/* 땅땅땅 — "법전의 재료로 만든 법정"
   입장 연출의 세계(어두운 석조 법정, 위에서 떨어지는 차가운 빛)를 전 화면으로.
   재료 4종: 석재 벽(L0) · 가죽(L1) · 종이(L2) · 황동(금속). 빛은 항상 위에서. 모서리 반경 0(종이만 1px).
   적색(--seal)은 판결에만. 판결문 안에서는 mask·blend·filter를 쓰지 않는다(이미지 저장 호환). */

:root {
  --void: #12171a;   /* 컬럼 양옆 */
  --bg: #1c2227;     /* 석재 벽 */
  --panel: #262e34;
  --bone: #e6dfcc;
  --muted: #9aa29c;
  --seal: #b3302f;
  --seal-text: #ec6b63; /* 어두운 바탕 위 적색 글자 전용(5.2:1) */
  --seal-ink: #a02a29;  /* 종이 위 적색 글자(5.5:1, #b3302f는 4.55:1이라 가장자리 그늘에서 모자랄 수 있음) */
  --khaki: #6f7355;
  --side: #2a3339;
  /* 재료 */
  --leather: #22302a;  --leather-hi: #2c3b33;  --stitch: rgba(193, 154, 75, .32);
  --paper: #e4dcc8;    --paper-edge: rgba(110, 92, 58, .22);
  --ink: #2a2620;      --ink-muted: #5e574a;   --ink-rule: rgba(42, 38, 32, .16);
  --brass-hi: #dcbd70; --brass: #c19a4b;       --brass-lo: #9c7a34;  --brass-base: #5a4518;
  --engrave-ink: #3b2d12;
  --engrave: #b9b29e;  /* 가죽·벽 위 음각 글자 */
  --skylight: rgba(223, 231, 238, .07);
  --rule-leather: rgba(193, 154, 75, .18);
  --err-ink: #8a3a1e;
  /* 질감(인라인 SVG, opacity만 사용 — mix-blend 없음) */
  --tex-stone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.2 -.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
  --tex-leather: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 -.85'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E");
  --tex-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .43 0 0 0 0 .36 0 0 0 0 .23 0 0 0 1.6 -.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
  /* 인주 얼룩: 종이색 반점이 인주 위에 남은 자리(도장 위에 덮는 한 장) */
  --tex-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.08 .5' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .894 0 0 0 0 .863 0 0 0 0 .784 0 0 0 -5 2.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* 그림자 단계 */
  --l1: inset 0 1px 0 rgba(255, 255, 255, .05), inset 0 -1px 0 rgba(0, 0, 0, .4), 0 10px 24px rgba(0, 0, 0, .4);
  --l2: 0 1px 0 rgba(0, 0, 0, .25), 0 16px 36px rgba(0, 0, 0, .5);
  /* 황동 모서리 캡(법전 3D 모델과 같은 직각삼각형) */
  --cap-tl: linear-gradient(135deg, var(--brass-hi), var(--brass-lo) 12px, transparent 12px) top left / 18px 18px no-repeat;
  --cap-tr: linear-gradient(225deg, var(--brass-hi), var(--brass-lo) 12px, transparent 12px) top right / 18px 18px no-repeat;
  --cap-bl: linear-gradient(45deg, var(--brass-lo), var(--brass) 12px, transparent 12px) bottom left / 18px 18px no-repeat;
  --cap-br: linear-gradient(315deg, var(--brass-lo), var(--brass) 12px, transparent 12px) bottom right / 18px 18px no-repeat;
  --brass-grad: linear-gradient(180deg, var(--brass-hi) 0%, var(--brass) 48%, var(--brass-lo) 100%);
  --display: "Black Han Sans", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --sans: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --serif: "Noto Serif KR", "Noto Serif CJK KR", "AppleMyungjo", "Batang", serif;
  --pad: clamp(16px, 4vw, 32px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--void); color: var(--bone);
  font-family: var(--sans); font-size: 15px; line-height: 1.65;
  word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100dvh; display: flex; flex-direction: column;
}
/* 환경 레이어(고정 2장 + 먼지 canvas 1개, 모두 z-index -1 = 내용 아래, 페이지 배경 위) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 55% at 50% -8%, var(--skylight), transparent 70%),
    var(--tex-stone),
    linear-gradient(90deg, transparent calc(50% - 361px), var(--side) calc(50% - 361px) calc(50% - 360px), var(--bg) calc(50% - 360px) calc(50% + 360px), var(--side) calc(50% + 360px) calc(50% + 361px), transparent calc(50% + 361px));
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, .42));
}
#ambient { position: fixed; left: 0; top: 0; width: 100%; height: 70vh; z-index: -1; pointer-events: none; display: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
h1, h2, h3, h4 { text-wrap: balance; margin: 0; }
/* 아이콘: 각인 느낌(모서리 각지게) */
svg.i { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: square; stroke-linejoin: miter; flex-shrink: 0; }
[hidden] { display: none !important; }

.shell { width: 100%; max-width: 720px; margin: 0 auto; padding-inline: var(--pad); }
main { flex: 1; }

/* 음각·양각 글자 */
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; line-height: 1.5; letter-spacing: .04em; color: var(--engrave); text-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 -1px 0 rgba(0, 0, 0, .5); min-width: 0; }
.emboss, .page-title, .hero h1, .pending h2, .sec-head h2, .form-head h2, .modal h2 { text-shadow: 0 -1px 0 rgba(0, 0, 0, .55), 0 1px 0 rgba(255, 255, 255, .07), 0 6px 18px rgba(0, 0, 0, .45); }

