:root {
  --ink: #071719;
  --ink-2: #0c2324;
  --felt: #104044;
  --felt-deep: #0b3035;
  --paper: #f5ecd9;
  --muted: #a4bab5;
  --muted-2: #6f8b86;
  --gold: #d2ad64;
  --gold-soft: #efcf92;
  --red: #cf5c57;
  --line: rgba(215, 181, 111, .25);
  --shadow: 0 26px 80px rgba(0, 0, 0, .35);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--paper);
  background: var(--ink);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; background: var(--ink); }
body { min-height: 100vh; overflow-x: hidden; background: radial-gradient(circle at 50% -10%, #1c4a4c 0, transparent 38rem), var(--ink); }
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .4; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
.hidden { display: none !important; }
.app-shell { position: relative; min-height: 100vh; isolation: isolate; }
.app-shell:has(.room-view:not(.hidden)) { height: 100vh; height: 100dvh; overflow: hidden; }
.app-shell::before { position: fixed; z-index: -1; inset: 0; content: ""; opacity: .18; pointer-events: none; background-image: linear-gradient(120deg, transparent 0 48%, rgba(255,255,255,.06) 49% 50%, transparent 51%); background-size: 14px 14px; mix-blend-mode: overlay; }
.topbar { width: min(1240px, calc(100% - 48px)); height: 86px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(231, 204, 148, .12); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--paper); text-decoration: none; letter-spacing: .09em; }
.brand-mark { display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-soft); font-size: 18px; box-shadow: inset 0 0 0 4px rgba(210,173,100,.08); }
.brand b, .brand small { display: block; line-height: 1; }
.brand b { font-size: 13px; letter-spacing: .23em; }
.brand small { margin-top: 5px; color: var(--gold); font-size: 9px; letter-spacing: .38em; }
.topbar-right { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: #8a4f4c; box-shadow: 0 0 0 4px rgba(138,79,76,.13); }
.connection-dot.online { background: #74d5aa; box-shadow: 0 0 0 4px rgba(116,213,170,.13); }
.icon-button { display: grid; width: 33px; height: 33px; margin-left: 12px; place-items: center; border: 1px solid rgba(210,173,100,.25); border-radius: 50%; background: transparent; color: var(--gold-soft); font-size: 20px; }
.account-button { max-width: 220px; overflow: hidden; padding: 7px 10px; border: 1px solid rgba(210,173,100,.35); border-radius: 20px; background: rgba(210,173,100,.08); color: var(--gold-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
main { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.home-view { min-height: calc(100vh - 86px); display: grid; grid-template-columns: minmax(0, 1fr) 390px; align-items: center; gap: 8vw; padding: 55px 4vw 85px; }
.hero-copy { max-width: 650px; }
.hub-view { min-height: calc(100vh - 86px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(430px, 530px); align-items: center; gap: 8vw; padding: 48px 4vw 68px; }
.hub-intro { max-width: 660px; }
.hub-intro h1 { margin: 0; color: #fff4df; font-family: "Playfair Display", Georgia, serif; font-size: clamp(52px, 7vw, 94px); font-weight: 600; line-height: .92; letter-spacing: -.055em; }
.hub-intro h1 em { color: var(--gold-soft); font-style: normal; }
.game-shelf { display: grid; gap: 12px; }
.shelf-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 3px; }
.game-tile { position: relative; display: grid; grid-template-columns: 132px 1fr; min-height: 178px; overflow: hidden; border: 1px solid rgba(239,207,146,.22); border-radius: 5px; color: var(--paper); text-decoration: none; background: linear-gradient(140deg, rgba(24,70,69,.95), rgba(7,27,29,.98)); box-shadow: 0 20px 55px rgba(0,0,0,.27); transition: transform .22s, border-color .22s, box-shadow .22s; }
.game-tile:hover { border-color: rgba(239,207,146,.65); box-shadow: 0 25px 62px rgba(0,0,0,.4); transform: translateY(-4px); }
.game-tile::after { position: absolute; inset: 7px; border: 1px solid rgba(239,207,146,.08); border-radius: 2px; content: ""; pointer-events: none; }
.tile-art { position: relative; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle, rgba(210,173,100,.26), transparent 66%), #102f31; }
.tile-art::before { position: absolute; inset: -30%; content: ""; background: linear-gradient(120deg, transparent 42%, rgba(255,255,255,.12) 50%, transparent 58%); transform: rotate(17deg); }
.tile-art img { position: relative; width: 83px; height: 116px; border: 2px solid var(--gold); border-radius: 5px; object-fit: cover; transform: rotate(8deg); box-shadow: 12px 14px 22px rgba(0,0,0,.35); }
.tile-suit { position: absolute; z-index: 1; right: 13px; bottom: 10px; color: rgba(239,207,146,.8); font-family: Georgia, serif; font-size: 27px; }
.tile-copy { position: relative; z-index: 1; padding: 27px 25px 20px; }
.tile-status { color: #78948d; font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.tile-status.live { color: #82d0a9; }
.tile-copy h2 { margin: 12px 0 8px; color: #fff4df; font-family: "Playfair Display", Georgia, serif; font-size: 28px; line-height: .95; }
.tile-copy h2 em { color: var(--gold-soft); font-style: normal; }
.tile-copy p { margin: 0; color: #9fb8ae; font-size: 11px; line-height: 1.45; }
.tile-cta { display: flex; align-items: center; gap: 14px; margin-top: 21px; color: var(--gold-soft); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.tile-cta b { font-size: 18px; font-weight: 400; }
.game-tile.upcoming { min-height: 128px; grid-template-columns: 96px 1fr; opacity: .72; }
.game-tile.upcoming:hover { transform: none; border-color: rgba(239,207,146,.22); box-shadow: 0 20px 55px rgba(0,0,0,.27); }
.game-tile.upcoming .tile-art { background: rgba(6,22,24,.55); }
.tile-art.ghost span { position: relative; z-index: 1; color: var(--gold); font-size: 33px; font-weight: 300; }
.game-tile.upcoming .tile-copy { padding: 22px 25px; }
.game-tile.upcoming .tile-copy h2 { margin: 8px 0 5px; font-size: 23px; }
.invite-note { margin: -8px 0 13px; padding: 9px 11px; border-left: 2px solid var(--gold); background: rgba(210,173,100,.08); color: #d8c999; font-size: 10px; line-height: 1.45; }
.eyebrow { margin: 0 0 15px; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .28em; }
.hero-copy h1 { margin: 0; color: #fff4df; font-family: "Playfair Display", Georgia, serif; font-size: clamp(52px, 7vw, 96px); font-weight: 600; line-height: .92; letter-spacing: -.055em; }
.hero-copy h1 em { color: var(--gold-soft); font-style: normal; }
.hero-lead { margin: 28px 0 0; color: #b4c6be; font-size: 16px; line-height: 1.7; }
.hero-rule { display: flex; align-items: center; gap: 17px; width: min(390px, 100%); margin-top: 46px; color: var(--gold); font-size: 15px; letter-spacing: .55em; opacity: .8; }
.hero-rule span { height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gold)); }
.hero-rule span:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.lobby-card { position: relative; padding: 30px; border: 1px solid rgba(239,207,146,.22); border-radius: 5px; background: linear-gradient(145deg, rgba(25,62,62,.93), rgba(8,29,30,.96)); box-shadow: var(--shadow); }
.lobby-card::before { position: absolute; inset: 7px; border: 1px solid rgba(239,207,146,.08); border-radius: 2px; content: ""; pointer-events: none; }
.lobby-card > * { position: relative; }
.lobby-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.mini-label, .players-badge { color: var(--gold); font-size: 9px; font-weight: 700; letter-spacing: .2em; }
.players-badge { color: var(--muted-2); }
.field-label { display: block; margin: 18px 0 8px; color: #d5dfd5; font-size: 11px; font-weight: 600; }
.text-input { width: 100%; height: 47px; border: 1px solid rgba(203,224,207,.18); border-radius: 3px; outline: 0; background: rgba(4,18,20,.5); color: var(--paper); padding: 0 14px; transition: border .2s, background .2s; }
.text-input::placeholder { color: #66807b; }
.text-input:focus { border-color: var(--gold); background: rgba(4,18,20,.75); }
.avatar-picker { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.avatar-choice { aspect-ratio: 1; overflow: hidden; padding: 2px; border: 1px solid transparent; border-radius: 50%; background: rgba(0,0,0,.22); transition: transform .2s, border .2s; }
.avatar-choice:hover { transform: translateY(-3px); }
.avatar-choice.selected { border-color: var(--gold-soft); box-shadow: 0 0 0 3px rgba(210,173,100,.13); }
.avatar-choice img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.primary-button, .secondary-button, .ghost-button { display: flex; align-items: center; justify-content: center; gap: 22px; height: 48px; border: 1px solid var(--gold); border-radius: 3px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; transition: transform .2s, background .2s, box-shadow .2s; }
.primary-button { width: 100%; margin-top: 28px; background: var(--gold); color: #172b28; box-shadow: 0 10px 25px rgba(210,173,100,.15); }
.primary-button:hover:not(:disabled) { transform: translateY(-2px); background: var(--gold-soft); box-shadow: 0 13px 28px rgba(210,173,100,.25); }
.primary-button b { font-size: 18px; font-weight: 400; }
.secondary-button { border-color: rgba(239,207,146,.55); background: rgba(210,173,100,.07); color: var(--gold-soft); }
.secondary-button:hover:not(:disabled), .ghost-button:hover:not(:disabled) { background: rgba(210,173,100,.15); }
.divider { display: flex; align-items: center; gap: 10px; margin: 24px 0 14px; color: #6e8882; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.divider::before, .divider::after { height: 1px; flex: 1; content: ""; background: rgba(210,173,100,.14); }
.join-row { display: grid; grid-template-columns: 1fr 106px; gap: 8px; }
.room-input { letter-spacing: .24em; font-weight: 700; text-align: center; }
.join-row .secondary-button { height: 47px; }
.form-note { margin: 17px 0 0; color: #64817b; font-size: 10px; line-height: 1.5; text-align: center; }
.room-view { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; gap: 8px; height: calc(100vh - 86px); height: calc(100dvh - 86px); min-height: 0; overflow: hidden; padding: 16px 0 8px; }
.room-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 20px; margin: 0; }
.room-head .eyebrow { margin-bottom: 9px; }
.room-head .eyebrow strong { color: var(--paper); font-size: 13px; letter-spacing: .18em; }
.room-head h2 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: clamp(22px, 2.6vw, 32px); font-weight: 600; }
.room-head-actions, .hand-actions { display: flex; gap: 8px; }
.ghost-button { width: auto; height: 37px; padding: 0 13px; border-color: rgba(198,219,197,.2); background: transparent; color: var(--muted); font-size: 9px; }
.ghost-button.danger:hover:not(:disabled) { border-color: rgba(207,92,87,.6); color: #f29b8f; }
.table-scene { position: relative; min-height: 0; height: 100%; overflow: hidden; border: 1px solid rgba(210,173,100,.25); border-radius: 6px; background: #111b1c url('/assets/background/game-room-background.png') center / cover; box-shadow: var(--shadow); }
.table-scene::after { position: absolute; z-index: 1; inset: 0; content: ""; background: linear-gradient(180deg, rgba(3,12,13,.4), rgba(3,12,13,.12) 42%, rgba(3,12,13,.7)); pointer-events: none; }
.table-ambient { position: absolute; z-index: 2; inset: 0; background: radial-gradient(ellipse at 50% 52%, rgba(55,154,144,.18), transparent 45%); pointer-events: none; }
.table-surface { position: absolute; z-index: 3; top: 19%; left: 13%; width: 74%; height: 67%; border: 14px solid rgba(12,24,23,.9); border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, #175b59, #0e4146 68%, #0c3439); box-shadow: 0 12px 0 rgba(2,12,12,.65), inset 0 0 0 2px rgba(212,180,104,.45), inset 0 0 70px rgba(0,0,0,.4), 0 18px 50px rgba(0,0,0,.5); transform: perspective(800px) rotateX(8deg); }
.table-inlay { position: absolute; inset: 9%; border: 1px solid rgba(215,181,111,.18); border-radius: 50%; }
.table-center { position: absolute; z-index: 4; top: 23%; left: 50%; width: min(430px, 60%); transform: translateX(-50%); text-align: center; }
.turn-kicker { color: var(--gold-soft); font-size: 10px; font-weight: 700; letter-spacing: .25em; }
.last-play { min-height: 155px; margin: 9px 0; color: #c2d4c9; font-size: 12px; }
.played-by { min-height: 22px; color: #b2c9bf; font-size: 11px; }
.played-by b { color: #fff2d2; }
.played-empty { display: inline-block; margin-top: 30px; color: #9bb5ac; }
.played-cards { display: flex; justify-content: center; height: 126px; padding: 5px 0 0; }
.table-card { position: relative; z-index: var(--i); width: 70px; height: 112px; margin-left: -23px; padding: 7px; border: 1px solid #b8a57e; border-radius: 6px; background: linear-gradient(145deg, #fffdf7, #e9e0cb); color: #172927; box-shadow: -2px 5px 9px rgba(0,0,0,.32); transform: rotate(calc((var(--i) - 1) * 1.3deg)); animation: dealt-card .24s both; }
.table-card:first-child { margin-left: 0; }
.played-cards.count-6 .table-card, .played-cards.count-7 .table-card, .played-cards.count-8 .table-card { width: 56px; height: 90px; margin-left: -19px; padding: 5px; }
.played-cards.count-6 .table-card:first-child, .played-cards.count-7 .table-card:first-child, .played-cards.count-8 .table-card:first-child { margin-left: 0; }
.table-card.red { color: #b54440; }
.table-card.black { color: #182c2b; }
.table-card .card-corner { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: .9; font-family: Georgia, serif; font-style: normal; }
.table-card .card-corner.top { top: 7px; left: 7px; }
.table-card .card-corner.bottom { right: 7px; bottom: 7px; transform: rotate(180deg); }
.table-card .card-corner b { font-size: 18px; }
.table-card .card-corner i { font-size: 15px; font-style: normal; }
.table-card .card-suit { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: Georgia, serif; font-size: 36px; opacity: .82; }
.played-cards.count-6 .table-card .card-corner b, .played-cards.count-7 .table-card .card-corner b, .played-cards.count-8 .table-card .card-corner b { font-size: 15px; }
.played-cards.count-6 .table-card .card-corner i, .played-cards.count-7 .table-card .card-corner i, .played-cards.count-8 .table-card .card-corner i { font-size: 12px; }
.played-cards.count-6 .table-card .card-suit, .played-cards.count-7 .table-card .card-suit, .played-cards.count-8 .table-card .card-suit { font-size: 28px; }
@keyframes dealt-card { from { opacity: 0; transform: translateY(14px) rotate(0); } to { opacity: 1; transform: rotate(calc((var(--i) - 1) * 1.3deg)); } }
.pile { width: 63px; margin: 13px auto 10px; filter: drop-shadow(0 8px 9px rgba(0,0,0,.4)); }
.pile img { display: block; width: 100%; height: 88px; border: 2px solid #d6b36a; border-radius: 5px; object-fit: cover; }
.table-status { margin: auto; max-width: 320px; color: #92b1a9; font-size: 11px; line-height: 1.45; }
.seat { position: absolute; z-index: 6; display: flex; align-items: center; min-width: 154px; }
.seat-top { top: 24px; left: 50%; transform: translateX(-50%); }
.seat-left { top: 49%; left: 27px; transform: translateY(-50%); }
.seat-right { top: 49%; right: 27px; transform: translateY(-50%); }
.seat-bottom { bottom: 22px; left: 50%; transform: translateX(-50%); }
.seat-left .player-seat, .seat-right .player-seat { flex-direction: column; text-align: center; gap: 6px; }
.player-seat { display: flex; align-items: center; gap: 10px; min-width: 155px; padding: 7px 11px 7px 7px; border: 1px solid rgba(255,255,255,.09); border-radius: 30px; background: rgba(3,18,19,.72); backdrop-filter: blur(8px); transition: border .25s, background .25s, transform .25s; }
.player-seat.turn { border-color: var(--gold); background: rgba(44,53,31,.78); box-shadow: 0 0 24px rgba(210,173,100,.2); }
.player-seat.local { border-color: rgba(210,173,100,.5); }
.player-seat.offline { opacity: .55; filter: grayscale(.6); }
.seat-avatar { position: relative; width: 48px; height: 48px; flex: 0 0 48px; }
.seat-avatar img { display: block; width: 100%; height: 100%; border: 2px solid rgba(224,192,119,.65); border-radius: 50%; object-fit: cover; }
.turn-ring { position: absolute; inset: -5px; border: 1px solid var(--gold-soft); border-radius: 50%; animation: pulse 1.7s infinite; }
@keyframes pulse { 50% { opacity: .28; transform: scale(1.09); } }
.seat-meta { min-width: 0; }
.seat-meta b { display: block; max-width: 95px; overflow: hidden; color: #f3e8d1; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.seat-meta b small { color: var(--gold); font-size: 8px; font-weight: 500; }
.seat-meta span { display: block; margin-top: 4px; color: #8ea8a0; font-size: 9px; }
.empty-seat { display: grid; width: 105px; height: 54px; place-items: center; border: 1px dashed rgba(210,173,100,.22); border-radius: 30px; color: #7a9890; background: rgba(3,18,19,.4); text-align: center; }
.empty-seat span { color: var(--gold); font-size: 19px; line-height: 17px; }
.empty-seat small { font-size: 9px; }
.room-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 42px; gap: 14px; }
.lobby-players { display: flex; flex-wrap: wrap; gap: 7px; }
.lobby-player { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; border: 1px solid rgba(210,173,100,.14); border-radius: 20px; background: rgba(255,255,255,.035); color: #aec3ba; font-size: 10px; }
.lobby-player img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.lobby-player.offline { opacity: .5; }
.compact { width: auto; min-width: 124px; height: 41px; margin: 0; padding: 0 15px; font-size: 9px; }
.hand-panel { min-height: 136px; padding: 10px 18px 8px; border: 1px solid rgba(210,173,100,.2); border-radius: 5px; background: rgba(11,35,36,.92); box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.hand-head { display: flex; align-items: end; justify-content: space-between; gap: 15px; }
.hand-head .eyebrow { margin: 0 0 7px; }
.hand-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.hand { display: flex; justify-content: center; min-height: 98px; margin: 4px 0 0; padding: 4px 10px 1px; }
.playing-card { position: relative; z-index: var(--i); width: clamp(65px, 9vw, 91px); height: clamp(103px, 13vw, 143px); margin-left: clamp(-19px, -1.4vw, -9px); padding: 7px; overflow: hidden; border: 1px solid #b8a57e; border-radius: 6px; background: linear-gradient(145deg, #fffdf7, #e9e0cb); color: #172927; box-shadow: -2px 4px 7px rgba(0,0,0,.24); transform: translateY(0) rotate(calc((var(--i) - 6) * .35deg)); transition: transform .18s, box-shadow .18s, z-index .18s; }
.playing-card:first-child { margin-left: 0; }
.playing-card:hover, .playing-card.selected { z-index: 30; transform: translateY(-15px) rotate(0deg); box-shadow: 0 12px 16px rgba(0,0,0,.35), 0 0 0 2px var(--gold-soft); }
.playing-card.selected { background: linear-gradient(145deg, #fff8df, #dfc987); }
.playing-card .card-corner { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: .9; font-family: Georgia, serif; font-style: normal; }
.card-corner.top { top: 8px; left: 8px; }
.card-corner.bottom { right: 8px; bottom: 8px; transform: rotate(180deg); }
.card-corner b { font-size: clamp(15px, 2vw, 21px); font-weight: 700; }
.card-corner i { font-size: clamp(12px, 1.7vw, 18px); font-style: normal; }
.card-suit { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: Georgia, serif; font-size: clamp(29px, 4vw, 44px); opacity: .82; }
.playing-card.red { color: #b54440; }
.playing-card.black { color: #182c2b; }
.hand-empty { align-self: center; color: #6f8b86; font-size: 12px; }
.selection-hint { min-height: 15px; margin: 0; color: #72918a; font-size: 10px; text-align: center; }
.rules-strip { display: flex; justify-content: center; gap: 28px; min-height: 20px; padding: 0; color: #78948d; font-size: 10px; }
.rules-strip b { color: var(--gold-soft); font-weight: 600; }
.toast { position: fixed; z-index: 50; right: 23px; bottom: 24px; max-width: min(360px, calc(100% - 46px)); padding: 13px 17px; border: 1px solid rgba(239,207,146,.4); border-radius: 3px; background: #173f3e; color: #f6e9ce; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(242,120,107,.55); background: #4e2829; }
.auth-backdrop { position: fixed; z-index: 60; inset: 0; background: rgba(2,10,11,.72); backdrop-filter: blur(6px); }
.auth-panel { position: fixed; z-index: 61; top: 50%; left: 50%; width: min(420px, calc(100% - 32px)); padding: 30px; border: 1px solid rgba(239,207,146,.35); border-radius: 6px; background: linear-gradient(145deg, #183e3e, #071b1d); box-shadow: 0 30px 100px rgba(0,0,0,.5); transform: translate(-50%, -50%); }
.auth-panel h2 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: 32px; }
.auth-close { position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); font-size: 25px; }
.auth-lead { margin: 12px 0 20px; color: #a9c0b7; font-size: 12px; line-height: 1.5; }
.auth-lead b { color: var(--gold-soft); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 15px; padding: 4px; border-radius: 4px; background: rgba(0,0,0,.22); }
.auth-tab { height: 35px; border: 0; border-radius: 3px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.auth-tab.active { background: rgba(210,173,100,.18); color: var(--gold-soft); }
.auth-form .field-label { margin-top: 12px; }
.auth-form .primary-button { margin-top: 21px; }
.auth-error { min-height: 17px; margin-top: 12px; color: #f28f83; font-size: 11px; }
.account-summary { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; margin-top: 15px; padding-top: 15px; border-top: 1px solid rgba(239,207,146,.15); }
.account-summary > div { display: grid; gap: 5px; }
.account-summary > div > b { color: var(--paper); font-size: 14px; }
.account-summary > strong { color: var(--gold-soft); font-size: 16px; }
.account-summary .compact { grid-column: 1 / -1; width: 100%; }
@media (max-width: 800px) {
  .topbar, main { width: min(100% - 28px, 1240px); }
  .hub-view { min-height: calc(100vh - 70px); grid-template-columns: 1fr; gap: 32px; padding: 38px 0 54px; }
  .hub-intro { text-align: center; }
  .hub-intro h1 { font-size: clamp(48px, 13vw, 72px); }
  .hub-intro .hero-rule { margin-right: auto; margin-left: auto; }
  .game-shelf { width: min(100%, 510px); margin: 0 auto; }
  .game-tile { grid-template-columns: 112px 1fr; min-height: 160px; }
  .tile-art img { width: 72px; height: 101px; }
  .tile-copy { padding: 23px 20px 17px; }
  .tile-copy h2 { font-size: 25px; }
  .game-tile.upcoming { min-height: 112px; grid-template-columns: 82px 1fr; }
  .game-tile.upcoming .tile-copy { padding: 18px 20px; }
  .home-view { grid-template-columns: 1fr; gap: 37px; padding: 45px 0 65px; }
  .hero-copy { text-align: center; }
  .hero-rule { margin-right: auto; margin-left: auto; }
  .lobby-card { width: min(100%, 430px); margin: 0 auto; }
  .room-view { height: calc(100vh - 70px); height: calc(100dvh - 70px); padding-top: 10px; padding-bottom: 4px; gap: 5px; }
  .table-scene { min-height: 0; background-position: 52% center; }
  .table-surface { top: 22%; left: 4%; width: 92%; height: 60%; border-width: 10px; }
  .seat-left { left: 9px; }
  .seat-right { right: 9px; }
  .seat-left .player-seat, .seat-right .player-seat { min-width: 0; padding: 4px; background: transparent; border-color: transparent; }
  .seat-left .seat-meta, .seat-right .seat-meta { display: none; }
  .seat-avatar { width: 44px; height: 44px; }
  .table-center { top: 24%; width: 80%; }
  .last-play { min-height: 112px; }
  .table-card { width: 58px; height: 94px; margin-left: -19px; padding: 5px; }
  .table-card .card-corner.top { top: 5px; left: 5px; }
  .table-card .card-corner.bottom { right: 5px; bottom: 5px; }
  .table-card .card-corner b { font-size: 15px; }
  .table-card .card-corner i { font-size: 12px; }
  .table-card .card-suit { font-size: 29px; }
  .played-cards.count-6 .table-card, .played-cards.count-7 .table-card, .played-cards.count-8 .table-card { width: 45px; height: 73px; margin-left: -15px; padding: 4px; }
  .played-cards.count-6 .table-card .card-corner b, .played-cards.count-7 .table-card .card-corner b, .played-cards.count-8 .table-card .card-corner b { font-size: 12px; }
  .played-cards.count-6 .table-card .card-corner i, .played-cards.count-7 .table-card .card-corner i, .played-cards.count-8 .table-card .card-corner i { font-size: 10px; }
  .played-cards.count-6 .table-card .card-suit, .played-cards.count-7 .table-card .card-suit, .played-cards.count-8 .table-card .card-suit { font-size: 23px; }
  .pile { width: 50px; margin-top: 7px; }
  .pile img { height: 68px; }
  .room-toolbar { flex-direction: row; padding: 3px 0; }
  .room-toolbar .compact { min-width: 104px; height: 36px; padding: 0 8px; }
  .room-toolbar .primary-button { align-self: auto; }
  .hand-panel { padding: 17px 10px 13px; }
  .hand-head { align-items: center; flex-direction: row; }
  .hand-head h3 { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
  .hand-head > div:first-child { min-width: 0; }
  .hand-actions { flex: 0 0 186px; width: auto; }
  .hand-actions button { flex: 1; min-width: 0; }
  .hand { min-height: 105px; justify-content: flex-start; overflow-x: auto; overflow-y: hidden; padding-right: 2px; padding-left: 2px; scrollbar-width: thin; scrollbar-color: rgba(210,173,100,.5) transparent; }
  .playing-card { flex: 0 0 clamp(44px, 12.1vw, 68px); width: clamp(44px, 12.1vw, 68px); height: clamp(72px, 17.7vw, 112px); margin-left: clamp(-23px, -4.6vw, -11px); border-radius: 4px; padding: 4px; }
  .card-corner.top { top: 5px; left: 5px; }
  .card-corner.bottom { right: 5px; bottom: 5px; }
  .card-corner b { font-size: clamp(11px, 3.2vw, 17px); }
  .card-corner i { font-size: clamp(9px, 2.7vw, 14px); }
  .card-suit { font-size: clamp(22px, 7vw, 35px); }
  .rules-strip { display: none; }
}
@media (max-width: 450px) {
  .topbar { height: 70px; }
  .topbar-right { font-size: 0; }
  .account-button { max-width: 130px; font-size: 9px; }
  .home-view { min-height: calc(100vh - 70px); padding-top: 35px; }
  .hub-view { min-height: calc(100vh - 70px); gap: 24px; padding-top: 30px; }
  .hub-intro h1 { font-size: 49px; }
  .hub-intro .hero-lead { margin-top: 20px; font-size: 13px; }
  .shelf-heading { padding-right: 1px; padding-left: 1px; }
  .game-tile { grid-template-columns: 88px 1fr; min-height: 145px; }
  .tile-art img { width: 62px; height: 87px; }
  .tile-suit { right: 7px; bottom: 7px; font-size: 22px; }
  .tile-copy { padding: 20px 15px 14px; }
  .tile-copy h2 { margin: 9px 0 6px; font-size: 22px; }
  .tile-copy p { font-size: 10px; }
  .tile-cta { margin-top: 13px; }
  .game-tile.upcoming { min-height: 102px; grid-template-columns: 70px 1fr; }
  .game-tile.upcoming .tile-copy { padding: 16px 15px; }
  .game-tile.upcoming .tile-copy h2 { font-size: 19px; }
  .hero-copy h1 { font-size: 53px; }
  .hero-lead { font-size: 14px; }
  .lobby-card { padding: 22px 18px; }
  .room-view { padding-top: 6px; }
  .room-head { align-items: center; flex-direction: row; gap: 8px; }
  .room-head .eyebrow { margin-bottom: 2px; font-size: 8px; }
  .room-head .eyebrow strong { font-size: 11px; }
  .room-head h2 { max-width: 130px; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
  .room-head-actions { flex: 0 0 auto; gap: 4px; }
  .room-head-actions .ghost-button { height: 32px; padding: 0 7px; font-size: 8px; letter-spacing: .04em; }
  .table-scene { min-height: 0; }
  .table-surface { top: 24%; height: 57%; }
  .table-center { top: 27%; width: 92%; }
  .last-play { min-height: 88px; }
  .played-cards { height: 82px; }
  .table-card { width: 54px; height: 88px; margin-left: -17px; }
  .played-cards.count-6 .table-card, .played-cards.count-7 .table-card, .played-cards.count-8 .table-card { width: 42px; height: 69px; margin-left: -14px; }
  .pile { width: 43px; margin-top: 4px; }
  .pile img { height: 58px; }
  .seat-top { top: 13px; }
  .seat-bottom { bottom: 13px; }
  .seat-left { left: 2px; }
  .seat-right { right: 2px; }
  .seat-avatar { width: 38px; height: 38px; }
  .player-seat { min-width: 0; padding: 3px; }
  .seat-bottom .seat-meta { display: block; }
  .seat-bottom .player-seat { padding-right: 9px; }
  .seat-bottom .seat-avatar { width: 43px; height: 43px; }
}
@media (min-width: 801px) and (max-height: 820px) {
  .topbar { height: 64px; }
  .app-shell:has(.room-view:not(.hidden)) .room-view { height: calc(100vh - 64px); height: calc(100dvh - 64px); padding-top: 8px; gap: 5px; }
  .room-head { min-height: 38px; }
  .room-head h2 { font-size: 24px; }
  .hand-panel { min-height: 122px; padding-top: 7px; padding-bottom: 5px; }
  .hand { min-height: 86px; margin-top: 2px; padding-top: 2px; }
  .playing-card { width: 62px; height: 94px; }
  .playing-card .card-corner b { font-size: 15px; }
  .playing-card .card-corner i { font-size: 12px; }
  .playing-card .card-suit { font-size: 30px; }
  .rules-strip { display: none; }
  .table-surface { border-width: 10px; }
  .seat-avatar { width: 42px; height: 42px; flex-basis: 42px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
