/* PLAYORA 요트 다이스 */
:root {
  --bg: #12212a; --bg-2: #182b35; --bg-3: #213742; --line: #2f4753; --ink: #f2efe6; --ink-2: #b8c2c2; --ink-3: #87959a;
  --acc: #ff9d5c; --acc-2: #ffb380; --acc-ink: #2b1205; --gold: #f2c14e; --ok: #7fd09a; --bad: #f2806b;
  --paper: #f7f1e3; --paper-2: #efe6d2; --paper-ink: #1f2a30; --paper-3: #8a7f6a; --paper-line: #dccfb5;
  --page: #f3f0e8; --page-ink: #1d1d1b; --page-2: #5a574f; --page-line: #dbd4c4;
  --f-body: "IBM Plex Sans KR", "Pretendard", system-ui, -apple-system, "Malgun Gothic", sans-serif;
  --f-disp: "Black Han Sans", "IBM Plex Sans KR", "Malgun Gothic", sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --r1: 6px; --r2: 10px; --r3: 16px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --rh: 28px; --sw: 300px;
}
@supports (color: oklch(0 0 0)) {
  :root {
    --bg: oklch(0.235 0.032 225); --bg-2: oklch(0.27 0.035 225); --bg-3: oklch(0.32 0.036 225); --line: oklch(0.39 0.035 225);
    --ink: oklch(0.955 0.012 85); --ink-2: oklch(0.8 0.018 200); --ink-3: oklch(0.65 0.02 210);
    --acc: oklch(0.78 0.14 52); --acc-2: oklch(0.83 0.11 55); --gold: oklch(0.83 0.13 88);
    --paper: oklch(0.96 0.02 88); --paper-2: oklch(0.925 0.028 86); --paper-ink: oklch(0.27 0.025 230); --paper-3: oklch(0.6 0.03 80); --paper-line: oklch(0.86 0.035 85);
    --page: oklch(0.96 0.01 85); --page-ink: oklch(0.22 0.01 80); --page-2: oklch(0.46 0.015 80); --page-line: oklch(0.88 0.018 85);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--page); color: var(--page-ink); font: 400 16px/1.7 var(--f-body); word-break: keep-all; overflow-wrap: anywhere; }
button { font: inherit; color: inherit; cursor: pointer; white-space: nowrap; touch-action: manipulation; }
button:disabled { cursor: default; opacity: 0.42; }
input { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- 페이지 머리 */
.mast { display: flex; align-items: baseline; gap: var(--s4); padding: var(--s3) clamp(var(--s4), 3vw, var(--s6)); border-bottom: 1px solid var(--page-line); }
.mast-brand { text-decoration: none; font-size: 14px; color: var(--page-2); white-space: nowrap; }
.mast-brand b { font-weight: 700; letter-spacing: 0.08em; color: var(--page-ink); margin-right: 6px; }
.mast-more { margin-left: auto; font-size: 14px; color: var(--page-2); white-space: nowrap; }
.head { max-width: 1240px; margin: 0 auto; padding: var(--s4) clamp(var(--s3), 3vw, var(--s6)) var(--s3); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4); }
.head h1 { margin: 0; font: 400 clamp(30px, 4vw, 40px)/1.1 var(--f-disp); letter-spacing: -0.01em; }
.head p { margin: 0; color: var(--page-2); font-size: 15px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(0px, 2vw, var(--s5)); }

/* ---------------------------------------------------------------- 게임 무대 */
.yd { position: relative; width: 100%; height: clamp(540px, calc(100svh - 132px), 880px); background: var(--bg); color: var(--ink); overflow: hidden; border-radius: var(--r2);
  display: grid; grid-template-rows: 46px minmax(0, 1fr) auto auto; grid-template-columns: minmax(0, 1fr);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; font-family: var(--f-body); font-size: 14px; line-height: 1.45; touch-action: manipulation; }
@media (max-width: 640px) { .yd { border-radius: 0; height: calc(100svh - 96px); min-height: 560px; } .head { padding-top: var(--s3); } .head p { display: none; } }
html.embed, html.embed body { height: 100%; overflow: hidden; background: var(--bg); }
html.embed .mast, html.embed .head, html.embed .about, html.embed .foot { display: none !important; }
html.embed .wrap { padding: 0; max-width: none; }
html.embed .yd { position: fixed; inset: 0; width: auto; height: auto; min-height: 0; border-radius: 0; }
.yd button:focus-visible, .yd input:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.nojs { padding: var(--s5); }

