/* 使用系统字体，离线打开时无需等待远程字体服务。 */

:root {
  color-scheme: light;
  --ink: #46363c;
  --muted: #8e7a82;
  --accent: #b45d78;
  --accent-dark: #87445b;
  --accent-soft: #f4e5e9;
  --paper: rgba(255, 252, 251, .88);
  --line: rgba(112, 68, 84, .16);
  --shadow: 0 18px 60px rgba(54, 28, 40, .12);
  --page-bg: #f6edf0;
  --home-background-image: url("./assets/images/home-background.png");
  --game-background-image: url("./assets/images/game-background.jpeg");
  --economy-seat-image: url("./assets/images/economy-seat.svg");
  --business-seat-image: url("./assets/images/business-seat.svg");
  --font-ui: 'DM Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-display: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }
body { color: var(--ink); font-family: var(--font-ui); background: var(--page-bg); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(180, 93, 120, .4); outline-offset: 3px; }
[hidden] { display: none !important; }

.app-shell { min-height: 100svh; min-height: 100dvh; overflow: clip; }
.screen { position: relative; min-height: 100svh; min-height: 100dvh; isolation: isolate; }
.home-screen, .game-screen, .history-screen { background-color: var(--page-bg); background-image: var(--page-background, none); background-position: center; background-size: cover; background-repeat: no-repeat; }
.home-screen { --page-background: var(--home-background-image); }
.game-screen, .history-screen { --page-background: var(--game-background-image); }
.home-screen::before, .game-screen::before, .history-screen::before { position: absolute; z-index: -1; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.04), rgba(92,53,68,.03)); content: ''; pointer-events: none; }

