@font-face {
  font-family: 'Pretendard';
  src: url('./assets/fonts/PretendardVariable.woff2') format('woff2-variations');
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f7f6;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --line: #e3e8e5;
  --line-strong: #cbd4cf;
  --text: #191d1b;
  --muted: #68736d;
  --green: #00c471;
  --green-dark: #00a960;
  --green-soft: #e9fbf2;
  --warning: #f4b740;
  --danger: #e55561;
  --cell-size: 88px;
  font-family: Pretendard, 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100dvh; color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 5vw, 64px); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .94); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); }
.site-header > .ghost.small { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.brand { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 800; letter-spacing: -.04em; }
.brand-mark { width: 25px; height: 25px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; padding: 4px; border-radius: 7px; background: var(--green); }
.brand-mark i { background: #fff; border-radius: 2px; }
.brand-mark i:nth-child(2) { opacity: .45; }
.header-actions, .toolbar-actions { display: flex; align-items: center; gap: 10px; }

main { min-height: calc(100dvh - 122px); }
.landing-view { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 64px 0 88px; }
.page-intro { margin-bottom: 30px; }
.service-label { margin: 0 0 9px; color: var(--green-dark); font-size: 13px; font-weight: 700; }
.page-intro h1 { margin: 0; font-size: clamp(32px, 4vw, 44px); line-height: 1.25; letter-spacing: -.055em; }
.page-intro > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.setup-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.setup-card, .setup-preview, .control-panel, .board-stage { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 8px rgba(26, 45, 35, .035); }
.setup-card { overflow: hidden; }
.form-section { padding: 30px 32px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 24px; }
.step-number { flex: 0 0 25px; height: 25px; display: inline-flex; align-items: center; justify-content: center; color: var(--green-dark); background: var(--green-soft); border-radius: 50%; font-size: 12px; font-weight: 800; }
.section-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.field { display: grid; gap: 8px; min-width: 0; }
.field > span { color: #38423d; font-size: 12px; font-weight: 700; }
.field > span output { float: right; color: var(--green-dark); font-size: 12px; }
.field > span small { margin-left: 4px; color: var(--muted); font-weight: 400; }
.field input:not([type=range]), .field select, .field textarea { width: 100%; min-height: 46px; padding: 11px 13px; color: var(--text); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #a1aaa5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 196, 113, .1); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
input[type=range] { width: 100%; accent-color: var(--green); }
.range-labels { display: flex; justify-content: space-between; color: #89938e; }

.source-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; padding: 0; margin: 0 0 16px; border: 0; }
.source-option { min-height: 94px; position: relative; display: block; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.source-option:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.source-option:has(input:checked) { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.source-option input { position: absolute; top: 13px; right: 13px; width: 15px; height: 15px; margin: 0; accent-color: var(--green); }
.source-option > span { display: grid; gap: 5px; padding-right: 15px; }
.source-option b { font-size: 12px; }
.source-option small { color: var(--muted); font-size: 10px; line-height: 1.45; word-break: keep-all; }
.dynamic-fields { padding: 16px; border-radius: 9px; background: var(--surface-soft); border: 1px solid var(--line); }
.topic-line { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.quick-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.quick-topics button { min-height: 30px; padding: 0 11px; color: #4f5a54; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; }
.quick-topics button:hover { color: var(--green-dark); border-color: var(--green); }

.primary, .ghost { min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 8px; font-weight: 700; transition: background .15s, border-color .15s, color .15s; }
.primary { color: #fff; background: var(--green); }
.primary:hover { background: var(--green-dark); }
.primary:disabled, .ghost:disabled { cursor: not-allowed; opacity: .45; }
.ghost { color: #3c4741; background: #fff; border-color: var(--line-strong); }
.ghost:hover { border-color: #9ca9a2; background: var(--surface-soft); }
.ghost.small { min-height: 34px; padding: 0 12px; font-size: 11px; }
.create-button { display: block; width: calc(100% - 64px); min-height: 50px; margin: 24px 32px 30px; font-size: 14px; }
.terms-check { display: flex; align-items: flex-start; gap: 9px; margin: 20px 32px -7px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.terms-check input { flex: 0 0 auto; width: 15px; height: 15px; margin: 2px 0 0; accent-color: var(--green); }
.terms-check a { color: #3e584a; font-weight: 700; }
.full { width: 100%; margin-bottom: 8px; }

.setup-preview { padding: 22px; position: sticky; top: 88px; }
.preview-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; color: var(--muted); font-size: 11px; }
.preview-top b { color: var(--text); font-size: 12px; }
.sample-board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; padding: 13px; aspect-ratio: 1; border-radius: 10px; background: #eef2f0; }
.sample-board i { border-radius: 4px; background: #fff; border: 1px solid #dde4e0; }
.sample-board i.on { background: var(--green); border-color: var(--green); }
.preview-copy { padding: 22px 2px 18px; border-bottom: 1px solid var(--line); }
.preview-copy h3 { margin: 0 0 8px; font-size: 15px; letter-spacing: -.025em; }
.preview-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.preview-list { padding: 10px 0; margin: 0; list-style: none; }
.preview-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 2px; font-size: 11px; }
.preview-list span { color: var(--muted); }
.preview-list b { font-weight: 600; }
.prototype-note { margin: 8px 0 0; padding: 13px; color: var(--muted); background: var(--surface-soft); border-radius: 8px; font-size: 10px; line-height: 1.6; }
.prototype-note.compact { margin-top: 20px; }

.room-view { width: min(1460px, calc(100% - 40px)); margin: 0 auto; padding: 26px 0 56px; }
.room-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.back-link { display: inline-block; margin-bottom: 5px; color: var(--green-dark); text-decoration: none; font-size: 11px; font-weight: 700; }
.room-toolbar h1 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.045em; }
.room-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.room-meta span:not(:last-child)::after { content: ''; display: inline-block; width: 1px; height: 9px; margin-left: 7px; vertical-align: -1px; background: var(--line-strong); }
#syncStatus { color: var(--green-dark); }
.role-switch { display: flex; padding: 3px; border-radius: 9px; background: #e9eeeb; }
.role-switch button { min-height: 34px; padding: 0 12px; color: var(--muted); background: transparent; border: 0; border-radius: 7px; font-size: 11px; font-weight: 700; }
.role-switch button.active { color: var(--text); background: #fff; box-shadow: 0 1px 4px rgba(22, 39, 30, .1); }
.dashboard { display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 18px; align-items: start; }
.control-panel { padding: 18px; position: sticky; top: 82px; }
.status-card { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 10px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.live-dot { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.live-dot i { width: 7px; height: 7px; border-radius: 50%; background: #a6afaa; }
.live-dot.running i { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.status-card strong { font-size: 38px; line-height: 1; letter-spacing: -.05em; }
.status-card > span { color: var(--muted); font-size: 11px; }
.guide-card { margin-bottom: 16px; padding: 13px; background: var(--green-soft); border-radius: 8px; }
.guide-card b { color: var(--green-dark); font-size: 11px; }
.guide-card p { margin: 5px 0 0; color: #4d6257; font-size: 10px; line-height: 1.6; }
.progress-block { margin: 20px 0; }
.progress-block > div:first-child, .section-label { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; }
.progress-track { height: 5px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: #edf1ef; }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .2s; }
.section-label b { min-width: 21px; padding: 2px 6px; color: #7a5a00; background: #fff6d8; border-radius: 99px; text-align: center; }
.pending-list { display: grid; gap: 6px; max-height: 230px; margin-top: 8px; overflow: auto; }
.pending-list > p { margin: 8px 0; color: #929b96; font-size: 10px; }
.pending-item { display: grid; grid-template-columns: 1fr auto auto; gap: 5px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 7px; }
.pending-item span { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pending-item button { width: 26px; height: 26px; padding: 0; color: #fff; background: var(--green); border: 0; border-radius: 5px; }
.pending-item button.reject { color: var(--danger); background: #fff0f1; }

.board-stage { min-width: 0; padding: clamp(16px, 2vw, 24px); }
.board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.board-head p { margin: 0 0 5px; color: var(--green-dark); font-size: 10px; font-weight: 700; }
.board-head h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.zoom-control { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.zoom-control input { width: 86px; }
.board-scroll { max-width: 100%; padding: 2px 2px 10px; overflow: auto; scrollbar-color: #b8c4bd transparent; }
.bingo-board { display: grid; grid-template-columns: repeat(var(--board-size), var(--cell-size)); gap: clamp(4px, .5vw, 7px); width: max-content; min-width: max-content; margin: 0 auto; }
.bingo-cell { position: relative; min-width: var(--cell-size); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 9px; overflow: hidden; color: #34413a; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; text-align: center; font-size: clamp(9px, .95vw, 12px); font-weight: 600; line-height: 1.4; word-break: keep-all; transition: transform .12s, border-color .12s, background .12s; }
button.bingo-cell:hover { z-index: 1; border-color: var(--green); background: #fff; transform: translateY(-1px); }
.bingo-cell::before { content: attr(data-number); position: absolute; top: 5px; left: 6px; color: #a2aba6; font-size: 7px; font-weight: 500; }
.bingo-cell.called { color: #fff; background: var(--green); border-color: var(--green); }
.bingo-cell.called::before { color: rgba(255,255,255,.68); }
.bingo-cell.called::after { content: '✓'; position: absolute; right: 6px; bottom: 4px; color: #fff; font-size: 12px; font-weight: 800; opacity: .8; }
.bingo-cell.pending { color: #765800; background: #fff9e6; border-color: var(--warning); }
.bingo-cell.pending::after { content: '확인 중'; position: absolute; bottom: 4px; color: #9a7612; font-size: 7px; }
.bingo-cell.editor { flex-direction: column; gap: 5px; padding: 6px; }
.bingo-cell.editor input { width: 100%; flex: 1; min-height: 0; padding: 2px; color: var(--text); background: transparent; border: 0; outline: 0; text-align: center; font-size: 10px; }
.bingo-cell.editor button { width: 100%; min-height: 23px; color: #fff; background: var(--green); border: 0; border-radius: 5px; font-size: 9px; font-weight: 700; }
.bingo-cell.editor button:disabled { color: #89938e; background: #e9eeeb; }
.bingo-notice { position: sticky; bottom: 14px; max-width: 390px; display: flex; align-items: center; gap: 12px; margin: 18px auto 0; padding: 13px 15px; color: #21553c; background: #e8fff3; border: 1px solid #9ae5bd; border-radius: 10px; box-shadow: 0 8px 28px rgba(30, 87, 58, .1); }
.bingo-notice > span { width: 29px; height: 29px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--green); border-radius: 50%; font-weight: 800; }
.bingo-notice b { font-size: 12px; }
.bingo-notice p { margin: 2px 0 0; font-size: 10px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 20; padding: 11px 15px; color: #fff; background: #262c29; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.15); font-size: 11px; font-weight: 600; opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.site-footer { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px clamp(20px, 5vw, 64px); color: #7f8984; background: #fff; border-top: 1px solid var(--line); font-size: 10px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 16px; }
.site-footer a { color: #59645e; text-decoration: none; }
.site-footer a:hover { color: var(--green-dark); text-decoration: underline; }
.legal-home { display: inline-flex; align-items: center; text-decoration: none; }

@media (max-width: 960px) {
  .setup-layout { grid-template-columns: 1fr; }
  .setup-preview { position: static; display: grid; grid-template-columns: 220px 1fr; gap: 0 22px; }
  .preview-top, .sample-board { grid-column: 1; }
  .preview-copy, .preview-list, .setup-preview > .prototype-note { grid-column: 2; }
  .preview-copy { padding-top: 0; }
  .dashboard { grid-template-columns: 1fr; }
  .control-panel { position: static; display: grid; grid-template-columns: 140px 1fr 1fr; gap: 14px; align-items: start; }
  .status-card { margin: 0; padding: 0; border: 0; }
  .progress-block { margin: 0; }
  .pending-block { grid-column: 2 / -1; }
  .prototype-note.compact { grid-column: 1 / -1; margin: 0; }
}

@media (max-width: 680px) {
  .site-header { height: 58px; padding: 0 15px; }
  main { min-height: calc(100dvh - 116px); }
  .landing-view, .room-view { width: calc(100% - 24px); padding-top: 34px; }
  .page-intro { margin-bottom: 22px; }
  .page-intro h1 { font-size: 30px; }
  .page-intro > p:last-child { font-size: 13px; }
  .setup-card, .setup-preview, .control-panel, .board-stage { border-radius: 11px; }
  .form-section { padding: 23px 18px; }
  .field-row, .source-picker { grid-template-columns: 1fr; }
  .source-option { min-height: 70px; }
  .create-button { width: calc(100% - 36px); margin: 20px 18px 22px; }
  .terms-check { margin-right: 20px; margin-left: 20px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .site-footer nav { justify-content: flex-start; }
  .setup-preview { display: block; padding: 18px; }
  .sample-board { max-width: 260px; margin: 0 auto; }
  .preview-copy { padding-top: 20px; }
  .room-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { justify-content: space-between; flex-wrap: wrap; }
  .role-switch { flex: 1; }
  .role-switch button { flex: 1; }
  .control-panel { grid-template-columns: 1fr 1fr; }
  .status-card { grid-column: 1; }
  #hostControls, #viewerGuide { grid-column: 2; margin: 0; }
  .progress-block, .pending-block { grid-column: 1 / -1; }
  .board-stage { padding: 17px 11px 21px; }
  .board-head { align-items: flex-start; }
  .board-head h2 { max-width: 220px; font-size: 14px; }
  .zoom-control { flex-direction: column; align-items: flex-end; }
  .zoom-control input { width: 68px; }
  .bingo-board { width: max-content; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Keyword bingo */
.compact-intro { max-width: 700px; }
.compact-intro h1 { font-size: clamp(38px, 5vw, 58px); line-height: 1.16; }
.keyword-setup-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.keyword-setup-card { max-width: none; }
.single-section { border-bottom: 0; }
.no-step { margin-bottom: 26px; }
.target-field { margin-top: 18px; }
.rule-summary { display: grid; grid-template-columns: 90px 1fr; gap: 12px; margin-top: 22px; padding: 16px; border-radius: 9px; background: var(--surface-soft); }
.rule-summary > span { color: var(--text); font-size: 11px; font-weight: 700; }
.rule-summary ol { margin: 0; padding-left: 18px; color: var(--muted); font-size: 11px; line-height: 1.85; }
.keyword-preview { padding: 22px; color: var(--text); background: #15251d; border-radius: 14px; box-shadow: 0 12px 36px rgba(21, 37, 29, .12); position: sticky; top: 88px; }
.preview-live { display: flex; align-items: center; gap: 7px; color: #afc0b7; font-size: 11px; }
.preview-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(0, 196, 113, .13); }
.called-word-preview { padding: 28px 0 24px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.1); }
.called-word-preview span { display: block; color: #89a095; font-size: 10px; }
.called-word-preview strong { display: block; margin: 6px 0; color: #fff; font-size: 42px; letter-spacing: -.06em; }
.called-word-preview p { margin: 0; color: #a9bbb1; font-size: 10px; }
.mini-ranking { padding: 13px 0; }
.mini-ranking > div { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; padding: 8px 2px; color: #fff; font-size: 11px; }
.mini-ranking em { color: var(--green); font-style: normal; font-weight: 800; }
.mini-ranking b { color: #aec0b6; font-size: 10px; font-weight: 500; }
.keyword-preview > p { margin: 5px 0 0; padding-top: 15px; color: #82988c; border-top: 1px solid rgba(255,255,255,.1); font-size: 10px; line-height: 1.65; }
.quick-join-form { margin-top: 12px; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.1); }
.quick-join-form > strong { display: block; margin-bottom: 8px; color: #dce7e1; font-size: 11px; }
.quick-join-form > div { display: grid; grid-template-columns: 80px minmax(0, 1fr) 58px; gap: 6px; }
.quick-join-form input { min-width: 0; height: 34px; padding: 0 8px; border: 1px solid #3b4b43; border-radius: 7px; background: #213129; color: #fff; font: inherit; font-size: 10px; text-transform: none; }
.quick-join-form #quickRoomCode { text-transform: uppercase; }
.quick-join-form button { min-height: 34px; padding: 0 8px; border-color: #52635a; background: #fff; font-size: 10px; }
.join-overlay { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(20, 31, 25, .52); backdrop-filter: blur(4px); }
.join-card { width: min(460px, 100%); padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.18); }
.join-card h2 { margin: 5px 0 8px; font-size: 26px; letter-spacing: -.04em; }
.join-card > p:not(.service-label) { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.join-card .field { margin-top: 16px; }
.join-card .terms-check { margin: 18px 0 0; }
.join-card .form-message { min-height: 20px; margin: 10px 0 0; color: #bd3535; }
.join-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.join-actions a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

@media (min-width: 901px) {
  .landing-view { padding: 28px 0 24px; }
  .landing-view .page-intro { margin-bottom: 18px; }
  .landing-view .service-label { margin-bottom: 6px; }
  .landing-view .compact-intro h1 { font-size: clamp(38px, 4vw, 48px); line-height: 1.1; }
  .landing-view .page-intro > p:last-child { margin-top: 7px; font-size: 14px; }
  .landing-view .form-section { padding: 22px 28px; }
  .landing-view .no-step { margin-bottom: 18px; }
  .landing-view .field-row { margin-top: 14px; }
  .landing-view .target-field { margin-top: 14px; }
  .landing-view .rule-summary { margin-top: 16px; padding: 12px 14px; }
  .landing-view .terms-check { margin: 14px 28px -2px; }
  .landing-view .create-button { width: calc(100% - 56px); min-height: 46px; margin: 14px 28px 20px; }
  .landing-view .keyword-preview { padding: 18px; }
  .landing-view .called-word-preview { padding: 20px 0 18px; }
  .landing-view .called-word-preview strong { font-size: 38px; }
  .landing-view .mini-ranking { padding: 9px 0; }
  .landing-view .mini-ranking > div { padding: 6px 2px; }
  .landing-view .keyword-preview > p { padding-top: 11px; }
}

.keyword-room-toolbar { align-items: center; }
.room-topic { margin: 0 0 4px; color: var(--green-dark); font-size: 11px; font-weight: 700; }
.keyword-dashboard { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.ranking-panel, .game-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 8px rgba(26,45,35,.035); }
.ranking-panel { padding: 18px; position: sticky; top: 82px; }
.game-status-row { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.game-status-row .live-dot { margin: 0; color: var(--text); }
.game-status-row .live-dot b { font-size: 11px; }
.ranking-heading { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.ranking-heading h2 { margin: 0; font-size: 15px; }
.ranking-heading span { color: var(--muted); font-size: 9px; }
.ranking-list { display: grid; gap: 5px; }
.ranking-row { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 6px; min-height: 47px; padding: 7px 9px; border-radius: 8px; background: var(--surface-soft); }
.ranking-row em { color: #87928c; font-size: 11px; font-style: normal; font-weight: 800; }
.ranking-row span { display: grid; gap: 2px; min-width: 0; }
.ranking-row span b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ranking-row span small { color: var(--muted); font-size: 8px; }
.ranking-row strong { font-size: 11px; }
.ranking-row.me { box-shadow: inset 0 0 0 1px var(--green); background: var(--green-soft); }
.ranking-row.winner em, .ranking-row.winner strong { color: var(--green-dark); }
.ranking-row.has-actions { grid-template-columns: 25px minmax(0, 1fr) auto; }
.ranking-row.has-actions .participant-actions { display: flex; grid-column: 2 / -1; gap: 5px; }
.participant-actions button, .ban-summary button { min-height: 24px; padding: 3px 8px; color: #65716a; background: #fff; border: 1px solid var(--line); border-radius: 5px; font-size: 8px; cursor: pointer; }
.participant-actions button:last-child { color: #b34a4a; }
.participant-actions button:hover, .ban-summary button:hover { border-color: var(--line-strong); background: #f8faf9; }
.ban-summary { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding: 9px; color: #8b4d4d; background: #fff6f6; border-radius: 7px; font-size: 9px; }
.ranking-note { margin-top: 13px; color: #919b96; font-size: 9px; line-height: 1.55; }
.game-panel { min-width: 0; padding: clamp(20px, 3vw, 34px); }
.host-call-area { max-width: 760px; margin: 0 auto; padding: 12px 0 28px; text-align: center; }
.panel-label { color: var(--green-dark); font-size: 10px; font-weight: 700; }
.host-call-area h2 { margin: 8px 0 22px; font-size: clamp(20px, 3vw, 28px); letter-spacing: -.04em; }
.call-form { display: grid; grid-template-columns: 1fr 92px; gap: 8px; }
.call-form input { width: 100%; min-height: 58px; padding: 0 18px; color: var(--text); background: #fff; border: 2px solid var(--line-strong); border-radius: 10px; outline: 0; font-size: 20px; font-weight: 700; }
.call-form input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(0,196,113,.1); }
.call-form button { font-size: 14px; }
.host-actions { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.host-actions button { min-width: 120px; }
.latest-call { margin: 0 auto 24px; padding: 23px; color: #154b31; background: var(--green-soft); border: 1px solid #a8e8c7; border-radius: 12px; text-align: center; }
.latest-call span { display: block; font-size: 10px; }
.latest-call strong { display: block; margin: 4px 0; font-size: 34px; letter-spacing: -.05em; }
.latest-call p { margin: 0; font-size: 10px; }
.latest-call.empty { color: var(--muted); background: var(--surface-soft); border-color: var(--line); }
.latest-call.empty strong { font-size: 15px; letter-spacing: -.02em; }
.history-section { border-top: 1px solid var(--line); padding-top: 19px; }
.history-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.history-heading h3 { margin: 0; font-size: 13px; }
.history-heading span { color: var(--muted); font-size: 10px; }
.call-history { display: flex; flex-wrap: wrap; gap: 7px; min-height: 35px; }
.call-history > span { padding: 7px 11px; color: #39453f; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; font-size: 10px; }
.call-history p { margin: 8px 0; color: #919b96; font-size: 10px; }
.viewer-board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.viewer-board-head h2 { margin: 6px 0 0; font-size: 17px; }
.viewer-board-actions { display: flex; align-items: center; gap: 10px; }
.viewer-board-actions span { color: var(--muted); font-size: 10px; }
.viewer-board-shell { max-width: 100%; min-height: 200px; padding: 3px; overflow: auto; }
.keyword-board { margin: 0 auto; }
.keyword-editor { background: #fff; }
.keyword-editor input { width: 100%; height: 100%; padding: 8px; color: var(--text); background: transparent; border: 0; outline: 0; text-align: center; font-size: clamp(9px, 1vw, 12px); font-weight: 600; }
.keyword-editor:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,196,113,.08); }
.viewer-result { max-width: 620px; margin: 16px auto 0; padding: 11px 14px; color: var(--muted); background: var(--surface-soft); border-radius: 8px; text-align: center; font-size: 10px; }

@media (max-width: 900px) {
  .keyword-setup-layout, .keyword-dashboard { grid-template-columns: 1fr; }
  .keyword-preview, .ranking-panel { position: static; }
  .keyword-preview { display: none; }
  .ranking-panel { order: 2; }
  .game-panel { order: 1; }
  .ranking-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .compact-intro h1 { font-size: 35px; }
  .rule-summary { grid-template-columns: 1fr; }
  .keyword-room-toolbar { align-items: stretch; }
  .keyword-dashboard { gap: 12px; }
  .game-panel { padding: 18px 12px; }
  .call-form { grid-template-columns: 1fr 72px; }
  .call-form input { min-height: 52px; font-size: 17px; }
  .host-actions button { min-width: 0; flex: 1; }
  .viewer-board-head { align-items: flex-start; }
  .viewer-board-actions { align-items: flex-end; flex-direction: column-reverse; }
  .ranking-list { grid-template-columns: 1fr; }
}
