:root {
  --paper: #0b2b24;
  --ink: #f9f1d0;
  --muted: #a9c1ad;
  --line: rgba(249, 241, 208, .22);
  --mint: #c6e5bd;
  --mint-dark: #23634b;
  --coral: #f27d63;
  --yellow: #f5d66b;
  --blue: #9fd4dc;
  --white: #fffefa;
  --shadow: 0 20px 45px rgba(0, 0, 0, .28);
}
.app-shell { min-height: 100vh; overflow: hidden; background: radial-gradient(circle at 50% 20%, #164b38 0, transparent 45%), repeating-linear-gradient(115deg, rgba(255,255,255,.018) 0 1px, transparent 1px 7px), var(--paper); }
.screen { min-height: 100vh; min-height: 100svh; position: relative; padding: max(28px, env(safe-area-inset-top)) max(5vw, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(5vw, env(safe-area-inset-left)); }
.hidden { display: none !important; }
.topbar { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
.wordmark { color: var(--ink); font-size: 27px; font-weight: 800; letter-spacing: -1.5px; text-decoration: none; display: inline-flex; align-items: center; gap: 9px; }
.wordmark-button { border: 0; background: none; padding: 0; }
.logo-mark { width: 31px; height: 31px; display: grid; place-items: center; border: 2px solid var(--yellow); border-radius: 50%; color: var(--yellow); font-family: 'DM Mono', monospace; font-size: 14px; letter-spacing: -2px; transform: rotate(-12deg); }
.logo-text { display: inline-block; }
.leave-game-button { gap: 7px; }
.leave-arrow { color: var(--coral); font-size: 19px; font-weight: 400; }
.leave-label { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 400; letter-spacing: 1px; text-transform: uppercase; }
.topbar-note, .round-label, .turn-indicator, .pile-label, .footer-line, .eyebrow, .home-footer, .game-footer, .player-label, .tip-icon { font-family: 'DM Mono', monospace; text-transform: uppercase; letter-spacing: 1.3px; font-size: 10px; }
.status-dot { width: 7px; height: 7px; background: var(--coral); display: inline-block; border-radius: 50%; margin-right: 8px; }
.eyebrow { color: var(--muted); margin: 0 0 22px; }
h1 em, h2 em { color: var(--coral); font-style: normal; }
  .hero-description { color: var(--muted); line-height: 1.65; font-size: 15px; margin: 30px 0; }
.home-actions { display: flex; align-items: center; gap: 24px; }
.game-lobby-overlay { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(4, 19, 15, .7); }
.game-lobby-card { width: min(500px, 100%); border: 1px solid var(--line); background: var(--paper); padding: 34px; box-shadow: 9px 9px 0 var(--coral); position: relative; }
.game-lobby-card h2 { font-size: 45px; letter-spacing: -3px; margin-bottom: 25px; }.game-lobby-card > label { display: block; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; margin: 14px 0 8px; }
.game-lobby-card > input, .lobby-option-grid select, .game-lobby-card .join-row input { width: 100%; background: transparent; border: 1px solid var(--line); color: var(--ink); padding: 12px; outline: none; }
.lobby-option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 14px; }.lobby-option-grid label { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; text-transform: uppercase; letter-spacing: 1px; align-self: center; }.lobby-option-grid select { padding: 9px; }
.game-lobby-card .close-button { position: absolute; top: 18px; right: 18px; }.game-lobby-card .lobby-actions { margin-top: 22px; }.game-lobby-card .button { width: 100%; justify-content: space-between; }.game-lobby-card .join-row .button { width: auto; }
.go-fish-table { max-width: 1280px; min-height: calc(100vh - 150px); margin: auto; }.go-fish-board-head { display: flex; align-items: end; justify-content: space-between; padding: 48px 0 22px; }.go-fish-board-head h1 { font-size: clamp(45px, 6vw, 70px); letter-spacing: -4px; }.go-fish-status { color: var(--muted); max-width: 220px; font-size: 12px; text-align: right; }.go-fish-players { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }.go-fish-current { max-width: 850px; margin: 28px auto 0; }.go-fish-hand { min-height: 155px; }.go-fish-ask { display: flex; align-items: center; gap: 9px; justify-content: center; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; text-transform: uppercase; }.go-fish-ask select { background: transparent; border: 1px solid var(--line); color: var(--ink); padding: 10px; }.go-fish-ask .button { margin-left: 10px; }.go-fish-ask button:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; transform: none; }.go-fish-center { min-height: 155px; display: grid; place-items: center; }.set-area { text-align: center; }.set-area > .pile-label { display: block; margin-bottom: 10px; }.go-fish-set { display: inline-grid; place-items: center; width: 31px; height: 31px; margin: 2px; border: 1px solid var(--yellow); color: var(--yellow); font-family: 'DM Mono', monospace; font-size: 11px; }
@media (max-width: 760px) { .go-fish-table { min-height: auto; }.go-fish-board-head { padding: 35px 0 20px; }.go-fish-board-head h1 { font-size: 48px; }.go-fish-players { grid-template-columns: repeat(2, minmax(0, 1fr)); }.go-fish-current { margin-top: 18px; }.go-fish-hand { min-height: 135px; }.go-fish-ask { flex-wrap: wrap; }.go-fish-ask .button { margin-left: 0; width: 100%; justify-content: space-between; } }
.created-room { border: 1px solid var(--yellow); padding: 14px; margin: 12px 0; text-align: center; }.created-room span { display: block; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; text-transform: uppercase; letter-spacing: 1px; }.created-room strong { display: block; color: var(--yellow); font-family: 'DM Mono', monospace; font-size: 28px; letter-spacing: 5px; margin-top: 5px; }
.created-room small { display: block; margin-top: 8px; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; text-transform: uppercase; letter-spacing: .8px; }
.loading-overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(4, 14, 11, .86); }
.loading-card { width: min(360px, calc(100% - 40px)); padding: 34px; text-align: center; border: 1px solid rgba(212, 174, 90, .35); background: var(--paper); box-shadow: 8px 8px 0 var(--coral); }
.loading-mark { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 22px; border: 2px solid var(--yellow); border-radius: 50%; color: var(--yellow); font-family: 'DM Mono', monospace; font-size: 18px; transform: rotate(-12deg); }
.loading-card h2 { font-size: 32px; letter-spacing: -2px; margin: 0; }.loading-bar { height: 3px; margin-top: 25px; background: rgba(244, 230, 190, .18); overflow: hidden; }.loading-bar span { display: block; width: 40%; height: 100%; background: var(--yellow); animation: loading-slide 1s ease-in-out infinite; }
@keyframes loading-slide { from { transform: translateX(-100%); } to { transform: translateX(350%); } }
  .button-primary { color: var(--paper); background: var(--yellow); box-shadow: 5px 5px 0 var(--coral); }
.button:hover { transform: translateY(-3px); }
  .button-quiet span { border: 1px solid var(--ink); border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; font-size: 11px; }
  .button-quiet { color: var(--ink); background: transparent; padding-left: 0; }
  .preview-back { background: var(--yellow); top: 3%; left: 28%; transform: rotate(10deg); }
.card-stack { width: min(37vw, 430px); aspect-ratio: 1 / 1.1; position: relative; transform: rotate(7deg); margin-right: 7vw; }
.preview-card { width: 64%; height: 82%; position: absolute; padding: 22px; border: 1px solid var(--ink); box-shadow: var(--shadow); }
.preview-back { background: var(--yellow); top: 3%; left: 28%; transform: rotate(10deg); }
.preview-front { background: var(--mint); top: 14%; left: 12%; transform: rotate(-8deg); display: flex; flex-direction: column; justify-content: space-between; }
.stack-shadow { position: absolute; width: 58%; height: 76%; border: 1px solid var(--ink); top: 15%; left: 14%; }
.stack-shadow-one { background: var(--blue); transform: rotate(-15deg); }
.stack-shadow-two { background: var(--coral); transform: rotate(1deg); }
.card-corner { font-family: 'DM Mono', monospace; font-size: 17px; display: flex; justify-content: space-between; }
.back-mark { font-size: 80px; text-align: center; font-weight: 300; }.front-symbol { font-size: 120px; line-height: .8; text-align: center; }.card-label { font-family: 'DM Mono', monospace; text-transform: uppercase; font-size: 9px; letter-spacing: 1px; }
.game-screen { padding-bottom: 20px; }.game-topbar { border-bottom: 1px solid var(--line); padding-bottom: 24px; }.game-header-center { display: flex; align-items: center; gap: 16px; }.round-label { color: var(--muted); }.round-label strong { color: var(--ink); }.header-divider { width: 25px; height: 1px; background: var(--line); }.turn-indicator { color: var(--mint-dark); }.icon-button, .close-button { width: 36px; height: 36px; background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 50%; font-weight: 700; }
@media (max-width: 760px) { .screen { padding: max(20px, env(safe-area-inset-top)) 22px max(20px, env(safe-area-inset-bottom)); }.topbar-note { display: none; }.home-content { min-height: auto; display: block; padding: 15vh 0 100px; }.hero-copy { padding: 0; }.hero-description { font-size: 13px; }.home-actions { gap: 15px; flex-wrap: wrap; }.button { min-height: 48px; }.card-stack { width: 78vw; max-width: 330px; margin: 75px auto 0; }.home-footer { left: 22px; right: 22px; bottom: max(20px, env(safe-area-inset-bottom)); }.game-header-center { gap: 9px; }.game-layout { min-height: auto; display: block; padding: 45px 0 20px; }.score-panel h1 { font-size: 48px; }.scores { margin-top: 28px; display: flex; gap: 25px; border: 0; }.score-row { flex: 1; border-bottom: 1px solid var(--line); }.game-tip { display: none; }.table-area { margin-top: 35px; }.center-table { min-height: 205px; gap: 22px; }.deck-button, .discard-pile { width: 95px; }.hand { min-height: 135px; padding-top: 20px; }.game-card { padding: 8px; min-width: 56px; }.game-card .big-shape { font-size: 34px; }.game-footer { font-size: 8px; gap: 10px; }.modal { padding: 32px 25px; } }
.game-layout { max-width: 1280px; min-height: calc(100vh - 180px); margin: auto; display: grid; grid-template-columns: 230px 1fr; gap: 5vw; align-items: center; }.score-panel h1 { font-size: clamp(42px, 5vw, 67px); letter-spacing: -3px; }.score-panel .eyebrow { margin-bottom: 18px; }.scores { border-top: 1px solid var(--line); margin-top: 55px; }.score-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-family: 'DM Mono', monospace; font-size: 11px; }.score-row strong { font-family: 'Manrope', sans-serif; font-size: 22px; color: var(--ink); }.active-score { color: var(--coral); }.game-tip { border-left: 2px solid var(--coral); margin-top: 30px; padding-left: 13px; display: flex; gap: 10px; }.tip-icon { color: var(--coral); }.game-tip p { margin: 0; font-size: 11px; line-height: 1.6; color: var(--muted); }
.table-area { width: 100%; }.opponent-area, .player-area { position: relative; }.player-label { display: flex; gap: 9px; align-items: center; color: var(--muted); }.player-label strong { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 9px; }.avatar { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; font-family: 'Manrope', sans-serif; font-weight: 800; color: var(--ink); }.cpu-avatar { background: var(--yellow); }.player-avatar { background: var(--coral); }.mini-hand { min-height: 74px; display: flex; padding: 13px 0 0 15px; }.mini-card { width: 43px; height: 63px; border: 1px solid var(--ink); background: var(--ink); margin-left: -10px; transform: rotate(-6deg); padding: 6px; color: var(--yellow); font-family: 'DM Mono', monospace; font-size: 9px; }.mini-card:nth-child(even) { transform: rotate(7deg); background: var(--mint-dark); color: var(--mint); }.center-table { min-height: 270px; display: flex; justify-content: center; align-items: center; gap: 35px; position: relative; }.deck-button, .discard-pile { width: 128px; aspect-ratio: .68; border: 1px solid var(--ink); position: relative; }.deck-button { background: var(--ink); box-shadow: 8px 8px 0 var(--coral); color: var(--yellow); transform: rotate(-8deg); }.deck-button:hover { transform: rotate(-8deg) translateY(-5px); }.deck-mark { display: grid; place-items: center; height: 100%; font-size: 55px; font-weight: 300; }.discard-pile { background: var(--mint); transform: rotate(8deg); padding: 14px; }.discard-card { height: 100%; display: flex; flex-direction: column; justify-content: space-between; font-family: 'DM Mono', monospace; }.discard-card .big-shape { font-family: 'Manrope', sans-serif; text-align: center; font-size: 66px; line-height: .6; }.discard-card .card-number { font-size: 10px; }.match-burst { position: absolute; opacity: 0; color: var(--coral); font-size: 22px; font-weight: 800; transform: rotate(-8deg) scale(.7); pointer-events: none; }.match-burst.show { animation: burst .8s ease-out; } @keyframes burst { 0% { opacity: 0; transform: rotate(-8deg) scale(.7); } 30% { opacity: 1; transform: rotate(-8deg) scale(1.15); } 100% { opacity: 0; transform: rotate(-8deg) translateY(-45px) scale(1); } }
.hand { display: flex; justify-content: center; min-height: 180px; padding: 25px 10px 0; }.game-card { flex: 0 1 115px; width: 115px; min-width: 70px; max-width: 125px; aspect-ratio: .68; border: 1px solid var(--ink); margin-left: -13px; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; color: var(--ink); transition: transform .2s ease, margin .2s ease; position: relative; }.game-card:first-child { margin-left: 0; }.game-card:hover, .game-card:focus-visible { transform: translateY(-17px) rotate(0deg) !important; z-index: 2; }.game-card.playable { box-shadow: 3px 3px 0 var(--ink); }.game-card.disabled { filter: saturate(.35); opacity: .7; }.game-card:nth-child(odd) { transform: rotate(-4deg); }.game-card:nth-child(even) { transform: rotate(4deg); }.game-card .card-number { font-family: 'DM Mono', monospace; font-size: 12px; }.game-card .big-shape { text-align: center; font-size: clamp(34px, 5vw, 54px); line-height: .6; }.card-shape { font-family: 'Manrope', sans-serif; }.shape-circle { color: var(--coral); }.shape-triangle { color: var(--mint-dark); }.shape-star { color: var(--yellow); text-shadow: 1px 1px 0 var(--ink); }.shape-square { color: var(--blue); }.game-card .card-number.bottom { transform: rotate(180deg); align-self: flex-end; }.game-footer { border-top: 1px solid var(--line); padding-top: 20px; color: var(--muted); display: flex; justify-content: space-between; }.text-button { border: 0; background: none; color: var(--ink); font-family: 'DM Mono', monospace; text-transform: uppercase; letter-spacing: 1px; font-size: 10px; }.text-button span { color: var(--coral); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(23, 33, 29, .38); display: grid; place-items: center; padding: 20px; z-index: 5; }.modal { background: var(--paper); width: min(480px, 100%); padding: 40px; position: relative; box-shadow: 10px 10px 0 var(--coral); }.modal h2 { font-size: 53px; letter-spacing: -3px; margin-bottom: 35px; }.close-button { position: absolute; top: 20px; right: 20px; font-size: 20px; font-weight: 400; }.rules-list { list-style: none; padding: 0; margin: 0 0 35px; }.rules-list li { display: flex; gap: 20px; border-top: 1px solid var(--line); padding: 17px 0; }.rules-list span { font-family: 'DM Mono', monospace; color: var(--coral); font-size: 11px; }.rules-list p { margin: 0; font-size: 13px; line-height: 1.55; }.modal-action { width: 100%; justify-content: space-between; }
@media (max-width: 760px) { .screen { padding: 20px 22px; }.topbar-note { display: none; }.home-content { min-height: auto; display: block; padding: 15vh 0 100px; }.hero-copy { padding: 0; }.hero-description { font-size: 13px; }.home-actions { gap: 15px; flex-wrap: wrap; }.card-stack { width: 78vw; max-width: 330px; margin: 75px auto 0; }.home-footer { left: 22px; right: 22px; bottom: 20px; }.game-header-center { gap: 9px; }.game-layout { min-height: auto; display: block; padding: 45px 0 20px; }.score-panel h1 { font-size: 48px; }.scores { margin-top: 28px; display: flex; gap: 25px; border: 0; }.score-row { flex: 1; border-bottom: 1px solid var(--line); }.game-tip { display: none; }.table-area { margin-top: 35px; }.center-table { min-height: 205px; gap: 22px; }.deck-button, .discard-pile { width: 95px; }.hand { min-height: 135px; padding-top: 20px; }.game-card { padding: 8px; min-width: 56px; }.game-card .big-shape { font-size: 34px; }.game-footer { font-size: 8px; gap: 10px; }.modal { padding: 32px 25px; } }
@media (max-width: 390px) { h1 { font-size: 54px; }.game-card { margin-left: -19px; }.game-card:first-child { margin-left: 0; }.game-card .card-number { font-size: 9px; }.player-label strong { font-size: 8px; }.center-table { gap: 13px; } }