/* ───────── 재료 ───────── */
/* 가죽판(L1): 법전 표지색 + 결 + 바느질 점선 + 황동 모서리 캡 */
.leather, .case-form, .modal, .pending, .notice, .history {
  background: var(--cap-tl), var(--cap-tr), var(--cap-bl), var(--cap-br), var(--tex-leather), var(--leather);
  box-shadow: var(--l1);
  outline: 1px dashed var(--stitch); outline-offset: -7px;
}
/* 종이(L2): 섬유 + 가장자리 안쪽 그늘. 글자는 잉크 */
.paper, .sheet, #join.case-form, .verdict, .toast {
  background: var(--tex-paper), var(--paper); color: var(--ink);
  box-shadow: var(--l2), inset 0 0 36px var(--paper-edge);
  border-radius: 1px; outline: 0;
}

/* ───────── 상단·하단 ───────── */
.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; }
.topbar::after, .footer::before { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(193, 154, 75, .55), transparent); }
.topbar::after { bottom: 0; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--bone); }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; }
.brand strong { font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: .04em; }
.footer { position: relative; padding: 28px 0 40px; text-align: center; }
.footer::before { top: 0; }
.footer .fb { display: flex; justify-content: center; align-items: center; gap: 8px; font-family: var(--display); font-size: 16px; color: var(--engrave); text-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 -1px 0 rgba(0, 0, 0, .5); }
.footer .fb .i { color: var(--engrave); }
.footer p { font-size: 13px; color: var(--muted); margin: 8px 0; }
.footer .dis { line-height: 1.7; max-width: 560px; margin: 12px auto 0; }

/* ───────── 홈 ───────── */
.hero { position: relative; text-align: center; padding: 0 0 36px; min-height: min(88svh, 760px); display: flex; flex-direction: column; align-items: center; }
.hero .spot { display: none; } /* 천창 빛은 환경 레이어가 맡음 */
.hero-statue { display: block; width: calc(100% + 2 * var(--pad)); margin: 0 calc(-1 * var(--pad)); pointer-events: none; }
/* 아래 35%는 바탕에 녹이고, 위·양옆 가장자리도 살짝 풀어 벽과 경계선이 없게(홈에서만 mask 사용) */
.hero-statue img { display: block; width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 60%, transparent), linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 60%, transparent), linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-composite: intersect; }
.hero h1 { position: relative; margin-top: -78px; font-family: var(--display); font-weight: 400; line-height: 1.2; letter-spacing: .02em; font-size: clamp(28px, 8vw, 46px); }
.hero h1 em { display: block; font-style: normal; color: var(--bone); font-size: 1.7em; margin-top: 4px; }
.hero h1 em span { display: inline-block; }
.hero-copy { font-size: 15px; line-height: 1.8; color: var(--muted); margin: 18px auto 0; max-width: 30em; text-align: center; }
.hero-actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; justify-content: center; width: 100%; }
.hero-actions .btn { flex: 1 1 150px; max-width: 240px; }
@media (max-width: 430px) { .hero-actions .btn { flex-basis: 100%; max-width: none; } }
.hero-note { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; margin-top: 22px; }
.hero-note .i { color: var(--muted); }

.section { padding: 28px 0; }
.sec-head { margin-bottom: 14px; }
.sec-head h2 { font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: .02em; }
.sub { font-size: 15px; color: var(--muted); line-height: 1.75; margin: 0; }

/* 재판 진행: 가죽 띠 하나(캡은 왼쪽 위·오른쪽 아래만), 칸 사이 세로 바느질 */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--cap-tl), var(--cap-br), var(--tex-leather), var(--leather);
  box-shadow: var(--l1); outline: 1px dashed var(--stitch); outline-offset: -7px;
}
.step { padding: 18px 4px 16px; text-align: center; min-width: 0; color: var(--engrave); text-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 -1px 0 rgba(0, 0, 0, .5); }
.step + .step { background-image: repeating-linear-gradient(180deg, var(--stitch) 0 4px, transparent 4px 8px); background-size: 1px calc(100% - 28px); background-position: 0 14px; background-repeat: no-repeat; }
.step small { display: none; }
.step .i { display: block; margin: 0 auto 8px; font-size: 24px; color: var(--engrave); }
.step h3 { font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--engrave); }
.step p { display: none; font-size: 13px; color: var(--muted); line-height: 1.6; margin: 6px 0 0; padding-inline: 8px; text-shadow: none; }
@media (min-width: 600px) { .step p { display: block; } .step h3 { font-size: 15px; } }

