:root {
  --paper: #f7f7f3;
  --paper-strong: #ffffff;
  --linen: #f1f1eb;
  --linen-dark: #e4e2da;
  --ink: #111111;
  --ink-soft: #2d2d2a;
  --muted: #6b6b66;
  --moss: #17372d;
  --moss-2: #1f493b;
  --sage: #64746a;
  --brand: #28d17c;
  --copper: #28d17c;
  --copper-soft: #86e8b8;
  --burgundy: #8c2f3f;
  --line: #e4e2da;
  --line-strong: #d9d7ce;
  --shadow: 0 24px 80px rgba(17, 17, 17, .1);
  --shadow-soft: 0 12px 36px rgba(17, 17, 17, .07);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: Inter, system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(40, 209, 124, .08), transparent 28%),
    linear-gradient(180deg, #fbfbf8 0%, var(--paper) 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

p {
  line-height: 1.78;
}

.app {
  min-height: 100vh;
  padding: 14px 14px 104px;
}

.layout {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.mark {
  width: 42px;
  height: 42px;
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, .06);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(17, 17, 17, .08);
}

.mark-core {
  position: absolute;
  left: 11px;
  top: 12px;
  width: 21px;
  height: 18px;
  border-radius: 14px 10px 10px 14px;
  background: var(--brand);
}

.mark-core:after {
  content: "";
  position: absolute;
  right: -7px;
  top: 0;
  width: 16px;
  height: 8px;
  transform: skewX(-28deg);
  background: var(--brand);
}

.mark-dot {
  position: absolute;
  right: 10px;
  bottom: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111;
}

.brand h1,
.title h1,
.serif {
  font-family: "Noto Serif SC", "Songti SC", serif;
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: .02em;
}

.brand p,
.muted {
  margin: 0;
  color: var(--muted);
}

.mobile-top {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: -14px -14px 14px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(17, 17, 17, .06);
  background: rgba(247, 247, 243, .86);
  backdrop-filter: blur(18px);
}

.compact-brand .mark {
  width: 36px;
  height: 36px;
  font-size: 16px;
}

.compact-brand h1 {
  font-size: 18px;
}

.pill {
  flex: 0 0 auto;
  border: 1px solid rgba(40, 209, 124, .22);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(40, 209, 124, .1);
  color: #0a7d43;
  font-size: 12px;
}

.title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin: 4px 0 18px;
}

.title-copy {
  min-width: 0;
}

.title-actions {
  flex: 0 0 auto;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--copper);
  font-weight: 700;
  text-transform: uppercase;
}

.title h1 {
  margin: 3px 0 0;
  font-size: clamp(34px, 6vw, 48px);
  line-height: 1.06;
  letter-spacing: -.02em;
}

.grid {
  display: grid;
  gap: 14px;
}

.two {
  grid-template-columns: 1fr;
}

.card {
  position: relative;
  border: 1px solid rgba(17, 17, 17, .07);
  border-radius: 24px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-soft);
}

.card:focus-within {
  border-color: rgba(154, 103, 65, .72);
}

.spaced {
  padding: 20px;
}

.field {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: #fff;
  padding: 10px 12px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.field:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(154, 103, 65, .12);
  background: #fffdf7;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.2;
  box-shadow: none;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(40, 209, 124, .6);
}

.primary,
.tab.active,
.btn.active {
  border-color: var(--moss);
  background: #111;
  color: #fff;
}

.btn.subtle {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.danger {
  border-color: rgba(112, 43, 57, .55);
  color: var(--burgundy);
}

.tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 0 0 8px;
  margin-bottom: 8px;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft, #f1f1eb);
  color: var(--ink-soft);
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.2;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.list {
  display: grid;
  gap: 14px;
}

.entry-card summary::-webkit-details-marker { display: none; }
.entry-card[open] summary { border-bottom: none; }
.entry-card summary:hover { background: rgba(197, 168, 106, .04); border-radius: 24px 24px 0 0; }

.line {
  border-top: 1px solid rgba(215, 202, 184, .9);
  padding: 15px 0;
}

.small {
  font-size: 12px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.report-summary-card {
  overflow: hidden;
}

.report-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.report-summary-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.report-summary-copy .muted {
  margin-top: 6px;
}

.report-action {
  flex: 0 0 auto;
  min-width: 190px;
  white-space: nowrap;
}

.editor {
  width: 100%;
  min-height: 420px;
  resize: vertical;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: 20px/1.85 "Noto Serif SC", "Songti SC", serif;
}

.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(64px, 1fr);
  gap: 2px;
  overflow-x: auto;
  border-top: 1px solid rgba(17, 17, 17, .08);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -18px 48px rgba(17, 17, 17, .08);
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav button,
.nav-side button {
  border: 0;
  background: transparent;
  color: var(--muted);
}

.nav button {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 52px;
  padding: 4px 2px;
  font-size: 11px;
  line-height: 1.1;
}

.nav-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--sage);
  font: 700 13px/1 "Noto Serif SC", "Songti SC", serif;
}

