:root {
  --canvas: #f4efe7;
  --surface: #fbf9f4;
  --ink: #1c2523;
  --muted: #65706b;
  --faint: #9aa19b;
  --line: #d7d2c8;
  --accent: #ee6848;
  --accent-dark: #c54d32;
  --signal: #d9e9d6;
  --radius: 6px;
  --shadow: 0 18px 42px rgba(31, 38, 34, .08);
  --max: 1180px;
  --ease: cubic-bezier(.2,.75,.25,1);
}

* { box-sizing: border-box; }
html { background: var(--canvas); color: var(--ink); }
body {
  margin: 0;
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.6;
  background:
    linear-gradient(rgba(28,37,35,.035) 1px, transparent 1px),
    var(--canvas);
  background-size: 100% 32px;
}
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.shell { width: min(var(--max), calc(100% - 64px)); margin-inline: auto; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 86px; border-bottom: 1px solid var(--line);
}
.wordmark { display: inline-flex; gap: 13px; align-items: center; text-decoration: none; }
.wordmark strong { display: block; font-size: 15px; letter-spacing: .08em; }
.wordmark small { display: block; color: var(--muted); font: 10px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .16em; }
.mark { display: grid; place-items: center; width: 35px; height: 35px; color: var(--surface); background: var(--ink); font: 11px ui-monospace, monospace; }
.topbar-meta, .hint, .microcopy { color: var(--muted); font-size: 12px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #76a76e; }

.hero { display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(40px, 8vw, 120px); align-items: end; padding: 90px 0 78px; }
.eyebrow, .panel-kicker, .strip-label { margin: 0 0 16px; color: var(--accent-dark); font: 11px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .14em; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 690px; margin-bottom: 24px; font-size: clamp(39px, 5.3vw, 72px); line-height: 1.08; letter-spacing: -.045em; font-weight: 800; }
h2 { margin-bottom: 0; font-size: clamp(27px, 3vw, 40px); letter-spacing: -.04em; line-height: 1.2; }
.lede { max-width: 610px; color: var(--muted); font-size: 16px; line-height: 1.9; }
.hero-notes { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 37px; color: var(--muted); font-size: 12px; }
.hero-notes span { display: flex; gap: 8px; align-items: center; }
.hero-notes b { color: var(--ink); font: 11px ui-monospace, monospace; }

.capture-panel { padding: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.panel-kicker { display: flex; justify-content: space-between; margin-bottom: 24px; }
.panel-kicker span:last-child { color: var(--muted); letter-spacing: .03em; }
label { display: block; margin-bottom: 9px; color: var(--ink); font-size: 13px; font-weight: 700; }
textarea, input { width: 100%; color: var(--ink); background: #f5f2ec; border: 1px solid var(--line); border-radius: var(--radius); outline: none; transition: border-color .2s var(--ease), background .2s var(--ease); }
textarea { min-height: 148px; padding: 14px; resize: vertical; line-height: 1.7; }
input { padding: 12px 13px; }
textarea:focus, input:focus { background: #fffdf8; border-color: var(--ink); }
.form-foot { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-top: 17px; }
.hint { max-width: 230px; line-height: 1.55; }
.button { min-height: 43px; padding: 9px 17px; border: 1px solid var(--ink); border-radius: var(--radius); font-size: 13px; font-weight: 700; transition: transform .2s var(--ease), background .2s var(--ease), opacity .2s var(--ease); }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:focus-visible { outline: 3px solid rgba(238,104,72,.35); outline-offset: 3px; }
.button:disabled { cursor: not-allowed; opacity: .4; }
.button-primary { color: #fffaf4; background: var(--accent); border-color: var(--accent); }
.button-primary:hover:not(:disabled) { background: var(--accent-dark); }
.button-secondary { color: var(--ink); background: transparent; }
.button-secondary:hover:not(:disabled) { background: var(--signal); }

.signal-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.signal-strip > div { min-height: 86px; padding: 17px 20px 16px 0; border-right: 1px solid var(--line); }
.signal-strip > div:not(:first-child) { padding-left: 20px; }
.signal-strip > div:last-child { border-right: 0; }
.strip-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.signal-strip strong { font-size: 15px; }

.results-section { padding: 94px 0 100px; }
.section-heading { display: flex; justify-content: space-between; gap: 40px; align-items: end; padding-bottom: 28px; border-bottom: 1px solid var(--ink); }
.section-heading .eyebrow { margin-bottom: 13px; }
.section-aside { max-width: 340px; margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.message { min-height: 25px; padding: 14px 0 0; color: var(--accent-dark); font-size: 13px; }
.message:empty { display: none; }
.results-list { border-bottom: 1px solid var(--line); }
.empty-state { display: flex; align-items: center; gap: 20px; padding: 52px 0; color: var(--muted); }
.empty-state strong { color: var(--ink); }
.empty-state p { margin: 4px 0 0; font-size: 13px; }
.empty-number { color: var(--accent); font: 28px ui-monospace, monospace; }
.result-row { display: grid; grid-template-columns: 142px 1fr auto; gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); animation: rise .35s var(--ease) both; }
.cover-wrap { width: 142px; height: 98px; overflow: hidden; background: #e5dfd4; }
.cover-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-fallback { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font: 10px ui-monospace, monospace; letter-spacing: .12em; }
.result-main { min-width: 0; }
.result-id { display: inline-block; margin-bottom: 7px; color: var(--accent-dark); font: 11px ui-monospace, monospace; }
.result-title { margin: 0 0 6px; font-size: 19px; line-height: 1.45; overflow-wrap: anywhere; }
.creator { margin: 0 0 13px; color: var(--muted); font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 7px; color: var(--muted); background: #e9eee7; border-radius: 3px; font-size: 11px; }
.metrics { display: flex; flex-wrap: wrap; justify-content: end; align-content: start; gap: 5px 15px; max-width: 250px; padding-top: 2px; color: var(--muted); font: 11px ui-monospace, monospace; text-align: right; }
.metric strong { display: block; color: var(--ink); font-size: 13px; font-weight: 600; }
.result-detail { grid-column: 2 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 15px 30px; padding-top: 14px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 12px; }
.result-detail dt { margin-bottom: 3px; color: var(--faint); font: 10px ui-monospace, monospace; letter-spacing: .08em; }
.result-detail dd { margin: 0; line-height: 1.7; overflow-wrap: anywhere; }
.result-detail a { color: var(--accent-dark); }

.sheet-section { display: grid; grid-template-columns: 1fr .9fr; gap: clamp(40px, 10vw, 150px); padding: 80px 0 92px; border-top: 1px solid var(--line); }
.sheet-copy h2 { margin-bottom: 20px; }
.sheet-copy > p:not(.eyebrow):not(.microcopy) { max-width: 470px; color: var(--muted); line-height: 1.9; font-size: 14px; }
.sheet-rule { width: 80px; height: 4px; margin: 31px 0 20px; background: var(--accent); }
.microcopy { max-width: 410px; line-height: 1.7; }
.sheet-form { align-self: center; padding: 24px; background: var(--surface); border-top: 4px solid var(--ink); box-shadow: var(--shadow); }
.sheet-form label:not(:first-child) { margin-top: 18px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 22px; }
.sheet-actions .button { flex: 1; }
.form-status { min-height: 22px; margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.footer { display: flex; justify-content: space-between; padding: 21px 0 28px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
.footer a { color: var(--ink); text-decoration: none; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 820px) {
  .shell { width: min(var(--max), calc(100% - 36px)); }
  .hero, .sheet-section { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding: 60px 0 56px; }
  .signal-strip { grid-template-columns: repeat(2, 1fr); }
  .signal-strip > div:nth-child(2) { border-right: 0; }
  .signal-strip > div:nth-child(3), .signal-strip > div:nth-child(4) { border-top: 1px solid var(--line); }
  .signal-strip > div:nth-child(3) { padding-left: 0; }
  .section-heading { align-items: start; flex-direction: column; gap: 17px; }
  .result-row { grid-template-columns: 96px 1fr; gap: 16px; }
  .cover-wrap { width: 96px; height: 78px; }
  .metrics { grid-column: 2; justify-content: start; max-width: none; text-align: left; }
  .result-detail { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .topbar-meta { display: none; }
  h1 { font-size: 40px; }
  .form-foot, .sheet-actions { align-items: stretch; flex-direction: column; }
  .hint { max-width: none; }
  .button { width: 100%; }
  .result-row { grid-template-columns: 1fr; }
  .cover-wrap { width: 100%; height: 170px; }
  .metrics { grid-column: 1; }
  .result-detail { grid-template-columns: 1fr; }
}
