:root {
  color-scheme: light;
  --bg: #fff; --ink: #111; --muted: #747474; --line: #e7e7e7;
  --soft: #f7f7f7; --green: #288454; --danger: #be4e48; --blue: #5675ef;
  --accent: #8075e8; --accent-strong: #7164d4; --accent-hover: #6557c5; --on-accent: #fff;
  --label-width: 62px; --out: cubic-bezier(.22,1,.36,1);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--bg); font-size: 16px; -webkit-font-smoothing: antialiased;
}
:root[data-theme='blue'] { --accent: #5d87c7; --accent-strong: #3e6eb0; --accent-hover: #315d99; }
:root[data-theme='jade'] { --accent: #408b7e; --accent-strong: #287568; --accent-hover: #1e6257; }
:root[data-theme='rose'] { --accent: #c77392; --accent-strong: #aa4c70; --accent-hover: #953b5e; }
:root[data-theme='amber'] { --accent: #b78a42; --accent-strong: #926623; --accent-hover: #7b551e; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
[hidden] { display: none !important; }
p { line-height: 1.7; }
.site-header { max-width: 664px; margin: 0 auto; padding: 28px 32px 18px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: center; }
.brand { justify-self: start; color: var(--accent-strong); font-size: 20px; font-weight: 800; letter-spacing: -.055em; text-decoration: none; }
.brand-mark { display: flex; align-items: center; justify-content: center; }
.brand-mark i { display: block; width: 12px; height: 12px; background: var(--accent); border-radius: 50%; }
.brand-mark i + i { margin-left: -4px; background: #f3986e; }
.text-button { border: 0; background: none; padding: 8px 0; font-size: 12px; color: var(--muted); white-space: nowrap; transition: color .2s; }
.text-button:hover { color: var(--accent-strong); }
.text-button span { display: inline-block; margin-left: 3px; transition: transform .3s var(--out); }
.text-button:hover span { transform: translate(2px,-2px); }
.header-tools { display: flex; justify-content: flex-end; align-items: center; gap: 16px; }
.theme-picker { display: flex; align-items: center; gap: 2px; }
.theme-swatch { --swatch: #8075e8; position: relative; width: 28px; height: 32px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 6px; background: none; }
.theme-swatch::before, .theme-swatch::after { content: ''; position: absolute; top: 50%; left: 50%; border-radius: 50%; pointer-events: none; }
.theme-swatch::before { width: 12px; height: 12px; background: var(--swatch); transform: translate(-50%,-50%); transition: transform .2s var(--out); }
.theme-swatch::after { width: 20px; height: 20px; border: 1px solid var(--swatch); opacity: 0; transform: translate(-50%,-50%) scale(.8); transition: opacity .2s,transform .2s var(--out); }
.theme-swatch[aria-pressed='true']::after { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.theme-swatch:hover::before { transform: translate(-50%,-50%) scale(1.15); }
.theme-swatch:focus-visible { outline-offset: 0; }
.theme-swatch[data-theme-option='blue'] { --swatch: #5d87c7; }
.theme-swatch[data-theme-option='jade'] { --swatch: #408b7e; }
.theme-swatch[data-theme-option='rose'] { --swatch: #c77392; }
.theme-swatch[data-theme-option='amber'] { --swatch: #b78a42; }
.brand, .home h1, .room-view.is-won .round-heading h1, .step-number, .word-cluster.hit { transition: color .22s; }
.brand-mark i { transition: background-color .22s; }
#rules-open { flex: 0 0 auto; }
.home, .room-view { max-width: 664px; padding: 0 32px; margin: 35px auto 0; }
.home h1 { color: var(--accent); margin: 0; font-size: clamp(60px,8.5vw,96px); font-weight: 850; line-height: 1.18; letter-spacing: .025em; white-space: nowrap; }
.home h1 .hero-line { display: block; }
.home h1 .hero-line + .hero-line { padding-left: .55em; margin-top: .08em; }
.home h1 .hero-letter { display: inline-block; animation: letter-in .72s var(--out) both; }
.home h1 .hero-letter:nth-child(2) { animation-delay: 45ms; }
.home h1 .hero-letter:nth-child(3) { animation-delay: 90ms; }
.home h1 .hero-letter:nth-child(4) { animation-delay: 135ms; }
.home h1 .hero-line:nth-child(2) .hero-letter:nth-child(1) { animation-delay: 180ms; }
.home h1 .hero-line:nth-child(2) .hero-letter:nth-child(2) { animation-delay: 225ms; }
.home h1 .hero-line:nth-child(2) .hero-letter:nth-child(3) { animation-delay: 270ms; }
.home h1 .hero-line:nth-child(2) .hero-letter:nth-child(4) { animation-delay: 315ms; }
.intro { color: var(--muted); font-size: 15px; margin: 17px 0 0; letter-spacing: .005em; }
.home-cast { display: grid; grid-template-columns: 1fr 1fr; margin: 22px 0 32px; }
.home-player { display: block; padding: 0; border: 0; background: none; text-align: center; min-width: 0; }
.home-avatar-stage { display: flex; align-items: flex-end; justify-content: center; height: 126px; border-bottom: 1px solid var(--line); }
.home-player-name { display: block; font-size: 14px; line-height: 20px; font-weight: 650; margin-top: 17px; }
#home-avatar .home-player-name::after { content: ''; display: block; width: 14px; height: 2px; border-radius: 1px; background: var(--accent); margin: 3px auto 0; }
.home-player-hint { display: block; color: var(--muted); font-size: 11px; margin-top: 8px; line-height: 1.4; }
.friend-placeholder .home-player-hint { margin-top: 13px; }
.character { --character-color: #5675ef; display: block; flex: 0 0 auto; width: 96px; height: 96px; margin-bottom: -9.6px; }
.home-avatar-stage .character { width: 112px; height: 112px; margin-bottom: -11.2px; }
.character-pose { display: block; width: 100%; height: 100%; transform-origin: 50% 90%; }
.character-drawing { display: block; width: 100%; height: 100%; overflow: visible; transform-origin: 50% 90%; animation: breathe 5.2s ease-in-out infinite; }
.character-shape { fill: var(--character-color); }
.character-gaze { transform: translate(var(--look-x,0px),var(--look-y,0px)); transition: transform .22s var(--out); }
.eyes { fill: none; stroke: #111; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; transform-box: fill-box; transform-origin: center; }
.eyes-happy, .eyes-closed { display: none; }
.character-ring { opacity: 0; fill: none; stroke: var(--character-color); stroke-width: 1; transform-origin: 50% 60%; }
.avatar-1 { --character-color: #f3986e; }
.avatar-2 { --character-color: #70b99a; }
.avatar-3 { --character-color: #a18cde; }
.avatar-4 { --character-color: #e4b947; }
.avatar-5 { --character-color: #e88dba; }
.avatar-6 { --character-color: #54b9b3; }
.avatar-7 { --character-color: #b68d68; }
.avatar-8 { --character-color: #6cb7de; }
.avatar-9 { --character-color: #e67870; }
.avatar-1 .character-drawing, .avatar-5 .character-drawing { animation-delay: -1.7s; }
.avatar-2 .character-drawing, .avatar-6 .character-drawing { animation-delay: -3.1s; }
.avatar-3 .character-drawing, .avatar-7 .character-drawing { animation-delay: -2.2s; }
.character[data-mode='offline'], .character[data-mode='absent'] { --character-color: #cdced1; }
.character[data-mode='offline'] .character-drawing, .character[data-mode='absent'] .character-drawing { animation: none; }
.character[data-mode='offline'] .eyes-normal, .character[data-mode='absent'] .eyes-normal, .character[data-mode='win'] .eyes-normal { display: none; }
.character[data-mode='offline'] .eyes-closed, .character[data-mode='absent'] .eyes-closed, .character[data-mode='win'] .eyes-happy { display: block; }
.line-field { display: grid; grid-template-columns: var(--label-width) minmax(0,1fr); align-items: center; gap: 14px; position: relative; min-width: 0; }
label { font-size: 12px; font-weight: 550; line-height: 1.5; }
input { display: block; width: 100%; min-width: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; outline: none; padding: 12px 0 11px; font-size: 23px; font-weight: 500; line-height: 1.4; transition: border-color .25s,color .25s; }
input::placeholder { color: #bdbdbf; opacity: 1; font-weight: 400; }
input:disabled { color: var(--muted); }
.line-field::after, .word-line::after { content: ''; position: absolute; bottom: 0; right: 0; left: calc(var(--label-width) + 14px); height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--out); pointer-events: none; }
.line-field:focus-within::after, .word-line:focus-within::after { transform: scaleX(1); }
.join-action-row, .word-action-row { display: flex; align-items: flex-end; gap: 18px; }
.join-action-row { margin-top: 14px; }
.join-action-row .line-field, .word-line { flex: 1; min-width: 0; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: auto; flex: 0 0 auto; min-height: 48px; padding: 12px 24px; border: 1px solid var(--accent-strong); border-radius: 999px; background: var(--accent-strong); color: var(--on-accent); font-size: 14px; font-weight: 600; line-height: 1.5; white-space: nowrap; transition: transform .18s var(--out),opacity .2s,background .2s; }
.primary-button:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); }
.primary-button:active:not(:disabled) { transform: scale(.97); }
.primary-button:disabled { opacity: .42; }
.button-arrow { font-size: 19px; font-weight: 400; line-height: 1; display: inline-block; transition: transform .3s var(--out); }
.primary-button:hover:not(:disabled) .button-arrow { transform: translateX(4px); }
.ghost-button { background: none; color: var(--accent-strong); border-color: var(--line); }
.ghost-button:hover:not(:disabled) { background: none; color: var(--accent-hover); border-color: var(--accent); }
.field-hint { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 11px 0 0; }
#join-hint { margin-left: calc(var(--label-width) + 14px); }
.error { font-size: 12px; line-height: 1.7; margin: 10px 0; color: var(--danger); animation: nudge .3s ease-in-out; }
.steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 0; margin: 38px 0 0; list-style: none; gap: 18px; }
.steps li { display: flex; gap: 12px; min-width: 0; }
.steps li + li { border-left: 1px solid var(--line); padding-left: 18px; }
.step-number { color: var(--accent-strong); font-size: 14px; font-weight: 650; line-height: 1.5; font-variant-numeric: tabular-nums; }
.steps strong { display: block; font-size: 12px; font-weight: 650; line-height: 1.8; }
.steps p { color: var(--muted); font-size: 10px; line-height: 1.7; margin: 4px 0 0; }
.home-footer { color: #aaa; text-align: center; font-size: 10px; margin: 25px 0 30px; }
.room-view { margin-top: 12px; }
.room-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 48px; }
.room-identity { display: flex; min-width: 0; gap: 10px; align-items: baseline; font-size: 12px; }
#room-label { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.room-count { color: var(--muted); white-space: nowrap; font-size: 11px; }
.room-tools { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.connection { color: #999; font-size: 10px; white-space: nowrap; }
.connection::before { content: ''; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--green); margin-right: 5px; vertical-align: 2px; }
.connection.reconnecting::before { background: #bb9863; animation: pulse 1.6s ease-in-out infinite; }
.round-heading { margin: 32px 0 20px; }
.round-heading h1 { font-size: 42px; line-height: 1.2; font-weight: 750; letter-spacing: -.055em; margin: 0; overflow-wrap: anywhere; }
.round-heading p { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.previous-words { padding: 0; margin: 23px 0 4px; }
.previous-words > p { font-size: 11px; color: var(--muted); margin: 0 0 7px; }
#previous-list { display: flex; gap: 8px 14px; flex-wrap: wrap; font-size: 23px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.previous-chip + .previous-chip::before { content: '/'; color: #aaa; font-weight: 400; margin-right: 14px; }
.previous-chip sup { font-size: 10px; color: var(--muted); font-weight: 500; margin-left: 3px; vertical-align: super; }
.roster { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 0; row-gap: 12px; margin: 5px 0 29px; position: relative; }
.roster.cols-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.roster.cols-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.roster.cols-5 { grid-template-columns: repeat(5,minmax(0,1fr)); }
.player { min-width: 0; border: 0; padding: 0 0 8px; text-align: center; background: none; color: var(--ink); position: relative; }
.player-stage { display: flex; align-items: flex-end; justify-content: center; height: 120px; width: 100%; border-bottom: 1px solid var(--line); }
.roster.duo .player-stage .character { width: 108px; height: 108px; margin-bottom: -10.8px; }
.player-info { display: block; min-width: 0; padding: 16px 6px 0; }
.player-name { display: block; max-width: 100%; font-size: 14px; line-height: 1.5; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player.self .player-name::after { content: ''; display: block; width: 12px; height: 2px; background: var(--accent); border-radius: 1px; margin: 4px auto -1px; }
.self-label { color: var(--muted); font-size: 9px; font-weight: 400; margin-left: 4px; }
.player-status { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 11px; color: var(--muted); min-height: 16px; line-height: 1.5; margin-top: 8px; white-space: nowrap; }
.status-dot { display: block; flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%; background: #a6a6ab; animation: pulse 1.6s ease-in-out infinite; }
.player.done .status-dot { background: var(--green); animation: none; }
.player.done .player-status { color: var(--green); }
.player.offline { opacity: .55; }
.player.offline .status-dot, .player.placeholder .status-dot { animation: none; background: #ccc; }
.waiting-actions { padding-top: 3px; }
.word-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.word-label label { font-size: 12px; }
.word-label > span { font-size: 10px; color: var(--muted); }
.word-line { position: relative; }
.word-line::after { left: 0; }
#word-input { font-size: 25px; padding-top: 10px; padding-bottom: 11px; }
.word-action-row .primary-button { margin-bottom: 1px; }
#word-hint { margin-top: 12px; }
.win-actions { margin-top: 12px; }
.win-actions > p { font-size: 13px; color: var(--muted); margin: 0 0 17px; }
.room-view.is-won .round-heading { margin-top: 36px; }
.room-view.is-won .round-heading h1 { color: var(--accent); font-size: clamp(48px,8vw,80px); line-height: 1.2; }
.win-letter { display: inline-block; animation: letter-in .62s var(--out) both; }
.room-view.is-won .roster.duo .player:first-child .character { transform: translateX(14px); transition: transform .9s var(--out); }
.room-view.is-won .roster.duo .player:nth-child(2) .character { transform: translateX(-14px); transition: transform .9s var(--out); }
.history { margin-top: 35px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: 12px; font-weight: 600; }
.section-heading > span { font-size: 10px; color: #aaa; }
.history ol { list-style: none; padding: 0; margin: 0; }
.history li { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: baseline; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); position: relative; }
.history li > span { color: #aaa; font-size: 10px; font-variant-numeric: tabular-nums; }
.word-clusters { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 16px; min-width: 0; }
.word-cluster { display: inline-flex; align-items: baseline; gap: 7px; min-width: 0; max-width: 100%; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.word-cluster.hit { color: var(--accent-strong); font-weight: 650; }
.cluster-dots { display: inline-flex; flex-shrink: 0; align-self: center; }
.cluster-dots i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px var(--bg); margin-left: -2px; }
.color-1 { background: #f3986e !important; }
.color-2 { background: #70b99a !important; }
.color-3 { background: #a18cde !important; }
.color-4 { background: #e4b947 !important; }
.color-5 { background: #e88dba !important; }
.color-6 { background: #54b9b3 !important; }
.color-7 { background: #b68d68 !important; }
.color-8 { background: #6cb7de !important; }
.color-9 { background: #e67870 !important; }
.room-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; margin: 29px 0 25px; }
.room-footer .text-button { font-size: 10px; }
.room-footer > span { color: #aaa; font-size: 9px; }
.dialog { width: min(460px,calc(100% - 36px)); border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--ink); padding: 30px; max-height: calc(100dvh - 40px); overflow: auto; box-shadow: 0 15px 80px #0000000d; }
.dialog[open] { animation: dialog-in .28s var(--out); }
.dialog::backdrop { background: #99999925; backdrop-filter: blur(5px); }
.dialog h2 { margin: 0 30px 12px 0; font-size: 25px; font-weight: 750; letter-spacing: -.04em; }
.dialog > p { font-size: 12px; color: var(--muted); }
.close-button { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; background: none; color: #999; font-size: 24px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 25px; }
.secondary-button { min-height: 48px; padding: 12px 22px; border: 1px solid var(--line); border-radius: 999px; background: none; font-size: 13px; }
.rules-dialog ol { margin: 22px 0; padding-left: 20px; }
.rules-dialog li { padding-left: 5px; margin-top: 20px; }
.rules-dialog li::marker { color: #aaa; font-size: 12px; }
.rules-dialog strong { font-size: 13px; font-weight: 650; }
.rules-dialog li p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.rules-example { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 9px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 13px 0; font-size: 10px; }
.rules-example strong { font-size: 11px; }
.dialog .dialog-note { font-size: 10px; margin-bottom: 0; }
#invite-link { font-size: 14px; }
.toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); z-index: 20; border-radius: 999px; background: var(--ink); color: var(--bg); padding: 12px 22px; max-width: calc(100% - 32px); font-size: 11px; line-height: 1.6; text-align: center; box-shadow: 0 5px 20px #0000000b; animation: toast-in .26s var(--out); }
.celebration { position: absolute; pointer-events: none; top: 60px; left: 50%; width: 0; height: 0; z-index: 2; }
.spark { position: absolute; left: 0; top: 0; width: 2px; height: 7px; background: var(--blue); opacity: 0; border-radius: 2px; }
.document-hidden *, .document-hidden *::before, .document-hidden *::after { animation-play-state: paused !important; }
@keyframes letter-in { from { opacity: 0; transform: translateY(.22em) rotate(2deg); } to { opacity: 1; transform: translateY(0) rotate(0); } }
@keyframes breathe { 0%,22%,100% { transform: scale(1); } 55% { transform: scale(1.014,.986); } 76% { transform: scale(.994,1.006); } }
@keyframes pulse { 50% { opacity: .32; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-in { from { opacity: 0; margin-bottom: -5px; } to { opacity: 1; margin-bottom: 0; } }
@keyframes nudge { 25%,75% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }
@media (max-width: 640px) {
  :root { --label-width: 48px; }
  .site-header { padding: 22px 22px 16px; grid-template-columns: auto minmax(0,1fr); }
  .site-header > .brand-mark { display: none; }
  .header-tools { gap: 10px; }
  .theme-swatch { width: 26px; }
  .brand { font-size: 18px; }
  .brand-mark i { width: 10px; height: 10px; }
  .text-button { font-size: 12px; }
  .home, .room-view { padding: 0 22px; }
  .home { margin-top: 30px; }
  .home h1 { font-size: clamp(50px,13.6vw,80px); letter-spacing: .025em; }
  .intro { font-size: 12px; line-height: 1.8; margin-top: 14px; }
  .home-cast { margin: 19px 0 24px; }
  .home-avatar-stage { height: 105px; }
  .home-avatar-stage .character { width: 100px; height: 100px; margin-bottom: -10px; }
  .home-player-name { font-size: 13px; margin-top: 15px; }
  .home-player-hint { font-size: 10px; }
  .line-field { gap: 10px; }
  .line-field::after { left: calc(var(--label-width) + 10px); }
  input { font-size: 19px; padding: 12px 0 10px; }
  label { font-size: 12px; }
  .join-action-row { gap: 14px; margin-top: 13px; }
  .primary-button { min-height: 44px; font-size: 12px; padding: 11px 20px; gap: 9px; }
  .button-arrow { font-size: 17px; }
  .field-hint { font-size: 11px; }
  #join-hint { margin-left: calc(var(--label-width) + 10px); }
  .steps { gap: 11px; margin-top: 31px; }
  .steps li { flex-direction: column; gap: 5px; }
  .steps li + li { padding-left: 13px; }
  .step-number { font-size: 12px; }
  .steps strong { font-size: 12px; }
  .steps p { font-size: 10px; line-height: 1.8; }
  .home-footer { font-size: 9px; margin: 24px 0 26px; }
  .room-view { margin-top: 7px; }
  .room-bar { min-height: 46px; }
  .room-identity { font-size: 12px; gap: 8px; }
  #room-label { max-width: 142px; }
  .room-count { font-size: 11px; }
  .room-tools { gap: 12px; }
  .connection { font-size: 0; }
  .connection::before { margin-right: 0; }
  .round-heading { margin: 29px 0 18px; }
  .round-heading h1 { font-size: 35px; }
  .round-heading p { font-size: 12px; line-height: 1.8; margin-top: 9px; }
  .previous-words { margin-top: 21px; }
  .previous-words > p { font-size: 11px; }
  #previous-list { font-size: 21px; gap: 6px 10px; }
  .previous-chip + .previous-chip::before { margin-right: 10px; }
  .roster { margin-bottom: 22px; }
  .roster.cols-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .roster.cols-5 { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .player-stage { height: 100px; }
  .character { width: 82px; height: 82px; margin-bottom: -8.2px; }
  .roster.duo .player-stage .character { width: 96px; height: 96px; margin-bottom: -9.6px; }
  .roster.cols-3 .character, .roster.cols-5 .character { width: 72px; height: 72px; margin-bottom: -7.2px; }
  .player-info { padding-top: 13px; }
  .player-name { font-size: 12px; }
  .self-label { font-size: 8px; }
  .player-status { font-size: 11px; gap: 4px; margin-top: 7px; }
  .status-dot { width: 4px; height: 4px; }
  .word-label label { font-size: 12px; }
  .word-label > span { font-size: 10px; }
  #word-input { font-size: 20px; }
  .word-action-row { gap: 13px; }
  .word-action-row .primary-button { padding-inline: 19px; }
  #word-hint { margin-top: 10px; font-size: 10px; }
  .room-view.is-won .round-heading h1 { font-size: 56px; }
  .history { margin-top: 28px; }
  .section-heading { padding-bottom: 11px; }
  .section-heading h2 { font-size: 12px; }
  .section-heading > span { font-size: 9px; }
  .history li { gap: 7px; grid-template-columns: 29px minmax(0,1fr); padding: 13px 0; }
  .word-clusters { gap: 7px 12px; }
  .word-cluster { font-size: 12px; }
  .cluster-dots i { width: 5px; height: 5px; }
  .room-footer { margin-top: 25px; padding-top: 9px; }
  .room-footer > span { display: none; }
  .room-footer .text-button { font-size: 10px; }
  .dialog { padding: 27px 23px; border-radius: 14px; }
  .dialog h2 { font-size: 23px; }
  .dialog-actions { gap: 9px; }
  .secondary-button { font-size: 12px; min-height: 44px; padding: 10px 20px; }
  .toast { bottom: 20px; font-size: 10px; }
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --bg: #0c0c0d; --ink: #f1f1f1; --muted: #89898f; --line: #29292d; --soft: #161617; --green: #64bd88; --danger: #eb827a; --blue: #8194ff; --accent: #b4a6ff; --accent-strong: #b4a6ff; --accent-hover: #c6bbff; --on-accent: #15121e; }
  :root[data-theme='blue'] { --accent: #92b9ee; --accent-strong: #92b9ee; --accent-hover: #b0cef4; }
  :root[data-theme='jade'] { --accent: #80c5b2; --accent-strong: #80c5b2; --accent-hover: #a0d9ca; }
  :root[data-theme='rose'] { --accent: #eba2bf; --accent-strong: #eba2bf; --accent-hover: #f3bed3; }
  :root[data-theme='amber'] { --accent: #e6bd7d; --accent-strong: #e6bd7d; --accent-hover: #f0d1a0; }
  input::placeholder { color: #56565c; }
  .character[data-mode='offline'], .character[data-mode='absent'] { --character-color: #44444a; }
  .dialog::backdrop { background: #00000070; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}