.nav .active .nav-mark {
  border-color: #111;
  background: #111;
  color: #fff;
}

.nav .active .nav-text {
  color: #111;
  font-weight: 700;
}

.side {
  display: none;
}

.desktop-only {
  display: none;
}

.dev-banner {
  margin: 0 0 16px;
  border: 1px solid rgba(105, 120, 100, .32);
  border-radius: 8px;
  background: rgba(242, 247, 237, .72);
  color: var(--moss);
  padding: 10px 12px;
  font-size: 12px;
}

.success,
.warning {
  border-radius: 8px;
  padding: 10px 12px;
}

.success {
  border: 1px solid rgba(105, 120, 100, .36);
  background: rgba(242, 247, 237, .82);
  color: var(--moss);
}

.warning {
  border: 1px solid rgba(154, 103, 65, .38);
  background: rgba(255, 247, 233, .82);
  color: var(--copper);
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e1d5c4;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--moss);
}

.source {
  width: 100%;
  padding: 16px;
  text-align: left;
}

.source.selected {
  border-color: rgba(25, 55, 45, .72);
  box-shadow: 0 0 0 3px rgba(25, 55, 45, .08), var(--shadow-soft);
}

.source-hit {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.report-chart {
  height: 230px;
  display: flex;
  align-items: end;
  gap: 10px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px;
}

.bar {
  position: relative;
  flex: 1;
  min-width: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--sage), var(--moss));
  color: #fff;
  font-size: 11px;
  padding-top: 6px;
}

.bar span {
  writing-mode: vertical-rl;
  opacity: .9;
}

.cloud span {
  display: inline-block;
  margin: 6px;
  color: var(--moss);
  font-family: "Noto Serif SC", "Songti SC", serif;
}

.pattern-input-panel {
  margin: 12px 0 16px;
  padding: 16px;
  border: 1px solid rgba(215, 202, 184, .9);
  border-radius: 8px;
  background: rgba(247, 239, 228, .52);
}

.range-field {
  min-height: 38px;
  padding: 6px;
  background: transparent;
}