/* Standard playing-card faces */
.playing-card { background: #fffdf7; color: #17211d; border-color: #17211d; }
.playing-card.red { color: #c94f48; }
.playing-card.black { color: #17211d; }
.playing-card-rank { font-family: 'DM Mono', monospace; font-size: 12px; line-height: 1; align-self: flex-start; }
.playing-card-suit { font-family: Georgia, serif; font-size: clamp(38px, 5vw, 66px); line-height: 1; align-self: center; }
.playing-card-rank-bottom { transform: rotate(180deg); align-self: flex-end; }
.discard-card { display: flex; flex-direction: column; justify-content: space-between; padding: 14px; }
.discard-card .playing-card-suit { font-size: 66px; }
.discard-card.playing-card { height: 100%; }
.game-card.playing-card { box-shadow: 3px 3px 0 rgba(0, 0, 0, .28); }
.game-card.playing-card.disabled { opacity: .58; filter: saturate(.5); }
.game-card.playing-card.playable { box-shadow: 3px 3px 0 var(--yellow); }

@media (max-width: 760px) {
  .game-layout { display: block; min-height: auto; padding: 45px 0 20px; }
  .score-panel h1 { font-size: 48px; }
  .scores { display: flex; gap: 25px; border-top: 0; margin-top: 28px; }
  .score-row { flex: 1; }
  .game-tip { display: none; }
  .table-area { margin-top: 35px; }
  .center-table { min-height: 205px; gap: 22px; }
  .deck-button, .discard-pile { width: 95px; }
  .hand { min-height: 135px; padding-top: 20px; }
  .game-card { min-width: 56px; padding: 8px; }
  .playing-card-suit { font-size: 34px; }
}

/* Modern poker-room finish */
:root {
  --paper: #101316;
  --ink: #f4e6be;
  --muted: #9ca39c;
  --line: rgba(244, 230, 190, .2);
  --mint: #e7e0c3;
  --mint-dark: #164b3b;
  --coral: #b9483f;
  --yellow: #d4ae5a;
  --blue: #526a70;
  --shadow: 0 22px 55px rgba(0, 0, 0, .45);
}
body { background: #080a0b; }
.app-shell { background: radial-gradient(ellipse at 50% 45%, #19513d 0%, #0c2d24 55%, #080a0b 100%); }
.screen { isolation: isolate; }
.screen::before { content: ''; position: absolute; inset: 16px; border: 1px solid rgba(212, 174, 90, .23); pointer-events: none; z-index: -1; }
.topbar { border-bottom-color: rgba(244, 230, 190, .25); }
.home-screen .topbar { border-bottom: 0; }
.hero-copy { position: relative; }
.hero-copy::before { content: 'EST. 2024'; position: absolute; top: -42px; left: 2px; color: var(--yellow); font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 2px; }
.button { border-radius: 2px; min-height: 46px; }
.button-primary { background: var(--yellow); color: #17130a; box-shadow: 4px 4px 0 var(--coral); }
.button-casino { border-color: var(--yellow); color: var(--ink); background: rgba(0, 0, 0, .14); box-shadow: 3px 3px 0 rgba(212, 174, 90, .65); }
.button-quiet { color: var(--ink); }
.game-screen, .blackjack-screen, .twenty-one-screen, .chase-ace-screen, .go-fish-screen { background: radial-gradient(ellipse at center, rgba(29, 91, 67, .58), transparent 62%); }
.game-layout, .blackjack-layout, .twenty-one-table, .chase-ace-table, .go-fish-table { position: relative; }
.table-area, .blackjack-table, .twenty-one-table, .chase-ace-table, .go-fish-table { border: 1px solid rgba(212, 174, 90, .2); background: rgba(4, 20, 15, .22); box-shadow: inset 0 0 0 8px rgba(0, 0, 0, .08), 0 24px 60px rgba(0, 0, 0, .17); }
.table-area { padding: 20px 28px; border-radius: 44px; }
.blackjack-table, .twenty-one-table, .chase-ace-table, .go-fish-table { padding: 0 30px 24px; border-radius: 34px; }
.playing-card { border-radius: 7px; box-shadow: 2px 3px 0 rgba(0, 0, 0, .22), 0 10px 18px rgba(0, 0, 0, .22); }
.game-card.playing-card { animation: deal-in .42s cubic-bezier(.2, .8, .2, 1) both; }
.game-card.playing-card:nth-child(2) { animation-delay: .035s; }.game-card.playing-card:nth-child(3) { animation-delay: .07s; }.game-card.playing-card:nth-child(4) { animation-delay: .105s; }.game-card.playing-card:nth-child(5) { animation-delay: .14s; }
.playing-card.playable { border-color: var(--yellow); }
.discard-pile { border-radius: 7px; box-shadow: 6px 8px 0 rgba(0, 0, 0, .28); }
.deck-button { border-radius: 7px; box-shadow: 8px 8px 0 var(--coral), 0 12px 24px rgba(0,0,0,.25); }
.deck-button:hover { box-shadow: 8px 13px 0 var(--coral), 0 16px 28px rgba(0,0,0,.3); }
.mini-card, .hidden-card-choice { border-radius: 5px; }
.modal { border: 1px solid rgba(212, 174, 90, .35); border-radius: 3px; box-shadow: 10px 10px 0 var(--coral), 0 25px 70px rgba(0,0,0,.45); }
.home-footer, .game-footer { color: var(--muted); }
.profile-button, .game-lobby-card, .lobby-card, .waiting-card, .game-over-card { border-color: rgba(212, 174, 90, .25); }
@keyframes deal-in { from { opacity: 0; transform: translateY(18px) rotate(-4deg) scale(.94); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (max-width: 760px) {
  .screen::before { inset: 8px; }
  .table-area, .blackjack-table, .twenty-one-table, .chase-ace-table, .go-fish-table { padding-left: 13px; padding-right: 13px; border-radius: 24px; }
  .hero-copy::before { top: -30px; }
  .home-actions .button { flex: 1 1 auto; }
}

.mini-card { background-image: repeating-linear-gradient(45deg, transparent 0 4px, rgba(212,174,90,.18) 4px 5px); }
.button:active, .icon-button:active, .profile-button:active, .text-button:active { transform: translateY(1px); }
.button:focus-visible, .icon-button:focus-visible, .profile-button:focus-visible, .text-button:focus-visible, .game-card:focus-visible, .deck-button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; }
.profile-customization { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; }.profile-section-label { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 10px; }.design-options { display: flex; gap: 9px; margin-bottom: 20px; }.design-option { width: 76px; height: 65px; display: grid; place-items: center; align-content: center; gap: 3px; border: 1px solid var(--line); background: #fffdf7; color: #17211d; }.design-option span { font-family: Georgia, serif; font-size: 27px; }.design-option small { font-family: 'DM Mono', monospace; font-size: 8px; text-transform: uppercase; }.design-option-ivory { background: #e7ddbf; }.design-option-ivory span { color: #9c3734; }.design-option-noir { background: #20262a; color: var(--yellow); }.design-option.selected, .accent-option.selected { outline: 2px solid var(--yellow); outline-offset: 2px; }.accent-options { display: flex; gap: 10px; }.accent-option { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; }.accent-option-emerald { background: #19513d; }.accent-option-wine { background: #6d252d; }.accent-option-navy { background: #1f3b54; }
.card-design-ivory .playing-card { background: #e7ddbf; }.card-design-noir .playing-card { background: #20262a; color: #f4e6be; border-color: #d4ae5a; }.card-design-noir .playing-card.red { color: #ff8177; }.card-design-noir .playing-card.black { color: #f4e6be; }.card-design-noir .mini-card, .card-design-noir .hidden-card-choice { background-color: #20262a; }
.card-design-ivory .preview-front { background: #e7ddbf; }.card-design-noir .preview-front { background: #20262a; color: var(--ink); border-color: var(--yellow); }.card-design-noir .preview-back { background: #30383e; color: var(--yellow); }
.table-accent-wine .app-shell { background: radial-gradient(ellipse at 50% 45%, #7a3139 0%, #3c171d 55%, #080a0b 100%); }.table-accent-navy .app-shell { background: radial-gradient(ellipse at 50% 45%, #31566c 0%, #142a3d 55%, #080a0b 100%); }

.twenty-one-setup { max-width: 900px; min-height: calc(100vh - 150px); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 8vw; }
.twenty-one-setup h1, .twenty-one-board-head h1 { font-size: clamp(52px, 7vw, 84px); letter-spacing: -5px; }
.twenty-one-setup > div:first-child { flex: 1; }
.twenty-one-names { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 235px; overflow-y: auto; margin: 14px 0 18px; }
.twenty-one-names .player-name-input { min-width: 0; }
.twenty-one-table { max-width: 1280px; min-height: calc(100vh - 150px); margin: auto; }
.twenty-one-board-head { display: flex; align-items: end; justify-content: space-between; padding: 48px 0 22px; }
.twenty-one-board-head h1 { font-size: clamp(45px, 6vw, 70px); }
.twenty-one-status { color: var(--muted); max-width: 210px; font-size: 12px; line-height: 1.5; text-align: right; }
.twenty-one-players { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.twenty-one-player { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 10px 0; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; text-transform: uppercase; }
.twenty-one-player strong { margin-left: auto; color: var(--ink); font-weight: 400; }
.twenty-one-player.current { color: var(--yellow); border-top-color: var(--yellow); }
.twenty-one-center { min-height: 160px; display: grid; place-items: center; }
.twenty-one-current { max-width: 850px; margin: auto; }
.twenty-one-current .hand { min-height: 150px; }
.twenty-one-actions { display: flex; justify-content: center; gap: 14px; }
.twenty-one-actions .button { min-width: 150px; justify-content: space-between; }
.twenty-one-actions button:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; transform: none; }

@media (max-width: 760px) {
  .twenty-one-setup { display: block; min-height: auto; padding: 55px 0 30px; }
  .twenty-one-setup h1 { font-size: 55px; }
  .twenty-one-setup .lobby-card { margin-top: 35px; }
  .twenty-one-names { max-height: 190px; }
  .twenty-one-table { min-height: auto; }
  .twenty-one-board-head { padding: 35px 0 20px; align-items: end; }
  .twenty-one-board-head h1 { font-size: 48px; }
  .twenty-one-status { max-width: 145px; font-size: 10px; }
  .twenty-one-players { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .twenty-one-center { min-height: 130px; }
  .twenty-one-current .hand { min-height: 135px; }
  .twenty-one-actions { gap: 10px; }
  .twenty-one-actions .button { min-width: 0; flex: 1; padding: 12px; }
}

.chase-ace-setup { max-width: 900px; min-height: calc(100vh - 150px); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 8vw; }
.chase-ace-setup h1, .chase-ace-board-head h1 { font-size: clamp(52px, 7vw, 84px); letter-spacing: -5px; }
.chase-ace-setup > div:first-child { flex: 1; }
.chase-ace-names { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 235px; overflow-y: auto; margin: 14px 0 18px; }
.chase-ace-names .player-name-input { min-width: 0; }
.chase-ace-table { max-width: 1280px; min-height: calc(100vh - 150px); margin: auto; }
.chase-ace-board-head { display: flex; align-items: end; justify-content: space-between; padding: 48px 0 22px; }
.chase-ace-board-head h1 { font-size: clamp(45px, 6vw, 70px); }
.chase-ace-players { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.chase-ace-current { max-width: 850px; margin: 30px auto 0; }
.chase-ace-hand { min-height: 150px; }
.chase-ace-actions { display: flex; justify-content: center; gap: 14px; }
.chase-ace-actions .button { min-width: 180px; justify-content: space-between; }
.chase-ace-actions button:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; transform: none; }
.chase-ace-pick { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; text-transform: uppercase; }
.hidden-card-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hidden-card-choice { width: 54px; height: 70px; background: repeating-linear-gradient(45deg, rgba(245,214,107,.12) 0 3px, transparent 3px 7px), var(--ink); color: var(--yellow); border: 1px solid var(--yellow); box-shadow: 3px 3px 0 var(--coral); font-size: 24px; }
.hidden-card-back-mark { display: grid; place-items: center; width: 28px; height: 38px; margin: auto; border: 1px solid var(--yellow); font-family: 'DM Mono', monospace; font-size: 17px; }
.hidden-card-choice:hover, .hidden-card-choice:focus-visible { transform: translateY(-4px); }

@media (max-width: 760px) {
  .chase-ace-setup { display: block; min-height: auto; padding: 55px 0 30px; }
  .chase-ace-setup h1 { font-size: 55px; }
  .chase-ace-setup .lobby-card { margin-top: 35px; }
  .chase-ace-names { max-height: 190px; }
  .chase-ace-table { min-height: auto; }
  .chase-ace-board-head { padding: 35px 0 20px; align-items: end; }
  .chase-ace-board-head h1 { font-size: 48px; }
  .chase-ace-players { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chase-ace-current { margin-top: 20px; }
  .chase-ace-hand { min-height: 135px; }
  .chase-ace-actions { gap: 10px; }
  .chase-ace-actions .button { min-width: 0; flex: 1; padding: 12px; }
}

.chain-footer-actions { display: flex; gap: 18px; align-items: center; }
.chain-footer-actions .text-button:disabled { opacity: .35; cursor: not-allowed; }
.deck-button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.blackjack-screen { padding-bottom: 20px; }
.blackjack-layout { max-width: 1280px; min-height: calc(100vh - 150px); margin: auto; display: grid; grid-template-columns: 230px 1fr; gap: 5vw; align-items: center; }
.blackjack-sidebar h1 { font-size: clamp(42px, 5vw, 67px); letter-spacing: -3px; }
.blackjack-status { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 28px; }
.player-count-controls { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 16px; display: grid; gap: 12px; }
.player-count-controls label { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
.player-count-controls select { background: transparent; border: 1px solid var(--line); color: var(--ink); padding: 10px; width: 100%; }
.player-count-controls .text-button { text-align: left; padding: 8px 0; }
.blackjack-table { width: 100%; }
.blackjack-opponents { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; min-height: 35px; }
.blackjack-opponent { display: flex; align-items: center; gap: 7px; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; text-transform: uppercase; }
.blackjack-opponent strong { margin-left: auto; color: var(--ink); font-weight: 400; }
.blackjack-center { min-height: 245px; display: flex; justify-content: center; align-items: center; gap: 35px; position: relative; }
.blackjack-player-label { margin-top: 5px; }
.blackjack-hand { min-height: 180px; }
.blackjack-actions { display: flex; justify-content: center; gap: 16px; min-height: 48px; }
.blackjack-actions .button { min-width: 140px; justify-content: space-between; }
.blackjack-actions button:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }
.button-casino { color: var(--ink); background: transparent; border: 1px solid var(--yellow); box-shadow: 3px 3px 0 var(--yellow); }
.suit-choice { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; text-transform: uppercase; }
.suit-choice > div { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.suit-button { border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 8px 10px; text-transform: uppercase; font-family: 'DM Mono', monospace; font-size: 9px; }
.suit-button.red { color: #ff8f79; }
.suit-button:hover { border-color: var(--yellow); }
.lobby-panel, .waiting-panel { max-width: 900px; min-height: calc(100vh - 150px); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 8vw; }
.lobby-copy h1, .waiting-heading h1 { font-size: clamp(52px, 7vw, 84px); letter-spacing: -5px; }
.lobby-copy .blackjack-status { max-width: 260px; }
.lobby-card, .waiting-card { width: min(390px, 100%); border: 1px solid var(--line); padding: 28px; background: rgba(5, 24, 19, .3); box-shadow: 8px 8px 0 rgba(0, 0, 0, .18); }
.lobby-card label { display: block; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px; }
.lobby-card input { width: 100%; background: transparent; border: 1px solid var(--line); color: var(--ink); padding: 13px; outline: none; }
.lobby-card input:focus { border-color: var(--yellow); }
.lobby-card input::placeholder { color: var(--muted); }
.lobby-actions { margin-top: 18px; display: grid; gap: 13px; }
.lobby-actions .button { justify-content: space-between; width: 100%; }
.lobby-or { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; text-align: center; text-transform: uppercase; }
.join-row { display: flex; gap: 10px; }
.join-row input { flex: 1; }
.join-row .button { width: auto; }
.form-error { min-height: 18px; margin: 14px 0 0; color: #ff9c86; font-size: 11px; }
.home-topbar-actions { display: flex; align-items: center; gap: 22px; }
.profile-button { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: rgba(5, 24, 19, .25); color: var(--ink); padding: 5px 10px 5px 5px; font-size: 11px; }
.profile-avatar { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); color: var(--paper); font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 500; }
.profile-modal-card { width: min(560px, 100%); }
.profile-modal-card h2 { font-size: 48px; margin-bottom: 28px; }
.profile-name-label { display: block; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.profile-name-row { display: flex; gap: 10px; }.profile-name-row input { flex: 1; background: transparent; border: 1px solid var(--line); color: var(--ink); padding: 13px; outline: none; }.profile-name-row input:focus { border-color: var(--yellow); }
.profile-stats { margin-top: 27px; }.profile-stat-summary { display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: baseline; gap: 8px 12px; border-top: 1px solid var(--line); padding: 17px 0; }.profile-stat-summary strong { color: var(--yellow); font-size: 26px; }.profile-stat-summary span { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; text-transform: uppercase; }
.profile-game-stat { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 12px 0; font-size: 12px; }.profile-game-stat > span:nth-child(2) { margin-left: auto; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; }.profile-game-stat strong { color: var(--yellow); font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 400; }.profile-reset { color: var(--coral); margin-top: 18px; padding: 0; }
.waiting-heading { flex: 1; }.waiting-heading p:last-child { color: var(--muted); font-size: 13px; }
.waiting-card { text-align: center; }
.waiting-code-label, .waiting-players-heading { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 1.3px; text-transform: uppercase; }
.large-game-code { color: var(--yellow); font-family: 'DM Mono', monospace; font-size: clamp(32px, 6vw, 54px); letter-spacing: 7px; margin: 10px 0 18px; }
.waiting-divider { border-top: 1px solid var(--line); margin: 24px 0 14px; }
.waiting-players-heading { display: flex; justify-content: space-between; margin-bottom: 8px; }
.waiting-players { text-align: left; margin-bottom: 20px; }
.waiting-player { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 10px 0; color: var(--ink); font-size: 13px; }
.waiting-player strong { margin-left: auto; color: var(--yellow); font-family: 'DM Mono', monospace; font-size: 9px; text-transform: uppercase; }
.start-blackjack-button { width: 100%; justify-content: space-between; }
.start-blackjack-button:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; transform: none; }
.game-over-panel { max-width: 900px; min-height: calc(100vh - 150px); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 8vw; }
.game-over-heading { flex: 1; }.game-over-heading h1 { font-size: clamp(52px, 7vw, 84px); letter-spacing: -5px; }.game-over-heading p:last-child { color: var(--muted); font-size: 13px; }
.game-over-card { width: min(430px, 100%); border: 1px solid var(--line); padding: 28px; background: rgba(5, 24, 19, .3); box-shadow: 8px 8px 0 rgba(0, 0, 0, .18); }
.final-standings { margin: 14px 0 22px; }
.final-standing { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 12px 0; color: var(--ink); font-size: 13px; }
.final-standing strong { margin-left: auto; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 400; text-transform: uppercase; }
.standing-place { min-width: 33px; color: var(--yellow); font-family: 'DM Mono', monospace; font-size: 10px; text-transform: uppercase; }
.game-over-card > .button { width: 100%; justify-content: space-between; }

@media (max-width: 760px) {
  .blackjack-layout { display: block; min-height: auto; padding: 35px 0 20px; }
  .blackjack-sidebar h1 { font-size: 48px; }
  .blackjack-status { margin-top: 15px; }
  .player-count-controls { display: flex; align-items: center; border-top: 0; margin-top: 18px; padding-top: 0; }
  .player-count-controls select { width: auto; padding: 8px; }
  .player-count-controls .text-button { margin-left: auto; }
  .blackjack-table { margin-top: 28px; }
  .blackjack-opponents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blackjack-center { min-height: 190px; gap: 22px; }
  .blackjack-hand { min-height: 135px; }
  .blackjack-actions { gap: 10px; }
  .blackjack-actions .button { min-width: 0; flex: 1; padding: 12px; }
  .suit-choice { align-items: flex-start; flex-direction: column; }
  .suit-choice > div { justify-content: flex-start; }
  .lobby-panel, .waiting-panel { display: block; min-height: auto; padding: 55px 0 30px; }
  .lobby-card, .waiting-card { margin: 35px auto 0; }
  .waiting-heading { text-align: center; }
  .waiting-heading h1 { font-size: 55px; }
  .game-over-panel { display: block; min-height: auto; padding: 55px 0 30px; }
  .game-over-heading { text-align: center; }
  .game-over-heading h1 { font-size: 55px; }
  .game-over-card { margin: 35px auto 0; }
}
