/* CLAUDE, PLEASE — 像素风检查台。禁 emoji，全部反馈走文字与描边。 */
:root {
  --bg: #2e2825;
  --bg2: #3a322e;
  --paper: #d8cdb0;
  --paper-dark: #c4b898;
  --ink: #35302a;
  --red: #b03a2e;
  --blue: #35608c;
  --green: #4a7a4f;
  --line: #6b5f52;
  --warn: #d9a441;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: #e8e0d0;
  font-family: "Courier New", "PingFang SC", "Microsoft YaHei", monospace;
  letter-spacing: 0.02em;
}
#app { max-width: 1080px; margin: 0 auto; padding: 12px 16px 40px; }

.screen { display: none; min-height: 92vh; flex-direction: column; align-items: center; }
.screen.active { display: flex; }
.hidden { display: none !important; }

/* ---- 通用像素按钮 ---- */
.pixel-btn {
  font-family: inherit;
  font-size: 16px;
  padding: 10px 18px;
  background: #57493d;
  color: #f0e8d8;
  border: 2px solid #221c18;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.14), inset 0 -3px 0 rgba(0,0,0,.3), 2px 3px 0 #1a1512;
  cursor: pointer;
  user-select: none;
}
.pixel-btn:active { transform: translate(1px, 2px); box-shadow: inset 0 2px 0 rgba(0,0,0,.2); }
.pixel-btn.primary { background: var(--red); }
.pixel-btn.approve { background: var(--blue); min-width: 110px; }
.pixel-btn.deny { background: var(--red); min-width: 110px; }
.pixel-btn.small { font-size: 13px; padding: 6px 12px; }
.pixel-btn.active { outline: 3px solid var(--warn); outline-offset: 1px; background: #6b5a3a; }

/* ---- 标题页 ---- */
.slogan-row { width: 100%; display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
.slogan { background: #4a3f36; padding: 4px 10px; font-size: 13px; color: #cfc4ae; border: 1px solid #241e1a; }
.slogan.red { background: var(--red); color: #f5e9d8; }
.logo { margin-top: 9vh; font-size: clamp(40px, 8vw, 84px); letter-spacing: .08em; color: #f0e8d8; text-shadow: 4px 4px 0 #1a1512; }
.subtitle { margin-top: 10px; color: #bdb096; font-size: 17px; }
.lang-row { display: flex; gap: 14px; margin-top: 34px; }
.own-tz { margin-top: 22px; color: var(--warn); font-size: 14px; }
.title-actions { display: flex; gap: 14px; margin-top: 26px; align-items: center; }
.credit { margin-top: auto; padding-top: 40px; color: #7d7263; font-size: 12px; text-align: center; }
.credit .sponsored { color: #8a7f6a; text-decoration: underline; }

/* ---- 信 / 报纸 ---- */
.letter, .paper, .settle-card, .book, .slip {
  background: var(--paper);
  color: var(--ink);
  padding: 26px 30px;
  border: 3px solid #a89a7c;
  box-shadow: 6px 6px 0 #1a1512;
  max-width: 640px;
  width: 100%;
  margin-top: 6vh;
}
.letter p { margin: 10px 0; font-size: 16px; line-height: 1.7; }
.letter .glory { color: var(--red); font-weight: bold; }
.letter .sign { text-align: right; color: #6b6152; }
#screen-letter, #screen-briefing, #screen-settlement, #screen-demoend { justify-content: center; }
#screen-letter .pixel-btn, #screen-briefing .pixel-btn, #screen-settlement .pixel-btn, #screen-demoend .pixel-btn { margin: 26px 0 4vh; }

.paper { margin-top: 0; }
.paper h2 { text-align: center; font-size: 26px; letter-spacing: .18em; }
.paper .paper-en { text-align: center; font-size: 11px; color: #8a7f6a; letter-spacing: .3em; margin-bottom: 6px; }
.paper .paper-date { text-align: center; font-size: 12px; color: #8a7f6a; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.paper h3 { text-align: center; font-size: 22px; margin: 16px 0 4px; }
.paper .headline-sub { text-align: center; font-size: 13px; color: #6b6152; margin-bottom: 12px; }
.paper .newrule-box { border: 2px dashed var(--red); padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.paper .newrule-box b { color: var(--red); }
.paper .newsline { font-size: 13px; color: #55503f; margin: 6px 0; line-height: 1.6; }

/* ---- 检查台 ---- */
.topbar { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.newrule { background: var(--red); padding: 4px 10px; font-size: 13px; border: 1px solid #241e1a; }
.desk-grid { width: 100%; display: grid; grid-template-columns: 320px 1fr; gap: 18px; margin-top: 14px; flex: 1; }

.booth { display: flex; flex-direction: column; gap: 10px; }
.window { background: #241f1c; border: 3px solid #4a3f36; height: 210px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.window canvas { image-rendering: pixelated; }
.dialogue { background: #241f1c; border: 3px solid #4a3f36; min-height: 120px; padding: 10px 12px; font-size: 15px; line-height: 1.9; }
.dialogue p { opacity: 0; animation: fadeUp .28s ease forwards; }
.dialogue p.trap-found { color: var(--warn); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.clock { color: #8a7f6a; font-size: 12px; }

.desk { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.doc { background: var(--paper); color: var(--ink); border: 3px solid #a89a7c; box-shadow: 4px 4px 0 #1a1512; width: 320px; }
.doc.passport { min-height: 230px; position: relative; }
.passport-head { background: #8fa3c4; color: #1d2a3d; font-weight: bold; text-align: center; padding: 8px 6px; font-size: 15px; letter-spacing: .12em; }
.doc.passport.crayon .passport-head { background: transparent; color: var(--red); font-family: "Comic Sans MS", "Chalkboard SE", cursive; border-bottom: 2px dashed var(--red); letter-spacing: .2em; }
.passport-body { display: flex; gap: 12px; padding: 12px; }
.passport-body canvas { image-rendering: pixelated; border: 2px solid #8a7f6a; background: #c4b898; flex: none; }
.passport-rows { flex: 1; font-size: 13px; }
.passport-rows .row { display: flex; gap: 6px; margin: 3px 0; align-items: baseline; }
.passport-rows .k { color: #6b6152; font-size: 11px; width: 34px; flex: none; }
.mrz { border-top: 1px solid #8a7f6a; margin: 0 12px; padding: 6px 0 10px; font-size: 11px; letter-spacing: .14em; color: #4a4438; word-break: break-all; }
.doc.passport.crayon { background: #efe3c4; }
.doc.passport.crayon .passport-rows .k { color: #3f7a4a; }
.crayon-badge { margin: 0 12px 10px; font-size: 12px; color: #3f7a4a; border: 1px dashed #3f7a4a; display: inline-block; padding: 3px 8px; }

.device { position: relative; padding: 12px 14px; font-size: 14px; min-height: 200px; }
.device .dev-title { font-size: 11px; color: #6b6152; letter-spacing: .2em; margin-bottom: 8px; display: flex; justify-content: space-between; }
.device .row { display: flex; gap: 8px; margin: 7px 0; align-items: baseline; }
.device .k { color: #6b6152; font-size: 12px; width: 40px; flex: none; }
.payment .row, .xray .row { display: flex; gap: 8px; margin: 7px 0; align-items: baseline; }
.payment .k, .xray .k { color: #6b6152; font-size: 12px; width: 40px; flex: none; }
.moa-stamp { position: absolute; right: 10px; bottom: 8px; border: 2px solid var(--red); color: var(--red); font-size: 10px; padding: 3px 6px; transform: rotate(-8deg); opacity: .8; }

/* 可检查栏位 */
[data-field] { cursor: default; }
.inspect-on [data-field] { cursor: crosshair; }
[data-field].selected { outline: 3px solid var(--blue); outline-offset: 1px; }
[data-field].mismatch { outline: 3px solid var(--red); outline-offset: 1px; color: var(--red); font-weight: bold; }
.dialogue.inspect-on p { cursor: crosshair; }
.dialogue.inspect-on p:hover { background: rgba(176,58,46,.25); }

/* ---- 台面底栏 ---- */
.deskbar { width: 100%; display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.stamp-btns { display: flex; gap: 10px; }
.consequence { flex: 1; min-width: 200px; background: #241f1c; border: 2px solid #4a3f36; padding: 8px 12px; font-size: 14px; min-height: 42px; }
.consequence .tag-ok { color: #9fd0a4; }
.consequence .tag-bad { color: var(--warn); }
.tool-btns { display: flex; gap: 10px; }
.money { width: 100%; text-align: right; color: #8a7f6a; font-size: 13px; margin-top: 6px; }

/* ---- 结算 ---- */
.settle-card h2 { text-align: center; font-size: 22px; margin-bottom: 12px; }
.settle-card .srow { display: flex; justify-content: space-between; font-size: 15px; margin: 6px 0; }
.settle-card .srow.total { border-top: 2px solid var(--ink); padding-top: 8px; font-weight: bold; }
.settle-card .srow .neg { color: var(--red); }
.settle-card .family { margin-top: 14px; border-top: 1px dashed #8a7f6a; padding-top: 10px; font-size: 13px; color: #55503f; line-height: 1.8; }
.settle-card .warnline { color: var(--red); font-size: 13px; margin-top: 8px; }
.settle-card .tease { margin-top: 14px; font-size: 13px; color: #55503f; line-height: 1.7; }
.settle-card .credit-line { margin-top: 8px; font-size: 13px; color: #8a7f6a; }
.settle-card .glory-line { text-align: center; margin-top: 12px; color: var(--red); font-weight: bold; }

/* ---- 覆盖层 ---- */
.overlay { position: fixed; inset: 0; background: rgba(10, 8, 7, .72); display: flex; align-items: center; justify-content: center; z-index: 50; }
.book h2, .slip h2 { text-align: center; margin-bottom: 12px; letter-spacing: .14em; }
.book ul { list-style: none; }
.book li { font-size: 15px; margin: 10px 0; line-height: 1.6; }
.book li .badge-new { background: var(--red); color: #fff; font-size: 11px; padding: 2px 6px; margin-left: 8px; }
.book .tease { margin-top: 14px; font-size: 12px; color: #8a7f6a; }
.book .pixel-btn, .slip .pixel-btn { display: block; margin: 18px auto 0; }
.book.lie .q { font-size: 15px; margin: 10px 0; }
.book.lie .a { font-size: 16px; margin: 10px 0; color: #7a3f8c; font-weight: bold; opacity: 0; animation: fadeUp .3s .5s ease forwards; }
.book.lie .catch { font-size: 13px; color: var(--red); margin-top: 12px; border-top: 1px dashed #8a7f6a; padding-top: 10px; opacity: 0; animation: fadeUp .3s 1s ease forwards; }
.slip h2 { color: var(--red); }
.slip p { font-size: 15px; line-height: 1.7; }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 74px; transform: translateX(-50%);
  background: #1d1815; color: #f0e8d8; border: 2px solid var(--warn);
  padding: 10px 18px; font-size: 14px; z-index: 60; pointer-events: none;
  max-width: 80vw;
}
.toast.hidden { display: none; }

/* ---- 窄屏降级（P2 再做专项适配）---- */
@media (max-width: 900px) {
  .desk-grid { grid-template-columns: 1fr; }
  .doc { width: 100%; }
}

/* ---- P1：付款卡 / X 光卡 / 快检卡 / PROMPT 卡 / 过场 ---- */
.doc.payment { min-height: 130px; background: #d3ccb4; }
.doc.payment .bank-stamp { position: absolute; right: 10px; bottom: 8px; border: 2px solid #4a7a4f; color: #4a7a4f; font-size: 10px; padding: 3px 6px; transform: rotate(6deg); opacity: .7; }
.doc.xray { min-height: 120px; background: #cfd6c4; }
.xray-list { list-style: none; font-size: 14px; }
.xray-list li { margin: 7px 0; }
.xray-item { cursor: default; }
.inspect-on .xray-item { cursor: crosshair; }
.xray-item:hover { color: var(--red); }
.doc.quick { min-height: 150px; background: #ded5be; }
.quick-name { font-size: 20px; font-weight: bold; margin: 10px 0; letter-spacing: .08em; }
.quick-hint { font-size: 13px; color: #6b6152; }
.doc.prompt { background: #2b2723; color: #d8cdb0; border-color: #191512; }
.prompt-head { background: #b03a2e; color: #f5e9d8; text-align: center; padding: 8px 6px; font-size: 14px; letter-spacing: .18em; }
.prompt-body { padding: 16px 14px; font-size: 15px; line-height: 1.9; cursor: default; }
.inspect-on .prompt-body { cursor: crosshair; }
.prompt-foot { padding: 0 14px 14px; font-size: 12px; color: #8a7f6a; }
.photo-note { margin: 0 12px 10px; font-size: 12px; color: var(--red); border: 1px dashed var(--red); display: inline-block; padding: 3px 8px; cursor: default; }
.inspect-on .photo-note { cursor: crosshair; }
.passport-rows .row[data-field="passport.holders"] { color: var(--red); }

.chat { background: #241f1c; border: 3px solid #4a3f36; box-shadow: 6px 6px 0 #14100e; max-width: 620px; width: 92%; padding: 24px 26px; }
.chat h2 { color: #d8cdb0; text-align: center; margin-bottom: 16px; letter-spacing: .1em; font-size: 18px; }
.chat .bubble { opacity: 0; animation: fadeUp .35s ease forwards; color: #e8e0d0; font-size: 16px; line-height: 1.8; margin: 12px 0; padding: 10px 14px; background: #2f2a26; border-left: 3px solid var(--warn); }
.chat .bubble:last-of-type { border-left-color: var(--red); }
.chat .pixel-btn { display: block; margin: 20px auto 0; }

/* ---- P2：成就页 / 成就弹金Toast / 结算按钮组 ---- */
.toast.golden { border-color: #d8b24a; background: #3a2f16; color: #f0d896; }
.settle-actions { display: flex; gap: 12px; margin: 26px 0 4vh; align-items: center; }
.achv-book { max-height: 84vh; overflow: auto; }
#achv-list { list-style: none; }
.achv-item { display: flex; gap: 12px; align-items: center; padding: 10px 8px; border-bottom: 1px dashed #8a7f6a; }
.achv-item .achv-icon { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: #57493d; color: #cfc4ae; border: 2px solid #221c18; font-weight: bold; font-size: 14px; }
.achv-item.got .achv-icon { background: var(--warn); color: #241f1c; }
.achv-item b { font-size: 15px; display: block; }
.achv-item p { font-size: 12px; color: #6b6152; margin-top: 2px; }
.achv-item .achv-state { margin-left: auto; font-size: 12px; color: #8a7f6a; flex: none; }
.achv-item.got .achv-state { color: #4a7a4f; font-weight: bold; }

/* ---- P2：移动端专项 ---- */
body { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (max-width: 720px) {
  #app { padding: 8px 10px 32px; }
  .slogan { font-size: 11px; padding: 3px 6px; }
  .logo { margin-top: 4vh; }
  .lang-row { flex-direction: column; gap: 8px; width: 100%; }
  .lang-row .pixel-btn { width: 100%; }
  .title-actions { flex-wrap: wrap; justify-content: center; }
  .desk-grid { grid-template-columns: 1fr; gap: 10px; }
  .window { height: 150px; }
  .dialogue { min-height: 84px; font-size: 14px; }
  .doc { width: 100%; }
  .doc .row, .device .row, .payment .row, .xray .row { min-height: 34px; align-items: center; }
  .doc [data-field], .xray-item { padding: 4px 6px; margin: -4px -6px; display: inline-block; }
  .deskbar { gap: 8px; }
  .stamp-btns { flex: 1; }
  .stamp-btns .pixel-btn { flex: 1; min-width: 0; padding: 14px 8px; font-size: 17px; }
  .consequence { min-width: 100%; order: 3; }
  #btn-next { order: 4; width: 100%; padding: 14px 8px; font-size: 17px; }
  .tool-btns { order: 5; width: 100%; }
  .tool-btns .pixel-btn { flex: 1; padding: 12px 8px; }
  .paper, .settle-card, .book, .slip, .chat { margin-top: 3vh; padding: 18px 16px; }
  .book, .slip, .chat { max-height: 88vh; overflow: auto; }
  .overlay { padding: 10px; }
  .money { text-align: center; }
  .topbar { flex-wrap: wrap; }
  .newrule { order: 3; width: 100%; text-align: center; }
  .passport-body canvas { width: 52px; height: 66px; }
}
