/* =========================================================
 *  야간 당직실 (NIGHT SCHOOL) — 2003 한국 고등학교 당직실 스타일
 * ========================================================= */
:root {
  --ink: #0b100e;
  --slate: #131c19;
  --chalk: #192b22;
  --steel: #252d30;
  --paper: #ebe5d3;
  --paper-dark: #d7cfb8;
  --seal-pass: #1b5e3a;
  --seal-check: #b45309;
  --seal-deny: #b8292f;
  --crt: #4ade80;
  --crt-dim: #1e6b43;
  --amber: #e69d45;
  --fluo: #b8e3c8;
  --text-dark: #1d2220;
  --f-display: 'Noto Sans KR', 'Gowun Batang', sans-serif;
  --f-body: 'Noto Sans KR', 'Gowun Batang', sans-serif;
  --f-doc: 'Noto Serif KR', 'Gowun Batang', serif;
  --f-mono: 'IBM Plex Mono', monospace;

  --paper-noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 0.25 0 0 0 0 0.23 0 0 0 0 0.18 0 0 0 0.09 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; background: var(--ink); color: var(--paper);
  font-family: var(--f-body); overflow: hidden; overscroll-behavior: none;
}
button { font-family: inherit; cursor: pointer; }
b { font-weight: 700; }

#app { position: relative; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; }
#app.large-text { font-size: 17px; }
#app.large-text .doc .lbl { font-size: .88rem; }
#app.large-text .doc .val { font-size: 1.06rem; }
#app.large-text .doc .doc-title { font-size: 1.18rem; }
#app.large-text .reg-table { font-size: .92rem; }
#app.large-text .rules-list { font-size: .96rem; line-height: 1.6; }
#app.large-text .speech-text { font-size: 1.04rem; line-height: 1.65; }
#app.large-text .tool-btn,
#app.large-text .q-chip,
#app.large-text .desk-tab,
#app.large-text .con-tab,
#app.large-text .cctv-btn { font-size: .94rem; }
#app.large-text .cctv-log { font-size: .88rem; }
#app.no-flicker * { animation-name: none !important; }
#app.no-shake .shake, #app.no-shake.quake { animation: none !important; }

.screen { position: absolute; inset: 0; display: none; }
.screen.active { display: flex; animation: screenIn .45s ease; }
@keyframes screenIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 공통: 2003 학교 공문서/출석부 용지 ---------- */
.school-paper {
  background-color: var(--paper);
  background-image: var(--paper-noise), linear-gradient(180deg, rgba(255,255,255,.35), rgba(0,0,0,.04));
  color: var(--text-dark);
}

/* ---------- 버튼 ---------- */
.btn {
  appearance: none; border: 1px solid rgba(184, 227, 200, .28);
  background: rgba(19, 28, 25, .86); color: var(--paper);
  padding: .72em 1.3em; font-size: .96rem; border-radius: 4px;
  letter-spacing: .04em; transition: transform .12s, background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover:not(:disabled) {
  background: rgba(74, 222, 128, .14); border-color: var(--crt);
  box-shadow: 0 0 16px rgba(74, 222, 128, .22);
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .35; cursor: default; }
.btn.primary {
  background: linear-gradient(180deg, #b8292f, #86191e);
  border-color: #df5b60; color: #fff8ed;
  box-shadow: 0 4px 0 #4d0d10, 0 8px 22px rgba(184, 41, 47, .35);
}
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, #cf353b, #9b1e24); }
.btn.ghost { background: rgba(11, 16, 14, .45); }
.btn.big { font-size: 1.08rem; padding: .88em 1.9em; }
.btn.small { font-size: .8rem; padding: .45em .8em; }
.btn small { opacity: .75; font-size: .8em; }

.icon-btn {
  background: rgba(19, 28, 25, .75); border: 1px solid rgba(184, 227, 200, .24);
  color: var(--paper); width: 32px; height: 32px; border-radius: 6px;
  font-size: 14px; display: inline-grid; place-items: center; padding: 0;
  position: relative;
}
.icon-btn:hover { border-color: var(--crt); }
.icon-btn.off { opacity: .42; }
.icon-btn.alert {
  border-color: var(--seal-deny); background: rgba(184, 41, 47, .3);
  animation: pulseAlert 1s infinite;
}
@keyframes pulseAlert { 0%,100% { box-shadow: 0 0 0 0 rgba(184,41,47,.6); } 50% { box-shadow: 0 0 0 6px rgba(184,41,47,0); } }

/* ---------- CRT 스캔라인 & 형광등 ---------- */
.crt-scanlines {
  position: absolute; inset: 0; pointer-events: none; z-index: 4;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px);
  opacity: .55;
}
.fluorescent-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(184, 227, 200, .18), transparent 62%);
  animation: fluoFlicker 7s infinite;
}
@keyframes fluoFlicker {
  0%, 92%, 96%, 100% { opacity: 1; }
  93% { opacity: .45; }
  95% { opacity: .85; }
}

