:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --ink: #1d2522;
  --muted: #66736d;
  --line: #d9ded8;
  --accent: #276c5c;
  --accent-strong: #174c40;
  --warm: #b66b32;
  --danger: #a64036;
  --shadow: 0 18px 50px rgba(30, 48, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(1220px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.simple-shell {
  width: min(1120px, calc(100vw - 32px));
}

.simple-header {
  margin-bottom: 18px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
}

h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.subtitle {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
}

.daily-tip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  border: 1px solid #cfe1d8;
  border-radius: 8px;
  padding: 18px 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.daily-tip h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

.daily-tip p {
  line-height: 1.65;
}

.daily-tip-main p:last-child {
  margin-bottom: 0;
}

.daily-tip-scene {
  color: var(--accent-strong);
  font-weight: 700;
}

.daily-tip-side {
  display: grid;
  gap: 12px;
  justify-items: end;
  min-width: 220px;
}

.daily-tip-side span {
  color: var(--muted);
  font-size: 13px;
}

.tip-action {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  color: #ffffff;
  background: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.tip-action:hover {
  background: var(--accent-strong);
}

.badge {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-strong);
  background: #ecf3ef;
  font-size: 14px;
  font-weight: 700;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
}

.simple-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-panel {
  align-self: start;
  padding: 20px;
}

.composer {
  padding: 20px;
}

.composer label {
  display: block;
  margin-bottom: 10px;
  font-size: 17px;
}

.composer textarea {
  min-height: 210px;
  font-size: 16px;
  line-height: 1.75;
}

.actions {
  display: grid;
  grid-template-columns: 138px 1fr;
  gap: 10px;
  margin-top: 12px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

label {
  color: #34413c;
  font-size: 14px;
  font-weight: 700;
}

.hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd3cc;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fbfcfb;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(39, 108, 92, 0.14);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.primary {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 13px 16px;
  color: #ffffff;
  background: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.voice {
  border: 1px solid #cbd3cc;
  border-radius: 8px;
  padding: 13px 16px;
  color: var(--accent-strong);
  background: #eef5f1;
  cursor: pointer;
  font-weight: 800;
}

.voice:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.primary:hover {
  background: var(--accent-strong);
}

.result-panel {
  padding: 20px;
}

.result-head,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.risk {
  border-radius: 999px;
  padding: 7px 10px;
  color: #ffffff;
  background: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.risk.low {
  background: var(--accent);
}

.risk.medium {
  background: var(--warm);
}

.risk.high {
  background: var(--danger);
}

.section-card {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfb;
}

.match-card p {
  margin-bottom: 0;
  color: var(--accent-strong);
  font-weight: 800;
  line-height: 1.7;
}

.frame-card {
  background: #f7faf8;
}

.frame-summary {
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.frame-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.frame-step {
  min-height: 124px;
  border: 1px solid #dfe6df;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.frame-step strong {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent-strong);
}

.frame-step p {
  margin-bottom: 0;
  color: #3d4a45;
  font-size: 14px;
  line-height: 1.65;
}

.methods-list {
  display: grid;
  gap: 10px;
}

.method-note {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.method-path {
  margin-bottom: 12px;
  border-left: 4px solid var(--accent);
  padding: 10px 12px;
  color: #34413c;
  background: #f1f5f2;
  line-height: 1.7;
}

.method-item {
  border: 1px solid #dfe6df;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.method-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-strong);
}

.method-item p {
  margin-bottom: 8px;
  color: #3d4a45;
  line-height: 1.65;
}

.method-item small {
  color: var(--muted);
  line-height: 1.6;
}

.copy {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 10px;
  color: var(--accent-strong);
  background: #eef5f1;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.copy:hover {
  border-color: var(--accent);
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #24312c;
  font-family: inherit;
  line-height: 1.75;
}

ul {
  margin: 0;
  padding-left: 20px;
  color: #24312c;
  line-height: 1.75;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.note {
  margin-top: 14px;
  border-left: 4px solid var(--accent);
  padding: 12px 14px;
  color: #485650;
  background: #f1f5f2;
  line-height: 1.7;
}

@media (max-width: 880px) {
  .topbar,
  .result-head {
    align-items: start;
    flex-direction: column;
  }

  .workspace,
  .simple-layout,
  .daily-tip,
  .split,
  .frame-grid,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .daily-tip-side {
    justify-items: stretch;
    min-width: 0;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100vw - 20px, 760px);
    padding-top: 16px;
  }
}
