:root { --ink:#1f2d2a; --muted:#60716b; --forest:#176b5b; --forest-dark:#173f37; --rust:#b95738; --gold:#e2b34e; --paper:#fffaf0; --line:rgba(31,45,42,.18); --shadow:0 18px 52px rgba(41,63,56,.16); }
* { box-sizing:border-box; }
html { min-width:0; background:#e5eadc; color:var(--ink); font-family:"Noto Serif TC","Microsoft JhengHei",serif; }
body { margin:0; min-width:0; min-height:100vh; background:linear-gradient(90deg,rgba(23,107,91,.05) 1px,transparent 1px),linear-gradient(rgba(23,107,91,.05) 1px,transparent 1px),radial-gradient(circle at 85% 8%,rgba(226,179,78,.28),transparent 25%),linear-gradient(150deg,#eef3e5 0%,#f7edda 52%,#dce9df 100%); background-size:32px 32px,32px 32px,auto,auto; }
button,select,textarea,a { font:inherit; } button { touch-action:manipulation; }
.topbar { min-height:64px; padding:12px clamp(16px,4vw,58px); display:flex; align-items:center; justify-content:space-between; gap:16px; background:var(--forest-dark); color:#fffdf2; border-bottom:4px solid var(--gold); }
.topbar a { color:inherit; text-decoration:none; font-weight:900; } .topbar nav { display:flex; align-items:center; gap:15px; } .brand { letter-spacing:.1em; }
main { width:min(1200px,calc(100% - 32px)); margin:0 auto; padding:30px 0 54px; }
.hero { position:relative; overflow:hidden; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:28px; align-items:center; padding:clamp(28px,5vw,58px); border:1px solid rgba(23,107,91,.28); border-radius:32px 32px 92px 32px; background:rgba(255,250,240,.92); box-shadow:var(--shadow); }
.hero::before { content:"CASE FILE 06"; position:absolute; right:-25px; top:25px; color:rgba(185,87,56,.1); font:900 clamp(2rem,6vw,5rem)/1 Georgia,serif; transform:rotate(8deg); }
.eyebrow { margin:0 0 8px; color:var(--rust); font-weight:900; letter-spacing:.12em; text-transform:uppercase; }
h1 { position:relative; margin:0; max-width:760px; font-size:clamp(2.5rem,7vw,6.1rem); line-height:.98; letter-spacing:-.055em; }
.hero p:not(.eyebrow) { position:relative; max-width:760px; margin:20px 0 0; line-height:1.85; font-weight:700; }
.hero-actions { position:relative; display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.guild-seal { position:relative; z-index:1; width:158px; height:158px; display:grid; place-items:center; border:9px double #f4d88e; border-radius:50%; background:var(--forest-dark); color:#fff5c7; text-align:center; box-shadow:0 20px 40px rgba(23,63,55,.24); transform:rotate(4deg); }
.guild-seal span { position:absolute; top:8px; font-size:1.5rem; color:var(--gold); } .guild-seal b { font-size:1.35rem; line-height:1.2; letter-spacing:.14em; }
.primary,.paper-button,.reset-zone button,.dialog-head button { min-height:48px; padding:10px 17px; border-radius:13px; border:1px solid transparent; cursor:pointer; font-weight:900; }
.primary { background:var(--forest); color:white; box-shadow:0 7px 18px rgba(23,107,91,.22); } .paper-button { border-color:var(--line); background:#fffdf7; color:var(--ink); } button:disabled { opacity:.45; cursor:not-allowed; }
.progress-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:18px 0; }
.progress-strip article { min-width:0; padding:18px; border-radius:18px; background:var(--forest-dark); color:white; text-align:center; }
.progress-strip strong { display:block; color:#f8d77c; font:900 1.75rem/1 "Microsoft JhengHei",sans-serif; } .progress-strip span { display:block; margin-top:7px; font-size:.84rem; opacity:.84; }
.case-layout { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(300px,.6fr); gap:18px; align-items:start; }
.case-card,.side-column>section { min-width:0; border:1px solid var(--line); background:rgba(255,250,240,.95); box-shadow:var(--shadow); }
.case-card { padding:clamp(20px,4vw,38px); border-radius:28px; } .case-heading { display:flex; justify-content:space-between; gap:14px; align-items:start; }
.case-heading h2 { margin:4px 0 0; font-size:clamp(1.45rem,3vw,2.2rem); } .kind-label { margin:0; color:var(--forest); font-weight:900; }
.difficulty { flex:0 0 auto; padding:7px 11px; border-radius:999px; background:#dceee4; color:#155647; font-weight:900; font-size:.82rem; } .difficulty[data-level="challenge"] { background:#ffe1cf; color:#8f3e28; }
.stage-track { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:24px 0; padding:0; list-style:none; }
.stage-track li { min-width:0; padding:11px 8px; border-radius:14px; background:#ece9dc; color:#716f66; font-weight:900; text-align:center; font-size:.85rem; }
.stage-track span { display:inline-grid; width:25px; height:25px; margin-right:5px; place-items:center; border-radius:50%; background:#d1cec3; }
.stage-track li.active { background:#f6d786; color:#493711; box-shadow:inset 0 0 0 2px #d4a32d; } .stage-track li.done { background:#dceee4; color:#165647; } .stage-track li.done span { background:var(--forest); color:white; }
.prompt { margin:22px 0; padding:20px; border-left:6px solid var(--rust); background:#fffdf8; font-size:clamp(1.08rem,2vw,1.28rem); line-height:1.85; font-weight:750; }
.reasoning-box { padding:clamp(18px,3vw,28px); border-radius:22px; background:#edf2e8; border:1px solid rgba(23,107,91,.2); }
.stage-kicker { margin:0; color:var(--rust); font-weight:900; letter-spacing:.08em; } .reasoning-box h3 { margin:6px 0 8px; font-size:clamp(1.2rem,2.4vw,1.6rem); } .reasoning-box>p:last-of-type { margin:0; color:var(--muted); line-height:1.7; }
.stage-options { display:grid; gap:10px; margin-top:18px; }
.stage-option { min-width:0; min-height:62px; display:grid; grid-template-columns:36px minmax(0,1fr); gap:10px; align-items:center; padding:12px; border:2px solid rgba(23,107,91,.22); border-radius:15px; background:#fffef9; color:var(--ink); text-align:left; cursor:pointer; }
.stage-option>span { display:grid; width:32px; height:32px; place-items:center; border-radius:50%; background:#e6e3d8; color:#655d4d; } .stage-option>b { line-height:1.55; overflow-wrap:anywhere; }
.stage-option:hover,.stage-option.selected { border-color:var(--forest); background:#e2f2e9; transform:translateY(-1px); } .stage-option.selected>span { background:var(--forest); color:white; } .completed-file { display:block; width:100%; text-align:center; font-weight:900; }
.actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.mode-control,.hint-choice { display:flex; align-items:center; gap:8px; color:var(--muted); font-weight:900; }
.mode-control select,.hint-choice select { min-height:44px; padding:8px 30px 8px 10px; border:1px solid rgba(23,107,91,.35); border-radius:11px; background:#fffef9; color:var(--ink); font-weight:800; }
.stage-track[hidden] { display:none; }
.feedback,.hint-panel { margin-top:15px; padding:15px 17px; border-radius:14px; line-height:1.72; font-weight:700; } .feedback:empty { display:none; } .feedback.success { background:#dcf0df; border-left:5px solid #3c8a51; } .feedback.retry { background:#fff0d7; border-left:5px solid #c88426; } .hint-panel { background:#e5eef1; border-left:5px solid #4d7d8b; }
.trace-card { margin-top:18px; padding:18px; border-radius:20px; background:#fffdf7; border:1px dashed rgba(31,45,42,.25); }
.section-title { display:flex; align-items:baseline; justify-content:space-between; gap:12px; } .section-title h2,.section-title h3 { margin:0; } .section-title span { color:var(--muted); font-size:.8rem; font-weight:800; }
.timeline { position:relative; display:grid; gap:10px; margin:16px 0 0; padding:0; list-style:none; }
.timeline li { position:relative; padding:12px 14px 12px 42px; border-radius:13px; background:#f1eee3; } .timeline li::before { content:"·"; position:absolute; left:13px; top:10px; display:grid; width:22px; height:22px; place-items:center; border-radius:50%; background:#8d8a80; color:white; font-weight:900; }
.timeline li.right::before { content:"✓"; background:var(--forest); } .timeline li.wrong::before { content:"↺"; background:#c67832; } .timeline li.hint::before { content:"?"; background:#4d7d8b; }
.timeline strong,.timeline span { display:block; line-height:1.55; overflow-wrap:anywhere; } .timeline span { margin-top:3px; color:var(--muted); font-size:.9rem; } .timeline .empty { padding-left:14px; color:var(--muted); } .timeline .empty::before { display:none; }
.side-column { min-width:0; display:grid; grid-template-columns:minmax(0,1fr); gap:14px; } .side-column>section { padding:20px; border-radius:22px; } .side-column h2 { margin:0 0 10px; font-size:1.25rem; } .side-column p { color:var(--muted); line-height:1.65; }
.artifact-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; } .artifact { min-width:0; padding:10px 7px; border-radius:13px; background:#e9e5da; color:#817c70; text-align:center; } .artifact span,.artifact b,.artifact small { display:block; margin-top:4px; overflow-wrap:anywhere; } .artifact b { font-size:.78rem; } .artifact small { font-size:.68rem; } .artifact.unlocked { background:#f5d886; color:#4a3915; box-shadow:inset 0 0 0 2px #d4a32d; }
.archive-list { max-height:370px; display:grid; gap:8px; overflow:auto; padding-right:3px; } .archive-list button { min-width:0; padding:11px; border:1px solid var(--line); border-radius:12px; background:#fffdf8; color:var(--ink); text-align:left; cursor:pointer; } .archive-list strong,.archive-list span { display:block; overflow-wrap:anywhere; } .archive-list span { margin-top:4px; color:var(--muted); font-size:.78rem; } .archive-empty { padding:13px; border-radius:12px; background:#f0ede3; } .privacy-card { border-left:5px solid var(--rust)!important; }
.energy-host { min-width:0; margin-top:18px; overflow:hidden; } .reset-zone { margin-top:36px; padding-top:20px; border-top:1px dashed var(--line); text-align:center; } .reset-zone button { border-color:var(--line); background:rgba(255,250,240,.72); color:var(--muted); }
.case-dialog { width:min(860px,calc(100% - 24px)); max-height:90vh; padding:0; border:1px solid var(--line); border-radius:24px; background:var(--paper); color:var(--ink); box-shadow:0 28px 80px rgba(20,39,34,.32); overflow:auto; } .case-dialog::backdrop { background:rgba(18,34,30,.68); backdrop-filter:blur(3px); }
.dialog-head { position:sticky; top:0; z-index:2; display:flex; justify-content:space-between; gap:14px; align-items:start; padding:20px 24px; background:var(--forest-dark); color:white; } .dialog-head h2 { margin:0; } .dialog-head .eyebrow { color:#f5d886; } .dialog-head button { border-color:rgba(255,255,255,.35); background:transparent; color:white; }
#dialog-content,.comment-editor { padding:22px 24px; } .dialog-prompt { padding:17px; border-left:5px solid var(--rust); background:#fffdf8; line-height:1.75; font-weight:750; }
.reasoning-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin:16px 0 22px; } .reasoning-summary article { min-width:0; padding:12px; border-radius:12px; background:#e8f0e8; } .reasoning-summary span,.reasoning-summary b { display:block; overflow-wrap:anywhere; } .reasoning-summary span { color:var(--muted); font-size:.76rem; } .reasoning-summary b { margin-top:5px; line-height:1.5; }
.solution { margin-top:20px; padding:18px; border-radius:16px; background:#fff0cf; border:1px solid #e6c56f; } .solution h3 { margin-top:0; } .solution p { margin-bottom:0; line-height:1.75; }
.comment-editor { border-top:1px solid var(--line); background:#f3eddf; } .comment-form { display:grid; grid-template-columns:minmax(150px,.35fr) minmax(0,1fr); gap:12px; align-items:end; } .comment-form label { display:grid; gap:6px; color:var(--muted); font-size:.82rem; font-weight:900; } .comment-form select,.comment-form textarea { width:100%; padding:10px; border:1px solid var(--line); border-radius:10px; background:white; color:var(--ink); } .comment-form button { grid-column:2; justify-self:start; } .local-note { color:var(--muted); font-size:.78rem; line-height:1.55; }
.comment-list { display:grid; gap:9px; margin-top:14px; } .comment-list article { padding:12px; border-radius:12px; background:#fffdf8; } .comment-list article>div { display:flex; justify-content:space-between; gap:12px; } .comment-list time { color:var(--muted); font-size:.75rem; } .comment-list p { margin:8px 0 0; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; } .empty-comments { color:var(--muted); }
@media (max-width:850px) { main { width:min(100% - 20px,700px); padding-top:16px; } .hero { grid-template-columns:minmax(0,1fr); border-radius:24px 24px 58px 24px; } .guild-seal { width:110px; height:110px; justify-self:end; } .progress-strip { grid-template-columns:repeat(2,minmax(0,1fr)); } .case-layout { grid-template-columns:minmax(0,1fr); } .side-column { grid-template-columns:minmax(0,1fr); } }
@media (max-width:540px) { .topbar { padding:10px 13px; } .topbar nav { font-size:.82rem; } .hero { padding:24px 18px; } .guild-seal { display:none; } .hero-actions,.actions { display:grid; grid-template-columns:minmax(0,1fr); } .hero-actions button,.actions button { width:100%; } .progress-strip { gap:7px; } .progress-strip article { padding:13px 7px; } .case-card { padding:19px 14px; border-radius:20px; } .case-heading { display:grid; } .difficulty { justify-self:start; } .stage-track li { padding:9px 3px; font-size:.72rem; } .stage-track span { display:grid; margin:0 auto 4px; } .prompt { padding:15px; } .reasoning-summary,.comment-form { grid-template-columns:minmax(0,1fr); } .comment-form button { grid-column:1; width:100%; } #dialog-content,.comment-editor { padding:18px 14px; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; animation-iteration-count:1!important; scroll-behavior:auto!important; } }
