/* 여울게임터 공용 화면 (첫 화면·로비·방 목록·대기실·모달).
   게임을 고르면 그 게임 manifest 의 theme 값으로 --accent 등이 바뀐다. 판 화면은 각 게임의 view.css 가 맡는다. */
:root {
  color-scheme: dark;
  --bg: #121519;
  --bg-2: #1b1f25;      /* 패널 */
  --bg-3: #262b33;
  --fg: #eee7d8;
  --fg-dim: rgba(238, 231, 216, .6);
  --line: rgba(238, 231, 216, .12);
  --accent: #6fb3c9;     /* 게임마다 바뀜 */
  --accent-fg: #0f1418;
  --accent-2: #c8402f;   /* 도장·레디 같은 강조 */
  --accent-2-fg: #fff5e8;
  --ok: #5cc98a;
  --warn: #ff8a78;
  --tb-h: 58px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sans: 'Noto Sans KR', system-ui, -apple-system, 'Apple SD Gothic Neo', sans-serif;
  --serif: 'Noto Serif KR', 'Nanum Myeongjo', serif;
  --display: 'Black Han Sans', var(--sans);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

#app { position: fixed; inset: 0; background: radial-gradient(70% 55% at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%), linear-gradient(180deg, color-mix(in srgb, var(--bg) 88%, #fff 3%), var(--bg)); }
.screen { position: absolute; inset: 0; display: none; }
.screen.active { display: block; }
#app:not(.ingame) .screen { top: var(--tb-h); }
#home, #lobby, #channel, #room { overflow-y: auto; }
#game-root { position: absolute; inset: 0; }

/* 상단 바 */
.topbar { position: absolute; left: 0; right: 0; top: 0; height: var(--tb-h); z-index: 20; display: flex; align-items: center; gap: 12px; padding: 0 max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
#app.ingame .topbar { display: none; }
.tb-back { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); }
.tb-back svg { width: 20px; height: 20px; fill: none; stroke: var(--fg); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tb-brand { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-size: 1.3rem; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; background: url(icon.svg) center/contain no-repeat; }
.tb-title { flex: 1; min-width: 0; font-weight: 700; color: var(--fg-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title b { color: var(--fg); }
.tb-right { display: flex; align-items: center; gap: 12px; }
.tb-me { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.tb-me:hover { border-color: var(--accent); }
.tb-me-txt { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: center; text-align: left; line-height: 1.25; }
.tb-me-txt b { font-size: .9rem; max-width: 7em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-sub { grid-column: 1 / 3; font-size: .74rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.net { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--fg-dim); white-space: nowrap; }
.net .dot { width: 8px; height: 8px; border-radius: 50%; background: #d8a94a; }
.net.online .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(92, 201, 138, .2); }
.net.offline .dot { background: var(--accent-2); }

/* 공용 조각 */
.avatar { --h: 30; width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-family: var(--serif); font-weight: 900; font-size: 17px; font-style: normal; color: #fff8ea; background: radial-gradient(circle at 35% 30%, hsl(var(--h) 40% 52%), hsl(var(--h) 36% 26%)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14); }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.big { width: 64px; height: 64px; font-size: 26px; }
.rank-tag { display: inline-block; font-size: .68rem; font-weight: 900; padding: 1px 6px; border-radius: 4px; line-height: 1.5; white-space: nowrap; color: var(--fg); background: var(--bg-3); border: 1px solid var(--line); }
.rank-tag.dan, .rank-tag.t6, .rank-tag.t7, .rank-tag.t8 { color: var(--accent-2-fg); background: var(--accent-2); border-color: var(--accent-2); }
.rank-tag.t3, .rank-tag.t4, .rank-tag.t5 { color: var(--accent-fg); background: var(--accent); border-color: var(--accent); }
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 16px; }
.panel { padding: 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.panel-title { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.25rem; }
.panel-sub { margin: 4px 0 10px; font-size: .8rem; color: var(--fg-dim); }
.chip-btn { padding: 7px 12px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.chip-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.chip-btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.chip-btn.accent:hover { color: var(--accent-fg); }
.btn-solid { padding: 10px 16px; border-radius: 10px; font-weight: 900; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.btn-solid:hover:not(:disabled) { border-color: var(--accent); }
.btn-solid.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn-solid.seal { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-2-fg); }
.pill { font-size: .7rem; font-weight: 900; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: rgba(255, 255, 255, .07); color: var(--fg-dim); }
.pill.wait { background: rgba(92, 201, 138, .15); color: #8fe0b1; }
.pill.play { background: rgba(200, 64, 47, .2); color: #f29b8e; }
.pill.opt { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.notice { display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 14px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); font-size: .9rem; }
.notice::before { content: '알림'; flex: none; font-size: .72rem; font-weight: 900; padding: 2px 8px; border-radius: 4px; background: var(--accent-2); color: var(--accent-2-fg); }

/* 첫 화면 · 로비 */
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.lobby-side { display: grid; gap: 12px; }
.sec-title { font-family: var(--display); font-weight: 400; font-size: 1.7rem; margin: 2px 0 12px; }
.sec-title small { font-family: var(--sans); font-size: .8rem; color: var(--fg-dim); margin-left: 6px; }
.game-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.game-card { position: relative; display: grid; grid-template-columns: 72px 1fr; gap: 6px 16px; align-items: center; text-align: left; padding: 18px; border-radius: 16px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); transition: border-color .2s, transform .15s var(--ease); }
.game-card:hover { border-color: var(--gc, var(--accent)); transform: translateY(-2px); }
.game-card img { grid-row: span 3; width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 8px 18px rgba(0, 0, 0, .35); }
.game-card .gc-name { font-family: var(--display); font-size: 1.5rem; }
.game-card .gc-tag { font-size: .82rem; color: var(--fg-dim); }
.game-card .gc-meta { display: flex; gap: 12px; font-size: .78rem; color: var(--fg-dim); }
.game-card .gc-meta b { color: var(--fg); }
.game-card::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gc, var(--accent)); }
.channel-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.channel { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: center; text-align: left; padding: 18px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); transition: border-color .2s, transform .15s var(--ease); }
.channel:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-2px); }
.channel .c-seal { grid-row: span 3; width: 56px; height: 56px; border-radius: 10px; display: grid; place-items: center; font-family: var(--serif); font-weight: 900; font-size: 1.6rem; color: var(--accent-2-fg); background: var(--accent-2); transform: rotate(-4deg); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .15); }
.channel:nth-child(1) .c-seal { background: #3d6b54; }
.channel:nth-child(2) .c-seal { background: #4b5f8a; }
.channel:nth-child(3) .c-seal { background: color-mix(in srgb, var(--accent) 70%, #000); }
.channel .c-name { font-family: var(--display); font-size: 1.35rem; }
.channel .c-desc { font-size: .82rem; color: var(--fg-dim); }
.channel .c-meta { display: flex; gap: 12px; font-size: .78rem; color: var(--fg-dim); }
.channel .c-meta b { color: var(--fg); }
.me-card { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; }
.me-card .avatar { grid-row: span 3; }
.mc-name { display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 1.1rem; min-width: 0; }
.mc-val { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.mc-rec { font-size: .8rem; color: var(--fg-dim); }
.mc-btns { grid-column: 1 / 3; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.side-links { display: flex; gap: 6px; flex-wrap: wrap; }
.ai-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ai-pick button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 10px; background: rgba(0, 0, 0, .22); border: 1px solid transparent; font-weight: 700; min-width: 0; }
.ai-pick button:hover { border-color: var(--accent); }
.ai-pick small { font-weight: 400; font-size: .74rem; color: var(--fg-dim); }

/* 방 목록 */
.ch-wrap, .room-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; }
.ch-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.join-no { display: flex; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.join-no input { width: 84px; padding: 9px 10px; font: inherit; border: 0; background: rgba(0, 0, 0, .3); color: var(--fg); text-align: center; }
.join-no button { padding: 0 12px; font-weight: 700; background: rgba(255, 255, 255, .06); }
.ch-filter { margin-left: auto; display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(0, 0, 0, .25); flex-wrap: wrap; }
.ch-filter button { padding: 6px 10px; border-radius: 8px; font-size: .82rem; color: var(--fg-dim); }
.ch-filter button.on { background: rgba(255, 255, 255, .1); color: var(--fg); font-weight: 700; }
.room-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; align-content: start; }
.room-card { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); transition: border-color .2s; }
.room-card:hover { border-color: var(--accent); }
.room-card .no { grid-row: span 2; font-family: var(--display); font-size: 1.6rem; color: var(--accent); min-width: 2em; text-align: center; }
.room-card .ti { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 6px; align-items: center; min-width: 0; }
.room-card .ti svg { width: 13px; height: 13px; flex: none; fill: var(--fg-dim); }
.room-card .st { grid-row: span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.room-card .vs { font-size: .78rem; color: var(--fg-dim); display: flex; gap: 5px; align-items: center; min-width: 0; overflow: hidden; white-space: nowrap; }
.empty-note { grid-column: 1 / -1; padding: 40px 10px; text-align: center; color: var(--fg-dim); border: 1px dashed var(--line); border-radius: 14px; }
.ch-side, .room-side { display: flex; flex-direction: column; min-height: 0; height: calc(100dvh - var(--tb-h) - 32px); border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; padding: 11px; font-weight: 700; color: var(--fg-dim); border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--fg); border-bottom-color: var(--accent); }
.tab-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.users { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.users li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.users li:hover { background: rgba(255, 255, 255, .05); }
.users .u-name { flex: 1; min-width: 0; font-size: .88rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.users .u-where { font-size: .7rem; color: var(--fg-dim); white-space: nowrap; }

/* 채팅 (로비·방·판 화면 공용) */
.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: .88rem; line-height: 1.45; }
.chat-log .ln { word-break: break-all; }
.chat-log .ln b { cursor: pointer; margin-right: 4px; }
.chat-log .ln.sys { color: var(--accent); font-size: .8rem; }
.chat-log .ln .rank-tag { margin-right: 4px; vertical-align: 1px; }
.chat-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; padding: 9px 12px; font: inherit; font-size: .9rem; border-radius: 8px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--fg); }
.chat-form button { padding: 0 14px; border-radius: 8px; font-weight: 900; background: var(--accent); color: var(--accent-fg); }
.emotes { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px 0; }
.emotes button { padding: 4px 9px; border-radius: 999px; font-size: .76rem; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }

/* 대기실 */
.room-main { display: flex; flex-direction: column; gap: 14px; }
.room-info { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.room-info .r-no { font-family: var(--display); font-size: 1.9rem; color: var(--accent); line-height: 1; }
.room-info .r-title { flex: 1; min-width: 0; font-weight: 900; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-info .r-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.seats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.team-head { grid-column: 1 / -1; display: flex; justify-content: space-between; font-family: var(--display); font-size: 1.1rem; margin-bottom: -4px; }
.team-head .t0 { color: #8db8ff; }
.team-head .t1 { color: #ff9c8f; }
.seat-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 14px 14px; min-height: 210px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); text-align: center; }
.seat-card[data-team="0"] { border-color: rgba(120, 170, 255, .45); background: linear-gradient(180deg, rgba(60, 110, 200, .16), var(--bg-2)); }
.seat-card[data-team="1"] { border-color: rgba(255, 120, 100, .45); background: linear-gradient(180deg, rgba(200, 60, 50, .16), var(--bg-2)); }
.seat-card.mine { box-shadow: 0 0 0 2px var(--accent); }
.seat-card .avatar { width: 66px; height: 66px; font-size: 26px; }
.seat-card .s-name { display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 1.05rem; max-width: 100%; }
.seat-card .s-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-card .s-val { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; font-size: .9rem; }
.seat-card .s-sub { font-size: .8rem; color: var(--fg-dim); }
.seat-card .ready-stamp { position: absolute; top: 12px; right: 12px; padding: 3px 10px; border-radius: 8px; font-family: var(--display); font-size: 1rem; color: var(--accent-2-fg); background: var(--accent-2); transform: rotate(8deg); box-shadow: 0 3px 8px rgba(0, 0, 0, .35); }
.seat-card .host-tag { position: absolute; top: 12px; left: 12px; font-size: .7rem; font-weight: 900; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); }
.seat-card .s-tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: auto; }
.seat-card.empty { justify-content: center; border-style: dashed; background: rgba(0, 0, 0, .15); }
.seat-card.empty .e-title { color: var(--fg-dim); font-weight: 700; }
.seat-card.offline .avatar { filter: grayscale(1) brightness(.6); }
.room-opts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; font-size: .86rem; color: var(--fg-dim); }
.room-opts select { font: inherit; padding: 7px 10px; border-radius: 8px; background: var(--bg-2); color: var(--fg); border: 1px solid var(--line); }
.room-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.room-actions .btn-solid { min-width: 140px; padding: 14px 20px; font-size: 1.05rem; }
.btn-ready { font-family: var(--display); font-weight: 400 !important; font-size: 1.6rem !important; min-width: 220px !important; }
.room-hint { width: 100%; text-align: center; font-size: .82rem; color: var(--fg-dim); }
.countdown { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(8, 10, 13, .5); pointer-events: none; }
.countdown b { font-family: var(--display); font-weight: 400; font-size: clamp(100px, 24vw, 220px); color: var(--fg); text-shadow: 0 6px 0 var(--accent-2); animation: stamp .9s var(--ease) forwards; }
@keyframes stamp { 0% { transform: scale(2); opacity: 0; } 20% { transform: scale(.94); opacity: 1; } 80% { transform: scale(1); opacity: 1; } 100% { opacity: 0; } }

/* 모달 */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(6, 8, 10, .62); backdrop-filter: blur(3px); }
.sheet { width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 24px 22px 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: rise .25s var(--ease); }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.sheet h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: 1.8rem; text-align: center; }
.sheet .lead { text-align: center; color: var(--fg-dim); margin: 0 0 16px; font-size: .92rem; line-height: 1.55; }
.sheet .row { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.btn { flex: 1; padding: 13px 16px; border-radius: 12px; font-weight: 900; font-size: 1rem; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.seal { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-2-fg); }
.btn.big { font-family: var(--display); font-weight: 400; font-size: 1.7rem; padding: 16px; }
.btn small { display: block; font-family: var(--sans); font-size: .72rem; font-weight: 500; opacity: .8; }
.link { color: var(--fg-dim); font-size: .88rem; padding: 6px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .82rem; color: var(--fg-dim); margin-top: 6px; }
.field input, .field select { font: inherit; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--fg); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { flex: 1; margin: 0; min-width: 80px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 10px 6px; border-radius: 10px; text-align: center; font-weight: 900; color: var(--fg); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); cursor: pointer; }
.seg input:checked + span { border-color: var(--accent); color: var(--accent); }
.seg small { display: block; font-weight: 400; font-size: .7rem; color: var(--fg-dim); }
.toggle { display: flex; justify-content: space-between; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.toggle input { width: 20px; height: 20px; accent-color: var(--accent); }
.paid { text-align: center; margin-top: 12px; font-family: var(--display); font-size: 1.5rem; }
.paid.plus { color: var(--ok); }
.paid.minus { color: var(--warn); }
.rank-list { list-style: none; margin: 0; padding: 0; max-height: 60dvh; overflow-y: auto; }
.rank-list li { display: grid; grid-template-columns: 2.4em auto 1fr auto; gap: 10px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.rank-list .pos { font-family: var(--display); font-size: 1.2rem; text-align: center; color: var(--fg-dim); }
.rank-list li:nth-child(-n+3) .pos { color: var(--accent); }
.rank-list .nm { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .cn { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.prof { display: grid; justify-items: center; gap: 6px; }
.prof .avatar { width: 76px; height: 76px; font-size: 30px; }
.prof-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin-top: 10px; }
.prof-stats div { padding: 10px 6px; border-radius: 10px; background: rgba(0, 0, 0, .25); text-align: center; font-size: .75rem; color: var(--fg-dim); }
.prof-stats b { display: block; font-size: 1.1rem; color: var(--fg); }
.rules { font-size: .9rem; line-height: 1.65; color: color-mix(in srgb, var(--fg) 88%, transparent); }
.rules h3 { font-family: var(--display); font-weight: 400; color: var(--accent); margin: 14px 0 4px; font-size: 1.15rem; }
.rules ul { margin: 0; padding-left: 1.2em; }
.rules b { color: var(--fg); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 200; padding: 10px 18px; border-radius: 999px; background: var(--fg); color: var(--bg); font-weight: 700; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .lobby-grid, .ch-wrap, .room-wrap { grid-template-columns: 1fr; }
  .ch-side, .room-side { height: 360px; }
  .ch-filter { margin-left: 0; }
}
@media (max-width: 640px) {
  :root { --tb-h: 54px; }
  .tb-brand b, .net .txt { display: none; }
  .tb-title { font-size: .85rem; }
  .channel-list, .game-list { grid-template-columns: 1fr; }
  .seat-card { min-height: 180px; padding: 18px 8px 10px; }
  .seat-card .avatar { width: 52px; height: 52px; font-size: 21px; }
  .room-actions .btn-solid { min-width: 0; flex: 1; }
  .btn-ready { width: 100%; min-width: 0 !important; }
  .wrap { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; transition-duration: .01s !important; } }