/* ───────── 버튼: 금속 판과 눌림 ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border: 0; border-radius: 0; text-decoration: none;
  font-family: var(--display); font-weight: 400; font-size: 16px; letter-spacing: .03em;
  color: var(--bone); background: transparent;
  transition: transform 80ms ease-out, box-shadow 80ms ease-out;
}
.btn:disabled { cursor: not-allowed; }
.btn:focus-visible { outline-offset: 3px; }
/* 황동 */
.btn-primary {
  background: var(--brass-grad); color: var(--engrave-ink); text-shadow: 0 1px 0 rgba(255, 240, 200, .45);
  box-shadow: inset 0 1px 0 rgba(255, 246, 220, .6), inset 0 -2px 0 rgba(70, 48, 12, .35), 0 2px 0 var(--brass-base), 0 8px 16px rgba(0, 0, 0, .35);
}
.btn-primary .i { color: var(--engrave-ink); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: translateY(2px); box-shadow: inset 0 2px 5px rgba(70, 48, 12, .45), 0 0 0 var(--brass-base); }
.btn-primary:disabled { background: linear-gradient(180deg, #666a4f, #5b5e45 50%, #4b4e39); /* 뼈색 글자 대비 약 5:1 */ color: var(--bone); text-shadow: none; box-shadow: none; filter: none; transform: none; }
.btn-primary:disabled .i { color: inherit; }
/* 어두운 바탕용 외곽 */
.btn-secondary { background: rgba(0, 0, 0, .22); color: var(--bone); box-shadow: inset 0 0 0 1px rgba(193, 154, 75, .45), inset 0 1px 0 rgba(255, 255, 255, .05); }
.btn-secondary:hover { background: rgba(0, 0, 0, .32); }
.btn-secondary:active { transform: translateY(1px); box-shadow: inset 0 0 0 1px rgba(193, 154, 75, .45), inset 0 2px 4px rgba(0, 0, 0, .4); }
/* 철판(명판 안 소환장 보내기, 이미지로 저장, 반대) — 마크업은 그대로, 위치로 고름 */
.btn-iron, .code-box .btn, #save, .modal [data-vote="no"] {
  background: #1c2227; color: var(--bone); text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 0 0 1px rgba(0, 0, 0, .35), 0 2px 0 #0d1012, 0 6px 12px rgba(0, 0, 0, .3);
}
.btn-iron .i, .code-box .btn .i, #save .i { color: var(--bone); }
.btn-iron:hover, .code-box .btn:hover, #save:hover, .modal [data-vote="no"]:hover { filter: brightness(1.15); }
.btn-iron:active, .code-box .btn:active, #save:active, .modal [data-vote="no"]:active { transform: translateY(2px); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .6), 0 0 0 #0d1012; }
/* 종이 위 잉크 버튼(입장 폼) */
.btn-ink, #join .btn-secondary { background: var(--ink); color: var(--paper); box-shadow: 0 2px 0 #0f0d0a, 0 6px 12px rgba(42, 38, 32, .25); }
.btn-ink:active, #join .btn-secondary:active { transform: translateY(2px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .5); }
/* 판결 전용 적색 외곽 */
.btn-stamp { background: transparent; color: var(--seal-text); box-shadow: inset 0 0 0 1px var(--seal); }
.btn-stamp:hover { background: rgba(179, 48, 47, .12); }
.btn-stamp:active { transform: translateY(1px); box-shadow: inset 0 0 0 1px var(--seal), inset 0 2px 4px rgba(0, 0, 0, .4); }
.full { width: 100%; }
.text-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border: 0; background: none; color: var(--bone); font-weight: 700; font-size: 14px; text-decoration: none; }

