:root {
  color-scheme: dark;
  --ink: #f7f0da;
  --muted: #9bb4aa;
  --gold: #e7bd62;
  --gold-dark: #8a5c1d;
  --red: #df4d4d;
  --felt: #0b5a46;
  --felt-deep: #073b32;
  --night: #061b18;
  --panel: rgba(5, 27, 24, .92);
  --line: rgba(231, 189, 98, .28);
  font-family: "Noto Sans SC", "Microsoft YaHei UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--night); color: var(--ink); overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
.hidden { display: none !important; }

.entry-shell {
  min-height: 100dvh; display: grid; place-content: center; gap: 28px; padding: 28px; overflow: auto;
  background:
    radial-gradient(circle at 18% 15%, rgba(32, 158, 117, .24), transparent 30%),
    radial-gradient(circle at 82% 88%, rgba(231, 189, 98, .13), transparent 32%),
    linear-gradient(145deg, #041411, #092d27 58%, #051c18);
}
.entry-shell::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .24; background-image: repeating-linear-gradient(45deg, transparent 0 20px, rgba(255,255,255,.025) 21px 22px); }
.brand-block { display: flex; align-items: center; gap: 16px; margin-inline: auto; width: min(94vw, 720px); }
.brand-mark, .wordmark span {
  display: grid; place-items: center; background: linear-gradient(145deg, #fffdf2, #e7dcc0); color: #b21e27;
  border: 2px solid var(--gold); box-shadow: inset -4px -5px 0 #b9a982, 0 9px 28px #0008; font-family: serif; font-weight: 800;
}
.brand-mark { width: 72px; height: 86px; border-radius: 12px; font-size: 42px; transform: rotate(-4deg); }
.brand-block h1 { margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(32px, 6vw, 54px); letter-spacing: .04em; }
.brand-block p { margin: 3px 0 0; color: var(--gold); letter-spacing: .2em; }
.entry-card { position: relative; width: min(94vw, 720px); padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(155deg, rgba(12,59,50,.94), rgba(4,28,24,.96)); box-shadow: 0 24px 70px #0008, inset 0 1px rgba(255,255,255,.08); }
.entry-card label { display: grid; gap: 8px; color: var(--muted); font-size: 14px; }
input { width: 100%; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(0,0,0,.22); color: white; padding: 13px 14px; outline: none; }
input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(231,189,98,.12); }
.entry-actions, .join-row { display: grid; grid-template-columns: 1.35fr 1fr; gap: 10px; margin-top: 14px; }
button { border: 1px solid rgba(255,255,255,.15); border-radius: 11px; background: rgba(255,255,255,.07); padding: 11px 16px; }
button:hover { border-color: rgba(231,189,98,.6); background: rgba(255,255,255,.11); }
button:active { transform: translateY(1px); }
button.primary, .ready-button { border-color: #f0d28c; background: linear-gradient(#eac875, #b9822e); color: #1c2119; font-weight: 800; box-shadow: inset 0 1px #fff8, 0 5px 18px #0004; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 2px; color: #78978d; font-size: 13px; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: rgba(255,255,255,.09); }
.entry-note { color: #78978d; font-size: 13px; line-height: 1.6; margin: 16px 0 0; }
.character-fieldset { min-width: 0; margin: 16px 0 4px; padding: 0; border: 0; }
.character-fieldset legend { margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.character-picker { display: grid; grid-template-columns: repeat(7, minmax(70px, 1fr)); gap: 7px; overflow-x: auto; padding: 3px 2px 8px; }
.character-option { min-width: 70px; padding: 5px 4px 7px; display: grid; justify-items: center; gap: 4px; border-radius: 12px; color: var(--muted); }
.character-option.selected { border-color: var(--gold); color: #fff5d5; background: rgba(231,189,98,.13); box-shadow: 0 0 0 2px rgba(231,189,98,.12); }
.character-option b { font-size: 13px; }
.character-portrait { position: relative; overflow: hidden; width: 58px; height: 58px; border-radius: 11px; background-image: url('/assets/avatars/characters-v1.png'); background-repeat: no-repeat; background-size: 700% auto; background-position-y: 50%; image-rendering: pixelated; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.avatar-qingqing { background-position-x: 0%; }.avatar-xiaoai { background-position-x: 16.6667%; }.avatar-queen { background-position-x: 33.3333%; }.avatar-luodan { background-position-x: 50%; }.avatar-chengcheng { background-position-x: 66.6667%; }.avatar-taotao { background-position-x: 83.3333%; }.avatar-huayi { background-position-x: 100%; }

.game-shell { width: 100vw; height: 100dvh; display: flex; flex-direction: column; background: #03110f; }
.topbar { flex: 0 0 48px; display: flex; align-items: center; justify-content: space-between; padding: 5px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, #061c18, #0a2d27, #061c18); z-index: 20; }
.wordmark { display: flex; align-items: center; gap: 8px; font-family: Georgia, serif; letter-spacing: .06em; }
.wordmark span { width: 31px; height: 36px; border-radius: 6px; font-size: 20px; }
.room-pill { border-radius: 99px; padding: 6px 16px; color: var(--muted); }
.room-pill strong { color: var(--gold); letter-spacing: .12em; }
.jackpot-display { position: relative; display: flex; align-items: center; gap: 8px; min-width: 164px; height: 36px; padding: 5px 13px; overflow: hidden; border: 1px solid #e9bb5f88; border-radius: 99px; background: linear-gradient(90deg,#3f2508,#8a570f,#3f2508); color: #ffe9a8; box-shadow: inset 0 1px #fff3,0 0 18px #e7a82c2e; font-size: 12px; font-weight: 800; letter-spacing: .05em; }
.jackpot-display b { color: #fff8d8; font: 900 22px/1 Georgia,serif; text-shadow: 0 1px #6e3c00,0 0 8px #ffd55b88; }
.jackpot-display.rolling > * { animation: jackpot-roll .55s cubic-bezier(.2,.75,.25,1); }
@keyframes jackpot-roll { 0% { opacity: 0; transform: translateY(26px); } 55% { opacity: 1; transform: translateY(-4px); } 100% { transform: translateY(0); } }
.top-stats { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); }
.top-stats b { color: var(--ink); }
#yellow-badge { padding: 4px 9px; border-radius: 99px; background: rgba(255,255,255,.07); }
#yellow-badge.active { background: linear-gradient(90deg,#7b4b05,#d49e32); color: #fff7d5; box-shadow: 0 0 16px #d99d3755; }
#sound-toggle { width: 34px; height: 34px; padding: 0; border-radius: 50%; }
.table-wrap { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.table { position: relative; flex: 1; min-height: 0; overflow: hidden; background: radial-gradient(ellipse at center, #14705a 0, var(--felt) 48%, var(--felt-deep) 80%, #05241f 100%); box-shadow: inset 0 0 80px #001a, inset 0 0 0 5px #0b332c; }
.grain { position: absolute; inset: 0; opacity: .2; pointer-events: none; background-image: repeating-linear-gradient(68deg, transparent 0 3px, rgba(255,255,255,.026) 4px 5px); }
.center-console { position: absolute; left: 50%; top: 47%; transform: translate(-50%,-50%); width: min(30vw, 290px); aspect-ratio: 1.5; display: grid; grid-template: auto 1fr / 1fr 1fr; gap: 5px; padding: 10px; border: 1px solid #d3ad6155; border-radius: 18px; background: linear-gradient(145deg, rgba(4,34,29,.93),rgba(2,20,18,.92)); box-shadow: 0 12px 35px #0018, inset 0 1px rgba(255,255,255,.08); z-index: 4; }
.round-info { grid-column: 1 / -1; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.dice-row { display: flex; gap: 5px; align-items: center; justify-content: center; }
.dice-row img { width: 38px; height: 38px; object-fit: contain; image-rendering: auto; filter: drop-shadow(0 4px 3px #0007); }
.indicator-panel, .wild-panel { text-align: center; font-size: 11px; color: var(--gold); }
.indicator-panel > div, .wild-panel > div { display: flex; justify-content: center; gap: 3px; margin-top: 3px; }
.turn-label { grid-column: 1 / -1; justify-self: center; align-self: end; font-size: 12px; color: #fff; background: rgba(231,189,98,.14); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; }
.claim-countdown { position: absolute; left: 50%; top: 50%; z-index: 12; transform: translate(-50%,-50%); display: grid; place-items: center; width: 92px; height: 92px; border: 4px solid #ffd375; border-radius: 50%; background: #8e1d29ed; color: #fff7d5; box-shadow: 0 0 0 6px #330c1299, 0 0 28px #ffb43c88; pointer-events: none; }
.claim-countdown b { font: 900 43px/.9 Georgia,serif; }.claim-countdown span { font-size: 11px; font-weight: 800; }
.claim-countdown.urgent { background: #d32632; animation: countdown-pulse .55s ease-in-out infinite alternate; }
@keyframes countdown-pulse { to { transform: translate(-50%,-50%) scale(1.1); box-shadow: 0 0 0 8px #5c111899,0 0 38px #ff4949bb; } }

.player-seat { position: absolute; z-index: 8; display: flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(3,26,22,.8); transition: box-shadow .2s, border-color .2s; }
.player-seat.current { border-color: var(--gold); box-shadow: 0 0 22px rgba(231,189,98,.38); }
.seat-top { left: 50%; top: 10px; transform: translateX(-50%); }
.seat-bottom { left: 12px; bottom: 10px; }
.seat-left { left: 9px; top: 34%; }
.seat-right { right: 9px; top: 34%; }
.avatar { position: relative; display: grid; place-items: center; width: 100px; height: 100px; flex: 0 0 auto; overflow: visible; border-radius: 20px; background-color: #0a3f34; background-image: none; background-repeat: no-repeat; background-size: 700% auto; background-position-y: 50%; image-rendering: pixelated; color: #fff; font-family: serif; font-size: 0; border: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 0 0 3px rgba(231,189,98,.14); }
.avatar::before { content: ""; position: absolute; inset: 0; z-index: 0; overflow: hidden; border-radius: inherit; background-image: url('/assets/avatars/characters-v1.png'); background-repeat: no-repeat; background-size: 700% auto; background-position-x: inherit; background-position-y: 50%; image-rendering: pixelated; }
.avatar-blink { position: absolute; inset: 0; z-index: 1; pointer-events: none; animation: avatar-eye-blink 4.8s steps(1,end) infinite; opacity: 0; }
.avatar-blink i { position: absolute; top: var(--eye-y, 40%); width: 15%; height: 8%; border-bottom: max(2px, .03em) solid var(--eye-line, #49261d); border-radius: 0 0 50% 50%; background: var(--skin, #efaa7b); box-shadow: 0 -1px var(--skin, #efaa7b); }
.avatar-blink i:first-child { left: var(--eye-left, 34%); }.avatar-blink i:last-child { left: var(--eye-right, 62%); }
.avatar-qingqing { --eye-left: 36%; --eye-right: 65%; --eye-y: 40%; --skin: #f2a475; --eye-line: #43251d; }
.avatar-xiaoai { --eye-left: 30%; --eye-right: 59%; --eye-y: 43%; --skin: #f4b38e; --eye-line: #4b2631; }
.avatar-queen { --eye-left: 36%; --eye-right: 66%; --eye-y: 42%; --skin: #efaa80; --eye-line: #48251d; }
.avatar-luodan { --eye-left: 35%; --eye-right: 65%; --eye-y: 42%; --skin: #f4b78e; --eye-line: #45251e; }
.avatar-chengcheng { --eye-left: 30%; --eye-right: 60%; --eye-y: 41%; --skin: #efa574; --eye-line: #49271f; }
.avatar-taotao { --eye-left: 34%; --eye-right: 63%; --eye-y: 40%; --skin: #c98158; --eye-line: #2f1d19; }
.avatar-huayi { --eye-left: 37%; --eye-right: 67%; --eye-y: 42%; --skin: #f1af86; --eye-line: #43251e; }
.avatar.talking { animation: avatar-talk .34s ease-in-out 5 alternate; }
.avatar.talking::after { content: attr(data-speech); position: absolute; left: 82%; top: -18px; z-index: 20; min-width: max-content; padding: 7px 11px; border: 2px solid #d9ac53; border-radius: 14px 14px 14px 3px; background: #fff8e7; color: #81212a; font: 900 17px/1 "Source Han Serif SC", "Noto Serif CJK SC", serif; box-shadow: 0 5px 14px #0007; animation: speech-pop .2s ease-out both; }
.seat-right .avatar.talking::after { left: auto; right: 82%; border-radius: 14px 14px 3px 14px; }
.seat-top .avatar.talking::after { left: 45%; top: 82%; border-radius: 3px 14px 14px 14px; }
.seat-bottom .avatar.talking::after { left: 82%; top: -8px; }
.avatar.smiling::before { filter: brightness(1.14) saturate(1.12); }
.avatar-expression { position: absolute; left: 50%; bottom: -12px; z-index: 22; transform: translateX(-50%); min-width: max-content; padding: 3px 7px; border: 2px solid #fff0b5; border-radius: 7px; background: #9e2633; color: #fff; font: 900 15px/1 monospace; letter-spacing: -2px; box-shadow: 0 3px 8px #0008; animation: expression-pop .2s steps(2,end) both; }
.avatar.smiling .avatar-expression { background: #d94b39; color: #fff6a9; font-size: 17px; }
@keyframes avatar-eye-blink { 0%, 45%, 49%, 100% { opacity: 0; } 46%, 48% { opacity: 1; } }
@keyframes avatar-talk { from { transform: translateY(0) rotate(-1deg); } to { transform: translateY(-5px) rotate(1deg); } }
@keyframes speech-pop { from { opacity: 0; transform: translate(-5px, 7px) scale(.72); } to { opacity: 1; transform: none; } }
@keyframes expression-pop { from { opacity: 0; transform: translateX(-50%) scale(.5); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
.avatar > .dealer { z-index: 2; }
.avatar .dealer { position: absolute; right: -6px; top: -7px; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: #c71e2d; color: white; font: 700 11px sans-serif; }
.player-data { min-width: 74px; }
.player-data b { display: block; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.player-data small { color: var(--gold); font-size: 12px; }
.player-status { padding: 2px 6px; border-radius: 5px; background: rgba(255,255,255,.08); color: var(--muted); font-size: 11px; }
.player-seat.hu .player-status { background: #b11e2b; color: #fff; }
.flower-strip, .meld-strip { display: flex; gap: 2px; }

.tile { position: relative; width: clamp(42px, 6.2vw, 80px); aspect-ratio: .69; flex: 0 0 auto; border: 1px solid #ded4b9; border-radius: 6px 6px 9px 9px; background: linear-gradient(110deg,#fffdf2 0 66%,#ded2b3 100%); box-shadow: inset -4px -4px 0 #c0b28e, 0 4px 3px #0017; overflow: visible; user-select: none; }
.tile { padding: 0; }
.tile img { width: 100%; height: 100%; object-fit: contain; padding: 8% 6% 13%; image-rendering: auto; pointer-events: none; }
.tile.small { width: clamp(27px,3.3vw,45px); border-radius: 4px; }
.tile.micro { width: clamp(22px,2.7vw,35px); }
.discard-zone .tile.micro { width: clamp(28px, 3.375vw, 44px); }
.tile.back { background: linear-gradient(135deg,#0a8470,#064e43); border-color: #d7c492; box-shadow: inset 0 0 0 3px #137e6b, inset 0 0 0 5px #e3c66c55, 0 2px 3px #0018; }
.tile.back img { display: none; }
.tile.wild { border-color: #ffd56d; box-shadow: inset -3px -3px #c2ad7e, 0 0 13px #ffd34f, 0 4px 3px #0018; }
.tile.wild::after { content: "百"; position: absolute; left: -7.5%; top: -5.25%; z-index: 3; display: grid; place-items: center; width: 31.5%; aspect-ratio: 1; padding: 0; border: clamp(1px, .14vw, 2px) solid #ffd7a1; border-radius: 50%; background: #e83f4d; color: #fffaf0; font-family: "Source Han Serif SC", "思源宋体", "Noto Serif CJK SC", serif; font-size: clamp(8px, 1.05vw, 14px); line-height: 1; font-weight: 900; box-shadow: 0 2px 4px #0005; pointer-events: none; }
.tile.selected { transform: translateY(-12px); border-color: #fff1a1; }
.my-hand .tile { cursor: pointer; transition: transform .12s, filter .12s; }
.my-hand .tile:hover { transform: translateY(-6px); filter: brightness(1.05); }
.my-hand .tile.selected:hover { transform: translateY(-12px); }

.discard-zone { position: absolute; z-index: 3; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 2px; width: 29%; height: 18%; pointer-events: none; }
.discard-top { top: 17%; left: 35.5%; justify-content: center; }
.discard-bottom { bottom: 9%; left: 35.5%; justify-content: center; align-content: flex-end; }
.discard-left { left: 13%; top: 39%; width: 18%; height: 30%; }
.discard-right { right: 13%; top: 39%; width: 18%; height: 30%; justify-content: flex-end; }
.event-feed { position: absolute; right: 10px; bottom: 10px; z-index: 9; width: 180px; display: grid; gap: 3px; pointer-events: none; }
.event-line { padding: 4px 7px; border-radius: 5px; background: rgba(0,0,0,.36); color: #c6d6cf; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); z-index: 50; padding: 9px 18px; border: 1px solid #f2cd7b; border-radius: 99px; background: #102d27ee; color: #fff5d4; box-shadow: 0 8px 30px #0008; }

.hand-dock { flex: 0 0 170px; position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: end; padding: 10px 14px max(9px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: linear-gradient(#071e1a, #03120f); z-index: 10; }
.my-open { display: flex; gap: 5px; max-width: 27vw; overflow-x: auto; }
.my-hand { display: flex; justify-content: flex-start; align-items: flex-end; gap: clamp(1px,.25vw,4px); min-width: 0; overflow-x: auto; overflow-y: hidden; padding-top: 13px; }
.action-bar { display: flex; gap: 10px; align-items: end; min-width: 260px; justify-content: flex-end; }
.action-bar button { min-width: 78px; width: 78px; height: 72px; border-radius: 50%; padding: 0; border-color: #d5aa58; background: radial-gradient(circle at 35% 28%, #c8933e, #69430f); color: #fff8df; font-size: 18px; font-weight: 800; box-shadow: inset 0 1px #fff6, 0 4px 10px #0007; touch-action: manipulation; }
.action-bar button.danger { border-color: #e57979; background: radial-gradient(circle at 35% 28%,#bb3843,#68131b); }
.action-bar button.chi-option, .action-bar button.kong-option { width: auto; min-width: 126px; padding: 0 12px; border-radius: 22px; font-size: 15px; white-space: nowrap; }

.overlay-card, .settlement { position: fixed; inset: 48px 0 0; z-index: 40; display: grid; place-items: center; padding: 18px; background: rgba(1,15,13,.72); backdrop-filter: blur(9px); }
.overlay-card { inset: 12% max(10%, 80px); align-self: center; justify-self: center; width: min(620px, 86vw); height: fit-content; display: block; padding: 25px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(145deg,#0b4036f2,#051f1bf5); box-shadow: 0 25px 70px #0009; }
.overlay-head, .settlement-head { display: flex; align-items: start; justify-content: space-between; }
.overlay-head h2, .settlement-head h2 { margin: 3px 0 0; font-family: Georgia,"Noto Serif SC",serif; font-size: 27px; }
.eyebrow { color: var(--gold); font-size: 12px; letter-spacing: .18em; }
.lobby-players { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 20px 0; }
.lobby-player { display: flex; align-items: center; justify-content: space-between; padding: 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(0,0,0,.16); }
.lobby-person { display: flex; align-items: center; gap: 9px; }.lobby-person .avatar { display: inline-block; width: 84px; height: 84px; border-radius: 16px; }
.lobby-player .empty { color: #64847a; }
.lobby-player.ready { border-color: rgba(231,189,98,.5); }
.overlay-card > .ready-button { width: 100%; font-size: 17px; }
.overlay-card > p { text-align: center; color: var(--muted); margin: 12px 0 0; font-size: 13px; }
.host-mark { display: inline-block; margin-left: 4px; padding: 2px 5px; border-radius: 5px; background: #bd2632; color: #fff6d4; font-size: 10px; }
.kick-player { padding: 7px 10px; border-color: #9f4349; color: #ffd9dc; background: #51171d; font-size: 12px; }
.leave-room { padding: 6px 10px !important; border-color: #9f4349 !important; color: #ffd9dc !important; background: #51171d !important; }
.version-footer { position: fixed; right: 8px; bottom: 4px; z-index: 80; padding: 3px 7px; border-radius: 6px; background: #03120fd9; color: #91aca3; font-size: 10px; pointer-events: none; }
.version-footer strong { color: #e7bd62; }

.settlement-card { width: min(900px, 95vw); max-height: 88vh; overflow: auto; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg,#0b3b32,#041d19); box-shadow: 0 24px 80px #000b; }
.settlement-head button { font-size: 25px; border: 0; padding: 0; width: 38px; height: 38px; }
.settlement-list { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 18px 0; }
.result-player { min-width: 0; padding: 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(0,0,0,.16); }
.result-player.winner { border-color: rgba(231,189,98,.6); }
.result-player h3 { margin: 0 0 6px; }
.result-player .value { color: var(--gold); font: 700 22px Georgia,serif; }
.result-player dl { margin: 10px 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; font-size: 12px; }
.result-player dt { color: var(--muted); }.result-player dd { margin: 0; text-align: right; }
.result-hand { display: flex; gap: 1px; overflow-x: auto; }
.result-player ul { padding-left: 17px; color: #c7d7d1; font-size: 12px; line-height: 1.6; }
.settlement-card > .ready-button { width: 100%; }

@media (orientation: portrait), (max-width: 720px) {
  .topbar { padding-inline: 7px; }
  .jackpot-display { min-width: 132px; padding-inline: 9px; }
  .jackpot-display span { display: none; }
  .wordmark b { display: none; }
  .top-stats { gap: 5px; font-size: 12px; }
  .top-stats > span:nth-child(2) { display: none; }
  .table-wrap { min-height: 0; }
  .hand-dock { flex-basis: 126px; grid-template-columns: 1fr; padding: 6px; }
  .my-open { display: none; }
  .my-hand { justify-content: flex-start; width: 100%; padding-top: 12px; }
  .action-bar { position: absolute; right: 7px; bottom: 122px; min-width: 0; }
  .action-bar button { min-width: 64px; width: 64px; height: 64px; font-size: 16px; }
  .action-bar button.chi-option, .action-bar button.kong-option { width: auto; min-width: 108px; padding-inline: 8px; font-size: 13px; }
  .center-console { width: 43vw; top: 47%; padding: 6px; }
  .player-seat { padding: 4px; gap: 4px; }
  .avatar { width: 80px; height: 80px; border-radius: 16px; }
  .player-data { min-width: 57px; }.player-data b { font-size: 12px; max-width: 58px; }.player-status { display: none; }
  .seat-left, .seat-right { top: 26%; }
  .event-feed { display: none; }
  .discard-zone { width: 34%; }.discard-top,.discard-bottom{left:33%}.discard-left{left:8%}.discard-right{right:8%}
  .overlay-card { inset: auto; width: calc(100vw - 20px); }
  .settlement-list { grid-template-columns: 1fr 1fr; }
}
@media (max-height: 500px) {
  .topbar { flex-basis: 42px; }
  .hand-dock { flex-basis: 112px; }
  .tile { width: clamp(39px, 6vw, 68px); }
  .seat-bottom { bottom: 4px; }
  .center-console { width: 25vw; }
  .indicator-panel > span, .wild-panel > span { display: none; }
  .event-feed { display: none; }
  .player-seat { padding: 2px 5px; }
  .seat-left, .seat-right { top: 0; }
  .seat-bottom { bottom: 0; }
  .seat-top .meld-strip { display: none; }
}
