/* 기업 인생 게임 — 진행판(전자칠판) 옷. 정본 docs/soc2-05-game-spec.md §4-A·§6.
   기준 1920x1080(#stage), 다른 크기는 board.js 가 비율 유지 확대·축소. 모서리 각짐 · 그림자 흐림 0 · 둥근 모서리는 번호 동그라미만. */
@font-face { font-family: "GalmuriB"; src: url("fonts/Galmuri11-Bold.woff2") format("woff2"); font-weight: 700; font-display: block; }
@font-face { font-family: "Pretendard"; src: url("fonts/pretendard-400.woff2") format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "Pretendard"; src: url("fonts/pretendard-700.woff2") format("woff2"); font-weight: 700; font-display: block; }

:root {
  --bg: #141726; --panel: #232842; --cell: #2d3354; --ink: #f2efe6; --soft: #a9adc6; --edge: #0b0d18;
  --hi: #ffd54a; --hi-deep: #a8871c;
  --m: #f2c14e; --w: #f28c4e; --c: #ef6f9c; --e: #6cc66c; --r: #6aa6ff;
  --spring: #f7a8c4; --summer: #57c4a0; --autumn: #e88a3c; --winter: #9cc7ef;
  --gal: "GalmuriB", "Pretendard", sans-serif;
  --txt: "Pretendard", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--edge); color: var(--ink); overflow: hidden; }
body { font-family: var(--txt); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 4px solid var(--hi); outline-offset: 4px; }

/* ---------- stage ---------- */
.stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform: translate(-50%, -50%) scale(var(--k, 1));
  background: var(--bg); overflow: hidden; }
