/* Game layout and responsive interactions */
:root {
  color-scheme: dark;
  --cream: #151312;
  --paper: #fff7ee;
  --ink: #fff7ef;
  --muted: #c9b9ab;
  --green: #402f24;
  --green-dark: #201713;
  --rust: #ffad7c;
  --yellow: #ffd64a;
  --line: #ffffff17;
  --gold: #ffad7c;
  --gold-soft: #aa7b5f;
  --navy-panel: #281c16;
  --sans: 'Cinzel Numbers', 'Segoe UI', Arial, sans-serif;
}

html { scroll-padding-top: 18px; }
body {
  background-color: var(--cream);
  background-image: radial-gradient(ellipse at 70% 0, #6a3c2755, transparent 56%),
    radial-gradient(circle at 1px 1px, #bd876724 .7px, transparent 1px);
  background-size: auto, 74px 74px;
  font-size: 15px;
}
body::before { opacity: .018; }
button, a, select { outline-offset: 5px; }
button:focus-visible, a:focus-visible, select:focus-visible {
  outline: 3px solid #f4d67f;
  box-shadow: 0 0 0 5px #151312;
}
.app-shell { max-width: 1360px; padding: 0 56px; }
.site-header { height: 104px; border-bottom-color: #c7ad6833; gap: 24px; }
.brand { gap: 17px; letter-spacing: 0; }
.brand-logo { position: relative; width: 228px; aspect-ratio: 360 / 76; overflow: hidden; display: block; flex-shrink: 0; }
.brand-logo img { display: block; position: absolute; width: 100%; max-width: 100%; height: auto; left: 0; top: 50%; transform: translateY(-50%); }
.brand-game { font: 600 10px var(--sans); letter-spacing: 2.6px; color: var(--gold); border-left: 1px solid #d5bc7644; padding: 11px 0 11px 17px; }
.header-caption { margin-left: 0; color: #a1b4bf; font-size: 10px; letter-spacing: 2.2px; }
.header-actions { gap: 12px; }
.header-divider { background: #ffffff20; }
.icon-button { min-width: 44px; min-height: 44px; width: 44px; height: 44px; color: #c2cfd6; }
.icon-button:hover { background: #ffffff0b; color: var(--gold); }
.help-button { min-height: 44px; font-size: 12px; gap: 9px; color: #c2cfd6; }
.help-button:hover { color: var(--gold); }
.intro-row { padding: 44px 0 35px; }
.eyebrow { color: #b3c5ce; font-size: 11px; letter-spacing: 2px; }
.tiny-star { color: var(--gold); }
h1 { font-size: clamp(46px, 4.5vw, 66px); line-height: 1.08; letter-spacing: -2.1px; margin: 18px 0; }
h1 em, h2 em { color: var(--gold); }
.intro-copy { color: #9fb2bf; font-size: 14px; line-height: 1.85; }
.intro-aside { margin-right: 52px; transform: rotate(8deg); }
.lucky-seal { width: 114px; height: 114px; background: #b79c4510; border-color: #c1a96c80; outline-color: #c1a96c70; color: var(--gold); box-shadow: 0 0 40px #b5a66e0a; }
.lucky-seal strong { font-size: 45px; }
.lucky-seal span { font-size: 10px; }
.handwriting { color: #bcaa80; }
.hand-arrow { stroke: #bca66e; }
.felt { background-color: #0a2c40; background-image: radial-gradient(ellipse at 50% 0, #1b4c6259, transparent 70%), linear-gradient(115deg, #082337, #0c3043 50%, #082437); color: #f1eee3; }
.selection-table { border: 1px solid #bba15e42; border-radius: 16px; padding: 28px 37px 24px; box-shadow: inset 0 0 70px #00142244, 0 8px 0 -4px #011321, 0 20px 55px #00000029; }
.selection-table::after { inset: 10px; border-color: #c9b57d25; border-radius: 9px; }
.table-corner { border-color: #d4ba7066; }
.table-label { font-size: 10px; letter-spacing: 1.6px; color: #d7c99f; }
.status-dot { background: var(--gold); box-shadow: 0 0 0 4px #ffad7c12; }
.table-small { font-size: 10px; letter-spacing: 1.8px; color: #8fa9b8; }
.card-deck { height: 274px; gap: clamp(18px, 2.3vw, 34px); padding-top: 8px; }
.pick-card { width: clamp(120px, 10.2vw, 148px); height: auto; aspect-ratio: 142 / 199; filter: drop-shadow(0 15px 12px #000e1a99); }
.pick-card:not(:disabled):hover, .pick-card:not(:disabled):focus-visible { filter: drop-shadow(0 15px 15px #000e1abf); }
.card-back { border: 5px solid #d9c488; background-color: #0b2435; background-image: repeating-linear-gradient(45deg, transparent, transparent 7px, #d2ba7526 7px, #d2ba7526 8px), repeating-linear-gradient(-45deg, transparent, transparent 7px, #d2ba7520 7px, #d2ba7520 8px); box-shadow: inset 0 0 0 2px #17364a, inset 0 0 0 3px #b59c5e; }
.card-back::before { border-color: #d1b97888; }
.card-back::after, .card-back .back-corner { color: #e1cb90; }
.card-medallion { width: 84px; height: 118px; background: radial-gradient(ellipse, #123c50, #082536); border-color: #c1a96b; outline-color: #c7ad6666; color: #e6ce8f; gap: 8px; }
.card-medallion strong { font: 38px 'Cinzel Numbers', Georgia, serif; font-style: normal; text-shadow: 0 2px 12px #d6bc5033; }
.card-medallion small { font-size: 8px; font-weight: 700; letter-spacing: 1.1px; }
.card-medallion small:last-child { font-size: 7px; font-weight: 400; letter-spacing: 2px; }
.card-medallion::before, .card-medallion::after { font-size: 10px; }
.card-choice-index { color: #bca86d; font-size: 10px; }
.table-note { color: #b6c5ce; font-size: 14px; }
.table-shuffle { min-height: 44px; padding: 8px 6px; color: #dfc98b; font-size: 12px; }
.table-shuffle svg { width: 17px; height: 17px; }
.table-shuffle:hover:not(:disabled) { color: #fff0c9; }
.primary-button { min-height: 48px; background: linear-gradient(115deg, #ecd69b, #d5b76d); border: 1px solid #ecd8a0; color: #132a39; box-shadow: 0 2px 0 #0c1b2377, inset 0 1px #fff4cc88; border-radius: 8px; font-size: 14px; }
.primary-button:hover:not(:disabled) { background: linear-gradient(115deg, #f5e3b3, #e6c982); box-shadow: 0 6px 22px #b99d3b19; }
.primary-button:disabled { opacity: .65; }
.quiet-button { color: #b3c4ce; font-size: 13px; min-height: 44px; padding: 8px 10px; border-radius: 7px; }
.quiet-button:hover { color: #f2dba3; background: #ffffff08; }
.selection-bottom { padding: 30px 0 38px; gap: 18px; }
.step-indicator { gap: 16px; }
.step { color: #8ca3b1; font-size: 10px; letter-spacing: .7px; }
.step b { width: 27px; height: 27px; border-color: #829cac40; font-size: 10px; }
.step.active { color: #ead59a; }
.step.active b { background: #d9bd79; border-color: #d9bd79; color: #082334; }
.step-line { background: #7e929b40; width: 28px; }
.selection-hint { font-size: 12px; color: #a2b6c1; }
.small-dot { background: #cfb66f; }
.resume-banner { background: #113247; border-color: #cfb77140; font-size: 13px; gap: 20px; }
.resume-banner button { color: #e3cc8d; min-height: 44px; padding: 8px; }
.reveal-area { padding: 26px 0 20px; gap: 22px; }
.reveal-area .tombala-ticket { border-color: #d6c58d; width: min(600px, 100%); }
.reveal-actions { gap: 16px; }
.reveal-actions .primary-button { font-size: 13px; min-height: 46px; }
.reveal-actions .quiet-button { font-size: 12px; }
.site-footer { border-color: #c7ad6826; padding: 25px 0 30px; color: #91a9b8; font-size: 11px; gap: 16px; }
.site-footer strong { font-size: 10px; letter-spacing: 1px; color: #d5c18b; font-weight: 650; }

/* The playing surface stays light so the real yellow ink is easy to see. */
.game-heading { padding: 32px 0 26px; }
.game-heading h1 { color: #eef2f4; font-size: 44px; margin-top: 12px; }
.game-layout { grid-template-columns: 296px minmax(0, 1fr); gap: 32px; align-items: start; }
.draw-panel { padding: 23px; border: 1px solid #b79b5f3b; border-radius: 14px; box-shadow: 0 14px 35px #00101b2b; }
.draw-topline .table-label { font-size: 9px; letter-spacing: 1.2px; }
.draw-topline > span:last-child { font-size: 11px; color: #9bb3c3; }
.draw-eyebrow { font-size: 10px; color: #d2bd83; margin-top: 25px; letter-spacing: 2px; }
.ball-orbit { margin: 17px auto 14px; }
.ball-orbit::before { border-color: #d2b97d2e; }
.orbit-spark { color: var(--gold); }
.number-ball { background: radial-gradient(circle at 35% 25%, #fffdf2 0, #f1e7c9 58%, #d0bd81 85%, #a88b42 100%); color: #123348; box-shadow: inset -6px -8px 16px #8c754533, inset 4px 4px 10px #fff8d9, 7px 16px 19px #00111c80; }
.number-ball::before { border-color: #9d884338; }
.ball-word { color: #8d7845; }
.draw-message { color: #c1d0d9; font-size: 12px; line-height: 1.65; min-height: 20px; margin: 12px 0 18px; }
.draw-button { min-height: 48px; font-size: 13px; }
.autoplay-control { gap: 10px; margin-top: 12px; }
.auto-toggle { color: #bdcfd9; min-height: 44px; font-size: 11px; gap: 9px; }
.switch-track { flex-shrink: 0; width: 30px; height: 18px; padding: 3px; border: none; background: #809aa944; }
.switch-track span { width: 12px; height: 12px; background: #b9c8d2; }
.auto-toggle[aria-pressed=true] .switch-track { background: #ffad7c; }
.auto-toggle[aria-pressed=true] .switch-track span { background: #173347; transform: translateX(12px); }
#draw-speed { background: #082334; color: #d6e0e6; border-color: #a7bdcb40; border-radius: 6px; min-width: 59px; min-height: 44px; padding: 7px; font-size: 12px; }
#draw-speed option { background: #082334; color: #edf2f4; }
.recent-draws { border-color: #c2b07126; padding-top: 17px; margin-top: 16px; }
.recent-draws > span { color: #92acbd; font-size: 9px; letter-spacing: 1.6px; }
.recent-draws > div { gap: 8px; margin-top: 12px; }
.recent-number { color: #c8d7e0; border-color: #a2b9ca40; width: 30px; height: 30px; }
.recent-number:first-child { background: #e3cc8c; color: #143044; border-color: #e3cc8c; }
.recent-empty { color: #9db4c1; }
.player-panel { padding-top: 5px; }
.player-topline { padding: 0 2px 17px; }
.player-topline .eyebrow { font-size: 10px; color: #b7c8d1; }
.card-serial { color: #a2b8c6; font-size: 11px; }
.ticket-wrap { padding: 5px 0; }
.ticket-wrap::before { background: #a28d59; border-color: #d4bd7e; transform: rotate(-1.1deg); }
.tombala-ticket { background: #faf8ed; border: 1px solid #cabb8f; border-radius: 7px; transform: rotate(.35deg); color: #402f24; box-shadow: 0 12px 25px #00111c35; overflow: hidden; }
.ticket-header { background: #122e40; color: #e5d3a5; padding: 17px 20px; margin-bottom: 18px; min-height: 53px; }
.ticket-brand { font: 800 13px var(--sans); letter-spacing: .5px; white-space: nowrap; }
.ticket-brand span { color: #cdb57a; font-weight: 500; font-size: 10px; letter-spacing: 1px; }
.ticket-motto { color: #9ab1be; font-size: 8px; letter-spacing: 1.2px; }
.ticket-star { color: #d9bf7d; font-size: 22px; }
.ticket-grid { margin: 0 20px; border-color: #b1b8ae; background: #fffdf4; }
.ticket-cell { color: #12364a; border-color: #b1b8ae; font-size: 34px; height: 69px; }
.ticket-cell.empty { background-color: #e8e9de; background-image: repeating-linear-gradient(45deg, transparent 0, transparent 3px, #5c758510 3px, #5c758510 4px); }
.ticket-cell.empty::after { color: #83948a55; }
.ticket-cell[data-number]:not(.marked):hover { background: #eee7cd; }
.ticket-cell.available:not(.marked) { color: #91630b; }
.ticket-cell.available:not(.marked)::after { background: #aa780d; width: 5px; height: 5px; bottom: 7px; }
.ticket-cell.marked::before { background: #e6ef33c9; }
.ticket-cell:focus-visible { box-shadow: inset 0 0 0 3px #163f56; outline: none; }
.ticket-footer { color: #737f79; padding: 15px 20px; font-size: 9px; letter-spacing: .7px; }
.marker-hint { padding: 20px 2px; gap: 12px; }
.marker-icon { background: #d9c57519; color: #dac274; width: 38px; height: 38px; }
.marker-hint p { color: #b4c7d2; font-size: 12px; line-height: 1.75; }
.marker-hint strong { color: #ead6a2; }
.marker-hint p span { color: #91acbd; font-size: 11px; }
.marked-count { color: #91a9b7; font-size: 12px; }
.marked-count strong { color: #e6cf92; font-size: 25px; }
.achievement-track { gap: 12px; padding: 19px 0; border-color: #d0be7a22; }
.achievement { gap: 9px; }
.achievement-icon { width: 32px; height: 32px; border-color: #9cb2bc40; color: #a5bac5; }
.achievement strong { color: #c2d0d6; font-size: 11px; }
.achievement > div > span { color: #8ba5b7; font-size: 10px; }
.achievement.complete .achievement-icon { background: #dcc384; border-color: #dcc384; color: #0b2a3d; }
.achievement.complete strong { color: #e9d69f; }
.card-status { color: #b9ac85; font-size: 13px; margin-top: 19px; }
.number-board-section { margin: 32px 0 38px; }
.board-heading h2 { color: #edf2f5; font-size: 25px; }
.board-heading > div > span { color: #93acbb; font-size: 11px; }
.board-legend { gap: 16px; }
.board-legend i { background: #0c2b3e; border-color: #8194a132; width: 8px; height: 8px; }
.board-legend .drawn-legend { background: #d4bb7c; border-color: #d4bb7c; }
.board-legend .marked-legend { background: #dce945; border-color: #dce945; }
.number-board { gap: 7px; }
.board-number { background: #092639; color: #8ca9bb; border-color: #44617549; height: 34px; font-size: 12px; }
.board-number.drawn { color: #142f40; border-color: #d9c184; background: #d9c184; font-weight: 600; }
.board-number.marked { color: #1f3e3a; background: #e2eb57; border-color: #e2eb57; }
.board-number.latest { outline-color: #0b2a3d; box-shadow: 0 0 0 2px #f5e4b7; }
.modal { background: #092638; border-color: #c8ad6655; color: #edf3f6; width: 500px; padding: 38px; box-shadow: 0 20px 100px #000a13aa; }
.modal::backdrop { background: #000e1ccb; }
.modal .eyebrow { color: #b5c5ce; font-size: 10px; }
.modal-close { color: #b6c9d4; top: 10px; right: 10px; }
.modal h2 { color: #edf2f4; }
.rules strong { font-size: 14px; color: #e1d1a4; }
.rules p, .small-modal > p, .win-modal p { color: #b3c4cf; font-size: 13px; line-height: 1.8; }
.rules li > b { color: #dbc17d; }
.small-modal { width: 450px; }
.win-modal { width: 450px; }
.toast { background: #102f42; border: 1px solid #ffad7c6b; color: #f3ead6; border-radius: 9px; bottom: max(24px, env(safe-area-inset-bottom)); box-shadow: 0 8px 30px #000a1466; }
.animated-marker { filter: drop-shadow(8px 12px 5px #0a192755); }

@media (max-width: 1100px) {
  .app-shell { padding: 0 36px; }
  .header-caption { display: none; }
  .brand-logo { width: 220px; }
  .game-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 24px; }
  .draw-panel { padding: 21px 18px; }
  .card-deck { gap: 20px; height: 258px; }
  .pick-card { width: 125px; }
  .ticket-grid { margin: 0 14px; }
  .ticket-header { padding: 14px; margin-bottom: 14px; }
  .ticket-footer { padding: 12px 14px; font-size: 8px; }
  .ticket-cell { height: 63px; font-size: 30px; }
  .ticket-motto { display: none; }
  .achievement-track { gap: 7px; }
  .achievement { gap: 6px; }
  .achievement-icon { height: 28px; width: 28px; }
  .achievement strong { font-size: 10px; }
  .achievement > div > span { font-size: 9px; }
  .selection-bottom { flex-wrap: wrap; row-gap: 20px; }
  .step { font-size: 9px; }
  .selection-hint { font-size: 11px; }
}

@media (min-width: 761px) and (max-width: 900px) {
  .app-shell { padding: 0 26px; }
  .card-deck { gap: 17px; }
  .pick-card { width: min(112px, 15.5%); }
  .card-medallion { width: 65px; height: 98px; }
  .card-medallion strong { font-size: 29px; }
  .card-medallion small { font-size: 7px; }
  .card-medallion small:last-child { font-size: 6px; }
  .game-layout { grid-template-columns: 234px minmax(0, 1fr); gap: 20px; }
  .auto-toggle { font-size: 10px; gap: 5px; }
  #draw-speed { min-width: 54px; font-size: 11px; }
  .achievement { flex-direction: column; text-align: center; gap: 8px; }
  .ticket-cell { height: 61px; font-size: 27px; }
  .ticket-grid { margin: 0 11px; }
  .ticket-footer { padding-inline: 11px; font-size: 7px; }
  .marker-hint { gap: 8px; }
  .marker-hint p { font-size: 11px; }
  .marker-hint p span { font-size: 10px; }
}

/* Full, separate cards and five wide number targets on phones and small tablets. */
@media (max-width: 760px) {
  html { scroll-padding-top: 12px; }
  .app-shell { padding: 0 20px; }
  .site-header { height: 78px; gap: 8px; }
  .brand { gap: 0; }
  .brand-logo { width: 197px; }
  .brand-game, .header-caption, .header-divider { display: none; }
  .header-actions { gap: 5px; }
  .header-actions .icon-button, .help-button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 10px; justify-content: center; border: 1px solid #a9becb24; border-radius: 9px; }
  .help-button span { display: none; }
  .help-button svg { width: 20px; height: 20px; }
  .intro-row { padding: 29px 0 27px; align-items: center; gap: 15px; }
  .eyebrow { font-size: 10px; letter-spacing: 1.45px; gap: 8px; }
  .tiny-star { font-size: 19px; }
  h1 { font-size: clamp(40px, 7.5vw, 52px); margin: 17px 0 14px; letter-spacing: -1.6px; line-height: 1.05; }
  .intro-copy { font-size: 12px; line-height: 1.8; }
  .intro-aside { margin: 0 13px 0 0; padding: 0; }
  .lucky-seal { width: 76px; height: 76px; outline-offset: 4px; }
  .lucky-seal strong { font-size: 32px; }
  .lucky-seal span { font-size: 7px; letter-spacing: 1.7px; }
  .handwriting, .hand-arrow { display: none; }
  .selection-table { min-height: 0; padding: 23px 22px 16px; border-radius: 13px; }
  .table-label { font-size: 10px; letter-spacing: 1px; }
  .table-small { display: none; }
  .card-deck { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: auto auto; gap: 18px 17px; height: auto; max-width: 368px; width: 100%; margin: 27px auto 22px; padding: 0; }
  .pick-card { position: relative; grid-column: span 2; left: auto; top: auto; width: 100%; height: auto; aspect-ratio: 110 / 148; margin: 0; transform: rotate(var(--mobile-angle, 0deg)); filter: drop-shadow(0 7px 7px #00101c99); }
  .pick-card:nth-child(1) { --mobile-angle: -4deg; z-index: 1; }
  .pick-card:nth-child(2) { --mobile-angle: 0deg; z-index: 2; }
  .pick-card:nth-child(3) { --mobile-angle: 4deg; z-index: 3; }
  .pick-card:nth-child(4) { --mobile-angle: -3deg; grid-column: 2 / span 2; z-index: 4; }
  .pick-card:nth-child(5) { --mobile-angle: 3deg; grid-column: 4 / span 2; z-index: 5; }
  .pick-card:not(:disabled):hover, .pick-card:not(:disabled):focus-visible { transform: translateY(-5px) rotate(0deg); z-index: 6; }
  .card-back { border-width: 4px; border-radius: 6px; }
  .card-back::before { inset: 5px; }
  .card-back::after { left: 8px; top: 6px; font-size: 13px; }
  .card-back .back-corner { right: 8px; bottom: 6px; font-size: 13px; }
  .card-medallion { width: 62%; height: 71%; gap: 5px; outline-offset: 3px; }
  .card-medallion strong { font-size: clamp(25px, 6vw, 32px); }
  .card-medallion small { font-size: 7px; letter-spacing: .6px; }
  .card-medallion small:last-child { font-size: 6px; letter-spacing: 1.3px; }
  .card-medallion::before, .card-medallion::after { font-size: 8px; }
  .card-choice-index { display: none; }
  .card-deck.shuffling .pick-card { animation-name: shuffle-grid; }
  .pick-card.chosen { animation-name: choose-grid; }
  .card-deck.picking .pick-card:not(.chosen) { transform: translateY(15px) scale(.85); }
  .table-bottomline { gap: 10px; }
  .table-note { font-size: 12px; max-width: 160px; line-height: 1.5; }
  .table-shuffle { font-size: 11px; min-height: 44px; padding: 8px 0; gap: 6px; white-space: nowrap; }
  .table-shuffle svg { width: 16px; height: 16px; }
  .selection-bottom { padding: 25px 0 28px; align-items: center; flex-direction: column; gap: 17px; }
  .step-indicator { width: 100%; justify-content: space-between; gap: 9px; }
  .step { font-size: 10px; letter-spacing: .35px; gap: 7px; }
  .step b { width: 25px; height: 25px; font-size: 10px; }
  .step-line { width: 18px; }
  .selection-hint { font-size: 11px; }
  .reveal-area { padding: 24px 0 17px; gap: 21px; }
  .reveal-area .ticket-header { margin-bottom: 11px; padding: 13px 11px; }
  .reveal-area .ticket-grid { margin: 0 11px; }
  .reveal-area .ticket-cell { height: 45px; font-size: 25px; }
  .reveal-area .ticket-footer { padding: 12px 11px; font-size: 8px; }
  .reveal-actions { width: 100%; justify-content: space-between; gap: 8px; }
  .reveal-actions .primary-button { font-size: 12px; padding: 12px 16px; gap: 10px; }
  .reveal-actions .quiet-button { font-size: 11px; padding: 8px 2px; }
  .resume-banner { flex-wrap: wrap; justify-content: center; padding: 14px; gap: 4px; font-size: 12px; }
  .resume-banner button { font-size: 12px; }
  .game-heading { padding: 24px 0 21px; align-items: flex-end; gap: 8px; }
  .game-heading .eyebrow { font-size: 10px; }
  .game-heading h1 { font-size: clamp(31px, 6.3vw, 42px); letter-spacing: -1.2px; margin-top: 10px; }
  .game-heading .quiet-button { font-size: 11px; min-height: 44px; padding: 8px 0 8px 7px; gap: 5px; white-space: nowrap; }
  .game-layout { display: flex; flex-direction: column; gap: 23px; }
  .draw-panel { width: 100%; padding: 17px 20px 13px; display: grid; grid-template-columns: 116px minmax(0, 1fr); grid-template-rows: auto auto auto auto auto; column-gap: 20px; }
  .draw-topline { grid-column: 1 / -1; margin-bottom: 12px; }
  .draw-topline .table-label { font-size: 10px; }
  .draw-topline > span:last-child { font-size: 11px; }
  .draw-eyebrow { grid-column: 2; grid-row: 2; margin: 0 0 4px; text-align: left; font-size: 9px; }
  .ball-orbit { grid-column: 1; grid-row: 2 / 5; margin: 2px 0 0; width: 116px; height: 116px; align-self: start; }
  .number-ball { width: 106px; height: 106px; }
  .number-ball #current-number { font-size: 55px; }
  .number-ball::before { inset: 11px; }
  .ball-word { font-size: 11px; }
  .ball-orbit::before { inset: 7px -3px; }
  .spark-one { left: -4px; top: 0; font-size: 17px; }
  .spark-two { right: -1px; bottom: 13px; font-size: 12px; }
  .draw-message { grid-column: 2; grid-row: 3; align-self: start; text-align: left; margin: 0 0 8px; min-height: 32px; line-height: 1.4; font-size: 11px; }
  .draw-button { grid-column: 2; grid-row: 4; margin: 0; align-self: start; padding: 10px 12px; min-height: 44px; gap: 6px; font-size: 12px; }
  .draw-button svg { width: 17px; height: 17px; }
  .autoplay-control { grid-column: 1 / -1; grid-row: 5; margin: 8px 0 0; padding-top: 5px; border-top: 1px solid #c3ac7022; gap: 14px; }
  .auto-toggle { min-height: 44px; font-size: 12px; gap: 9px; }
  .switch-track { width: 30px; height: 18px; padding: 3px; }
  .switch-track span { width: 12px; height: 12px; }
  .auto-toggle[aria-pressed=true] .switch-track span { transform: translateX(12px); }
  #draw-speed { min-height: 44px; min-width: 67px; max-width: none; padding: 8px; font-size: 12px; }
  .recent-draws { grid-column: 1 / -1; grid-row: 6; display: flex; align-items: center; gap: 14px; margin-top: 7px; padding-top: 12px; }
  .recent-draws > span { font-size: 9px; letter-spacing: .9px; white-space: nowrap; }
  .recent-draws > div { margin: 0; min-height: 27px; gap: 7px; flex-wrap: wrap; }
  .recent-number { width: 27px; height: 27px; font-size: 13px; }
  .recent-empty { font-size: 11px; }
  .player-panel { width: 100%; padding: 0; }
  .player-topline { padding: 0 2px 13px; }
  .player-topline .eyebrow { font-size: 10px; letter-spacing: 1.1px; }
  .card-serial { font-size: 10px; }
  .ticket-wrap { padding: 5px 0; }
  .tombala-ticket { transform: none; border-radius: 7px; }
  .ticket-wrap::before { transform: rotate(-.8deg); }
  .ticket-header { padding: 14px; margin-bottom: 14px; min-height: 49px; }
  .ticket-brand { font-size: 13px; letter-spacing: .3px; }
  .ticket-brand span { font-size: 10px; }
  .ticket-motto { display: none; }
  .ticket-star { font-size: 21px; }
  .ticket-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 14px; }
  .ticket-cell.empty { display: none; }
  .ticket-cell { height: clamp(48px, 13vw, 61px); font-size: 30px; }
  .ticket-cell.available:not(.marked)::after { bottom: 5px; }
  .ticket-footer { padding: 13px 14px; font-size: 9px; letter-spacing: .3px; }
  .ticket-footer span:last-child { display: none; }
  .marker-hint { padding: 16px 1px; gap: 10px; }
  .marker-icon { width: 34px; height: 34px; }
  .marker-hint p { font-size: 12px; }
  .marker-hint p span { font-size: 11px; }
  .marked-count { font-size: 12px; }
  .marked-count strong { font-size: 25px; }
  .achievement-track { gap: 9px; padding: 17px 0; }
  .achievement { flex-direction: column; text-align: center; gap: 8px; }
  .achievement-icon { height: 30px; width: 30px; }
  .achievement strong { font-size: 11px; }
  .achievement > div > span { font-size: 10px; line-height: 1.4; }
  .card-status { font-size: 13px; line-height: 1.6; margin-top: 17px; }
  .number-board-section { margin: 28px 0 31px; }
  .board-heading { flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 17px; }
  .board-heading > div:first-child { display: block; }
  .board-heading h2 { font-size: 25px; }
  .board-heading > div:first-child > span { display: block; font-size: 11px; margin-top: 5px; }
  .board-legend { gap: 13px; }
  .board-legend > span { font-size: 10px !important; gap: 5px; }
  .board-legend i { height: 7px; width: 7px; }
  .number-board { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
  .board-number { height: 31px; font-size: 12px; }
  .site-footer { font-size: 10px; flex-wrap: wrap; gap: 11px; padding: 20px 0 max(24px, env(safe-area-inset-bottom)); }
  .site-footer > span:first-child { max-width: none; }
  .site-footer strong { font-size: 10px; }
  .site-footer > span:last-child { gap: 6px; }
  .modal { padding: 38px 25px 26px; max-width: calc(100% - 24px); max-height: calc(100dvh - 28px); }
  .modal h2 { font-size: 32px; }
  .modal .eyebrow { font-size: 10px; }
  .rules li { gap: 13px; }
  .rules p { font-size: 13px; }
  .rules strong { font-size: 14px; }
  .modal-actions { gap: 14px; }
  .modal-actions .primary-button { padding-inline: 17px; }
  .win-modal h2 { font-size: 59px; }
  .toast { padding: 13px 16px; font-size: 12px; line-height: 1.55; bottom: max(20px, env(safe-area-inset-bottom)); }
  .animated-marker { width: 42px; height: 147px; }
}

@media (max-width: 480px) {
  .intro-aside { margin-right: 5px; }
  .lucky-seal { width: 63px; height: 63px; }
  .lucky-seal strong { font-size: 27px; }
  .lucky-seal span { font-size: 6px; letter-spacing: 1.2px; }
  .card-deck { max-width: 300px; gap: 15px 13px; margin-top: 24px; margin-bottom: 18px; }
  .selection-table { padding-inline: 20px; }
  .step-indicator { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .step { flex-direction: column; text-align: center; gap: 7px; font-size: 9px; letter-spacing: .3px; }
  .step-line { display: none; }
  .brand-logo { width: 188px; }
  .recent-draws { gap: 10px; }
  .recent-draws > span { font-size: 8px; letter-spacing: .55px; }
  .recent-draws > div { gap: 6px; }
}

@media (max-width: 374px) {
  .app-shell { padding: 0 16px; }
  .site-header { height: 72px; }
  .brand-logo { width: 164px; }
  .header-actions { gap: 4px; }
  .intro-row { padding: 25px 0; gap: 10px; }
  .intro-row .eyebrow { font-size: 9px; letter-spacing: 1px; }
  .intro-row h1 { font-size: 39px; }
  .intro-copy { font-size: 11px; }
  .intro-aside { display: none; }
  .selection-table { padding: 22px 17px 14px; }
  .card-deck { gap: 13px 13px; }
  .table-label { font-size: 9px; }
  .table-note { font-size: 11px; max-width: 120px; }
  .table-shuffle { font-size: 10px; gap: 5px; }
  .card-medallion small { font-size: 6px; }
  .card-medallion small:last-child { font-size: 5px; }
  .card-medallion strong { font-size: 25px; }
  .card-medallion { gap: 3px; }
  .card-medallion::before, .card-medallion::after { display: none; }
  .game-heading { padding: 21px 0 18px; }
  .game-heading h1 { font-size: 29px; }
  .game-heading .quiet-button { font-size: 10px; }
  .draw-panel { padding: 15px 15px 13px; grid-template-columns: 100px minmax(0, 1fr); column-gap: 14px; }
  .ball-orbit { width: 100px; height: 110px; }
  .number-ball { width: 96px; height: 96px; }
  .number-ball #current-number { font-size: 50px; }
  .draw-topline .table-label { font-size: 9px; }
  .draw-button { font-size: 11px; padding: 10px; }
  .draw-message { min-height: 33px; font-size: 10px; }
  .recent-number { width: 25px; height: 25px; font-size: 12px; }
  .recent-draws { align-items: flex-start; }
  .recent-draws > span { padding-top: 7px; }
  .recent-draws > div { gap: 5px; }
  .ticket-header { padding: 12px; margin-bottom: 12px; }
  .ticket-grid { margin: 0 12px; }
  .ticket-cell { height: 49px; font-size: 28px; }
  .ticket-footer { padding: 12px; font-size: 8px; }
  .marker-hint { gap: 7px; }
  .marker-hint p { font-size: 11px; }
  .marker-hint p span { font-size: 10px; }
  .marker-icon { width: 30px; height: 30px; }
  .achievement strong { font-size: 10px; }
  .achievement > div > span { font-size: 9px; }
  .number-board { gap: 5px; }
  .board-number { font-size: 11px; }
  .reveal-actions .primary-button { font-size: 11px; padding-inline: 12px; }
  .reveal-actions .quiet-button { font-size: 10px; }
}

@keyframes shuffle-grid {
  0% { transform: rotate(var(--mobile-angle)); }
  24% { transform: translate(var(--stack-x), var(--stack-y)) rotate(-6deg); }
  43% { transform: translate(calc(var(--stack-x) + var(--shuffle-x) * .65), calc(var(--stack-y) - 14px)) rotate(var(--shuffle-angle)); }
  66% { transform: translate(var(--stack-x), var(--stack-y)) rotate(6deg); }
  100% { transform: rotate(var(--mobile-angle)); }
}
@keyframes choose-grid { to { transform: translate(var(--stack-x), var(--stack-y)) rotateY(90deg) scale(1.05); } }

@media (prefers-reduced-motion: reduce) {
  .card-deck.shuffling .pick-card { animation: none; }
}

/* Keep the game clear of camera cutouts in landscape. */
.app-shell {
  padding-left: max(var(--edge-space, 56px), env(safe-area-inset-left));
  padding-right: max(var(--edge-space, 56px), env(safe-area-inset-right));
}
@media (max-width: 1100px) { :root { --edge-space: 36px; } }
@media (min-width: 761px) and (max-width: 900px) { :root { --edge-space: 26px; } }
@media (max-width: 760px) { :root { --edge-space: 20px; } }
@media (max-width: 374px) { :root { --edge-space: 16px; } }

/* User-supplied mobile and desktop artwork; picture loads only the matching asset. */
body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  background: #151312;
}
.scene-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.scene-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
}
.intro-row, .game-heading, .site-header, .selection-bottom, .site-footer {
  text-shadow: 0 2px 14px #000d;
}
.intro-copy, .header-caption, .selection-hint, .site-footer { color: #d0bdae; }
.felt {
  background: linear-gradient(115deg, #1e1714ed, #3d2b21e0 50%, #1e1714ed);
}
.player-panel, .number-board-section {
  position: relative;
  isolation: isolate;
}
.player-panel::before, .number-board-section::before {
  content: '';
  position: absolute;
  inset: -12px;
  z-index: -1;
  pointer-events: none;
  border: 1px solid #d5bc7629;
  border-radius: 14px;
  background: #211b17e8;
}
@media (max-width: 760px) {
  .scene-background::after {
    background: linear-gradient(180deg, #1513125e, #1513126b 42%, #151312a6);
  }
  .intro-row { text-shadow: 0 2px 12px #000, 0 0 24px #0009; }
  .player-panel::before, .number-board-section::before { inset: -10px; }
}

/* Compact layout after removing the annotated decorative text. */
.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
.site-header > .brand { justify-self: start; }
.site-header > .brand-game { border: 0; padding: 0; text-align: center; }
.site-header > .header-actions { justify-self: end; }
.selection-table .table-topline { justify-content: center; }
.table-bottomline { justify-content: flex-end; }
.intro-row h1 { margin-top: 0; }
.game-heading { justify-content: flex-end; padding: 14px 0 24px; }
@media (max-width: 760px) {
  .site-header { display: flex; justify-content: space-between; }
  .game-heading { padding: 10px 0 20px; }
}

/* Optional snow */
.holiday-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px;
  border: 1px solid #c3aa6a55; border-radius: 24px; color: #d5b39b; background: #241b16d9;
  font-size: 12px; white-space: nowrap;
}
.holiday-toggle svg { width: 17px; height: 17px; }
.holiday-toggle[aria-pressed="true"] { color: #f3ddaa; background: #39281fd9; }
.holiday-toggle:hover:not(:disabled) { border-color: #ffad7c; }
.holiday-toggle:disabled { opacity: .55; }
.holiday-snow { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; display: none; }
.snow-enabled .holiday-snow { display: block; }
.holiday-snow i {
  position: absolute; top: -48px; left: var(--snow-x); width: var(--snow-size); height: var(--snow-size);
  background: url('/christmas-snowflake-20261121.webp') center / contain no-repeat; opacity: var(--snow-opacity, .8);
  animation: holiday-snowfall var(--snow-time) var(--snow-delay) linear infinite;
}
.snow-paused .holiday-snow i { animation-play-state: paused; }
@keyframes holiday-snowfall {
  from { transform: translate3d(0, 0, 0) rotate(var(--snow-angle)); }
  to { transform: translate3d(var(--snow-drift), calc(100vh + 96px), 0) rotate(calc(var(--snow-angle) + var(--snow-turn))); }
}
@media (max-width: 760px) {
  .holiday-snow i { width: calc(var(--snow-size) * .82); height: calc(var(--snow-size) * .82); }
  .holiday-snow i:nth-child(n+13) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .holiday-snow { display: none !important; }
  .holiday-snow i { animation: none !important; }
}

.show-result { margin: 0 0 18px auto; min-height: 44px; color: #ffb788; }
.reward-modal { width: 480px; padding: 28px 34px; overflow-y: auto; overscroll-behavior: contain; }
.reward-modal h2 { font-size: clamp(27px, 5vw, 39px); line-height: 1.2; margin: 10px 0; }
.reward-modal #win-copy { margin: 0; font-size: 13px; }
.reward-breakdown { list-style: none; padding: 0; margin: 0 0 20px; border-top: 1px solid #d4ba7433; }
.reward-breakdown li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #d4ba7426; font-size: 12px; }
.reward-breakdown strong { font-size: 11px; white-space: nowrap; }
.reward-earned { color: #e5eddf; }
.reward-earned strong { color: #e4d4c6; }
.reward-unearned { color: #c7b3a3; }
.reward-unearned strong { font-weight: 400; font-size: 10px; }
.reward-modal .claim-reward { min-height: 50px; justify-content: center; font-size: 15px; }
.reward-modal .claim-reward:disabled { opacity: .65; cursor: not-allowed; }
.reward-modal .reward-availability { margin: 9px 0 4px; font-size: 11px; color: #d5c0ae; }
.reward-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 8px; }
.reward-actions .quiet-button { min-height: 44px; font-size: 12px; }
@media (max-width: 480px), (max-height: 720px) {
  .reward-modal { padding: 22px 20px 14px; max-height: calc(100dvh - 24px); max-width: calc(100% - 24px); }
  .reward-modal h2 { font-size: 29px; }
  .reward-breakdown { margin-bottom: 15px; }
}