/* ---------- 타이틀 화면 ---------- */
#screen-title { align-items: center; justify-content: center; overflow-y: auto; }
.school-sky {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 15%, #192b22 0%, #0e1613 48%, #070a09 100%);
  overflow: hidden;
}
#screen-title.has-img .school-sky {
  background: linear-gradient(180deg, rgba(7, 10, 9, .55), rgba(7, 10, 9, .72) 55%, rgba(7, 10, 9, .94)), var(--title-img) center / cover no-repeat;
}
.rain-overlay {
  position: absolute; inset: 0; pointer-events: none; opacity: .16;
  background-image: repeating-linear-gradient(105deg, transparent 0 14px, rgba(190, 220, 205, .35) 14px 15px, transparent 15px 38px);
}
.title-wrap {
  position: relative; z-index: 5; text-align: center; padding: 24px 20px;
  max-width: 580px; width: 100%; margin: auto;
}
.title-badge {
  display: inline-block; font-family: var(--f-mono); font-size: .78rem;
  letter-spacing: .12em; color: var(--crt); border: 1px solid rgba(74, 222, 128, .35);
  background: rgba(11, 16, 14, .75); padding: 4px 12px; border-radius: 3px; margin-bottom: 12px;
}
.title-kicker {
  font-family: var(--f-mono); letter-spacing: .48em; color: var(--fluo);
  margin: 0; opacity: .75; font-size: .92rem;
}
.title-main {
  font-family: var(--f-display); font-weight: 900; font-size: clamp(2.6rem, 10vw, 4.6rem);
  margin: .08em 0 .12em; letter-spacing: .08em; color: #f1f5f0;
  text-shadow: 0 0 24px rgba(74, 222, 128, .28), 0 4px 0 #000;
}
.title-tag {
  font-family: var(--f-doc); font-size: 1.05rem; color: #f6b8b8;
  margin: 0 0 14px; letter-spacing: .04em; text-shadow: 0 2px 8px #000;
}
.title-brief {
  font-size: .88rem; line-height: 1.7; color: rgba(235, 229, 211, .82);
  background: rgba(11, 16, 14, .7); border: 1px solid rgba(184, 227, 200, .18);
  padding: 10px 14px; border-radius: 4px; margin-bottom: 18px;
}
.title-menu {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  max-width: 400px; margin: 0 auto;
}
.title-menu .btn.primary { grid-column: 1 / -1; font-size: 1.08rem; padding: .85em; }
.title-menu #btn-continue { grid-column: 1 / -1; }
.title-foot {
  margin-top: 18px; display: flex; align-items: center; justify-content: center;
  gap: 10px; font-size: .78rem; color: rgba(235, 229, 211, .62);
}