/* ───────── 페이지 ───────── */
.narrow { padding: 26px 0 56px; }
.dh { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.page-title { font-family: var(--display); font-weight: 400; line-height: 1.25; letter-spacing: .02em; font-size: clamp(26px, 7vw, 40px); margin: 14px 0 10px; }
.pill { font-size: 13px; color: var(--engrave); white-space: nowrap; flex-shrink: 0; text-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 -1px 0 rgba(0, 0, 0, .5); }
.pill.done { font-weight: 700; color: var(--bone); }
.pill.no { text-decoration: line-through; }

/* 가죽 서류철(접수·로비·변론 겉판) */
.case-form { padding: clamp(24px, 5vw, 32px) clamp(18px, 5vw, 30px); margin-top: 20px; }
.case-form + .case-form { margin-top: 14px; }
.form-head { margin-bottom: 16px; }
.form-head h2 { font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: .02em; margin-top: 8px; }
.fs { margin-bottom: 18px; min-width: 0; }
.fl { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 700; margin-bottom: 8px; color: var(--engrave); letter-spacing: .02em; text-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 -1px 0 rgba(0, 0, 0, .5); }
.fl span { font-size: 13px; font-weight: 500; color: var(--muted); text-shadow: none; }
.cc { text-align: right; color: var(--muted); font-size: 13px; margin-top: 6px; font-variant-numeric: tabular-nums; }

/* 종이 서식(접수 폼 안쪽 한 장, 진술서) */
.sheet { padding: 22px 18px 6px; margin: 4px 0 20px; }
.sheet .fl, #join .fl { color: var(--ink); text-shadow: none; font-size: 13px; letter-spacing: .02em; }
.sheet .fl span, #join .fl span { color: var(--ink-muted); }
.sheet .cc, #join .cc { color: var(--ink-muted); }
/* 서식 칸: 입력칸은 종이 위에만 나온다 */
input[type=text] {
  width: 100%; min-height: 48px; border: 0; border-bottom: 1px solid rgba(42, 38, 32, .35); border-radius: 0;
  background: rgba(255, 255, 255, .35); color: var(--ink); padding: 12px 12px 10px; font-size: 16px;
}
input[type=text]:focus { outline: 0; border-bottom: 2px solid var(--brass-lo); padding-bottom: 9px; background: rgba(255, 255, 255, .55); }
input[type=text]:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
::placeholder { color: #8a8170; opacity: 1; }
/* 사건번호 6칸: 고정폭 글꼴 + em 단위 칸이라 글자가 칸 가운데에 놓임(입력은 그대로 input 하나) */
input[type=text].code-input {
  text-transform: uppercase; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace; font-weight: 700; font-size: 18px;
  width: 15.6em; max-width: 100%; letter-spacing: 2em; padding: 12px 0 10px 1em !important;
  background: repeating-linear-gradient(90deg, transparent 0 calc(2.6em - 1px), var(--ink-rule) calc(2.6em - 1px) 2.6em) border-box, rgba(255, 255, 255, .35) !important;
}
input[type=text].code-input:focus { padding-bottom: 9px !important; }
.code-input::placeholder { letter-spacing: 2em; }
input[aria-invalid="true"], .fs.err input { border-bottom: 2px solid var(--err-ink); }
.err-msg { color: var(--err-ink); font-size: 13px; margin-top: 6px; }
/* 진술서: 괘선(32px)과 글줄이 맞게, 스크롤해도 같이 움직임. 왼쪽 여백선은 황동 갈색 */
textarea {
  display: block; width: 100%; min-height: 256px; max-height: 70vh; field-sizing: content; resize: vertical; /* 8줄, 지원 브라우저는 내용만큼 늘어남 */ border: 0; border-radius: 0; outline: 0;
  color: var(--ink); font-family: var(--serif); font-weight: 500; font-size: 16px; line-height: 32px;
  padding: 0 4px 0 20px; margin-top: 4px;
  background:
    linear-gradient(90deg, transparent 11px, rgba(156, 122, 52, .45) 11px 12px, transparent 12px) local,
    repeating-linear-gradient(180deg, transparent 0 31px, var(--ink-rule) 31px 32px) local;
}
textarea::placeholder { color: #8a8170; }
.sheet:focus-within { outline: 2px solid var(--brass); outline-offset: 4px; }
/* 개인정보 안내: 서식 맨 아래 각주 */
.privacy { display: block; border-top: 1px solid var(--ink-rule); padding: 12px 0 16px; margin: 4px 0 0; }
.privacy .i { display: none; }
.privacy p { font-size: 13px; line-height: 1.7; margin: 0; color: var(--ink-muted); }
.privacy p::before { content: "※ "; }

/* 입장 = 소환장 한 장(가죽 없이 종이만, 위에 절취선) */
#join.case-form { position: relative; padding-top: 34px; margin-top: 18px; }
#join.case-form::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px;
  background: radial-gradient(circle at 4px 0, var(--bg) 3.5px, transparent 4px) 0 0 / 8px 10px repeat-x;
}
#join.case-form::after { content: ""; position: absolute; left: 12px; right: 12px; top: 14px; border-top: 1px dashed rgba(42, 38, 32, .3); }
#join .form-head .eyebrow { color: var(--ink-muted); text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
#join .form-head h2 { color: var(--ink); text-shadow: 0 0 .5px rgba(42, 38, 32, .55); }

/* 안내: 황동 왼쪽 선 + 가죽(적색은 판결에만) */
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 14px 18px; font-size: 14px; line-height: 1.7; margin: 16px 0; outline: 0; box-shadow: var(--l1), inset 3px 0 0 var(--brass); background: var(--tex-leather), var(--leather); }
.notice .i { color: var(--brass); margin-top: 4px; }

/* ───────── 로비: 명판과 좌석 ───────── */
.code-box {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
  padding: 22px 22px 20px; margin-top: 20px;
  background:
    radial-gradient(circle at 35% 35%, var(--brass-hi), var(--brass-lo) 60%, var(--brass-base)) 9px 9px / 6px 6px no-repeat,
    radial-gradient(circle at 35% 35%, var(--brass-hi), var(--brass-lo) 60%, var(--brass-base)) calc(100% - 9px) 9px / 6px 6px no-repeat,
    radial-gradient(circle at 35% 35%, var(--brass-hi), var(--brass-lo) 60%, var(--brass-base)) 9px calc(100% - 9px) / 6px 6px no-repeat,
    radial-gradient(circle at 35% 35%, var(--brass-hi), var(--brass-lo) 60%, var(--brass-base)) calc(100% - 9px) calc(100% - 9px) / 6px 6px no-repeat,
    var(--brass-grad);
  box-shadow: inset 0 1px 0 rgba(255, 246, 220, .6), inset 0 -2px 0 rgba(70, 48, 12, .35), 0 2px 0 var(--brass-base), 0 16px 36px rgba(0, 0, 0, .5);
}
.code-box .label { display: block; font-size: 13px; font-weight: 700; letter-spacing: .3em; color: var(--engrave-ink); text-shadow: 0 1px 0 rgba(255, 240, 200, .45), 0 -1px 0 rgba(0, 0, 0, .25); }
.code-box strong { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(34px, 11vw, 48px); line-height: 1.2; letter-spacing: .18em; padding-left: .18em; font-variant-numeric: tabular-nums; color: var(--engrave-ink); text-shadow: 0 1px 0 rgba(255, 240, 200, .45), 0 -1px 0 rgba(0, 0, 0, .25); }
.code-box .btn { width: 100%; }

/* 역할 = 좌석 명패 */
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid rgba(193, 154, 75, .25); background: #1a2420; padding: 8px 6px; font-size: 15px; font-weight: 700; color: var(--engrave); text-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 -1px 0 rgba(0, 0, 0, .5); border-radius: 0; transition: transform 80ms ease-out; }
.choice:active { transform: translateY(1px); }
.choice.sel { background: var(--brass-grad); border-color: var(--brass-lo); color: var(--engrave-ink); text-shadow: 0 1px 0 rgba(255, 240, 200, .45); box-shadow: inset 0 1px 0 rgba(255, 246, 220, .5), inset 0 2px 4px rgba(70, 48, 12, .3); transform: translateY(1px); }
.choice:disabled { opacity: .4; cursor: not-allowed; border-style: dashed; }

/* 참여자 = 좌석 줄 */
.people { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); }
.people li { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 56px; padding: 8px 2px; border-top: 1px solid var(--rule-leather); }
.people li:last-child { border-bottom: 1px solid var(--rule-leather); }
.people .row-ic {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--display); font-size: 16px; color: var(--bone);
  background: radial-gradient(circle, var(--leather-hi) 0 58%, transparent 59%), var(--brass-grad);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .4), inset 0 0 0 1.5px transparent;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .55), 0 1px 0 rgba(255, 255, 255, .08);
}
.people .row-ic:empty { background: transparent; border: 1px dashed rgba(193, 154, 75, .45); box-shadow: none; }
.people .row-main { flex: 1 1 0; min-width: 0; overflow: hidden; }
.people strong { font-size: 15px; font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .row-main span { font-size: 13px; color: var(--engrave); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-form > .fl { margin-top: 6px; }

/* ───────── 대기 / 휴정 ───────── */
.pending { position: relative; text-align: center; padding: 34px 20px 30px; margin-top: 20px; overflow: hidden; }
.pending > *:not(.spot):not(.scan):not(.recess-statue) { position: relative; z-index: 1; }
.pending-ic {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; font-size: 26px; color: var(--bone);
  background: radial-gradient(circle, var(--leather-hi) 0 60%, transparent 61%), var(--brass-grad);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .45), 0 8px 18px rgba(0, 0, 0, .35);
}
.pending h2 { font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: .02em; margin: 12px 0; }
.pending p { font-size: 14px; color: var(--muted); line-height: 1.75; max-width: 440px; margin: 0 auto; }
.pending .btn { margin-top: 18px; }
.spin { display: inline-block; width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .8s linear infinite; vertical-align: -2px; }
@keyframes sp { to { transform: rotate(360deg); } }
.gavel-tap { animation: tap 1.6s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes tap { 0%, 55%, 100% { transform: rotate(0); } 28% { transform: rotate(-24deg); } 42% { transform: rotate(4deg); } }

/* 휴정: 가죽판 없이 벽 위, 빛 아래 여신 */
.pending.recess {
  min-height: 64vh; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  background: none; box-shadow: none; outline: 0; padding: 0 12px 34px;
}
.recess-statue { position: absolute; left: 50%; top: 0; width: min(100%, 420px); height: auto; transform: translateX(-50%); opacity: .55; filter: grayscale(.3); pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 45%, transparent 85%), linear-gradient(to right, transparent, #000 14%, #000 86%, transparent); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 45%, transparent 85%), linear-gradient(to right, transparent, #000 14%, #000 86%, transparent); mask-composite: intersect; }
.recess .spot { position: absolute; left: -20%; width: 140%; top: 0; height: 100%; pointer-events: none; z-index: 0; opacity: .5;
  background: linear-gradient(180deg, rgba(223, 231, 238, .14), rgba(223, 231, 238, 0) 85%);
  clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%); transform-origin: 50% 0; animation: swing 6s ease-in-out infinite alternate; }
@keyframes swing { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }
.scan { display: none; } /* 스캔 라인 폐기 */
.recess .pending-ic { margin-top: 0; }
.pending p.cycle { position: relative; width: 100%; height: 28px; margin-top: 18px; font-family: var(--display); font-size: 17px; color: var(--bone); letter-spacing: .02em; text-shadow: 0 -1px 0 rgba(0, 0, 0, .55), 0 6px 18px rgba(0, 0, 0, .45); }
.cycle span { position: absolute; inset: 0; opacity: 0; animation: cyc 6s infinite; }
.cycle span:nth-child(2) { animation-delay: 2s; }
.cycle span:nth-child(3) { animation-delay: 4s; }
@keyframes cyc { 0% { opacity: 0; transform: translateY(8px); } 6%, 30% { opacity: 1; transform: none; } 36%, 100% { opacity: 0; transform: translateY(-8px); } }

/* ───────── 판결문: 펼친 법전의 한 페이지 ───────── */
.verdict {
  position: relative; margin: 26px 6px 0;
  padding: clamp(30px, 8vw, 44px) clamp(18px, 5.5vw, 36px) clamp(24px, 6vw, 36px);
}
/* 종이 뒤 가죽 받침(6px 링, 그림자로) + 네 모서리 황동 캡(위에 얹는 투명 판).
   음수 z-index 의사요소를 쓰지 않음: 이미지 저장(html2canvas)에서 종이 위로 그려질 수 있어서 */
.verdict { box-shadow: 0 0 0 6px var(--leather), 0 0 0 7px rgba(193, 154, 75, .3), var(--l2), inset 0 0 36px var(--paper-edge); }
.verdict::before {
  content: ""; position: absolute; inset: -6px; z-index: 1; pointer-events: none;
  background: var(--cap-tl), var(--cap-tr), var(--cap-bl), var(--cap-br);
}
.vtop { position: relative; text-align: center; }
.vtop .eyebrow { display: block; font-family: var(--serif); font-weight: 600; font-size: 13px; letter-spacing: .5em; padding-left: .5em; color: var(--ink); text-shadow: none; }
.vtop h2 {
  font-family: var(--display); font-weight: 400; font-size: clamp(24px, 7vw, 30px); letter-spacing: .04em; line-height: 1.3; color: var(--ink);
  margin-top: 12px; padding: 14px 0 13px; text-shadow: 0 0 .5px rgba(42, 38, 32, .55);
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 4px / 100% 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 calc(100% - 4px) / 100% 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 100% / 100% 1px no-repeat;
}
/* 인주 도장: 테두리 + 안쪽 선 + 붉은 글자, 위에 종이색 얼룩 한 장(::after) */
.stamp {
  position: absolute; right: -8px; top: -18px; width: 64px; height: 64px;
  display: grid; place-items: center; text-align: center; font-family: var(--display); font-size: 15px; line-height: 1.25; color: var(--seal-ink);
  border: 2.5px solid var(--seal); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--seal);
  background: rgba(179, 48, 47, .06); transform: rotate(7deg);
}
.stamp::after, .vres strong::after { content: ""; position: absolute; inset: -3px; background: var(--tex-ink) 0 0 / 120px 120px; opacity: .85; pointer-events: none; }
.vmeta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--ink-muted); padding: 14px 0 0; margin: 0; }
/* 사건 정보: 표 서식 */
.vparties { margin-top: 12px; display: grid; }
.vparties div { display: flex; align-items: baseline; gap: 12px; padding: 8px 2px; border-top: 1px solid var(--ink-rule); min-width: 0; }
.vparties div:last-child { border-bottom: 1px solid var(--ink-rule); }
.vparties .role { flex: 0 0 72px; width: 72px; font-size: 13px; color: var(--ink-muted); font-weight: 700; }
.vparties strong { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.vres { padding: 24px 0 6px; }
.vres > span { font-size: 13px; color: var(--ink-muted); font-weight: 700; }
.vres h3 { font-family: var(--display); font-weight: 400; font-size: clamp(22px, 6.4vw, 30px); line-height: 1.4; letter-spacing: .01em; color: var(--ink); margin: 8px 0 16px; overflow-wrap: anywhere; text-shadow: 0 0 .5px rgba(42, 38, 32, .55); }
/* 판결 유형: 붉은 잉크 도장 상자 */
.vres strong { position: relative; display: inline-block; font-family: var(--display); font-weight: 400; font-size: 17px; letter-spacing: .08em; color: var(--seal-ink); background: transparent; border: 2px solid var(--seal); padding: 5px 14px; transform: rotate(-2deg); margin-left: 2px; }
.hw { display: inline-block; }
.hc { display: inline-block; }
.vblock { padding-top: 22px; }
.vblock h4 { font-size: 14px; font-weight: 700; color: var(--ink); margin: 0 0 10px; }
.vblock h4::after { content: ""; display: block; width: 24px; height: 1px; background: var(--ink); margin-top: 6px; }
.vblock p { font-family: var(--serif); font-weight: 500; font-size: 16px; line-height: 1.9; color: var(--ink); margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
/* 선고 형량: 위아래 적색 이중선 */
.sentence { margin-top: 26px; padding: 14px 4px 16px; border-top: 6px double var(--seal); border-bottom: 6px double var(--seal); transform-origin: 50% 50%; }
.sentence .sl { display: block; color: var(--seal-ink); font-size: 13px; font-weight: 700; letter-spacing: .2em; margin-bottom: 6px; }
.sentence p { font-family: var(--display); font-size: clamp(19px, 5.2vw, 22px); line-height: 1.6; color: var(--ink); margin: 0; overflow-wrap: anywhere; }
.note-q { margin: 26px 0 0; padding: 14px 0 0; text-align: center; font-family: var(--serif); font-weight: 500; font-size: 15px; line-height: 1.8; color: var(--ink); overflow-wrap: anywhere; position: relative; }
.note-q::before { content: ""; position: absolute; top: 0; left: 50%; width: 40px; margin-left: -20px; height: 1px; background: var(--ink-rule); background: rgba(42, 38, 32, .4); }
.note-q span { display: block; font-family: var(--sans); font-size: 13px; font-weight: 700; color: var(--ink-muted); margin-bottom: 4px; }
.legal { font-size: 13px; color: var(--ink-muted); line-height: 1.7; margin: 22px 0 0; padding-top: 12px; border-top: 1px solid var(--ink-rule); }
.vactions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.vactions .wide { grid-column: 1 / -1; }
.vactions .btn { padding-inline: 12px; font-size: 15px; gap: 8px; white-space: nowrap; }
.bottom { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.history { margin-top: 18px; padding: 6px 18px 16px; }
.history summary { cursor: pointer; display: flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 700; color: var(--engrave); }
.history p { font-size: 14px; margin: 10px 0 0; }

/* 선고 연출: 판결문 순차 공개 (.stamping 일 때만, 시간·순서 그대로) */
.verdict.stamping .vtop, .verdict.stamping .vmeta, .verdict.stamping .vparties { animation: fadeUp .35s ease-out 1.6s both; }
.verdict.stamping .vres > span { animation: fadeUp .3s ease-out 1.65s both; }
.verdict.stamping .vres strong { animation: wipe .12s cubic-bezier(.2, .8, .2, 1) 1.7s both; }
.verdict.stamping .hc { animation: charIn .22s ease-out both; animation-delay: calc(1.85s + var(--i) * 14ms); }
.verdict.stamping .vres + .vblock { animation: fadeUp .35s ease-out 2.3s both; }
.verdict.stamping .vblock + .vblock { animation: fadeUp .35s ease-out 2.5s both; }
.verdict.stamping .sentence { animation: inkIn .35s cubic-bezier(.2, 1.5, .4, 1) 2.8s both; }
.verdict.stamping .stamp { animation: stampin .35s cubic-bezier(.3, 1.7, .5, 1) 3s both; }
.verdict.stamping .note-q { animation: fadeUp .35s ease-out 3.2s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* 판결 유형 도장이 '찍힘' (이름은 그대로 wipe) */
@keyframes wipe { from { opacity: 0; transform: rotate(-2deg) scale(1.3); } to { opacity: 1; transform: rotate(-2deg) scale(1); } }
@keyframes charIn { from { opacity: 0; transform: translateY(12px) scale(1.25); } to { opacity: 1; transform: none; } }
@keyframes inkIn { from { opacity: 0; transform: scale(1.3); } to { opacity: 1; transform: none; } }
@keyframes stampin { from { opacity: 0; transform: rotate(7deg) scale(2.4); } to { opacity: 1; transform: rotate(7deg) scale(1); } }

/* 땅! 땅! 땅! 오버레이 */
.slam { position: fixed; inset: 0; z-index: 30; background: var(--void); overflow: hidden; animation: slamout .3s ease 1.65s forwards; }
.slam::after { content: ""; position: absolute; inset: -25%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle at center, transparent 34%, rgba(0, 0, 0, .92) 72%); opacity: .55; animation: vig .8s ease-in-out 1.05s both; }
@keyframes vig { 0% { opacity: .55; transform: scale(1); } 45% { opacity: 1; transform: scale(.7); } 100% { opacity: .55; transform: scale(1.2); } }
.slam-stage { position: absolute; inset: 0; z-index: 1; transform: scale(var(--z, 1)); transition: transform .12s ease-out; }
.slam-shake { position: absolute; inset: 0; display: grid; place-items: center; }
.slam-shake.shake { animation: shake .36s ease; }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(calc(var(--amp) * -1px), calc(var(--amp) * .6px)); }
  40% { transform: translate(calc(var(--amp) * .9px), calc(var(--amp) * -.6px)); }
  60% { transform: translate(calc(var(--amp) * -.6px), calc(var(--amp) * .4px)); }
  80% { transform: translate(calc(var(--amp) * .4px), calc(var(--amp) * -.2px)); }
}
.slam-word { position: absolute; font-family: var(--display); color: var(--bone); font-size: 72px; line-height: 1; opacity: 0; text-shadow: 0 6px 0 rgba(0, 0, 0, .5); }
.slam-word.w1 { transform: translate(-16vw, -22vh) rotate(-8deg); animation: hit .3s cubic-bezier(.2, 1.6, .4, 1) 0s forwards; }
.slam-word.w2 { transform: translate(14vw, -10vh) rotate(5deg); animation: hit .3s cubic-bezier(.2, 1.6, .4, 1) .36s forwards; }
.slam-word.w3 { transform: translate(0, 6vh); color: var(--seal-text); font-size: 120px; animation: hit3 .22s ease-out .8s forwards; }
.slam-word.dim { animation: none; opacity: .35; }
@keyframes hit { 0% { opacity: 0; scale: 2.8; } 60% { opacity: 1; } 100% { opacity: 1; scale: 1; } }
@keyframes hit3 { 0% { opacity: 0; scale: 1.8; } 70% { opacity: 1; scale: .96; } 100% { opacity: 1; scale: 1; } }
@keyframes slamout { to { opacity: 0; visibility: hidden; } }
.slam-hint { position: absolute; left: 0; right: 0; bottom: max(24px, env(safe-area-inset-bottom)); text-align: center; font-size: 13px; color: var(--muted); z-index: 1; }
/* 번쩍은 3타에만 한 번, 불투명도 .25 이하, 60ms */
.flash { position: absolute; inset: 0; background: #fff; z-index: 3; pointer-events: none; opacity: 0; animation: flash .06s linear; }
@keyframes flash { 0% { opacity: .25; } 100% { opacity: .25; } }
.ring { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 2px solid var(--bone); border-radius: 50%; opacity: 0; pointer-events: none; animation: ring .7s ease-out forwards; }
.ring.r3 { border-color: var(--seal); animation-duration: .8s; }
@keyframes ring { 0% { opacity: .6; transform: scale(.4); } 100% { opacity: 0; transform: scale(14); } }
.dust { position: absolute; left: 50%; top: 56%; width: var(--s); height: var(--s); background: var(--bone); opacity: 0; pointer-events: none; animation: dust .8s ease-out forwards; }
@keyframes dust { 0% { opacity: .75; transform: translate(0, 0); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.3); } }

/* 홈 히어로: 땅땅땅 쾅쾅쾅 (한 번만) */
.hero.play h1 em span { animation: slamIn .42s cubic-bezier(.2, 1.6, .4, 1) both; }
.hero.play h1 em span:nth-child(2) { animation-delay: .4s; }
.hero.play h1 em span:nth-child(3) { animation-delay: .8s; }
.hero.play h1 { animation: heroHit 1.7s linear both; }
@keyframes slamIn { 0% { opacity: 0; transform: scale(2.6) translateY(-30px); } 100% { opacity: 1; transform: none; } }
@keyframes heroHit {
  0%, 22%, 34%, 46%, 58%, 100% { transform: none; }
  25% { transform: translateY(3px); } 28% { transform: translateY(-1px); }
  37% { transform: translateY(5px); } 40% { transform: translateY(-2px); }
  49% { transform: translateY(8px); } 52% { transform: translateY(-3px); }
}

/* 인트로 게이트(연출 본체 스타일은 intro/intro.css를 탭한 뒤 불러옴) */
.intro-lock, .intro-lock body { overflow: hidden; }
.intro-pending .hero.play h1, .intro-pending .hero.play h1 em span { animation-play-state: paused; }
.intro-done .hero.play h1, .intro-done .hero.play h1 em span { animation: none; }
.intro-flip .hero h1 em span { opacity: 0; transition: opacity .1s linear; }
.ttt-gate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: radial-gradient(60% 50% at 50% 0%, rgba(223, 231, 238, .10), transparent 70%), var(--bg); }
.ttt-gate-in { width: 100%; max-width: 360px; text-align: center; }
.ttt-gate h2 { font-family: var(--display); font-weight: 400; font-size: clamp(54px, 18vw, 84px); line-height: 1.05; letter-spacing: .04em; }
.ttt-gate p { margin: 10px 0 0; color: var(--muted); }
.ttt-gate-acts { display: grid; gap: 10px; margin-top: 30px; }
.ttt-gate .btn { width: 100%; min-height: 48px; }
.ttt-gate-link { margin-top: 14px; min-height: 44px; padding: 0 12px; background: none; border: 0; color: var(--bone); text-decoration: underline; text-underline-offset: 4px; }
.ttt-gate .ttt-gate-note { font-size: 13px; margin-top: 6px; }
.ttt-gate-skip { position: absolute; left: 50%; bottom: max(28px, calc(env(safe-area-inset-bottom) + 16px)); transform: translateX(-50%); }
.ttt-gate-load { margin-top: 26px !important; display: flex; align-items: center; justify-content: center; gap: 10px; }
.ttt-gate-load[hidden] { display: none; }
.ttt-spin { width: 16px; height: 16px; border: 2px solid var(--muted); border-top-color: var(--brass); border-radius: 50%; animation: tttSpin .8s linear infinite; }
@keyframes tttSpin { to { transform: rotate(1turn); } }