.compact {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

.quick-picks {
  margin-top: 10px;
}

.today-grid {
  grid-template-columns: 1fr;
}

.writer-card {
  overflow: visible;
  background: #fff;
}

.writer-kicker {
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .16em;
}

.metadata-panel {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.metadata-panel summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.metadata-content {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.action-row .primary {
  min-width: 172px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 3px 0 0;
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.1;
}

.timeline-section {
  margin-top: 28px;
}

.insight-card {
  align-self: start;
  border-color: rgba(40, 209, 124, .16);
  background:
    radial-gradient(circle at 14% 0%, rgba(40, 209, 124, .18), transparent 34%),
    linear-gradient(145deg, #ffffff 0%, #f2fbf6 52%, #edf4f7 100%);
  color: var(--ink);
}

.insight-card .muted {
  color: #718178;
}

.insight-card .eyebrow {
  color: #12a968;
}

.insight-card .serif {
  color: var(--ink);
}

.insight-line {
  border-top: 1px solid rgba(23, 55, 45, .1);
  padding: 16px 0;
}

.insight-line p {
  margin: 5px 0 0;
  color: #2f3b35;
}

.insight-card .success,
.insight-card .warning {
  border-color: rgba(40, 209, 124, .18);
  background: rgba(255, 255, 255, .58);
  color: #577064;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.pattern-chain {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 10px 0;
}

.pattern-chain i {
  display: none;
  color: var(--copper);
  font-style: normal;
  text-align: center;
}

.chain-node {
  min-width: 0;
  border: 1px solid rgba(23, 55, 45, .1);
  border-radius: 18px;
  background: rgba(255, 255, 255, .62);
  padding: 12px;
  box-shadow: 0 10px 26px rgba(23, 55, 45, .06);
}

.chain-node span {
  display: block;
  margin-bottom: 5px;
  color: #12a968;
  font-size: 11px;
}

.chain-node b {
  display: block;
  line-height: 1.55;
  font-weight: 650;
  color: #26332d;
  word-break: break-word;
}

.trend-bars {
  min-height: 176px;
  display: flex;
  align-items: end;
  gap: 8px;
  margin: 12px 0;
  padding: 14px 10px 8px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trend-bar {
  flex: 1;
  min-width: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 5px;
}

.trend-bar span {
  width: 100%;
  max-width: 36px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--copper), var(--moss));
}

.trend-bar small {
  color: var(--muted);
  font-size: 11px;
}

.mini-plan {
  display: grid;
  gap: 8px;
}

.mini-plan p {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 9px;
  align-items: start;
  margin: 0;
}

.mini-plan span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--moss);
  color: var(--paper-strong);
  font-size: 12px;
}

.pattern-note {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.pattern-note span {
  display: block;
  margin-bottom: 6px;
  color: var(--copper);
  font-size: 12px;
}

.pattern-note p {
  margin: 0;
  line-height: 1.7;
}

.persona-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #c7b492;
  border-radius: 8px;
  background: linear-gradient(135deg, #183328 0%, #20342c 46%, #6d2635 100%);
  color: #f8efe1;
  padding: 22px;
  box-shadow: 0 22px 70px rgba(32, 52, 44, .22);
}

.persona-card:before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(245, 240, 232, .28);
  pointer-events: none;
}

.persona-card-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.persona-kicker {
  color: #d0b98e;
  font-size: 11px;
  letter-spacing: .18em;
}

.persona-card h2 {
  margin: 10px 0;
  font: 700 40px/1.05 "Noto Serif SC", "Songti SC", serif;
}

.persona-card p {
  line-height: 1.7;
}

.persona-seal {
  min-width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 240, 232, .45);
  border-radius: 50%;
  color: #ead8b8;
  font-family: "Noto Serif SC", "Songti SC", serif;
}

.persona-divider {
  height: 1px;
  margin: 18px 0;
  background: linear-gradient(90deg, transparent, #d0b98e, transparent);
}

.persona-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.persona-card-grid div {
  border: 1px solid rgba(245, 240, 232, .22);
  border-radius: 6px;
  background: rgba(255, 250, 241, .06);
  padding: 10px;
}

.persona-card-grid span,
.persona-section span,
.persona-columns span {
  display: block;
  margin-bottom: 6px;
  color: #d0b98e;
  font-size: 12px;
}

.persona-card-grid strong {
  font: 700 24px/1 "Noto Serif SC", "Songti SC", serif;
}

.persona-section {
  margin-top: 16px;
}

.persona-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.persona-tags i {
  border: 1px solid rgba(245, 240, 232, .26);
  border-radius: 999px;
  background: rgba(255, 250, 241, .08);
  padding: 5px 9px;
  font-style: normal;
}

.persona-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}

/* ── Premium Growth Card ───────────────────────────────── */
.social-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #0b1f15;
  color: #fffaf1;
  box-shadow: 0 48px 120px rgba(11, 31, 21, .55), 0 0 0 1px rgba(197, 168, 106, .18);
}

.sc-inner {
  position: relative;
  z-index: 1;
  padding: 36px;
}

/* subtle corner glow */
.social-card::before {
  content: "";
  position: absolute;
  top: -80px; right: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197,168,106,.12) 0%, transparent 70%);
  pointer-events: none;
}

/* header: brand + date */
.sc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 44px;
}

.sc-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .05em;
}

.sc-brand-dot {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: rgba(197,168,106,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}

.sc-period-pill {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #8ab099;
  border: 1px solid rgba(138,176,153,.3);
  border-radius: 100px;
  padding: 4px 12px;
}

/* rating hero */
.sc-rating-row {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  margin-bottom: 32px;
}

/* 三维度行 */
.sc-dimensions {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}
.sc-dim-item {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,250,241,.05);
  border: 1px solid rgba(197,168,106,.18);
  border-radius: 8px;
  padding: 6px 12px;
}
.sc-dim-label {
  font-size: .68rem;
  letter-spacing: .1em;
  color: #5a7a69;
  text-transform: uppercase;
}
.sc-dim-level {
  font: 700 1.05rem/1 "Noto Serif SC", Georgia, serif;
  color: #e8d5a0;
}
.sc-dim-pct {
  font-size: .72rem;
  color: #8ab099;
}