/* ---------- 일차 소개 ---------- */
#screen-intro {
  align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 18%, #16241d, var(--ink) 75%);
  overflow-y: auto; padding: 20px;
}
.intro-wrap { max-width: 580px; width: 100%; text-align: center; margin: auto; }
.intro-hanja { font-family: var(--f-mono); font-size: .9rem; color: var(--crt); letter-spacing: .3em; opacity: .85; }
.intro-title { font-family: var(--f-display); font-weight: 900; font-size: clamp(1.7rem, 6vw, 2.5rem); margin: .2em 0; color: #f1f5f0; }
.intro-sub { opacity: .72; margin: 0 0 1em; font-family: var(--f-mono); font-size: .86rem; }
.intro-story { text-align: left; line-height: 1.85; font-size: .96rem; margin-bottom: 1.1em; color: #e2e8e2; }
.intro-story p { margin: 0 0 .75em; }
.intro-events { margin-bottom: 14px; }
.intro-events .event {
  background: rgba(184, 41, 47, .16); border-left: 3px solid var(--seal-deny);
  padding: 9px 13px; text-align: left; margin-bottom: 8px; font-size: .88rem; line-height: 1.6;
}
.intro-events .event h4 { margin: 0 0 2px; color: #fca5a5; font-size: .92rem; }
.bang { padding: 14px 18px; text-align: left; border-radius: 3px; margin-bottom: 18px; border: 1px solid #9e967d; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.bang h3 { margin: 0 0 8px; font-size: 1rem; border-bottom: 2px solid #2b3530; padding-bottom: 5px; display: flex; justify-content: space-between; }
.bang h3 small { font-family: var(--f-mono); font-weight: 400; font-size: .76rem; opacity: .7; }
.rules-list { margin: 0; padding-left: 1.25em; font-size: .86rem; line-height: 1.65; }
.rules-list li { margin-bottom: 3px; }
.rules-list li.new::after {
  content: ' NEW'; font-size: .68em; background: var(--seal-deny); color: #fff;
  padding: 1px 5px; border-radius: 2px; margin-left: 6px; vertical-align: 1px; font-family: var(--f-mono);
}
.rules-list li.suspect { color: #991b1b; }
.rules-list li.verified-forged { text-decoration: line-through; opacity: .55; }

/* ---------- 상단 바 ---------- */
#screen-game { flex-direction: column; }
.topbar {
  height: 44px; flex: 0 0 44px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; background: #0e1512; border-bottom: 1px solid #23332b; z-index: 30; gap: 8px;
}
.tb-left, .tb-right { display: flex; align-items: center; gap: 8px; }
.tb-day { font-family: var(--f-mono); font-weight: 700; font-size: .95rem; color: var(--crt); }
.tb-date { font-family: var(--f-mono); font-size: .78rem; opacity: .68; }
.tb-clock {
  font-family: var(--f-mono); font-size: .82rem; background: #070b09;
  border: 1px solid #273a30; color: var(--crt); padding: 2px 7px; border-radius: 3px;
}
.tb-mid { font-size: .84rem; opacity: .82; font-family: var(--f-mono); }
.tb-stat { font-family: var(--f-mono); font-size: .84rem; padding: 2px 6px; border-radius: 3px; background: rgba(255,255,255,.04); }
.tb-stat.risk b { color: var(--amber); }
.tb-stat.risk.high b { color: #f87171; }
.tb-stat.warn { color: #fca5a5; }
.tb-stat.bump { animation: bump .45s; }
@keyframes bump { 30% { transform: scale(1.22); } }

/* ---------- 메인 레이아웃 (PC: 좌 35% / 우 65%) ---------- */
.game-main { flex: 1; min-height: 0; display: flex; }
.booth {
  width: 35%; flex: 0 0 35%; display: flex; flex-direction: column;
  background: #0b110e; border-right: 3px solid #1e2a24; position: relative; min-height: 0;
}
.desk {
  flex: 1; display: flex; flex-direction: column; position: relative;
  min-width: 0; min-height: 0; background: #182022;
}

/* ---------- 좌측: 당직실 방문 창구 ---------- */
.scene {
  position: relative; flex: 1 1 56%; min-height: 170px; overflow: hidden;
  border-bottom: 3px solid #1c2822; cursor: default;
}
.scene-bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #0d1612 0%, #14221c 58%, #090e0c 100%);
}
.scene.has-img .scene-bg { background: var(--scene-img) center / cover no-repeat; }
.scene.has-img .scene-bg > * { display: none; }
.hallway-perspective {
  position: absolute; inset: 12% 18% 0; border: 2px solid #23332b; border-bottom: none;
  background: radial-gradient(ellipse at 50% 25%, rgba(184, 227, 200, .12), #080d0b 75%);
}
.fluorescent-tube {
  position: absolute; top: 8%; left: 50%; transform: translateX(-50%);
  width: 110px; height: 8px; border-radius: 4px; background: #d9f7e3;
  box-shadow: 0 0 28px 8px rgba(184, 227, 200, .35);
  animation: fluoFlicker 6s infinite;
}
.window-frame {
  position: absolute; inset: 0; pointer-events: none;
  border: 8px solid #1b2420; box-shadow: inset 0 0 35px rgba(0,0,0,.75);
}
.fluorescent-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 10%, rgba(184, 227, 200, .14), transparent 55%);
}

.portrait-wrap {
  position: absolute; left: 50%; bottom: 0; height: 88%; aspect-ratio: 5 / 6;
  transform: translateX(-50%); pointer-events: none; display: flex; align-items: flex-end; justify-content: center;
}
.portrait-wrap.img { top: 60px; bottom: 60px; height: auto; aspect-ratio: 1 / 1; }
.portrait-wrap svg, .portrait-wrap img { width: 100%; height: 100%; display: block; object-fit: cover; user-select: none; }
.portrait-wrap.img > img {
  -webkit-mask-image: radial-gradient(ellipse 62% 68% at 50% 48%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 68% at 50% 48%, #000 62%, transparent 100%);
}
.portrait-wrap.enter { animation: visitorIn .55s cubic-bezier(.2, .8, .2, 1) forwards; }
.portrait-wrap.exit { animation: visitorOut .6s ease-in forwards; }
.portrait-wrap.vanish { animation: visitorVanish 1.3s ease forwards; }
@keyframes visitorIn { from { opacity: 0; transform: translate(-50%, 16px) scale(.94); filter: brightness(.3); } to { opacity: 1; transform: translate(-50%, 0) scale(1); filter: brightness(1); } }
@keyframes visitorOut { to { opacity: 0; transform: translate(-110%, 8px) scale(.92); } }
@keyframes visitorVanish { 0% { opacity: 1; } 50% { opacity: .6; filter: blur(4px); } 100% { opacity: 0; transform: translate(-50%, -18px) scale(.9); filter: blur(12px); } }

/* 본모습 / 감식기 렌즈 */
.reveal { position: absolute; inset: 0; pointer-events: none; clip-path: circle(0px at -200px -200px); z-index: 4; }
.reveal.full { transition: clip-path .7s ease; }
.reveal-bg { position: absolute; inset: 0; background: radial-gradient(circle, rgba(20, 48, 36, .92), #050a08 82%); }
.reveal.yokai .reveal-bg { background: radial-gradient(circle, rgba(60, 12, 18, .92), #080405 82%); }

#portrait-true.img > img.morph-wonhon, #portrait-true.img > img.morph-ghost {
  filter: grayscale(.88) hue-rotate(150deg) contrast(1.3) brightness(1.06) drop-shadow(0 0 12px rgba(120, 210, 220, .6));
}
#portrait-true.img > img.morph-anomaly {
  filter: sepia(.5) hue-rotate(-25deg) contrast(1.35) saturate(1.8);
}

.lens {
  position: absolute; width: 128px; height: 128px; border-radius: 50%;
  border: 3px solid var(--crt); transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px #0a140e, 0 0 24px rgba(74, 222, 128, .45), inset 0 0 18px rgba(74, 222, 128, .2);
  pointer-events: none; display: none; z-index: 6;
}
.lens.yokai { border-color: #f87171; box-shadow: 0 0 0 2px #2b0a0a, 0 0 28px rgba(248, 113, 113, .75); }
.lens-caption {
  position: absolute; left: 50%; bottom: -24px; transform: translateX(-50%);
  white-space: nowrap; font-size: .72rem; background: rgba(7, 10, 9, .9);
  padding: 2px 8px; border-radius: 8px; color: var(--crt); border: 1px solid rgba(74, 222, 128, .4);
  font-family: var(--f-mono);
}
.lens.yokai .lens-caption { color: #fca5a5; border-color: #ef4444; }
.booth.mirror-on .lens { display: block; }
.booth.mirror-on .scene { cursor: crosshair; touch-action: none; }

.scene-caption {
  position: absolute; left: 10px; right: 10px; top: 10px; z-index: 7; text-align: center;
  background: rgba(120, 18, 22, .92); color: #fff; padding: 6px 10px; border-radius: 3px;
  font-size: .82rem; display: none; border: 1px solid #f87171;
}
.scene-caption.show { display: block; animation: screenIn .25s; }
.scene-caption.human { background: rgba(20, 60, 40, .92); border-color: var(--crt); }

/* 대화창 */
.speech {
  position: relative; margin: -12px 10px 8px; padding: 11px 14px 14px; border-radius: 4px;
  z-index: 8; min-height: 82px; box-shadow: 0 8px 22px rgba(0,0,0,.55);
  cursor: pointer; user-select: none; border: 1px solid #a8a088;
}
.speech::before {
  content: ''; position: absolute; top: -10px; left: 32px;
  border: 10px solid transparent; border-top: 0; border-bottom-color: var(--paper);
}
.speech-name { font-size: .82rem; font-weight: 700; color: var(--seal-deny); margin-bottom: 3px; }
.speech-text { font-size: .93rem; line-height: 1.55; min-height: 2.8em; }
.speech-more { position: absolute; right: 10px; bottom: 5px; font-size: .72rem; color: var(--seal-deny); opacity: 0; }
.speech.has-more .speech-more { opacity: 1; animation: bob .9s infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }

.booth-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 8px; align-items: center; }
.tool-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px;
  border: 1px solid var(--crt-dim); background: #0e1a14; color: var(--crt);
  border-radius: 4px; font-size: .84rem; transition: all .15s;
}
.tool-btn:hover { background: #142a1f; border-color: var(--crt); }
.tool-btn.active { background: var(--crt); color: #07120c; font-weight: 700; }
.tool-btn.locked { opacity: .45; filter: grayscale(1); }
.mirror-ico { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; display: inline-block; }

.question-list { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; }
.q-chip {
  border: 1px solid rgba(184, 227, 200, .26); background: rgba(25, 43, 34, .65);
  color: var(--paper); font-size: .76rem; padding: 5px 9px; border-radius: 14px;
}
.q-chip:hover { border-color: var(--crt); background: rgba(74, 222, 128, .15); }
.q-chip.asked { opacity: .55; }

.rules-panel {
  margin: 0 10px 10px; padding: 10px 13px; border-radius: 3px;
  font-size: .82rem; overflow-y: auto; max-height: 155px; border: 1px solid #9e967d;
}
.rules-panel h3 {
  margin: 0 0 6px; font-size: .92rem; color: #1b2822;
  border-bottom: 1px solid rgba(30, 40, 35, .25); padding-bottom: 4px;
  display: flex; justify-content: space-between; align-items: center;
}
.rules-panel h3 small { font-family: var(--f-mono); font-size: .72rem; opacity: .65; }

/* ---------- 우측: 콘솔 스위처 + 패널 ---------- */
.console-switcher {
  display: flex; gap: 4px; padding: 6px 10px 0; background: #11181a;
  border-bottom: 1px solid #263336; flex: 0 0 auto;
}
.con-tab {
  border: 1px solid #2c3a3d; border-bottom: none; background: #182123;
  color: #a3b5b8; padding: 7px 14px; font-size: .85rem; border-radius: 5px 5px 0 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.con-tab.active { background: #232d30; color: var(--crt); border-color: #3d5256; font-weight: 700; }
.con-tab .badge {
  background: var(--seal-deny); color: #fff; font-size: .7rem; font-weight: 700;
  padding: 1px 5px; border-radius: 8px; font-family: var(--f-mono);
}

.mode-panel { display: none; flex: 1; min-height: 0; flex-direction: column; position: relative; }
.mode-panel.active { display: flex; }

/* ---------- 서류 책상 ---------- */
.desk-tabs {
  display: flex; gap: 4px; padding: 5px 10px 0; background: #1a2224;
  border-bottom: 1px solid #2d393c; flex-wrap: nowrap; overflow-x: auto; flex: 0 0 auto;
}
.desk-tab {
  border: 1px solid #354245; border-bottom: none; background: #222b2e;
  color: #cbd5d0; padding: 5px 11px; font-size: .8rem; border-radius: 4px 4px 0 0; white-space: nowrap;
}
.desk-tab.active { background: var(--paper); color: var(--text-dark); font-weight: 700; }
.desk-tab.mobile-only { display: none; }

.desk-surface {
  position: relative; flex: 1; overflow: hidden;
  background-color: #252d30;
  background-image: linear-gradient(135deg, rgba(255,255,255,.03) 0%, transparent 50%, rgba(0,0,0,.22) 100%);
  box-shadow: inset 0 0 70px rgba(0,0,0,.55);
}
.desk-surface.has-img {
  background-image: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.38)), var(--desk-img);
  background-size: cover; background-position: center;
}
.desk-surface.thud { animation: thud .22s; }
@keyframes thud { 40% { transform: translateY(2px); } }
.desk-light {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 24% 24%, rgba(220, 245, 225, .1), transparent 55%);
}
.desk-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  font-size: .78rem; color: rgba(235, 229, 211, .52); pointer-events: none;
  background: rgba(11, 16, 14, .55); padding: 4px 11px; border-radius: 12px;
  white-space: nowrap; transition: opacity .4s;
}
.desk-hint.hide { opacity: 0; }

/* 드래그 가능한 학교 서류 */
.doc {
  position: absolute; touch-action: none; user-select: none; cursor: grab;
  transform: rotate(var(--rot, 0deg)); transition: box-shadow .18s;
  font-family: var(--f-doc);
}
.doc.dragging { cursor: grabbing; transform: rotate(0deg) scale(1.02); box-shadow: 0 22px 42px rgba(0,0,0,.65) !important; }
.doc.slide-in { animation: docIn .45s cubic-bezier(.2, .8, .2, 1) both; }
.doc.slide-out { animation: docOut .4s ease-in forwards; }
.doc.focus { animation: docFocus .3s; }
@keyframes docIn { from { transform: translate(0, 70px) rotate(5deg); opacity: 0; } }
@keyframes docOut { to { transform: translate(80px, -20px) rotate(-4deg); opacity: 0; } }
@keyframes docFocus { 45% { transform: scale(1.04) rotate(0deg); } }

/* 학생증 / 교직원증 (2003년 플라스틱 코팅 카드) */
.doc.student-id {
  width: 244px; padding: 12px 13px; border-radius: 6px;
  background: linear-gradient(160deg, #f3f6f4 0%, #dce4df 100%);
  color: #16201c; border: 2px solid #355043;
  box-shadow: 0 10px 24px rgba(0,0,0,.55);
}
.doc.student-id.old-id {
  background: linear-gradient(160deg, #e7dec6 0%, #cfc2a1 100%);
  border-color: #6b5635;
}
.id-header {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 2px solid #214031; padding-bottom: 4px; margin-bottom: 8px;
  font-family: var(--f-display); font-weight: 700; font-size: .82rem; color: #193829;
}
.id-body { display: flex; gap: 10px; align-items: flex-start; }
.id-photo {
  width: 68px; height: 84px; flex: 0 0 68px; border: 1px solid #4a5a52;
  background: #cdd6d1; overflow: hidden; display: grid; place-items: center;
}
.id-photo img, .id-photo svg { width: 100%; height: 100%; object-fit: cover; }
.id-fields { flex: 1; min-width: 0; }
.doc .field { margin: 3px 0; font-size: .78rem; line-height: 1.3; }
.doc .field .lbl { font-size: .66rem; color: #52635b; display: block; font-family: var(--f-body); }
.doc .field .val { font-weight: 700; font-size: .84rem; color: #121a16; }

/* 귀가 허가증 */
.doc.permit {
  width: 246px; padding: 14px 16px 18px; border-radius: 2px;
  box-shadow: 0 12px 26px rgba(0,0,0,.52); border: 1px solid #b5ad95;
}
.doc-title {
  font-family: var(--f-display); font-weight: 900; font-size: 1.02rem; text-align: center;
  border-bottom: 2px solid #222d27; padding-bottom: 5px; margin-bottom: 7px; letter-spacing: .08em;
}
.doc-sub { font-family: var(--f-mono); font-size: .68rem; text-align: center; opacity: .68; margin: -4px 0 8px; }
.seal-row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: .72rem; }
.seal-mark {
  display: inline-block; border: 2px solid var(--seal-deny); color: var(--seal-deny);
  padding: 2px 6px; font-size: .72rem; font-weight: 700; border-radius: 3px; transform: rotate(-4deg);
}
.seal-none { border: 1px dashed #999; color: #777; padding: 2px 6px; font-size: .7rem; }

/* 출석부 / 실종자 기록 */
.doc.registry {
  width: 295px; padding: 12px 14px 14px 24px; border-radius: 2px 5px 5px 2px;
  box-shadow: 4px 12px 28px rgba(0,0,0,.58); border: 1px solid #968d74;
  background-image: linear-gradient(90deg, #1b3328 0 14px, rgba(0,0,0,.12) 14px 16px, transparent 16px), var(--paper-noise);
}
.reg-scroll { max-height: 250px; overflow-y: auto; padding-right: 4px; touch-action: pan-y; }
.reg-scroll::-webkit-scrollbar { width: 5px; }
.reg-scroll::-webkit-scrollbar-thumb { background: rgba(25, 43, 34, .35); border-radius: 3px; }
.reg-table { width: 100%; border-collapse: collapse; font-size: .74rem; }
.reg-table th { border-bottom: 1.5px solid #22332a; text-align: left; padding: 4px; font-size: .7rem; }
.reg-table td { padding: 5px 4px; border-bottom: 1px dashed rgba(30,45,38,.25); vertical-align: top; }
.reg-table tr.missing td { color: #8c191f; font-weight: 700; }
.reg-table tr.fresh { background: rgba(184, 41, 47, .08); }

/* 졸업앨범 / 당직일지 메모 */
.doc.yearbook {
  width: 258px; padding: 12px 14px; border-radius: 3px;
  background: #231f1d; color: #e8e0cf; border: 2px solid #594a3c;
  box-shadow: 0 12px 28px rgba(0,0,0,.6);
}
.doc.yearbook .doc-title { color: #e6c994; border-bottom-color: #594a3c; }
.yb-item { border-bottom: 1px dashed rgba(232,224,207,.2); padding: 6px 0; font-size: .76rem; line-height: 1.45; }
.yb-item:last-child { border-bottom: none; }
.yb-item b { color: #fca5a5; }

.doc.rules-doc { width: 276px; padding: 12px 15px; border: 1px solid #9e967d; box-shadow: 0 10px 24px rgba(0,0,0,.5); }

/* 판정 도장 자국 */
.stamp-mark {
  position: absolute; left: 50%; top: 44%; width: 98px; height: 98px; margin: -49px 0 0 -49px;
  border: 5px double var(--seal-pass); color: var(--seal-pass); border-radius: 8px;
  display: grid; place-items: center; font-family: var(--f-doc); font-size: 54px; font-weight: 900;
  pointer-events: none; opacity: .92; mix-blend-mode: multiply;
  transform: rotate(var(--srot, -10deg));
  animation: stampIn .32s cubic-bezier(.25, 1.8, .4, 1) forwards;
}
.stamp-mark.deny { border-color: var(--seal-deny); color: var(--seal-deny); border-radius: 50%; border-style: solid; }
@keyframes stampIn {
  0% { transform: rotate(var(--srot)) scale(2.4); opacity: 0; }
  50% { transform: rotate(var(--srot)) scale(.9); opacity: 1; }
  100% { transform: rotate(var(--srot)) scale(1); opacity: .92; }
}

/* ---------- CCTV 모니터 ---------- */
.cctv-shell { flex: 1; display: flex; flex-direction: column; padding: 10px; gap: 8px; background: #101617; min-height: 0; overflow-y: auto; }
.cctv-screen {
  position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 280px;
  background: #040806; border: 4px solid #2b3538; border-radius: 8px; overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0,0,0,.9), 0 8px 24px rgba(0,0,0,.6);
}
.cctv-img-wrap {
  position: absolute; inset: 0;
  background: radial-gradient(circle, #14261c 0%, #050b08 100%);
  display: flex; align-items: center; justify-content: center;
}
.cctv-img-wrap img, .cctv-img-wrap svg {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.75) sepia(0.25) hue-rotate(85deg) contrast(1.22) brightness(0.92);
}
.cctv-anomaly-layer { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.cctv-ghost-wrap {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-end; padding-right: 16%;
  background: radial-gradient(circle at 68% 58%, rgba(16, 28, 22, .12), rgba(0, 0, 0, .24) 78%);
}
.cctv-ghost-svg {
  width: 28%; height: 74%; opacity: .88;
  filter: contrast(1.15) drop-shadow(0 0 8px rgba(0, 0, 0, .85));
  animation: cctvGhostFlicker 4.4s steps(2, end) infinite;
}
@keyframes cctvGhostFlicker {
  0%, 92%, 100% { opacity: .82; transform: translate(0, 0); }
  94% { opacity: .45; transform: translate(-2px, 0); }
  96% { opacity: .88; transform: translate(2px, -1px); }
  98% { opacity: .35; transform: translate(-1px, 0); }
}
.cctv-dutyroom-wrap { position: absolute; inset: 0; overflow: hidden; }
.cctv-dutyroom-img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.85) sepia(0.4) hue-rotate(-30deg) contrast(1.4) brightness(0.75);
  animation: cctvGhostFlicker 2.8s steps(2, end) infinite;
}
.cctv-dutyroom-tint {
  position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(184,41,47,.18), rgba(0,0,0,.72));
}
.cctv-dutyroom-hud {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  color: #fca5a5; font-family: var(--f-mono); font-size: 13px;
  text-shadow: 0 2px 6px #000;
}
.cctv-stairs-wrap { position: absolute; inset: 0; pointer-events: none; }
.cctv-stairs-tear {
  position: absolute; left: 0; right: 0; top: 44%; height: 14%;
  background: linear-gradient(180deg, transparent, rgba(239,68,68,.18), rgba(0,0,0,.55), transparent);
  backdrop-filter: blur(2px);
  animation: cctvGhostFlicker 2.4s steps(2, end) infinite;
}
.cctv-stairs-badge {
  position: absolute; bottom: 16%; left: 50%; transform: translateX(-50%);
  background: rgba(127,29,29,.88); color: #fecaca; padding: 3px 10px;
  font-family: var(--f-mono); font-size: 11px; border: 1px solid #f87171;
  box-shadow: 0 2px 8px rgba(0,0,0,.7);
}
.cctv-hud {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 10px 12px; font-family: var(--f-mono); font-size: .78rem; color: var(--crt);
  text-shadow: 0 1px 3px #000;
}
.cctv-hud-top, .cctv-hud-bot { display: flex; justify-content: space-between; align-items: center; }
.rec-dot { color: #ef4444; font-weight: 700; animation: blinkRec 1.2s infinite; }
@keyframes blinkRec { 50% { opacity: .2; } }
.cctv-off-overlay {
  position: absolute; inset: 0; z-index: 8; background: #050706;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--f-mono); color: #6b7f75;
}
.cctv-off-overlay[hidden] { display: none; }
.cctv-channels { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.cam-btn {
  border: 1px solid #2e3e3a; background: #141d1b; color: #9ab3a8;
  font-family: var(--f-mono); font-size: .72rem; padding: 6px 4px; border-radius: 3px; text-align: center;
}
.cam-btn.active { background: var(--crt); color: #06140c; font-weight: 700; border-color: var(--crt); }
.cam-btn.has-alert { border-color: #ef4444; color: #fca5a5; animation: pulseAlert 1.4s infinite; }
.cam-btn.phantom { border-color: #a855f7; color: #e9d5ff; }
.cctv-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cctv-log {
  background: #080d0c; border: 1px solid #22302d; border-radius: 4px;
  padding: 8px 10px; font-family: var(--f-mono); font-size: .76rem; color: #9dc4b0;
  max-height: 92px; overflow-y: auto; line-height: 1.5;
}

/* ---------- 유선전화 & 교내 방송 ---------- */
.comms-shell { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; background: #141a1c; }
.comms-card {
  background: #1b2326; border: 1px solid #303f44; border-radius: 6px; padding: 12px 14px;
}
.comms-card.ringing { border-color: var(--seal-deny); box-shadow: 0 0 20px rgba(184,41,47,.35); }
.comms-head h3 { margin: 0 0 8px; font-size: .96rem; color: #e6efe9; display: flex; justify-content: space-between; align-items: center; }
.comms-head small { font-family: var(--f-mono); font-size: .74rem; color: var(--crt); }
.phone-display, .pa-display {
  background: #0c1211; border: 1px solid #263632; border-radius: 4px; padding: 10px 12px;
  min-height: 74px; font-size: .88rem; line-height: 1.6; color: #dce8e0; margin-bottom: 8px;
}
.phone-display .muted, .pa-display .muted { opacity: .48; margin: 0; }
.phone-btn-row, .pa-btn-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.phone-dial { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .78rem; color: #9db2aa; }

/* ---------- 하단 3버튼 판정 바 ---------- */
.stamp-bar {
  display: flex; justify-content: flex-end; gap: 12px; padding: 10px 16px 14px;
  background: #111819; border-top: 2px solid #233033; z-index: 50; flex: 0 0 auto;
}
.stamp-btn {
  position: relative; width: 108px; height: 82px; border: none; background: none; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; transition: transform .14s;
}
.stamp-handle {
  position: absolute; top: 0; left: 50%; width: 34px; height: 34px; margin-left: -17px;
  border-radius: 16px 16px 6px 6px; background: linear-gradient(90deg, #2b221c, #5a4638 45%, #2b221c);
}
.stamp-face {
  position: relative; width: 92px; height: 42px; margin-bottom: 16px; display: grid; place-items: center;
  font-family: var(--f-doc); font-size: 24px; font-weight: 900; color: #fff;
  background: linear-gradient(180deg, #228b54, var(--seal-pass));
  border-radius: 5px; box-shadow: 0 5px 0 #0d3a22, 0 8px 14px rgba(0,0,0,.55);
}
.stamp-btn.check .stamp-face {
  background: linear-gradient(180deg, #d97706, var(--seal-check));
  box-shadow: 0 5px 0 #78350f, 0 8px 14px rgba(0,0,0,.55);
}
.stamp-btn.deny .stamp-face {
  background: linear-gradient(180deg, #c8363c, var(--seal-deny));
  box-shadow: 0 5px 0 #581014, 0 8px 14px rgba(0,0,0,.55);
}
.stamp-label { position: absolute; bottom: 0; font-size: .74rem; color: #d8e2dc; white-space: nowrap; }
.stamp-btn:hover:not(:disabled) { transform: translateY(-3px); }
.stamp-btn:active:not(:disabled), .stamp-btn.pressed { transform: translateY(4px) scale(.97); }
.stamp-btn:disabled { opacity: .42; cursor: default; }

/* 경고장 */
.citation {
  position: absolute; top: 10px; right: 10px; z-index: 900; width: 238px; padding: 11px 13px;
  background: #f5d5d5; color: #450a0a; border-left: 5px solid var(--seal-deny);
  box-shadow: 0 8px 22px rgba(0,0,0,.55); font-size: .82rem; line-height: 1.5; animation: citeIn .4s ease;
}
.citation h4 { margin: 0 0 3px; color: var(--seal-deny); font-size: .98rem; }
.citation.out { animation: docOut .45s forwards; }
@keyframes citeIn { from { transform: translateY(-30px); opacity: 0; } }

/* ---------- 정산 (야간 당직일지) ---------- */
#screen-settle { align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 20%, #16241d, var(--ink) 72%); overflow-y: auto; padding: 20px; }
.settle-wrap { width: 100%; max-width: 560px; padding: 24px; box-shadow: 0 20px 50px rgba(0,0,0,.6); margin: auto; border: 1px solid #9e967d; border-radius: 3px; }
.settle-title { font-family: var(--f-display); font-weight: 900; text-align: center; font-size: 1.5rem; margin: 0; color: #192b22; }
.settle-sub { text-align: center; opacity: .72; margin: .3em 0 1em; font-size: .86rem; font-family: var(--f-mono); }
.ledger .row { display: flex; justify-content: space-between; padding: 6px 2px; border-bottom: 1px dashed rgba(25,43,34,.26); font-size: .9rem; }
.ledger .row.plus .amt { color: #1b5e3a; font-weight: 700; }
.ledger .row.minus .amt { color: var(--seal-deny); font-weight: 700; }
.settle-total { margin-top: 10px; padding-top: 10px; border-top: 2px solid #192b22; display: flex; justify-content: space-between; font-weight: 700; font-size: 1.12rem; }
.epilogue { margin: 16px 0 18px; }
.epilogue h4 { margin: 0 0 8px; font-size: .98rem; color: var(--seal-deny); }
.epilogue p { margin: 0 0 7px; line-height: 1.65; font-size: .88rem; padding-left: 10px; border-left: 2px solid rgba(184,41,47,.45); }
.settle-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- 엔딩 ---------- */
#screen-ending { align-items: center; justify-content: center; overflow-y: auto; background: radial-gradient(ellipse at 50% 30%, #14221c, var(--ink) 72%); }
#screen-ending.tone-blood { background: radial-gradient(ellipse at 50% 30%, #450a0a, #080404 72%); }
#screen-ending.tone-loop { background: radial-gradient(ellipse at 50% 30%, #1e1b4b, #060610 72%); }
#screen-ending.tone-truth { background: radial-gradient(ellipse at 50% 30%, #0f3d2e, #050c09 72%); }
#screen-ending.tone-dawn { background: radial-gradient(ellipse at 50% 30%, #1e3a5f, #060c14 72%); }
.ending-wrap { max-width: 580px; width: 100%; padding: 32px 20px; text-align: center; margin: auto; }
.ending-visual { max-width: 420px; margin: 0 auto 14px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(255,255,255,.15); }
.ending-visual img { width: 100%; display: block; }
.ending-seal {
  display: inline-grid; place-items: center; width: 92px; height: 92px;
  border: 6px double var(--seal-deny); color: var(--seal-deny); font-family: var(--f-doc);
  font-size: 46px; font-weight: 900; border-radius: 6px; background: rgba(235, 229, 211, .94);
  transform: rotate(-7deg);
}
.ending-kicker { font-family: var(--f-mono); letter-spacing: .42em; opacity: .65; margin: 14px 0 0; font-size: .82rem; }
.ending-title { font-family: var(--f-display); font-weight: 900; font-size: clamp(1.8rem, 7vw, 2.7rem); margin: .15em 0 .6em; color: #f1f5f0; }
.ending-text p { text-align: left; line-height: 1.85; font-size: .95rem; }
.ending-stats { text-align: left; margin: 18px 0; padding: 12px 16px; font-size: .88rem; line-height: 1.75; border-radius: 4px; }
.ending-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* ---------- 모달 / 도감 / 토스트 ---------- */
.modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; background: rgba(4, 7, 6, .82); padding: 14px; backdrop-filter: blur(3px); }
.modal.open { display: flex; }
.modal-box { position: relative; width: 100%; max-width: 660px; max-height: 88vh; overflow-y: auto; padding: 22px 20px; border-radius: 4px; box-shadow: 0 20px 60px rgba(0,0,0,.7); }
.modal-close { position: absolute; top: 8px; right: 10px; border: none; background: none; font-size: 1.3rem; color: #2b3530; }
.modal-body h2 { margin: 0 0 10px; color: #192b22; font-size: 1.3rem; }
.modal-body h3 { color: var(--seal-deny); margin: 14px 0 6px; font-size: 1.02rem; }
.modal-body p, .modal-body li { line-height: 1.7; font-size: .9rem; }
.modal-body .menu-list { display: flex; flex-direction: column; gap: 8px; }
.codex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 8px; }
.codex-card {
  border: 1px solid #9e967d; background: rgba(255,255,255,.35); padding: 12px 8px;
  text-align: center; border-radius: 4px; color: var(--text-dark);
}
.codex-card .ico { font-size: 1.7rem; color: var(--seal-deny); font-weight: 700; }
.codex-card .nm { font-weight: 700; margin-top: 4px; font-size: .86rem; }
.codex-card .sb { font-size: .72rem; opacity: .68; }
.codex-card.locked { filter: grayscale(1); opacity: .52; cursor: default; }
.ending-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ending-chips span { border: 1px solid #9e967d; padding: 4px 10px; border-radius: 12px; font-size: .8rem; }
.ending-chips span.got { background: var(--seal-pass); color: #fff; border-color: var(--seal-pass); }

.sound-box { border: 1px solid #9e967d; background: rgba(25,43,34,.06); padding: 12px; border-radius: 4px; margin-bottom: 12px; }
.sound-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: .88rem; }
.sound-row input[type="range"] { flex: 1; max-width: 220px; accent-color: var(--seal-pass); }
.sound-test { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .8rem; }
.sound-test .sfx-demo { color: var(--text-dark); border-color: #888; background: rgba(255,255,255,.55); }

#toast-layer { position: fixed; top: 54px; left: 50%; transform: translateX(-50%); z-index: 1100; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { background: rgba(11,16,14,.95); color: var(--paper); border: 1px solid var(--crt); padding: 9px 14px; border-radius: 4px; font-size: .86rem; box-shadow: 0 8px 24px rgba(0,0,0,.55); text-align: center; }
.toast.bad { border-color: var(--seal-deny); color: #fecaca; }
.toast.lore { border-color: var(--amber); color: #fde68a; }
.toast.out { opacity: 0; transition: opacity .35s; }

#fx-flash { position: fixed; inset: 0; pointer-events: none; z-index: 1050; opacity: 0; }
#fx-flash.blood { animation: flashBlood 2s ease forwards; }
#fx-flash.wisp { animation: flashWisp .9s ease forwards; }
@keyframes flashBlood { 0% { opacity: 0; background: #991b1b; } 15% { opacity: .7; } 100% { opacity: 0; background: #450a0a; } }
@keyframes flashWisp { 0% { opacity: 0; background: radial-gradient(circle, #4ade80, transparent 70%); } 25% { opacity: .6; } 100% { opacity: 0; } }
.shake { animation: shake .42s; }
@keyframes shake { 20%, 80% { transform: translate(3px, 1px); } 40%, 60% { transform: translate(-4px, -1px); } }
#app.quake { animation: shake .45s 3; }

/* =========================================================
 *  모바일 (세로) — max-width: 768px
 * ========================================================= */
@media (max-width: 768px) {
  .title-wrap { padding: 16px 14px; max-width: 100%; }
  .title-badge { font-size: .72rem; padding: 3px 9px; }
  .title-tag { font-size: .92rem; }
  .title-brief { font-size: .8rem; line-height: 1.55; padding: 8px 10px; }
  .title-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 100%; gap: 6px; }
  .title-menu .btn { font-size: .82rem; padding: .65em .5em; letter-spacing: 0; }
  .title-foot { flex-wrap: wrap; font-size: .72rem; }
  .game-main { flex-direction: column; }
  .booth { width: 100%; height: 37%; flex: 0 0 37%; border-right: none; border-bottom: 3px solid #1e2a24; display: block; }
  .scene { position: absolute; inset: 0; border-bottom: none; }
  .portrait-wrap { left: 24%; height: 92%; }
  .portrait-wrap.img { top: 10px; bottom: 10px; height: auto; left: 24%; }
  .speech { position: absolute; top: 8px; right: 8px; left: 46%; margin: 0; min-height: 0; max-height: calc(100% - 56px); overflow-y: auto; padding: 8px 10px 11px; }
  .speech::before { top: 20px; left: -10px; border: 10px solid transparent; border-left: 0; border-right-color: var(--paper); }
  .speech-name { font-size: .78rem; }
  .speech-text { font-size: .82rem; line-height: 1.48; min-height: 0; }
  .booth-actions { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 8px; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
  .tool-btn { min-height: 44px; padding: 7px 10px; font-size: .82rem; }
  .q-chip { min-height: 44px; font-size: .78rem; padding: 6px 10px; }
  .rules-panel { display: none; }
  .booth.mirror-on .speech { opacity: .15; pointer-events: none; }
  .lens { width: 104px; height: 104px; }

  .desk { width: 100%; flex: 1; }
  .con-tab { min-height: 44px; padding: 8px 10px; font-size: .82rem; flex: 1; justify-content: center; }
  .desk-tab { min-height: 44px; padding: 7px 10px; font-size: .8rem; display: inline-flex; align-items: center; }
  .desk-tab.mobile-only { display: inline-flex; }
  .cctv-channels { grid-template-columns: repeat(4, 1fr); }
  .cam-btn, .cctv-btn { min-height: 44px; }

  .stamp-bar { gap: 6px; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); }
  .stamp-btn { flex: 1; width: auto; height: 54px; flex-direction: row; justify-content: center; gap: 6px; border-radius: 6px; background: linear-gradient(180deg, #228b54, var(--seal-pass)); box-shadow: 0 4px 0 #0d3a22; }
  .stamp-btn.check { background: linear-gradient(180deg, #d97706, var(--seal-check)); box-shadow: 0 4px 0 #78350f; }
  .stamp-btn.deny { background: linear-gradient(180deg, #c8363c, var(--seal-deny)); box-shadow: 0 4px 0 #581014; }
  .stamp-handle { display: none; }
  .stamp-face { width: auto; height: auto; margin: 0; background: none !important; box-shadow: none !important; font-size: 22px; }
  .stamp-label { position: static; font-size: .86rem; font-weight: 700; color: #fff; }

  .doc.student-id { width: 205px; padding: 9px 10px; }
  .id-photo { width: 52px; height: 64px; flex: 0 0 52px; }
  .doc.permit { width: 208px; padding: 11px 12px; }
  .doc.registry { width: 245px; }
  .doc.rules-doc { width: 245px; }
  .topbar { padding: 4px 8px; padding-top: calc(4px + env(safe-area-inset-top)); min-height: 46px; height: auto; flex-wrap: wrap; gap: 4px 8px; }
  .tb-date { display: none; }
  .tb-mid { display: inline-flex; font-size: .82rem; font-weight: 700; opacity: .95; }
  .icon-btn { min-width: 38px; min-height: 38px; width: 38px; height: 38px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
.settle-partner { margin-top: 16px; padding-top: 12px; border-top: 1px dashed rgba(31,41,55,.24); text-align: center; }
.settle-partner[hidden] { display: none; }
.partner-card { background: rgba(15, 23, 42, .05); border: 1px solid rgba(31, 41, 55, .2); border-radius: 8px; padding: 10px 12px; }
.partner-head { font-size: .85rem; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.partner-desc { margin: 0 0 8px; font-size: .8rem; color: #475569; }
.partner-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border-radius: 6px; border: 1.5px solid #334155; background: #fff; color: #0f172a; font-weight: 700; font-size: .86rem; text-decoration: none; }
.partner-link:hover { background: #f1f5f9; }
.partner-notice { margin: 8px 0 0; font-size: .74rem; color: #475569; line-height: 1.35; }