.home-screen { display: grid; place-items: center; overflow: hidden; }
.home-visual { display: none; }
.home-content { position: absolute; z-index: 2; inset: auto 0 max(6vh, env(safe-area-inset-bottom)); width: 100%; padding: 0 16px; text-align: center; }
.home-kicker { margin: 0 0 clamp(12px, 2.5vh, 26px); color: var(--accent-dark); font-size: clamp(11px, 1vw, 13px); font-weight: 600; letter-spacing: .25em; text-transform: uppercase; }
.home-content h1, .game-heading h1, .history-header h1 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: .04em; }
.home-content h1 { font-size: clamp(42px, 7.5vw, 92px); line-height: 1.22; text-wrap: balance; }
.home-description { margin: clamp(15px, 2vh, 24px) 0 clamp(30px, 5vh, 54px); color: var(--muted); font-size: clamp(14px, 1.7vw, 19px); letter-spacing: .08em; }
.home-decoration { position: absolute; z-index: -1; left: 50%; top: 50%; width: min(70vw, 820px); aspect-ratio: 1.7; transform: translate(-50%, -50%); border: 1px solid rgba(255,255,255,.5); border-radius: 50%; box-shadow: 0 0 0 44px rgba(255,255,255,.07), 0 0 0 100px rgba(255,255,255,.045); }
.doll { position: absolute; z-index: 2; max-width: 25vw; max-height: 50vh; object-fit: contain; pointer-events: none; }
.home-doll { left: max(2vw, calc(50% - 510px)); bottom: 0; height: clamp(260px, 48vh, 520px); max-width: 38vw; filter: drop-shadow(0 16px 18px rgba(43, 31, 40, .22)); -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 76%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, #000 76%, transparent 100%); }
.button { min-height: 42px; padding: 10px 19px; border: 1px solid transparent; border-radius: 999px; font-size: 14px; font-weight: 600; letter-spacing: .015em; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button-primary { color: #573814; background: linear-gradient(180deg, #fff2c8, #e7b95d); border-color: rgba(143,95,32,.58); box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 8px 22px rgba(108,70,20,.27); }
.button-primary:hover:not(:disabled) { color: #39220b; background: linear-gradient(180deg, #fff8dc, #dca53e); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 28px rgba(108,70,20,.32); }
.button-secondary { color: var(--accent-dark); border-color: var(--line); background: rgba(255,252,251,.78); }
.button-secondary:hover:not(:disabled) { background: #fff; box-shadow: 0 6px 20px rgba(54, 28, 40, .09); }
.button-quiet { color: var(--ink); border-color: var(--line); background: rgba(255,255,255,.62); }
.button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.enter-button { min-width: clamp(180px, 23vw, 250px); min-height: 54px; font-size: 16px; letter-spacing: .1em; }
.home-tools, .game-tools { display: flex; gap: 9px; }
.home-tools { position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 5; }
.icon-button { display: inline-grid; width: 42px; aspect-ratio: 1; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--accent-dark); background: rgba(255,252,251,.82); font-size: 20px; }
.icon-button:hover { background: #fff; }

.game-screen { display: flex; height: 100svh; height: 100dvh; min-height: 100svh; min-height: 100dvh; flex-direction: column; overflow-y: auto; padding: max(12px, env(safe-area-inset-top)) clamp(14px, 2.5vw, 40px) max(12px, env(safe-area-inset-bottom)); }
.game-header { position: relative; z-index: 3; display: grid; grid-template-columns: 1fr minmax(220px, 2fr) 1fr; align-items: start; gap: 12px; min-height: clamp(58px, 8vh, 78px); }
.game-header > .button { justify-self: start; }
.game-heading { text-align: center; }
.game-heading h1 { font-size: clamp(24px, 3.3vw, 42px); }
.game-tools { justify-self: end; }
.action-dock { position: relative; z-index: 3; display: grid; flex: 0 0 auto; width: min(100%, 1320px); grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0 auto clamp(8px, 1.2vh, 14px); }
.action-dock .button { min-width: 0; min-height: 34px; padding: 7px 10px; border-radius: 10px; text-align: center; white-space: nowrap; font-size: 12px; }
.game-stage { position: relative; display: grid; flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 0; width: min(1440px, 100%); margin: 0 auto; }
.zone-stack { position: relative; display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.5vh, 18px); min-height: min(74vh, 780px); width: 100%; padding: 0; overflow: visible; }
.number-zone { position: relative; display: flex; flex-direction: column; min-height: 0; padding: clamp(12px, 1.5vw, 20px); border: 1px solid rgba(255,255,255,.68); border-radius: clamp(16px, 2vw, 26px); background: transparent; box-shadow: 0 8px 24px rgba(30,28,39,.13); }
.zone-heading { position: relative; display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 10px; margin: 0 0 clamp(9px, 1.5vh, 16px); text-align: center; }
.zone-heading h2 { margin: 0; color: #fffaf1; font-family: var(--font-display); font-size: clamp(22px, 2.3vw, 32px); font-weight: 700; letter-spacing: .2em; text-shadow: 0 2px 6px rgba(26,32,53,.9), 0 0 14px rgba(26,32,53,.7); }
.zone-heading h2 img { display: block; width: clamp(175px, 20vw, 260px); height: auto; max-height: 86px; object-fit: contain; }
.zone-heading p { display: inline; margin: 0 0 0 8px; color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.zone-count { position: absolute; right: 0; color: #fffaf1; font-size: 12px; font-variant-numeric: tabular-nums; text-shadow: 0 1px 5px rgba(26,32,53,.9); }
.number-board { display: grid; flex: 1; width: min(100%, 960px); min-height: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(0, 1fr)); gap: clamp(5px, .8vw, 12px); margin-inline: auto; }
.number-tile { position: relative; display: grid; width: min(100%, 150px); height: 100%; min-width: 0; min-height: 0; justify-self: center; place-items: center; overflow: hidden; border: 1px solid #8bb6d5; border-radius: 9px; clip-path: polygon(0 0, 94% 0, 100% 18%, 100% 100%, 0 100%); color: #193e63; background-image: radial-gradient(circle at 15px 15px, #fff 0 3px, #83aac3 3.5px 4.5px, transparent 5px), linear-gradient(180deg, #f9fdff 0%, #e4f3fc 47%, #c7e2f4 100%); box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(69,125,164,.13), 0 3px 6px rgba(39,70,94,.18); font-size: clamp(20px, 2.2vw, 30px); font-variant-numeric: tabular-nums; font-weight: 800; line-height: 1; text-align: center; text-shadow: 0 1px 0 rgba(255,255,255,.9); transition: color .18s ease, transform .18s ease, filter .18s ease; }
.number-tile::before { position: absolute; top: 14%; bottom: 14%; left: 21%; border-left: 1px dashed rgba(37,83,116,.5); content: ''; pointer-events: none; }
.number-tile::after { position: absolute; right: 5%; display: grid; width: 18%; height: 62%; place-items: center; border-left: 1px solid rgba(37,83,116,.28); content: '✈️'; font-size: clamp(14px, 1.5vw, 20px); line-height: 1; pointer-events: none; }
.number-tile:disabled::after { content: '🛫'; }
.zone-lower .number-tile { border-color: #7585a0; color: #fff; background-image: radial-gradient(circle at 15px 15px, #35445c 0 3px, #8290a6 3.5px 4.5px, transparent 5px), linear-gradient(180deg, #4b5870 0%, #303d54 48%, #202b40 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.72), inset 0 -2px 0 rgba(0,0,0,.24), 0 3px 6px rgba(22,31,48,.26); font-size: clamp(22px, 2.5vw, 34px); text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.zone-lower .number-tile::before { border-color: rgba(255,255,255,.48); }
.zone-lower .number-tile::after { border-color: rgba(255,255,255,.25); }
.number-tile:hover:not(:disabled) { z-index: 1; transform: translateY(-4px) scale(1.07); color: #182e3a; filter: drop-shadow(0 8px 8px rgba(33,51,62,.28)) brightness(1.06); }
.zone-lower .number-tile:hover:not(:disabled) { color: #fff; filter: brightness(1.15); }
.number-tile:disabled { opacity: .52; filter: grayscale(.72); cursor: default; }
.zone-lower .number-tile:disabled { border-color: #8bb6d5; color: #193e63; background-image: radial-gradient(circle at 15px 15px, #fff 0 3px, #83aac3 3.5px 4.5px, transparent 5px), linear-gradient(180deg, #f9fdff 0%, #e4f3fc 47%, #c7e2f4 100%); box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(69,125,164,.13), 0 3px 6px rgba(39,70,94,.18); font-size: clamp(20px, 2.2vw, 30px); text-shadow: 0 1px 0 rgba(255,255,255,.9); }
.zone-lower .number-tile:disabled::before { border-color: rgba(37,83,116,.5); }
.zone-lower .number-tile:disabled::after { border-color: rgba(37,83,116,.28); }
.game-doll { right: 0; bottom: 0; height: min(26vh, 240px); }

.reveal-dialog, .form-dialog { width: min(620px, calc(100vw - 28px)); max-width: none; padding: 0; overflow: visible; border: 1px solid rgba(255,255,255,.85); border-radius: 30px; color: var(--ink); background: #fffaf8; box-shadow: 0 28px 90px rgba(34,18,25,.26); }
dialog::backdrop { background: rgba(38, 24, 31, .5); backdrop-filter: blur(3px); }
.reveal-dialog { width: min(1160px, calc(100vw - 36px)); max-height: calc(100dvh - 20px); overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.reveal-dialog::backdrop { background: rgba(39, 29, 22, .36); backdrop-filter: blur(2px); }
.reveal-content { position: relative; display: flex; min-height: min(560px, 86dvh); align-items: center; justify-content: center; color: #12294a; text-align: center; }
.reveal-panel { position: relative; display: grid; width: 77%; min-height: min(560px, 86dvh); place-items: center; padding: 72px 9% 46px; border: 2px solid #bb8b49; border-radius: 44px; outline: 1px solid rgba(255,250,235,.95); outline-offset: -11px; background: radial-gradient(ellipse at 50% 5%, #fff 0%, #fff8ee 52%, #eacba4 100%); box-shadow: inset 0 0 0 5px rgba(255,255,255,.72), inset 0 0 35px rgba(166,113,52,.16), 0 25px 60px rgba(53,33,18,.3); }
.reveal-panel::before { position: absolute; top: 12%; left: 52%; width: 43%; height: 25%; border-top: 2px dashed rgba(177,127,58,.72); border-radius: 50%; transform: rotate(16deg); content: ''; }
.reveal-plane { position: absolute; top: 8%; left: 43%; color: #7997b5; font-size: clamp(36px, 5vw, 62px); transform: rotate(-24deg); text-shadow: 2px 3px 1px #fff, 3px 5px 6px rgba(27,51,85,.25); }
.reveal-star { position: absolute; color: #d2a64c; font-size: clamp(32px, 4vw, 52px); text-shadow: 0 0 14px #ffe7a5; }
.reveal-star-left { top: 31%; left: 8%; }
.reveal-star-right { right: 9%; bottom: 22%; }
.reveal-ticket { position: absolute; z-index: 2; top: 50%; display: flex; width: 27%; min-height: 245px; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 26px 20px 22px 26px; clip-path: polygon(0 5%, 8% 5%, 12% 0, 91% 0, 100% 8%, 100% 86%, 93% 91%, 93% 100%, 7% 100%, 0 93%); border: 2px solid rgba(255,255,255,.9); border-radius: 24px; box-shadow: 0 12px 25px rgba(25,39,56,.25), inset 0 0 0 2px rgba(15,48,82,.2); }
.reveal-ticket::before { position: absolute; top: 11%; bottom: 11%; left: 17%; border-left: 2px dashed currentColor; opacity: .42; content: ''; }
.reveal-ticket::after { position: absolute; top: 12%; left: 5%; width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.9); border-radius: 50%; content: ''; }
.reveal-ticket-cabin { left: 0; transform: translateY(-50%) rotate(-8deg); color: #15365d; background: linear-gradient(145deg, #eaf7ff, #a6c8e8); }
.reveal-cabin { max-width: 100%; font-family: var(--font-display); font-size: clamp(24px, 3.3vw, 42px); font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.reveal-number { display: flex; align-items: baseline; gap: 2px; color: #102b50; font-size: clamp(50px, 6.5vw, 86px); font-variant-numeric: tabular-nums; font-weight: 800; line-height: 1; white-space: nowrap; }
.reveal-number small { font-size: .45em; font-weight: 800; }
.reveal-prize { position: relative; z-index: 1; display: flex; width: 100%; min-width: 0; flex-direction: column; align-items: center; justify-content: center; }
.reveal-text { max-width: 100%; margin: 0; color: #102b50; font-family: var(--font-display); font-size: clamp(44px, 6vw, 76px); font-weight: 800; letter-spacing: .05em; line-height: 1.28; overflow-wrap: anywhere; -webkit-text-stroke: 1px #f7e3ba; paint-order: stroke fill; text-shadow: 1px 2px 0 #fff8e9, 3px 4px 0 #bc904d, 5px 7px 8px rgba(28,44,65,.32); text-wrap: balance; }
.reveal-text-long { font-size: clamp(32px, 4.5vw, 58px); }
.type-classic .reveal-cabin, .type-classic .reveal-number { font-family: 'Noto Serif SC', 'Songti SC', serif; font-weight: 800; -webkit-text-stroke: .6px #fff4dc; paint-order: stroke fill; text-shadow: 1px 2px 0 #fff, 2px 3px 2px rgba(32,54,80,.22); }
.type-soft .reveal-text { font-family: 'Songti SC', 'STSong', serif; font-weight: 700; letter-spacing: .1em; -webkit-text-stroke: 1.6px #e1ba79; text-shadow: 0 2px 0 #fff, 0 5px 11px rgba(26,43,71,.28); }
.type-soft .reveal-cabin, .type-soft .reveal-number { font-family: 'Songti SC', 'STSong', serif; font-weight: 700; letter-spacing: .1em; }
.type-modern .reveal-text { font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; font-weight: 900; letter-spacing: .02em; -webkit-text-stroke: 1px #d5aa65; text-shadow: 0 2px 0 #fff, 0 5px 9px rgba(26,43,71,.3); }
.type-modern .reveal-cabin, .type-modern .reveal-number { font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; font-weight: 800; letter-spacing: .02em; }
.reveal-dialog .button { min-height: 62px; margin-top: clamp(40px, 6.5vh, 62px); padding: 12px 62px; border: 2px solid #9c6b2f; border-radius: 999px; color: #fffaf1; background: linear-gradient(180deg, #f4d391, #b9823a); box-shadow: inset 0 2px 0 rgba(255,255,255,.78), 0 5px 0 #8f5f2d, 0 10px 18px rgba(115,74,27,.28); font-family: var(--font-display); font-size: clamp(21px, 2.5vw, 28px); font-weight: 800; letter-spacing: .13em; }
.reveal-dialog .button:hover:not(:disabled) { color: #fff; background: linear-gradient(180deg, #ffe4a9, #af752e); }
.reveal-ticket-lucky { right: 0; transform: translateY(-50%) rotate(8deg); color: #fff0d3; background: linear-gradient(145deg, #343b48, #171b24); box-shadow: 0 14px 26px rgba(15,21,31,.34), inset 0 0 0 2px rgba(237,214,174,.38); }
.lucky-label { font-family: var(--font-display); font-size: clamp(32px, 4vw, 52px); font-weight: 800; letter-spacing: .12em; line-height: 1.4; text-shadow: 0 2px 3px rgba(0,0,0,.32); }
.reveal-doll { right: -12%; bottom: -10%; height: 48%; }
.form-dialog { width: min(420px, calc(100vw - 32px)); padding: clamp(20px, 5vw, 30px); }
.dialog-heading, .popover-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { margin: 0; font-family: var(--font-display); font-size: 23px; }
.form-dialog form > label { display: grid; gap: 7px; margin-top: 19px; font-size: 13px; font-weight: 600; }
.form-dialog input:not([type=radio]), .form-dialog select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; }
.form-dialog fieldset { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 20px 0 0; padding: 0; border: 0; }
.form-dialog legend { margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.radio-label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.radio-label input { accent-color: var(--accent); }
.form-note { color: var(--muted); font-size: 12px; line-height: 1.6; }
.form-dialog form > .button { width: 100%; margin-top: 10px; }

.history-screen { display: flex; height: 100svh; height: 100dvh; min-height: 100svh; min-height: 100dvh; flex-direction: column; padding: max(18px, env(safe-area-inset-top)) clamp(16px, 4vw, 62px) max(18px, env(safe-area-inset-bottom)); }
.history-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding-bottom: 15px; }
.history-header h1 { margin: 16px 0 0; font-size: clamp(30px, 4vw, 48px); }
.history-header p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.history-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.history-toolbar { display: flex; justify-content: flex-start; padding: 8px 0 13px; }
.round-filter { display: inline-flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,252,251,.7); }
.filter-button { min-height: 34px; padding: 6px 16px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: 12px; }
.filter-button.active { color: #fff; background: var(--accent); }
.history-content { flex: 1; min-height: 180px; overflow: auto; padding: clamp(12px, 2vw, 22px); border: 1px solid rgba(255,255,255,.8); border-radius: 20px; background: rgba(255,252,251,.82); box-shadow: var(--shadow); }
.history-round + .history-round { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.history-round h2 { margin: 0 0 13px; font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.history-zone { margin-top: 16px; }
.history-zone h3 { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.record-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.record-row { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.6); font-size: 12px; }
.record-number { color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 700; }
.record-value { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.record-empty { color: #b7aab0; }
.history-doll { right: 2vw; bottom: 2vh; max-height: 26vh; }

.audio-popover { position: fixed; z-index: 30; right: max(18px, env(safe-area-inset-right)); bottom: max(72px, calc(env(safe-area-inset-bottom) + 64px)); width: min(290px, calc(100vw - 32px)); padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,252,251,.97); box-shadow: var(--shadow); }
.popover-heading { margin-bottom: 10px; }
.audio-row { display: flex; align-items: center; gap: 9px; }
.audio-row input { min-width: 0; flex: 1; accent-color: var(--accent); }
.audio-row output { width: 40px; color: var(--muted); font-size: 11px; text-align: right; }
.toggle-button { min-width: 42px; padding: 5px 10px; border: 0; border-radius: 999px; color: white; background: var(--accent); font-size: 12px; }
.toast { position: fixed; z-index: 60; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; max-width: calc(100vw - 32px); padding: 11px 18px; transform: translate(-50%, 16px); border-radius: 999px; color: #fff; background: #49353d; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (min-width: 1500px) { .number-board { gap: 12px; } }
@media (max-width: 760px) {
  .reveal-dialog { width: min(590px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); overflow-y: auto; }
  .reveal-content { min-height: 0; align-items: stretch; padding-top: 12px; }
  .reveal-panel { width: 100%; min-height: min(650px, calc(100dvh - 44px)); padding: 190px 20px 34px; border-radius: 30px; }
  .reveal-panel::before { top: 25%; }
  .reveal-plane { top: 27%; left: 45%; font-size: 35px; }
  .reveal-ticket { top: 36px; width: 42%; min-height: 135px; gap: 7px; padding: 13px 8px 13px 18px; }
  .reveal-ticket-cabin { left: 5%; transform: rotate(-6deg); }
  .reveal-ticket-lucky { right: 5%; transform: rotate(6deg); }
  .reveal-cabin { font-size: clamp(20px, 5vw, 28px); }
  .reveal-number { font-size: clamp(38px, 10vw, 60px); }
  .reveal-text { font-size: clamp(34px, 8vw, 56px); }
  .reveal-text-long { font-size: clamp(29px, 7vw, 42px); }
  .reveal-dialog .button { min-height: 48px; margin-top: 38px; padding: 9px 30px; font-size: 18px; }
  .lucky-label { font-size: clamp(22px, 6vw, 36px); }
}
@media (max-width: 900px) {
  .game-stage { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .zone-stack { min-height: 0; height: 100%; grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .action-dock { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .action-dock .button { padding: 9px 10px; text-align: center; }
  .action-dock #new-round, .action-dock #reset-game { text-align: center; }
  .game-doll { display: none; }
  .record-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .home-content { width: 88vw; }
  .home-screen { min-height: 100svh; }
  .home-content h1 { font-size: clamp(40px, 11vw, 66px); }
  .home-description { max-width: 290px; margin-inline: auto; line-height: 1.8; }
  .home-decoration { width: 100vw; }
  .home-doll { left: 2vw; bottom: 0; height: min(40vh, 340px); max-width: 38vw; }
  .home-content { text-align: right; padding-right: 8vw; }
  .game-screen { padding-inline: 10px; }
  .game-header { grid-template-columns: auto 1fr auto; min-height: 76px; gap: 6px; }
  .game-header > .button { min-height: 36px; padding: 7px 10px; font-size: 12px; }
  .game-heading h1 { font-size: clamp(17px, 5vw, 25px); }
  .game-tools { gap: 5px; }
  .game-tools .icon-button { width: 34px; font-size: 16px; }
  .action-dock { margin-bottom: 7px; }
  .zone-stack { gap: 8px; }
  .number-zone { padding: 9px; border-radius: 14px; }
  .zone-heading { margin-bottom: 7px; }
  .zone-heading h2 { font-size: clamp(18px, 5vw, 24px); }
  .zone-heading p, .zone-count { font-size: 10px; }
  .number-board { display: grid; width: 100%; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(0, 1fr)); gap: clamp(3px, 1vw, 6px); }
  .number-tile { font-size: clamp(22px, 6vw, 30px); }
  .zone-lower .number-tile { font-size: clamp(25px, 6.5vw, 34px); }
  .zone-lower .number-tile:disabled { font-size: clamp(22px, 6vw, 30px); }
  .action-dock { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .action-dock .button { min-height: 37px; padding: 6px 3px; border-radius: 10px; font-size: 10px; line-height: 1.2; }
  .history-screen { padding-inline: 12px; }
  .history-header { align-items: flex-start; flex-direction: column; }
  .history-header h1 { margin-top: 11px; }
  .history-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-actions .button { min-height: 36px; padding: 7px 9px; font-size: 11px; }
  .record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-row { padding: 7px; font-size: 11px; }
  .history-doll { display: none; }
}
@media (max-height: 700px) and (min-width: 621px) {
  .game-screen { padding-block: 8px; }
  .game-header { min-height: 64px; }
  .zone-stack { min-height: 0; }
  .number-zone { padding: 9px 12px; }
  .zone-heading { margin-bottom: 7px; }
  .action-dock { gap: 5px; }
  .action-dock .button { min-height: 34px; padding-block: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; } }

/* Keep the complete title in narrower computer windows, blending the same
   photograph into its extended background rather than exposing image edges. */
@media (max-aspect-ratio: 3/2) {
  .home-screen { background-image: none; }
  .home-screen::before { inset: -32px; background: var(--home-background-image) center / cover no-repeat; filter: blur(26px); }
  .home-visual { display: block; position: absolute; z-index: 0; top: 6vh; left: 0; width: 100%; height: auto; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 86%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 86%, transparent); }
  .home-decoration { display: none; }
  .home-doll { left: max(12px, calc(50% - 320px)); height: 44vh; max-width: 34vw; }
}