.sc-rating-letter {
  font: 900 96px/1 "Noto Serif SC", "Songti SC", Georgia, serif;
  color: #fffaf1;
  line-height: .85;
}

.sc-rating-meta {
  padding-bottom: 8px;
}

.sc-rating-pct {
  font-size: 13px;
  color: #c5a86a;
  letter-spacing: .04em;
  margin-bottom: 6px;
}

.sc-rating-pct strong {
  font: 700 28px/1 "Noto Serif SC", Georgia, serif;
  color: #e8d5a0;
}

.sc-rating-date {
  font-size: 11px;
  color: #5a7a69;
  letter-spacing: .1em;
}

/* section divider */
.sc-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  color: #5a7a69;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.sc-divider::before,
.sc-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,250,241,.08);
}

/* progress items */
.sc-progress-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,250,241,.05);
}

.sc-progress-num {
  font: 600 10px/1 "SF Mono", "Fira Code", monospace;
  color: #c5a86a;
  letter-spacing: .08em;
  padding-top: 3px;
}

.sc-progress-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #d4cdc5;
}

/* themes */
.sc-themes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0 24px;
}

.sc-theme-tag {
  font-size: 11px;
  color: #8ab099;
  border: 1px solid rgba(138,176,153,.25);
  border-radius: 100px;
  padding: 3px 10px;
  letter-spacing: .04em;
}

/* system comment */
.sc-comment {
  background: rgba(255,250,241,.04);
  border: 1px solid rgba(255,250,241,.07);
  border-radius: 10px;
  padding: 18px 20px;
  margin-top: 4px;
}

.sc-comment-label {
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #c5a86a;
  margin-bottom: 8px;
}

.sc-comment p {
  margin: 0;
  font: 400 14px/1.8 "Noto Serif SC", Georgia, serif;
  color: #e8e0d4;
}

/* footer */
.sc-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,250,241,.07);
  font-size: 10px;
  color: #3d6050;
  letter-spacing: .08em;
}

/* ── redesigned card: streak hero ── */
.sc-streak-block {
  text-align: center;
  padding: 28px 0 30px;
}
.sc-streak-eye {
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #5a7a69;
  margin-bottom: 6px;
}
.sc-streak-num {
  font: 900 4.8rem/1 "Noto Serif SC", Georgia, serif;
  color: #fffaf1;
  letter-spacing: -.02em;
}
.sc-streak-unit {
  font-size: .78rem;
  letter-spacing: .14em;
  color: #8ab099;
  margin-top: 6px;
}

/* thin divider line */
.sc-line {
  height: 1px;
  background: rgba(255,250,241,.08);
  margin: 4px 0;
}

/* mood section */
.sc-mood-block {
  padding: 22px 0 2px;
}
.sc-mood-label {
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #5a7a69;
  margin-bottom: 10px;
}
.sc-mood-word {
  font: 700 2.1rem/1 "Noto Serif SC", Georgia, serif;
  color: #e8d5a0;
}

/* poetic summary line */
.sc-poetry {
  padding: 14px 0 20px;
  font-style: italic;
  font-size: .9rem;
  color: rgba(255,250,241,.78);
  line-height: 1.8;
}

/* small rating badges */
.sc-badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0 2px;
}
.sc-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: rgba(255,250,241,.05);
  border: 1px solid rgba(197,168,106,.14);
  border-radius: 10px;
  padding: 8px 16px;
  min-width: 58px;
}
.sc-badge-label {
  font-size: .6rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #5a7a69;
}
.sc-badge-level {
  font: 700 1.05rem/1 "Noto Serif SC", Georgia, serif;
  color: #c5a86a;
}

.legal-panel {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.legal-panel summary {
  cursor: pointer;
  font-weight: 700;
}

.legal-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.8;
}

.persona-columns div {
  border-top: 1px solid rgba(245, 240, 232, .22);
  padding-top: 12px;
}

.persona-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  border-top: 1px solid rgba(245, 240, 232, .22);
  padding-top: 12px;
  color: #d9ccb7;
  font-size: 12px;
}

.persona-actions {
  margin-top: 12px;
}

.portrait-panel {
  margin-top: 16px;
  border: 1px solid #c7b492;
  border-radius: 8px;
  background: #20342c;
  color: #f8efe1;
  padding: 18px;
}

.portrait-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(245, 240, 232, .22);
  padding-bottom: 12px;
}

.portrait-head span {
  color: #d0b98e;
  font-size: 11px;
  letter-spacing: .16em;
}