/* 재심 투표: 아래에서 올라오는 가죽판 + 위 황동 레일 */
.modal-back { position: fixed; inset: 0; z-index: 20; background: rgba(10, 13, 15, .78); display: flex; align-items: flex-end; justify-content: center; }
.modal {
  position: relative; width: 100%; max-width: 720px; max-height: 92dvh; overflow-y: auto; padding: 30px clamp(18px, 4vw, 30px) 30px;
  background: var(--cap-tl), var(--cap-tr), var(--tex-leather), var(--leather);
  box-shadow: inset 0 3px 0 var(--brass-lo), inset 0 1px 0 var(--brass-hi), 0 -12px 30px rgba(0, 0, 0, .5);
}
.modal h2 { font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: .02em; margin: 12px 0 8px; }
.modal .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

/* 광고 자리 */
.ad-slot { margin: 18px 0; text-align: center; }
.ad-slot:empty { display: none; }

/* 토스트: 종이 쪽지 + 황동 압정 */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px); opacity: 0; visibility: hidden; transition: transform .25s, opacity .25s; z-index: 40;
  padding: 12px 18px 12px 30px; font-size: 14px; font-weight: 700; max-width: calc(100% - 32px);
}
.toast::before { content: ""; position: absolute; left: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--brass-hi), var(--brass-lo) 60%, var(--brass-base)); box-shadow: 0 1px 1px rgba(0, 0, 0, .4); }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition: none !important; }
  .slam { display: none; }
  .slam-hint { display: none; }
  .recess .spot { animation: none; }
  .cycle span { animation: none; opacity: 0; }
  .cycle span:first-child { opacity: 1; }
  .spin { animation-duration: 2.4s !important; animation-iteration-count: infinite !important; }
  .btn:active, .choice:active { transform: none; }
  #ambient { display: none !important; }
}