/* 가장자리 옅은 별 도트 무늬 */
.stage::before { content: ""; position: absolute; inset: 0; opacity: .55; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' shape-rendering='crispEdges'%3E%3Crect x='14' y='22' width='3' height='3' fill='%23a9adc6'/%3E%3Crect x='76' y='8' width='3' height='3' fill='%236b7099'/%3E%3Crect x='98' y='64' width='3' height='3' fill='%23a9adc6'/%3E%3Crect x='40' y='92' width='3' height='3' fill='%236b7099'/%3E%3Crect x='60' y='50' width='3' height='3' fill='%234a5180'/%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 58%, #000 92%); mask-image: radial-gradient(ellipse at center, transparent 58%, #000 92%); }
.views, .view { position: absolute; inset: 0; }
.view > *, .view > .scene { position: absolute; }
.gal { font-family: var(--gal); font-weight: 700; }

/* ---------- card ---------- */
.card { background: var(--panel); border: 2px solid var(--edge); border-radius: 0;
  box-shadow: inset 0 2px 0 #3c4470, inset 0 -2px 0 #171a2e; }
.cell { background: var(--cell); border: 2px solid var(--edge); }

/* ---------- name tag ---------- */
.tag { display: inline-flex; align-items: center; gap: 8px; height: 44px; max-width: 100%; padding: 0 12px 0 4px; background: var(--cell);
  border: 2px solid var(--edge); box-shadow: inset 0 2px 0 #3f4672; font-family: var(--gal); font-weight: 700; font-size: 28px; line-height: 1;
  color: var(--ink); white-space: nowrap; overflow: hidden; }
.tag .n { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--hi); color: var(--bg); font-size: 20px; }
.tag .nm { overflow: hidden; text-overflow: ellipsis; }
.tag.auto { opacity: .5; border: 2px dashed var(--soft); box-shadow: none; }
.tag .tech { flex: none; width: 14px; height: 14px; background: var(--hi); transform: rotate(45deg); margin-left: 2px; }

/* ---------- buttons ---------- */
.go { position: absolute; right: 20px; bottom: 16px; width: 430px; height: 104px; z-index: 30; display: flex; align-items: center; justify-content: center; gap: 22px;
  background: var(--hi); color: var(--bg); border: 2px solid var(--edge); border-radius: 0; cursor: pointer;
  font-family: var(--gal); font-weight: 700; font-size: 44px; box-shadow: inset 0 3px 0 #fff1b0, 0 6px 0 var(--hi-deep), 0 8px 0 var(--edge); }
.go:active { transform: translateY(4px); box-shadow: inset 0 3px 0 #fff1b0, 0 2px 0 var(--hi-deep), 0 4px 0 var(--edge); }
.go:disabled { opacity: .35; cursor: default; }
.go:focus-visible { outline-color: var(--ink); }
.go-arrow { width: 20px; height: 28px; background: var(--bg);
  clip-path: polygon(0 0, 25% 0, 25% 14%, 50% 14%, 50% 29%, 75% 29%, 75% 43%, 100% 43%, 100% 57%, 75% 57%, 75% 71%, 50% 71%, 50% 86%, 25% 86%, 25% 100%, 0 100%);
  animation: nudge 1s steps(2) infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }
.gear { position: absolute; right: 14px; top: 14px; width: 64px; height: 64px; z-index: 30; padding: 0; cursor: pointer;
  background: rgba(35, 40, 66, .85); border: 2px solid var(--edge); border-radius: 0; }
.gear-ico { display: block; width: 40px; height: 40px; margin: auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' shape-rendering='crispEdges'%3E%3Cpath fill='%23a9adc6' d='M4 0h2v2h1V1h2v2H8v1h2v2H8v1h1v2H7V8H6v2H4V8H3v1H1V7h1V6H0V4h2V3H1V1h2v1h1z'/%3E%3Crect x='4' y='4' width='2' height='2' fill='%23232842'/%3E%3C/svg%3E") center/contain no-repeat; }
.btn { min-height: 60px; padding: 0 26px; font-family: var(--gal); font-weight: 700; font-size: 28px; cursor: pointer;
  background: var(--cell); color: var(--ink); border: 2px solid var(--edge); border-radius: 0; box-shadow: inset 0 2px 0 #3f4672, 0 4px 0 var(--edge); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 #3f4672, 0 1px 0 var(--edge); }
.btn.primary { background: var(--hi); color: var(--bg); box-shadow: inset 0 2px 0 #fff1b0, 0 4px 0 var(--hi-deep); }
.btn.danger { background: #8e2f3c; }
.btn.sm { min-height: 52px; font-size: 24px; }
.btn:disabled { opacity: .4; cursor: default; }

/* ---------- offline band ---------- */
.offline { position: absolute; left: 0; right: 0; top: 0; height: 64px; z-index: 40; display: grid; place-items: center;
  background: var(--hi); color: var(--bg); font-family: var(--gal); font-weight: 700; font-size: 32px; border-bottom: 4px solid var(--edge); }

/* ---------- PIN ---------- */
.gate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: var(--bg); }
.gate-card { width: 560px; padding: 44px; display: flex; flex-direction: column; gap: 22px; }
.gate-card label { font-family: var(--gal); font-weight: 700; font-size: 40px; }
.field { background: var(--cell); color: var(--ink); border: 2px solid var(--edge); border-radius: 0; font-family: var(--txt); font-size: 26px; padding: 10px 14px;
  box-shadow: inset 0 2px 0 #171a2e; }
.field:focus-visible { outline-offset: 0; }
.pin { height: 84px; font-family: var(--gal); font-size: 44px; letter-spacing: .4em; text-align: center; }
.gate .btn { min-height: 76px; font-size: 36px; }

/* ---------- dialogs ---------- */
dialog { color: var(--ink); padding: 0; }
dialog::backdrop { background: rgba(11, 13, 24, .72); }
.ask { width: 760px; padding: 40px 44px 36px; }
.ask p { margin: 0 0 32px; font-family: var(--gal); font-weight: 700; font-size: 44px; line-height: 1.3; }
.ask .acts { display: flex; justify-content: flex-end; gap: 18px; }
.ask .btn { min-height: 72px; font-size: 32px; min-width: 180px; }
.settings { width: min(1640px, 94vw); max-height: 92vh; overflow: auto; }
.set-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 20px 32px; background: var(--panel); border-bottom: 2px solid var(--edge); }
.set-head h2 { margin: 0; font-family: var(--gal); font-weight: 700; font-size: 40px; }
.set-body { padding: 8px 32px 28px; }
.set { padding: 22px 0; }
.set + .set { border-top: 2px solid #171a2e; }
.set h3 { margin: 0 0 14px; font-family: var(--gal); font-weight: 700; font-size: 30px; color: var(--hi); }
.set.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.field.num { width: 160px; font-family: var(--gal); font-size: 32px; }
.radio { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; font-family: var(--gal); font-weight: 700; font-size: 28px; background: var(--cell); border: 2px solid var(--edge); cursor: pointer; }
.radio input { width: 24px; height: 24px; accent-color: var(--hi); }
/* 학생 번호 바꾸기: 들어온 학생 고르기 → 새 번호 → 바꾸기 */
.field.pick { min-width: 300px; font-family: var(--gal); font-weight: 700; font-size: 28px; }
.move-arrow { font-family: var(--gal); font-weight: 700; font-size: 32px; color: var(--soft); }
.move-msg { min-height: 1.3em; margin: 12px 0 0; font-family: var(--gal); font-weight: 700; font-size: 26px; color: var(--hi); word-break: keep-all; }
.move-msg.bad { color: #ff8a8a; }

/* ---------- shared bits ---------- */
.scene { overflow: hidden; }
.chip { display: inline-block; padding: 8px 16px; font-family: var(--gal); font-weight: 700; font-size: 32px; line-height: 1.1; color: var(--bg); border: 2px solid var(--edge); }
.money { color: var(--m); }
.plate { padding: 10px 18px; background: rgba(20, 23, 38, .88); border: 2px solid var(--edge); font-family: var(--gal); font-weight: 700; color: var(--ink); }

/* ---------- lobby ---------- */
.lobby .scene { left: 20px; top: 20px; width: 800px; height: 450px; border: 2px solid var(--edge); }
.lobby .addr { left: 20px; top: 488px; width: 800px; padding: 16px 10px; text-align: center; font-size: 40px; color: var(--hi); letter-spacing: -.01em; }
.lobby .qr { left: 220px; top: 580px; width: 400px; height: 400px; background: #fff; border: 8px solid #fff; outline: 2px solid var(--edge); }
.lobby .qr img { display: block; width: 100%; height: 100%; }
.lobby .head { left: 860px; top: 20px; width: 960px; height: 100px; display: flex; align-items: center; font-size: 56px; }
.lobby .head b { color: var(--hi); margin: 0 .15em; }
.lobby .seats { left: 860px; top: 136px; width: 1040px; height: 800px; display: grid; gap: 14px; }
.seat { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-width: 0; padding: 2px;
  background: transparent; border: 2px dashed #3a4068; }
.seat .big { font-family: var(--gal); font-weight: 700; font-size: 56px; line-height: 1; color: #3a4068; }
.seat .tag { visibility: hidden; gap: 6px; padding: 0 6px; }
.seat .tag .n { display: none; } /* 큰 번호가 칸에 있으니 이름표는 이름만, 칸 폭 전체를 쓴다 */
.seat.on { background: var(--panel); border: 2px solid var(--hi); box-shadow: inset 0 2px 0 #3c4470, 0 0 0 2px var(--edge); }
.seat.on .big { color: var(--hi); }
.seat.on .tag { visibility: visible; }

/* ---------- found ---------- */
.found .scene { left: 0; top: 0; width: 1920px; height: 360px; border-bottom: 2px solid var(--edge); }
.found .count { left: 40px; top: 128px; font-size: 60px; }
.found .count b { color: var(--hi); }
.found .shops { left: 20px; top: 376px; width: 1880px; height: 560px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 102px; gap: 12px; }
.shop { position: relative; display: flex; align-items: center; gap: 12px; padding: 2px 12px 2px 2px; min-width: 0; }
.shop.empty { background: transparent; border: 2px dashed #2e3354; box-shadow: none; }
.bld { flex: none; width: 96px; height: 96px; position: relative; }
.bld.blank { background: transparent; }
.shop .txt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.shop .co { font-family: var(--gal); font-weight: 700; font-size: 28px; line-height: 1.1; white-space: nowrap; overflow: hidden; color: var(--ink); }
.shop .tag { align-self: flex-start; }

/* ---------- year ---------- */
.year .scene { left: 0; top: 0; width: 1920px; height: 1080px; }
.year .wash { inset: 0; opacity: .5; }
.year .cal { left: 700px; top: 110px; width: 520px; height: 560px; perspective: 1400px; }
.cal .rings { position: absolute; left: 60px; right: 60px; top: -18px; height: 40px; display: flex; justify-content: space-between; z-index: 3; }
.cal .rings i { width: 22px; height: 40px; background: var(--soft); border: 2px solid var(--edge); }
.cal .page { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--ink); color: var(--bg); border: 4px solid var(--edge); box-shadow: 0 10px 0 #9b97a0, 0 14px 0 var(--edge); transform-origin: 50% 0; backface-visibility: hidden; }
.cal .page .top { position: absolute; left: 0; right: 0; top: 0; height: 96px; border-bottom: 4px solid var(--edge); }
.cal .page .yn { font-family: var(--gal); font-weight: 700; font-size: 230px; line-height: 1; margin-top: 70px; }
.cal .page .sn { font-family: var(--gal); font-weight: 700; font-size: 72px; line-height: 1; }
.year .drop { left: 0; width: 1920px; top: 760px; display: flex; justify-content: center; font-size: 124px; line-height: 1; color: var(--ink); text-shadow: 6px 6px 0 var(--edge); }
.year .drop span { display: inline-block; white-space: pre; }

/* ---------- open ---------- */
.open .scene { left: 0; top: 0; width: 1120px; height: 630px; border-right: 2px solid var(--edge); border-bottom: 2px solid var(--edge); }
.band { display: flex; align-items: stretch; gap: 0; }
.band .chip { display: flex; align-items: center; }
.band .ttl { display: flex; align-items: center; padding: 8px 18px; font-family: var(--gal); font-weight: 700; font-size: 32px; background: rgba(20, 23, 38, .9); border: 2px solid var(--edge); border-left: 0; }
.open .band { left: 16px; top: 16px; max-width: 1088px; }
.open .ev { left: 1136px; top: 0; width: 784px; height: 630px; padding: 24px 32px 24px; display: flex; flex-direction: column; gap: 14px; }
.ev .who { display: flex; align-items: flex-end; gap: 16px; padding-right: 76px; min-height: 76px; }
.ev .face { width: 48px; height: 72px; flex: none; }
.ev .whoName { font-family: var(--gal); font-weight: 700; font-size: 40px; color: var(--hi); line-height: 1.1; padding-bottom: 4px; }
.ev .say { margin: 0; font-size: 44px; line-height: 1.42; word-break: keep-all; overflow-wrap: anywhere; cursor: pointer; flex: 1; }
.ev .say .cur { display: inline-block; width: 18px; height: 36px; margin-left: 4px; vertical-align: -4px; background: var(--hi); animation: blink .8s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.opts { left: 16px; top: 646px; width: 1440px; height: 420px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.opt { display: flex; flex-direction: column; justify-content: space-between; padding: 26px 26px 22px; min-width: 0; }
.opt .lb { font-family: var(--txt); font-weight: 700; font-size: 36px; line-height: 1.36; word-break: keep-all; overflow-wrap: anywhere; }
.cost { display: flex; align-items: center; gap: 12px; font-family: var(--gal); font-weight: 700; font-size: 40px; color: var(--m); line-height: 1.15; }
.cost .ico { flex: none; }
.cost .sm { font-size: 30px; }
.open .side { left: 1472px; top: 646px; width: 432px; height: 300px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.timer { display: flex; align-items: center; gap: 16px; }
.timer .sec { width: 112px; font-family: var(--gal); font-weight: 700; font-size: 72px; line-height: 1; text-align: right; color: var(--ink); }
.timer .bar { flex: 1; height: 34px; display: flex; gap: 2px; padding: 3px; background: var(--edge); }
.timer .bar i { flex: 1; background: var(--hi); }
.timer .bar i.off { background: #2b3050; }
.timer.low .sec { color: #ff7a6b; animation: blink .5s steps(2) infinite; }
.timer.low .bar i:not(.off) { background: #ff7a6b; }
.timer.stop .sec, .timer.stop .bar { animation: none; opacity: .5; }
.picked { font-family: var(--gal); font-weight: 700; font-size: 36px; }
.heads { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.hd { width: 24px; height: 36px; background-repeat: no-repeat; background-size: 48px 36px; image-rendering: pixelated; filter: grayscale(1) brightness(.4); }
.hd.on { filter: none; }
.allin { left: 1472px; top: 646px; width: 432px; height: 98px; display: grid; place-items: center; z-index: 5;
  background: var(--hi); color: var(--bg); border: 2px solid var(--edge); font-size: 42px; box-shadow: 0 6px 0 var(--hi-deep); }

/* ---------- names · result ---------- */
.cols { left: 16px; top: 12px; width: 1440px; height: 1056px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.col { position: relative; display: flex; flex-direction: column; padding: 16px 18px 14px; min-width: 0; transform-origin: 50% 100%; }
.col .lb { font-family: var(--txt); font-weight: 700; font-size: 36px; line-height: 1.3; word-break: keep-all; min-height: 94px; }
.col .meta { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 6px; }
.col .cnt { font-family: var(--gal); font-weight: 700; font-size: 80px; line-height: .9; color: var(--ink); }
.col .stamps { position: relative; height: 152px; margin: 10px 0 8px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 14px; }
.col .tags { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 40px; gap: 4px 8px; align-content: start; }
.col .tag { height: 40px; }
.col .after { min-height: 94px; margin-top: 8px; font-family: var(--txt); font-weight: 700; font-size: 36px; line-height: 1.3; word-break: keep-all; color: var(--ink); }
.stamp { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 4px solid currentColor; background: rgba(20, 23, 38, .92);
  font-family: var(--gal); font-weight: 700; font-size: 34px; line-height: 1; transform: rotate(-6deg); }
.stamp.m { color: var(--m); } .stamp.w { color: var(--w); } .stamp.c { color: var(--c); } .stamp.e { color: var(--e); } .stamp.r { color: var(--r); }
.ink { position: absolute; width: 150px; height: 110px; left: 50%; top: 50%; margin: -55px 0 0 -75px; pointer-events: none; opacity: 0;
  clip-path: polygon(10% 30%, 25% 10%, 45% 18%, 60% 0, 75% 15%, 95% 10%, 88% 40%, 100% 60%, 82% 75%, 85% 95%, 60% 85%, 45% 100%, 30% 82%, 8% 90%, 12% 65%, 0 48%); }
.env { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 96px; }
.env .seal { position: absolute; right: -4px; bottom: 6px; width: 26px; height: 26px; background: #c2412b; border: 3px solid var(--edge); transform: rotate(45deg); }
.coin { position: absolute; left: 50%; top: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px; pointer-events: none; }
.legend { display: inline-flex; align-items: center; gap: 10px; font-family: var(--gal); font-weight: 700; font-size: 30px; color: var(--m); }
.legend .tech { width: 16px; height: 16px; background: var(--hi); transform: rotate(45deg); }
.flipcard { top: 646px; height: 420px; z-index: 4; backface-visibility: hidden; }
.side2 { left: 1472px; top: 12px; width: 432px; height: 930px; display: flex; flex-direction: column; gap: 16px; }
.side2 .mini { position: relative; width: 432px; height: 243px; border: 2px solid var(--edge); }
.side2 .band { flex-wrap: wrap; }
.side2 .band .ttl { border-left: 2px solid var(--edge); }
.side2 .tot { font-size: 36px; padding: 0 4px; }

/* ---------- 2차 걸음(준비 중) ---------- */
.soon .scene { left: 0; top: 0; width: 1920px; height: 1080px; }
.soon .plate { left: 560px; top: 380px; width: 800px; padding: 40px; text-align: center; }
.soon .plate .t { font-size: 64px; }
.soon .plate .s { font-size: 40px; color: var(--soft); margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  .go-arrow, .ev .say .cur, .timer.low .sec { animation: none !important; }
}

/* ================= 2차 걸음 ================= */
.result .col .meta { justify-content: flex-end; }
.result .col .meta .cost { display: none; }
.scene.full { left: 0; top: 0; width: 1920px; height: 1080px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- 순위판(settle · final 공용) ---------- */
.rboard { left: 20px; top: 16px; width: 1420px; height: 1048px; background: rgba(20, 23, 38, .9); border: 2px solid var(--edge);
  box-shadow: inset 0 2px 0 #3c4470, inset 0 -2px 0 #171a2e; }
.rhead { position: absolute; left: 10px; right: 10px; top: 8px; height: 44px; font-size: 26px; color: var(--soft); }
.rhead .h-rk { position: absolute; left: 12px; top: 8px; }
.rhead .h-val { position: absolute; right: 290px; top: 8px; width: 200px; text-align: right; }
.rrows { position: absolute; left: 10px; right: 10px; top: 58px; bottom: 6px; --rh: 36px; }
.rrow { position: absolute; left: 0; right: 0; height: var(--rh); display: grid; align-items: center; gap: 8px; padding: 0 8px;
  grid-template-columns: 96px 40px 290px 28px minmax(0, 1fr) 200px 96px 200px 34px;
  background: var(--panel); border: 2px solid var(--edge); box-shadow: inset 0 2px 0 #3c4470; }
.rrow.top { background: #3a3550; border-color: var(--hi-deep); }
.rrow .rk { font-size: 30px; line-height: 1; text-align: right; color: var(--ink); }
.rrow.top .rk { color: var(--hi); }
.rrow .tag { height: calc(var(--rh) - 4px); min-width: 0; }
.rrow .tag .n { width: calc(var(--rh) - 10px); height: calc(var(--rh) - 10px); }
.rrow .co { font-size: 28px; line-height: 1.1; white-space: nowrap; overflow: hidden; color: var(--ink); min-width: 0; }
.rrow .crown, .rrow .lv { display: flex; align-items: center; justify-content: center; height: 100%; position: relative; }
.rrow .lv > span { transform: scaleX(-1); }
.rrow .bar { height: 16px; background: #1b1f36; border: 2px solid var(--edge); position: relative; overflow: hidden; }
.rrow .bar i { position: absolute; inset: 0; background: var(--hi); transform-origin: 0 50%; }
.rrow .val { font-size: 32px; line-height: 1; text-align: right; color: var(--hi); }
.bdg { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bdg .bn { width: 30px; text-align: right; font-size: 26px; color: var(--soft); }
.bdg .bi { display: flex; }
.bdg .b1 + .b1 { margin-left: -10px; }
.rrow .mv { width: 28px; height: 22px; justify-self: center; }
.rrow .mv.up { background: var(--e); clip-path: polygon(36% 0, 64% 0, 64% 18%, 78% 18%, 78% 36%, 92% 36%, 92% 54%, 100% 54%, 100% 100%, 0 100%, 0 54%, 8% 54%, 8% 36%, 22% 36%, 22% 18%, 36% 18%); }
.rrow .mv.down { background: #ef5b5b; clip-path: polygon(0 0, 100% 0, 100% 46%, 92% 46%, 92% 64%, 78% 64%, 78% 82%, 64% 82%, 64% 100%, 36% 100%, 36% 82%, 22% 82%, 22% 64%, 8% 64%, 8% 46%, 0 46%); }
.rside { left: 1460px; top: 100px; width: 440px; padding: 22px 20px; text-align: center; }
.rside .t { font-size: 56px; line-height: 1.1; color: var(--ink); }
.rside .s { font-size: 32px; color: var(--winter); margin-top: 12px; }
.settle .wttl { left: 0; width: 1920px; top: 320px; display: flex; justify-content: center; font-size: 150px; line-height: 1; color: var(--ink); text-shadow: 8px 8px 0 var(--edge); }
.settle .wttl span { display: inline-block; white-space: pre; }
.settle .wsub { left: 0; width: 1920px; top: 510px; text-align: center; font-size: 60px; color: var(--winter); text-shadow: 5px 5px 0 var(--edge); }

/* ---------- final ---------- */
.rboard.fin { width: 1140px; }
.rboard.fin .rhead .h-val { right: 216px; width: 120px; }
.rboard.fin .rrow { grid-template-columns: 96px 290px minmax(0, 1fr) 96px 200px; }
.fttl { left: 1170px; top: 20px; width: 650px; padding: 14px 18px; text-align: center; font-size: 60px; color: var(--hi); }
.podium { left: 1172px; top: 130px; width: 724px; height: 810px; }
.pd { position: absolute; bottom: 0; width: 236px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.pd .who { display: flex; flex-direction: column; gap: 10px; align-items: center; padding-bottom: 12px; }
.pd .blk { display: grid; place-items: center; font-size: 110px; color: var(--bg); border: 2px solid var(--edge); transform-origin: 50% 100%;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .45), inset 0 -6px 0 rgba(0, 0, 0, .25); }
.pd.r1 .blk { height: 330px; background: var(--hi); }
.pd.r2 .blk { height: 240px; background: #c9cfe6; }
.pd.r3 .blk { height: 180px; background: #d9925a; }
.ent { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 236px; padding: 6px 4px; background: rgba(20, 23, 38, .88); border: 2px solid var(--edge); }
.ent .crown { height: 32px; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.ent .tag { max-width: 226px; }
.ent .co { font-size: 28px; line-height: 1.1; white-space: nowrap; overflow: hidden; max-width: 226px; color: var(--ink); }
.ent .val { font-size: 40px; line-height: 1; color: var(--hi); }
.cf { position: absolute; top: 0; width: 32px; height: 32px; pointer-events: none; z-index: 8; }

/* ---------- news ---------- */
.news .tv { left: 624px; top: 96px; width: 768px; height: 432px; overflow: hidden; background: #1d2340; }
.news .tv .inner { position: absolute; width: 1920px; height: 1080px; }
.news .tvstatic { position: absolute; inset: 0; z-index: 2; }
.static { left: 0; top: 0; width: 1920px; height: 1080px; z-index: 20; pointer-events: none; opacity: .9; }
.news .flash { left: 470px; top: 560px; padding: 8px 30px; background: #d8343f; color: #fff; font-size: 64px; line-height: 1.1;
  border: 4px solid var(--edge); box-shadow: inset 0 4px 0 #ff8a8f, 0 6px 0 #7a1720; transform: rotate(-2deg); }
.news .nhead { left: 470px; top: 676px; width: 1430px; height: 84px; font-size: 68px; line-height: 1.2; white-space: nowrap; overflow: hidden; color: var(--ink); text-shadow: 5px 5px 0 var(--edge); }
.news .nhead .cur { display: inline-block; width: 26px; height: 56px; margin-left: 6px; vertical-align: -6px; background: #d8343f; animation: blink .6s steps(2) infinite; }
.news .nline { margin: 0; left: 470px; top: 768px; width: 1000px; padding: 8px 16px; font-size: 40px; font-weight: 700; line-height: 1.35; word-break: keep-all;
  background: rgba(20, 23, 38, .88); border: 2px solid var(--edge); }
.news .nstamps { left: 1500px; top: 560px; width: 400px; height: 370px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 26px; padding-left: 14px; }
.stamp.bad { border-color: #e8484f; box-shadow: 0 0 0 4px var(--edge), 0 0 0 9px #e8484f; }
.stamp.good { border-color: var(--hi); transform: rotate(4deg); box-shadow: 0 0 0 4px var(--edge), 0 0 0 9px var(--hi);
  background: linear-gradient(110deg, rgba(20, 23, 38, .95) 38%, rgba(255, 213, 74, .55) 50%, rgba(20, 23, 38, .95) 62%) 0 0 / 300% 100%; animation: shimmer 1.4s steps(14) infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.ticker { left: 0; top: 944px; width: 1450px; height: 84px; overflow: hidden; background: #0b0d18; border-top: 4px solid #d8343f; border-bottom: 2px solid #d8343f; }
.ticker .track { position: absolute; left: 0; top: 16px; display: flex; gap: 44px; padding-left: 24px; white-space: nowrap; }
.ticker.fit .track { left: 0; right: 0; justify-content: center; padding-left: 0; }
.ticker.run .track { animation: tick var(--dur, 30s) linear infinite; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker .it { display: inline-flex; align-items: center; gap: 14px; flex: none; }
.ticker .co { font-size: 30px; color: var(--hi); }

/* ---------- newproduct ---------- */
.npanel { left: 20px; top: 16px; width: 1150px; height: 1048px; padding: 16px 22px 18px; display: flex; flex-direction: column; gap: 12px; background: rgba(35, 40, 66, .94); }
.np-ttl { font-size: 54px; line-height: 1.1; color: var(--hi); }
.np-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.np-hd .lb { font-weight: 700; font-size: 36px; line-height: 1.25; word-break: keep-all; }
.np-hd .cnt { font-size: 56px; line-height: .9; }
.np-big { display: flex; flex-direction: column; gap: 10px; }
.np-grid { display: grid; grid-template-columns: repeat(var(--c, 4), minmax(0, 1fr)); gap: 10px; }
.npc { position: relative; height: 92px; display: flex; flex-direction: column; justify-content: space-between; padding: 4px 6px 6px; min-width: 0;
  background: var(--cell); border: 2px solid var(--edge); box-shadow: inset 0 2px 0 #3f4672; }
.npc .tag { height: 38px; }
.npc .res { height: 44px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.npc .stamp { font-size: 28px; padding: 3px 8px; border-width: 3px; }
.npc.hit { background: #4a4224; border-color: var(--hi); }
.npc.miss { background: #2a2d40; }
.npc.miss .stamp { color: var(--soft); }
.penv { display: inline-flex; align-items: center; }
.np-leg p { margin: 0; font-size: 40px; font-weight: 700; line-height: 1.3; word-break: keep-all; padding-left: 40px; position: relative; }
.np-leg p::before { content: ""; position: absolute; left: 4px; top: 14px; width: 22px; height: 22px; border: 2px solid var(--edge); }
.np-leg .ok::before { background: var(--hi); }
.np-leg .meh::before { background: var(--soft); }
.np-low { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.np-box { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; min-height: 0; overflow: hidden; }
.np-st { height: 60px; display: flex; align-items: center; padding-left: 8px; }
.np-tags { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 40px; gap: 6px 8px; align-content: start; }
.np-tags .tag { height: 40px; }
.np-line { margin: 0; font-size: 40px; font-weight: 700; line-height: 1.3; word-break: keep-all; }

/* ---------- endings ---------- */
.elayer { position: absolute; inset: 0; }
.elayer > * { position: absolute; }
.endings .eplate { left: 160px; width: 1600px; top: 36px; padding: 18px 30px; text-align: center; font-size: 84px; line-height: 1.15; white-space: nowrap; overflow: hidden;
  background: rgba(20, 23, 38, .9); border: 4px solid var(--edge); color: var(--ink); text-shadow: 5px 5px 0 var(--edge); }
.endings .eline { margin: 0; left: 260px; width: 1400px; top: 196px; padding: 12px 24px; text-align: center; font-size: 40px; font-weight: 700; line-height: 1.35;
  word-break: keep-all; background: rgba(20, 23, 38, .86); border: 2px solid var(--edge); }
.endings .etags { left: 24px; width: 1420px; bottom: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; }
.endings .etags .tag { box-shadow: inset 0 2px 0 #3f4672, 0 4px 0 var(--edge); }
.low-w [data-layer="low-c"], .low-w [data-layer="low-e"], .low-c [data-layer="low-w"], .low-c [data-layer="low-e"],
.low-e [data-layer="low-w"], .low-e [data-layer="low-c"] { display: none !important; }
.fw { position: absolute; width: 192px; height: 192px; pointer-events: none; z-index: 6; }
.endings .eplate, .endings .eline { z-index: 7; } /* 불꽃은 제목·line 판 뒤로 (judge-game 2회차) */


@media (prefers-reduced-motion: reduce) {
  .stamp.good, .news .nhead .cur { animation: none !important; }
}
.result .col .stamps { height: 168px; }
.col .stamps .env { width: 72px; margin-left: -4px; }
.npc { height: 96px; }
.npc .res { height: 46px; gap: 8px; }
.npc .stamp { font-size: 26px; padding: 2px 8px; gap: 4px; white-space: nowrap; transform: rotate(-3deg); }
.npc .stamp .ico { zoom: .6667; }
.bdg .b1 + .b1 { margin-left: -4px; }
.endings .etags .tag { justify-self: start; }
.settle .wsub { left: 640px; width: 640px; top: 506px; padding: 12px 0; background: rgba(20, 23, 38, .9); border: 2px solid var(--edge); text-shadow: none; }
.pd .more { width: 236px; padding: 6px 4px; text-align: center; font-size: 30px; color: var(--ink); background: rgba(20, 23, 38, .88); border: 2px solid var(--edge); }
.ask p { word-break: keep-all; }

/* ---------- 고침 3: 딱지 스탯 이름 · 결과 딱지 크게 · 봉투 글 · 반 이름 ---------- */
.stamp .sn { white-space: nowrap; }
.lobby .head .room { margin-right: .6em; color: var(--hi); }
/* result: 칸 가운데에 딱지를 세로로 한 줄에 하나씩, 약 2배 */
.result .col .stamps { height: auto; flex: none; flex-direction: column; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 30px; margin: 22px 0 30px; }
.result .col .stamp { font-size: 56px; gap: 8px; padding: 6px 12px; border-width: 6px; white-space: nowrap; }
.result .col .stamp .ico { zoom: 1.6667; }
.result .col .stamp .sn { font-size: 28px; }
.result .col .legend { font-size: 36px; }
.envw { display: inline-flex; align-items: center; gap: 10px; }
.envt { font-family: var(--txt); font-weight: 700; font-size: 32px; color: var(--soft); white-space: nowrap; }
.result .col .stamps .env { width: 72px; height: 72px; margin-left: 0; }
/* result 이름표: 칸 안에 들 때까지 작게(fitTags) */
.result .col .tags { flex: 1 1 0; min-height: 0; }
.result .col .tags.t2 { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 34px; gap: 4px 6px; }
.result .col .tags.t2 .tag { height: 34px; font-size: 19px; gap: 5px; padding: 0 6px 0 3px; }
.result .col .tags.t2 .tag .n { width: 26px; height: 26px; font-size: 15px; }
.result .col .tags.t3 { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 28px; gap: 3px 6px; }
.result .col .tags.t3 .tag { height: 28px; font-size: 16px; gap: 4px; padding: 0 6px 0 2px; box-shadow: none; }
.result .col .tags.t3 .tag .n { width: 22px; height: 22px; font-size: 13px; }
.result .col .tags.t4 { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 19px; gap: 1px 6px; }
.result .col .tags.t4 .tag { height: 19px; font-size: 14px; gap: 3px; padding: 0 4px 0 2px; box-shadow: none; }
.result .col .tags.t4 .tag .n { width: 20px; height: 15px; border-radius: 8px; font-size: 11px; }
/* 기술 표시 ◆ 는 이름 글자 칸 밖 — 이름표 왼쪽 위 모서리(번호 동그라미 바깥 귀퉁이)에 걸친다 */
.result .col .tags .tag { position: relative; overflow: visible; }
.result .col .tags .tag .tech { position: absolute; left: -3px; top: -3px; z-index: 1; width: 10px; height: 10px; margin: 0; box-shadow: 0 0 0 2px var(--edge); }
.result .col .tags.t4 .tag .tech { width: 8px; height: 8px; box-shadow: 0 0 0 1px var(--edge); }
/* 신상품 봉투 글 */
.npc .res .penvt { font-family: var(--txt); font-weight: 700; font-size: 18px; color: var(--soft); white-space: nowrap; }

/* ---------- 고침 4: 최종 순위 화면 방 비우기(두 번 확인) — 숨긴 진행 단추 자리 ---------- */
.fin-reset { position: absolute; right: 20px; bottom: 16px; width: 430px; height: 104px; z-index: 30; font-size: 44px; }
.fin-reset:focus-visible { outline: 4px solid var(--hi); outline-offset: 4px; }