.portrait-head h3 {
  margin: 6px 0 0;
  font: 700 28px/1.15 "Noto Serif SC", "Songti SC", serif;
}

.portrait-head strong {
  color: #ead8b8;
  font: 700 42px/1 "Noto Serif SC", "Songti SC", serif;
}

.portrait-panel .persona-card-grid {
  margin: 14px 0;
}

.portrait-panel .persona-card-grid strong {
  font-size: 18px;
}

.reference-grid {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

.reference-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.reference-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.reference-title {
  min-width: 0;
}

.reference-title h2 {
  margin: 0 0 6px;
  line-height: 1.12;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.reference-title p {
  margin: 0;
  line-height: 1.45;
}

.reference-reason {
  align-self: start;
  white-space: normal;
  line-height: 1.55;
}

.reference-badges {
  margin: 12px 0 4px;
}

.reference-badges .chip {
  border-color: #d0bea6;
  background: #f4eadc;
  color: var(--moss);
}

.reference-line {
  min-height: auto;
}

.reference-line p {
  margin: 8px 0 0;
  line-height: 1.7;
}

@media (min-width: 800px) {
  .app {
    padding: 28px 28px 34px 318px;
  }

  .mobile-top {
    display: none;
  }

  .side {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 30;
    display: block;
    width: 286px;
    border-right: 1px solid rgba(17, 17, 17, .07);
    background: rgba(255, 255, 255, .78);
    padding: 24px 18px;
    box-shadow: 16px 0 48px rgba(17, 17, 17, .05);
    backdrop-filter: blur(22px);
  }

  .desktop-only {
    display: block;
  }

  .side .brand {
    margin-bottom: 18px;
  }

  .side-status {
    margin: 18px 0;
    border: 1px solid rgba(17, 17, 17, .06);
    border-radius: 22px;
    background: #fff;
    padding: 14px;
  }

  .side-status span,
  .side-status small {
    display: block;
    color: var(--muted);
    font-size: 12px;
  }

  .side-status strong {
    display: block;
    margin: 8px 0 2px;
    font: 700 34px/1 "Noto Serif SC", "Songti SC", serif;
    color: var(--moss);
  }

  .nav-side {
    display: grid;
    gap: 4px;
  }

  .nav-side button {
    position: relative;
    display: grid;
    grid-template-columns: 34px 1fr 26px;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    border-radius: 16px;
    padding: 7px 9px;
    text-align: left;
  }

  .nav-side button:hover {
    background: rgba(17, 17, 17, .04);
    color: var(--ink);
  }

  .nav-side button.active {
    background: #111;
    color: #fff;
  }

  .nav-side button.active .nav-mark {
    border-color: rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .1);
    color: #fff;
  }

  .nav-side button.active .nav-rule {
    width: 18px;
    height: 1px;
    background: var(--brand);
  }

  .nav-side .nav-text {
    font-size: 14px;
    font-weight: 650;
  }

  .nav {
    display: none;
  }

  .two {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  }

  .today-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr);
    align-items: start;
    gap: 18px;
  }

  .spaced {
    padding: 22px;
  }

  .editor {
    min-height: 520px;
    font-size: 21px;
  }

  .persona-columns {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .report-summary-head {
    flex-direction: column;
    gap: 14px;
  }

  .report-action {
    width: 100%;
    min-width: 0;
  }
}

@media (min-width: 980px) {
  .reference-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reference-head {
    grid-template-columns: minmax(150px, .72fr) minmax(0, 1.28fr);
    gap: 16px;
  }

  .reference-line {
    min-height: 118px;
  }

  .pattern-chain {
    display: flex;
    align-items: stretch;
    gap: 6px;
  }

  .pattern-chain i {
    display: block;
    flex: 0 0 14px;
    padding-top: 42px;
  }

  .chain-node {
    flex: 1;
    min-height: 118px;
  }
}

@media (max-width: 520px) {
  .title {
    display: block;
  }

  .title-actions {
    margin-top: 10px;
  }

  .row {
    align-items: flex-start;
    flex-direction: column;
  }

  .row .chips {
    width: 100%;
  }

  .btn {
    min-width: 0;
  }

  .persona-card h2 {
    font-size: 34px;
  }

  .persona-card-grid {
    grid-template-columns: 1fr;
  }

  .sc-inner {
    padding: 24px;
  }

  .sc-rating-letter {
    font-size: 72px;
  }

  .sc-rating-pct strong {
    font-size: 22px;
  }
}