/* ───────── v4 게임 느낌: 진행 단계 · 역할 타일 · 3D 법정 ───────── */
/* 재판 진행 단계(출석 → 변론 → 심리 → 판결): 지금 단계의 황동 줄이 숨 쉰다 */
.track { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule-leather); border-bottom: 1px solid var(--rule-leather); }
.track li { position: relative; display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 11px 0 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.track li b { font-family: var(--display); font-weight: 400; font-size: 12px; color: var(--muted); opacity: .8; }
.track li.past { color: var(--engrave); }
.track li.now { color: var(--brass-hi); }
.track li.now b { color: var(--brass); opacity: 1; }
.track li::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.track li.past::after { background: var(--brass-lo); }
.track li.now::after { background: var(--brass-grad); box-shadow: 0 0 10px rgba(220, 189, 112, .55); animation: trackGlow 2.4s ease-in-out infinite; }
@keyframes trackGlow { 50% { box-shadow: 0 0 3px rgba(220, 189, 112, .25); } }

/* 역할 = 아이콘 달린 좌석 명패 */
.choice { flex-direction: column; gap: 6px; min-height: 72px; }
.choice .i { font-size: 22px; }
.choice span { font-size: 14px; line-height: 1.2; }

/* 3D 법정 무대 */
.stage3d { position: absolute; inset: 0; }
.stage3d canvas { display: block; width: 100%; height: 100%; }
.recess-stage { position: relative; flex: 1 1 auto; min-height: 270px; width: calc(100% + 24px); margin: 0 -12px 6px; pointer-events: none; }
.recess-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, var(--bg), transparent 14%, transparent 70%, var(--bg)); }
.recess.has-stage .recess-statue, .recess.has-stage .spot { display: none; }
.slam-3d { position: absolute; inset: 0; z-index: 0; }
.slam.with-3d { background: #0d1114; }
/* 3D 연출일 때 '땅!' 글자는 판사 얼굴을 가리지 않게 화면 아래쪽으로 */
.slam.with-3d .slam-word { font-size: clamp(48px, 13vw, 72px); }
.slam.with-3d .slam-word.w1 { transform: translate(-22vw, 16vh) rotate(-8deg); }
.slam.with-3d .slam-word.w2 { transform: translate(20vw, 22vh) rotate(5deg); }
.slam.with-3d .slam-word.w3 { transform: translate(0, 31vh); font-size: clamp(76px, 22vw, 120px); }

/* 방침 페이지·안내 문구 */
.privacy p.aiwarn { margin-top: 8px; }
.privacy p.aiwarn::before { content: ""; }
.aiwarn { font-size: 12.5px; line-height: 1.7; }
.aiwarn a, .footer .dis a { color: inherit; text-decoration: underline; }
.legal-h { font-size: 17px; margin: 28px 0 8px; }
.legal-p { font-size: 14.5px; line-height: 1.8; margin: 6px 0; }