/* 위 막대 */
.bar { grid-row: 1; grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s2) 0 var(--s3); background: var(--bg-2); border-bottom: 1px solid rgba(0, 0, 0, 0.4); z-index: 7; min-width: 0; }
.bar-l { display: flex; align-items: baseline; gap: var(--s2); min-width: 0; flex: 1; overflow: hidden; }
.bar-t { font: 400 20px/1 var(--f-disp); white-space: nowrap; }
.bar-m { color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bar-r { display: flex; align-items: center; gap: 6px; flex: none; }
.tb { position: relative; height: 34px; padding: 0 var(--s3); border-radius: var(--r1); border: 1px solid var(--line); background: transparent; color: var(--ink); font: 600 13px/1 var(--f-body); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tb:hover:not(:disabled) { border-color: var(--ink-3); background: rgba(255, 255, 255, 0.04); }
.tb .ic { display: inline-flex; }
.tb svg { width: 18px; height: 18px; flex: none; }
.tb.icon { width: 36px; padding: 0; }
.tb.icon .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tb[aria-pressed="false"] { color: var(--ink-3); }
@media (max-width: 760px) { .bar-r .w-lbl { width: 36px; padding: 0; } .bar-r .w-lbl .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.yd.narrow .bar-m { display: none; }
.yd.narrow .bar-t { font-size: 18px; }

/* 판 */
.tray { grid-row: 2; grid-column: 1; position: relative; min-height: 0; min-width: 0; overflow: hidden; background: #0d171d; }
.tray canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.toast { position: absolute; left: 50%; top: var(--s3); transform: translate(-50%, -8px); padding: var(--s2) var(--s4); border-radius: 999px; background: rgba(8, 14, 18, 0.86); color: var(--ink); font-weight: 600; font-size: 13px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.4s var(--ease); max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; z-index: 4; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.tturn { position: absolute; left: var(--s3); top: var(--s3); padding: 5px var(--s3) 5px var(--s2); border-radius: 999px; background: rgba(8, 14, 18, 0.78); color: var(--ink); font-weight: 700; font-size: 13px; white-space: nowrap; display: flex; align-items: center; gap: 6px; opacity: 0; pointer-events: none; z-index: 3; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.tturn::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--pc); flex: none; }
.tturn.on { animation: turnIn 2.4s var(--ease) forwards; }
@keyframes turnIn { 0% { opacity: 0; transform: translateY(-6px); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0.0; } }
.yd.aiturn .tturn.on { animation: turnIn2 0.4s var(--ease) forwards; }
@keyframes turnIn2 { from { opacity: 0; } to { opacity: 1; } }
.stamp { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); pointer-events: none; z-index: 3; }
.stamp b { display: block; padding: 0.16em 0.46em 0.2em; font: 400 clamp(32px, 11vmin, 76px)/1 var(--f-disp); color: #fff8ee; background: var(--acc); border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); white-space: nowrap; opacity: 0; }
.stamp b.b { background: var(--gold); color: #2a1d00; font-size: clamp(24px, 7vmin, 48px); }
.stamp.on b { animation: stampIn 1.5s var(--ease) forwards; }
@keyframes stampIn { 0% { opacity: 0; transform: scale(0.5) rotate(-6deg); } 18% { opacity: 1; transform: scale(1.06) rotate(-3deg); } 28% { transform: scale(1) rotate(-3deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1) rotate(-3deg); } }
.confirm { position: absolute; left: 50%; bottom: var(--s3); transform: translateX(-50%); width: min(420px, calc(100% - 24px)); display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s2) var(--s2) var(--s4); border-radius: var(--r3); background: rgba(8, 14, 18, 0.9); border: 1px solid var(--line); z-index: 5; animation: fade 0.2s var(--ease); }
.confirm p { margin: 0; flex: 1; min-width: 0; font-size: 14px; }
.confirm p b.n { color: var(--acc); }
.confirm div { display: flex; gap: 6px; flex: none; }
.confirm button { height: 40px; border-radius: var(--r2); padding: 0 var(--s3); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.confirm .ok { border: 0; background: var(--acc); color: var(--acc-ink); }
.confirm .ok svg { width: 16px; height: 16px; }
.confirm .no { border: 1px solid var(--line); background: transparent; }

/* 아래: 주사위 다섯 개 + 굴리기 */
.dock { grid-row: 3; grid-column: 1; display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); background: var(--bg-2); border-top: 1px solid rgba(0, 0, 0, 0.45); min-width: 0; }
.dchips { display: flex; gap: 6px; flex: 1; min-width: 0; }
.dc { position: relative; width: 46px; height: 46px; padding: 0; border-radius: 10px; border: 2px solid transparent; background: transparent; display: grid; place-items: center; transition: transform 0.2s var(--ease); }
.dc svg { width: 40px; height: 40px; }
.dc .fb { fill: #f2ede1; stroke: rgba(0, 0, 0, 0.3); stroke-width: 0.8; }
.dc:disabled { opacity: 1; }
.dc.held { transform: translateY(-4px); border-color: var(--gold); background: rgba(242, 193, 78, 0.14); }
.dc.adv:not(.held) { border-color: rgba(255, 157, 92, 0.85); border-style: dashed; }
.dc .lk { position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); color: #2a1d00; display: grid; place-items: center; }
.dc .lk svg { width: 11px; height: 11px; }
.dsv .fb { fill: #f2ede1; stroke: rgba(0, 0, 0, 0.3); stroke-width: 0.8; }
.dsv .fp { fill: #1d1e22; }
.dsv .fr { fill: #c81e2c; }
.dsv .fq { fill: #8a8378; font: 700 11px var(--f-body); text-anchor: middle; dominant-baseline: middle; }
.dsv.spin { animation: pulse 0.6s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 0.45; } to { opacity: 0.9; } }
@keyframes spin { to { transform: rotate(360deg); } }
.roll { flex: none; min-width: 124px; height: 50px; padding: 0 var(--s4); border: 0; border-radius: var(--r2); background: var(--acc); color: var(--acc-ink); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 3px 0 rgba(110, 45, 10, 0.6); transition: transform 0.12s var(--ease), box-shadow 0.12s; }
.roll .rl { font: 400 18px/1 var(--f-disp); }
.roll:hover:not(:disabled) { background: var(--acc-2); }
.roll:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 rgba(110, 45, 10, 0.6); }
.roll:disabled { background: var(--bg-3); color: var(--ink-2); box-shadow: none; opacity: 1; }
.roll:disabled .rl { font: 600 13px/1 var(--f-body); }
.rdots { display: flex; gap: 5px; }
.rdots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(43, 18, 5, 0.25); }
.rdots i.on { background: var(--acc-ink); }
.roll:disabled .rdots i.on { background: var(--ink-2); }
.yd.shaking .roll { animation: shake 0.12s linear infinite; }
@keyframes shake { 0%, 100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-2px) rotate(-1.5deg); } 75% { transform: translateX(2px) rotate(1.5deg); } }
.yd.narrow .dc { width: 40px; height: 40px; }
.yd.narrow .dc svg { width: 35px; height: 35px; }
.yd.narrow .dchips { gap: 4px; }
.yd.narrow .dchips { flex: none; }
.yd.narrow .roll { min-width: 0; flex: 1; padding: 0 var(--s2); }
.yd.wide.short .dc { width: 40px; height: 40px; }
.yd.wide.short .dc svg { width: 35px; height: 35px; }
.yd.wide.short .roll { min-width: 112px; height: 44px; }
.yd.wide.short .dock { padding: 6px var(--s2); }
.yd.wide.tight .dc { width: 36px; height: 36px; }
.yd.wide.tight .dc svg { width: 32px; height: 32px; }
.yd.wide.tight .dchips { gap: 4px; }
.yd.wide.tight .roll { min-width: 96px; padding: 0 var(--s2); }
.yd.wide.tight .roll .rl { font-size: 16px; }
.yd.wide.short .st tr.tot td b { font-size: 14px; }
.yd.wide.short .st th, .yd.wide.short .st td { font-size: 12px; }

/* 점수표 (종이) */
.sheet { grid-row: 4; grid-column: 1; display: flex; gap: 6px; padding: 6px var(--s3) var(--s3); background: var(--bg-2); min-width: 0; }
.half { flex: 1 1 0; min-width: 0; }
.st { width: 100%; min-width: 0; border-collapse: separate; border-spacing: 0; table-layout: fixed; background: var(--paper); color: var(--paper-ink); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.st th, .st td { height: var(--rh); padding: 0 4px; border-bottom: 1px solid var(--paper-line); font-size: 13px; line-height: 1.15; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.st tr:last-child th, .st tr:last-child td { border-bottom: 0; }
.st thead th { height: calc(var(--rh) - 2px); font-size: 12px; font-weight: 700; color: var(--paper-ink); background: var(--paper-2); }
.st th.lab { text-align: left; font-weight: 600; padding-left: 8px; width: 44%; }
.sheet.np2 .st th.lab { width: 40%; }
.sheet.np3 .st th.lab, .sheet.np4 .st th.lab { width: 36%; padding-left: 6px; }
.yd:not(.wide) .sheet.np3 .st th.lab, .yd:not(.wide) .sheet.np4 .st th.lab { width: 56px; padding-left: 5px; }
.yd:not(.wide) .sheet.np3 .st th, .yd:not(.wide) .sheet.np3 .st td, .yd:not(.wide) .sheet.np4 .st th, .yd:not(.wide) .sheet.np4 .st td { padding: 0 2px; }
.yd:not(.wide) .sheet.np3 .st .ph span, .yd:not(.wide) .sheet.np4 .st .ph span { text-overflow: clip; }
.yd:not(.wide) .sheet.np3 .st .lic, .yd:not(.wide) .sheet.np4 .st .lic { margin-right: 3px; }
.sheet.np3 .st tr.sub .sg, .sheet.np4 .st tr.sub .sg { display: none; }
.yd:not(.wide) .sheet.np3 .st tr.tot td b, .yd:not(.wide) .sheet.np4 .st tr.tot td b { font-size: 14px; }
.st th.lab small { display: none; }
.st .lic { display: inline-block; vertical-align: -3px; margin-right: 5px; }
.st .lic svg { width: 15px; height: 15px; }
.st .lic .fb { fill: #fff; stroke: rgba(0, 0, 0, 0.45); stroke-width: 1.2; }
.st .ph { border-bottom: 3px solid var(--pc); overflow: visible; }
.st .ph span { display: block; overflow: hidden; text-overflow: ellipsis; }
.st .ph.cur { background: color-mix(in srgb, var(--pc) 28%, var(--paper-2)); }
.st td { font-variant-numeric: tabular-nums; }
.st td.f { font-weight: 700; color: var(--paper-ink); }
.st td.z { color: var(--paper-3); font-weight: 600; }
.st td.pv { color: #a2551f; font-weight: 600; }
.st td.pz { color: #b9ad94; font-weight: 400; }
.st td.aip { animation: blink 0.5s ease-in-out infinite alternate; }
.st td.flash { animation: flash 1s var(--ease); }
@keyframes blink { from { background: transparent; } to { background: rgba(255, 157, 92, 0.45); } }
@keyframes flash { 0% { background: rgba(255, 157, 92, 0.75); } 100% { background: transparent; } }
.st[data-cur="0"] td:nth-child(2), .st[data-cur="1"] td:nth-child(3), .st[data-cur="2"] td:nth-child(4), .st[data-cur="3"] td:nth-child(5) { background: rgba(255, 190, 120, 0.13); }
.sheet.live .st tr.can { cursor: pointer; }
.sheet.live .st tr.can:hover th, .sheet.live .st tr.can:hover td { background: rgba(255, 157, 92, 0.16); }
.st tr.sel th, .st[data-cur="0"] tr.sel td:nth-child(2), .st[data-cur="1"] tr.sel td:nth-child(3), .st[data-cur="2"] tr.sel td:nth-child(4), .st[data-cur="3"] tr.sel td:nth-child(5) { background: rgba(255, 157, 92, 0.42); }
.st tr.rec th.lab { box-shadow: inset 3px 0 0 var(--acc); }
.st em.rc { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 10px; font-weight: 700; color: #fff; background: #c4632a; border-radius: 4px; padding: 1px 3px; line-height: 1.2; }
.sheet.np2 .st em.rc, .sheet.np3 .st em.rc, .sheet.np4 .st em.rc { display: none; }
.sheet.np2 .st tr.rec td.pv, .sheet.np3 .st tr.rec td.pv, .sheet.np4 .st tr.rec td.pv { box-shadow: inset 0 0 0 2px #c4632a; }
.st tr.sub th, .st tr.sub td { background: var(--paper-2); font-size: 12px; }
.st tr.sub .sg { color: var(--paper-3); font-size: 12px; }
.st .bar0 { position: absolute; left: 4px; right: 4px; bottom: 2px; height: 3px; border-radius: 2px; background: rgba(0, 0, 0, 0.08); }
.st .bar0 i { display: block; height: 100%; border-radius: 2px; background: #2f8a63; }
.st .plus { color: #2f8a63; }
.st tr.tot th, .st tr.tot td { background: var(--paper-2); font-size: 14px; }
.st tr.tot td b { font: 400 17px/1 var(--f-disp); }
.st tr.pad th, .st tr.pad td { background: var(--paper-2); }
.bub { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); background: #fff; color: #1d1d1b; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 8px; white-space: nowrap; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); z-index: 5; animation: fade 0.2s var(--ease); pointer-events: none; }
.sheet { position: relative; }
.st thead th.ph .bub { bottom: auto; top: calc(100% + 4px); }
.st { overflow: visible; }
.st thead tr:first-child th:first-child { border-top-left-radius: 8px; }
.st thead tr:first-child th:last-child { border-top-right-radius: 8px; }

/* 넓은 화면: 판 왼쪽, 점수표 오른쪽 */
.yd.wide { grid-template-columns: minmax(0, 1fr) var(--sw); grid-template-rows: 46px minmax(0, 1fr) auto; }
.yd.wide .tray { grid-row: 2; grid-column: 1; }
.yd.wide .dock { grid-row: 3; grid-column: 1; }
.yd.wide .sheet { grid-row: 2 / 4; grid-column: 2; display: block; padding: var(--s2) var(--s3) var(--s3); border-left: 1px solid rgba(0, 0, 0, 0.45); overflow-y: auto; }
.yd.wide .st { width: 100%; }
.yd.wide .st th.lab small { display: inline; font-size: 10px; color: var(--paper-3); font-weight: 400; margin-left: 2px; }
.yd.wide.short .st th.lab small { display: none; }
.yd.wide .dock { justify-content: center; }
.yd.wide .dchips { flex: none; }
.yd.wide .roll { min-width: 150px; }
.yd:not(.inplay) .tray, .yd:not(.inplay) .dock, .yd:not(.inplay) .sheet { visibility: hidden; }

/* 화면 (처음, 준비, 찾기, 결과) */
.scr { position: absolute; left: 0; right: 0; top: 46px; bottom: 0; z-index: 6; background: var(--bg); overflow-y: auto; display: flex; }
.home, .setup, .find, .res { margin: auto; width: min(560px, 100%); padding: var(--s5) var(--s4); }
.home-hd { margin-bottom: var(--s4); }
.home-dice { display: flex; gap: 6px; margin: 0 0 var(--s3); }
.home-dice span { display: inline-flex; transform: rotate(calc((var(--i) - 2) * 4deg)); }
.home-dice svg { width: 34px; height: 34px; }
.home-t { margin: 0; font: 400 clamp(34px, 8vw, 46px)/1.05 var(--f-disp); letter-spacing: 0.01em; }
.home-s { margin: var(--s2) 0 0; color: var(--ink-2); font-size: 14px; }
.modes { display: flex; flex-direction: column; gap: var(--s2); }
.mrow { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-left: 4px solid var(--acc); border-radius: var(--r2); background: var(--bg-2); text-align: left; white-space: normal; }
.mrow b { font: 400 19px/1.2 var(--f-disp); }
.mrow span { color: var(--ink-2); font-size: 13px; }
.mrow:hover { background: var(--bg-3); }
.mrow.cont { border-left-color: var(--gold); background: rgba(242, 193, 78, 0.08); }
.home-ft { display: flex; gap: var(--s2); margin-top: var(--s4); flex-wrap: wrap; }
.ghost { height: 44px; padding: 0 var(--s4); border-radius: var(--r2); border: 1px solid var(--line); background: transparent; color: var(--ink); font-weight: 600; font-size: 14px; }
.ghost:hover:not(:disabled) { border-color: var(--ink-3); }
.big { height: 50px; padding: 0 var(--s5); border: 0; border-radius: var(--r2); background: var(--acc); color: var(--acc-ink); font: 400 19px/1 var(--f-disp); box-shadow: 0 3px 0 rgba(110, 45, 10, 0.6); }
.big:hover:not(:disabled) { background: var(--acc-2); }
.big:disabled { background: var(--bg-3); color: var(--ink-2); box-shadow: none; font: 600 14px/1 var(--f-body); opacity: 1; }
.su-hd h3 { margin: 0 0 var(--s2); font: 400 28px/1.2 var(--f-disp); }
.su-hd p { margin: 0 0 var(--s4); color: var(--ink-2); }
.su-hd p b { color: var(--ink); }
.su-me { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; padding: var(--s3) var(--s4); border-radius: var(--r2); background: var(--bg-2); margin-bottom: var(--s4); }
.su-me .rk { font: 400 18px/1 var(--f-disp); color: var(--gold); }
.su-me .sub { color: var(--ink-3); font-size: 13px; margin-left: auto; }
.su-k { margin: 0 0 6px; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.seg3 { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 3px; border-radius: var(--r2); background: var(--bg-2); border: 1px solid var(--line); margin-bottom: var(--s4); }
.seg3 button { height: 40px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); font-weight: 700; font-size: 15px; }
.seg3 button.on { background: var(--ink); color: var(--bg); }
.names { display: grid; gap: 6px; margin-bottom: var(--s4); }
.names .nm { display: flex; align-items: center; gap: var(--s2); }
.names .nm i { width: 12px; height: 12px; border-radius: 50%; background: var(--pc); flex: none; }
.names input { flex: 1; min-width: 0; height: 42px; padding: 0 var(--s3); border-radius: var(--r2); border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); font-size: 15px; }
.names .nm.off { opacity: 0.35; }
.su-ft, .fd-ft, .rbtn, .ask-b { display: flex; gap: var(--s2); flex-wrap: wrap; }
.fd-top { display: flex; align-items: center; gap: var(--s3); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--acc); animation: spin 0.8s linear infinite; flex: none; }
.find.found .spin { animation: none; border-color: var(--ok); }
.fd-msg { margin: 0; font: 400 22px/1.2 var(--f-disp); flex: 1; }
.fd-t { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.fd-sub { color: var(--ink-2); margin: var(--s2) 0 var(--s4); font-size: 14px; }
.room { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); margin-bottom: var(--s4); }
.pc { position: relative; display: flex; flex-direction: column; gap: 2px; padding: var(--s3); border-radius: var(--r2); background: var(--bg-2); border: 1px solid var(--line); border-top: 4px solid var(--pc); animation: fade 0.3s var(--ease); min-width: 0; }
.pc.me { background: var(--bg-3); }
.pc .av svg { width: 26px; height: 26px; }
.pc .pn { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc .pn small { font-size: 12px; color: var(--acc); }
.pc .pr { color: var(--gold); font-size: 13px; font-weight: 600; }
.pc .pw, .pc .ps, .pc .po { color: var(--ink-3); font-size: 12px; }
.pc .pready { font-size: 12px; font-weight: 700; color: var(--ink-3); min-height: 17px; }
.pc.ok .pready { color: var(--ok); }
.pc .say { position: absolute; right: 8px; top: -14px; background: #fff; color: #1d1d1b; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 8px; opacity: 0; transform: translateY(4px); transition: opacity 0.2s, transform 0.3s var(--ease); pointer-events: none; white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; }
.pc .say.on { opacity: 1; transform: none; }
.res { text-align: left; }
.rk-k { margin: 0; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.rt { margin: 4px 0 var(--s3); font: 400 clamp(32px, 8vw, 44px)/1.1 var(--f-disp); }
.rt small { font-size: 0.5em; margin-left: 4px; color: var(--ink-2); }
.rt.win { color: var(--gold); }
.rt.lose { color: var(--ink); }
.rs { margin: 0 0 var(--s3); color: var(--ink-2); font-size: 14px; }
.rs .nb { color: var(--gold); }
.rl { list-style: none; margin: 0 0 var(--s4); padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rl li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: var(--s2); padding: var(--s2) var(--s3); border-radius: var(--r2); background: var(--bg-2); border-left: 4px solid var(--pc); }
.rl li.me { background: var(--bg-3); }
.rl .rn { grid-row: 1 / 3; align-self: center; font: 400 20px/1 var(--f-disp); color: var(--ink-2); }
.rl .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl .nm small { font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-left: 4px; }
.rl .br { grid-column: 2; color: var(--ink-3); font-size: 12px; }
.rl b { grid-column: 3; grid-row: 1 / 3; align-self: center; font: 400 26px/1 var(--f-disp); }
.rank { padding: var(--s3) var(--s4); border-radius: var(--r2); background: var(--bg-2); margin-bottom: var(--s4); }
.rk-l { margin: 0 0 6px; font: 400 18px/1.2 var(--f-disp); color: var(--gold); }
.rk-l b { font: 600 15px/1 var(--f-body); color: var(--ink); margin-left: 4px; }
.rk-l .up { color: var(--ok); font: 700 14px/1 var(--f-body); }
.rk-l .dn { color: var(--bad); font: 700 14px/1 var(--f-body); }
.pbar { display: block; height: 6px; border-radius: 3px; background: var(--bg); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--gold); border-radius: 3px; transition: width 1s var(--ease); }
.rk-n { margin: 6px 0 0; color: var(--ink-2); font-size: 13px; }
.rchat { min-height: 20px; margin: 0 0 var(--s3); color: var(--ink-2); font-size: 13px; opacity: 0; transition: opacity 0.4s; }
.rchat.on { opacity: 1; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* 모달 */
.modal { position: absolute; inset: 0; z-index: 10; background: rgba(4, 10, 14, 0.62); display: grid; place-items: center; padding: var(--s3); animation: fade 0.2s var(--ease); }
.mbox { width: min(540px, 100%); max-height: 100%; display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r3); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7); overflow: hidden; }
.mbox-s { width: min(380px, 100%); }
.mhead { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s3) var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.mtitle { margin: 0; flex: 1; font: 400 20px/1.2 var(--f-disp); }
.x { height: 34px; padding: 0 var(--s3); border-radius: var(--r1); border: 1px solid var(--line); background: transparent; font-weight: 600; font-size: 13px; }
.mbody { padding: var(--s3) var(--s4) var(--s4); overflow-y: auto; -webkit-user-select: text; user-select: text; }
.mbody p { margin: 0 0 var(--s3); color: var(--ink-2); }
.mbody h4 { margin: var(--s4) 0 var(--s2); font-size: 13px; color: var(--ink-3); font-weight: 600; }
.mbody h4:first-child { margin-top: 0; }
.keys { border-collapse: collapse; width: 100%; font-size: 13px; }
.keys th { text-align: left; font-weight: 600; padding: 5px var(--s3) 5px 0; white-space: nowrap; color: var(--ink); vertical-align: top; }
.keys td { color: var(--ink-2); padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.keys th .dsv { width: 15px; height: 15px; vertical-align: -3px; }
.note { font-size: 13px; color: var(--ink-3) !important; }
.sws { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.sw, .bd { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--s2) 4px; border: 1px solid var(--line); border-radius: var(--r2); background: transparent; font-size: 12px; color: var(--ink-2); }
.sw i { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18); }
.sw i svg { width: 24px; height: 24px; }
.sw i .dsv .fb { fill: transparent; stroke: none; }
.sw i .dsv .fp, .sw i .dsv .fr { fill: currentColor; }
.sw.on, .bd.on { border-color: var(--acc); color: var(--ink); background: rgba(255, 157, 92, 0.08); }
.bds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.bd i { width: 100%; max-width: 64px; height: 30px; border-radius: 5px; border: 4px solid; }
.tg { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) 0; cursor: pointer; }
.tg > span, .opt > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tg b, .opt b { font-weight: 600; font-size: 14px; color: var(--ink); }
.tg small, .opt small { color: var(--ink-3); font-size: 12px; }
.tg input { position: absolute; opacity: 0; pointer-events: none; }
.tg i { flex: none; width: 44px; height: 26px; border-radius: 13px; background: var(--bg); border: 1px solid var(--line); position: relative; transition: background 0.2s; }
.tg i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink-3); transition: transform 0.25s var(--ease), background 0.2s; }
.tg input:checked + i { background: var(--acc); border-color: var(--acc); }
.tg input:checked + i::after { transform: translateX(18px); background: var(--acc-ink); }
.tg input:focus-visible + i { outline: 2px solid var(--acc); outline-offset: 2px; }
.opt { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) 0; }
.opt input[type="range"] { width: 140px; accent-color: var(--acc); }
.nmset input { width: 100%; height: 40px; padding: 0 var(--s3); border-radius: var(--r2); border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; margin-bottom: var(--s2); }
.stats span { display: flex; flex-direction: column; padding: var(--s2); border-radius: var(--r1); background: var(--bg); color: var(--ink-3); font-size: 12px; }
.stats b { font: 400 19px/1.2 var(--f-disp); color: var(--ink); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 56px; margin-bottom: var(--s2); }
.spark i { flex: 1; background: var(--acc); border-radius: 2px 2px 0 0; min-height: 2px; }
.hfoot { margin-top: var(--s3); text-align: right; }

/* ---------------------------------------------------------------- 소개 */
.about { max-width: 1240px; margin: 0 auto; padding: var(--s7) clamp(var(--s4), 4vw, var(--s7)) var(--s6); display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.8fr); gap: var(--s6) clamp(var(--s5), 5vw, var(--s8)); }
.about-main { min-width: 0; }
.about h2 { margin: var(--s6) 0 var(--s2); font: 400 27px/1.3 var(--f-disp); }
.about h2:first-child { margin-top: 0; }
.about p, .about li { font-size: 16px; color: var(--page-ink); }
.about p { margin: 0 0 var(--s3); }
.about ul, .about ol { margin: 0 0 var(--s3); padding-left: 1.3em; }
.about li { margin-bottom: 6px; }
.about strong { font-weight: 600; }
.about dl { margin: 0; }
.about dt { margin-top: var(--s4); font-weight: 600; }
.about dd { margin: 4px 0 0; color: var(--page-2); }
.about-side { min-width: 0; font-size: 14px; color: var(--page-2); }
.about-side h3 { margin: 0 0 var(--s2); font: 400 21px/1.3 var(--f-disp); color: var(--page-ink); }
.about-side h3 ~ h3 { margin-top: var(--s5); }
.keytab { width: 100%; border-collapse: collapse; }
.keytab th { text-align: left; font-weight: 600; color: var(--page-ink); padding: 5px var(--s3) 5px 0; border-bottom: 1px solid var(--page-line); white-space: nowrap; vertical-align: top; }
.keytab td { padding: 5px 0; border-bottom: 1px solid var(--page-line); }
.more { margin-top: var(--s6) !important; font-size: 14px !important; color: var(--page-2) !important; line-height: 1.9; }
.credits { font-size: 13px !important; color: var(--page-2) !important; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; padding-top: var(--s6); } }
.foot { border-top: 1px solid var(--page-line); padding: var(--s5) clamp(var(--s4), 4vw, var(--s7)) var(--s6); font-size: 13px; color: var(--page-2); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); max-width: 1240px; margin: 0 auto; }
.foot a { color: var(--page-2); white-space: nowrap; }
.foot p { flex-basis: 100%; margin: var(--s2) 0 0; }
@media (prefers-reduced-motion: reduce) { .tturn.on, .dsv.spin, .yd.shaking .roll, .st td.aip, .st td.flash { animation: none; } .stamp.on b { animation: stampFade 1.4s linear forwards; } }
@keyframes stampFade { 0% { opacity: 0; } 10% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
