/*
 * Deal or No Deal v1.4.1 styles a compact generic-case board, unobstructed offer decisions, full-screen case reveals, and the closing result.
 * The finale keeps the win/loss comparison prominent while omitting the secondary stats row for a shorter layout.
 */
:root {
  --ink: #f9f5e9;
  --muted: #a6b3c9;
  --navy: #061124;
  --navy-2: #0a1c38;
  --panel: rgba(10, 27, 53, .88);
  --panel-solid: #0b1d39;
  --gold: #f2c35c;
  --gold-2: #ffec9b;
  --red: #e44949;
  --green: #3bd59b;
  --line: rgba(255,255,255,.12);
  --shadow: 0 22px 70px rgba(0,0,0,.48);
  --radius: 20px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; background: var(--navy); }
body { margin: 0; min-height: 100vh; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: radial-gradient(circle at 50% -10%, #183b70 0, #08162e 35%, #040b17 85%); overflow-x: hidden; }
button, select, input { font: inherit; }
button { color: inherit; }
button:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
[hidden] { display: none !important; }
.stage-glow { position: fixed; inset: 0; pointer-events: none; opacity: .28; background: linear-gradient(115deg, transparent 0 25%, rgba(244,194,84,.16) 25.3%, transparent 28%), linear-gradient(245deg, transparent 0 22%, rgba(244,194,84,.12) 22.3%, transparent 25%); }
.topbar, main { position: relative; z-index: 1; width: min(1500px, 100%); margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(16px,4vw,48px) 10px; gap: 16px; }
.brand-block { min-width: 0; }
.eyebrow, .step-label { display: block; margin: 0 0 4px; color: var(--gold); font-size: .68rem; font-weight: 900; letter-spacing: .18em; }
h1 { display: flex; align-items: center; gap: .25em; margin: 0; font-size: clamp(1.65rem,5vw,3.4rem); line-height: .88; letter-spacing: -.06em; }
h1 span:first-child { color: var(--gold-2); }
h1 em { font-family: Georgia, serif; font-size: .55em; font-weight: 400; color: #fff; letter-spacing: 0; }
h1 span:last-child { -webkit-text-stroke: 1px var(--gold); color: transparent; }
.promptbox-link { display: block; width: fit-content; margin: 7px 0 0; color: #b9c6db; font-size: .78rem; text-decoration: none; }
.promptbox-link:hover { color: #fff; }
.header-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.control-btn, .icon-btn, .text-btn { border: 0; cursor: pointer; }
.control-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 45px; padding: 0 17px; border-radius: 999px; font-weight: 900; letter-spacing: .02em; box-shadow: 0 8px 24px rgba(0,0,0,.22); }
.control-btn svg { width: 18px; fill: currentColor; }
.control-btn.primary { color: #1a1406; background: linear-gradient(135deg, #fff1a4, #d79c27); }
.control-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.icon-btn { display: grid; place-items: center; width: 45px; height: 45px; padding: 11px; border-radius: 50%; background: rgba(255,255,255,.09); border: 1px solid var(--line); }
.icon-btn svg { width: 100%; height: 100%; fill: currentColor; stroke: currentColor; stroke-width: 2; }
main { padding: 0 clamp(12px,3vw,36px) 55px; }
.hero { margin-top: 14px; overflow: hidden; border-radius: var(--radius); border: 1px solid rgba(255,227,145,.2); box-shadow: var(--shadow); }
.hero-art { position: relative; display: grid; grid-template-columns: repeat(4,1fr); min-height: clamp(190px,34vw,480px); overflow: hidden; background: #07162d; }
.hero-model { min-width: 0; background-size: cover; background-position: center 30%; border-right: 1px solid rgba(255,255,255,.08); }
.hero-model-1 { background-image: url("assets/model-01.jpg"); }
.hero-model-2 { background-image: url("assets/model-07.jpg"); }
.hero-model-3 { background-image: url("assets/model-18.jpg"); }
.hero-model-4 { background-image: url("assets/model-24.jpg"); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3,9,19,.92) 0, rgba(3,9,19,.25) 48%, rgba(3,9,19,.06)), linear-gradient(0deg, rgba(3,9,19,.92), transparent 50%); }
.hero-copy { position: absolute; left: clamp(18px,4vw,58px); bottom: clamp(17px,5vw,55px); width: min(520px,72%); text-shadow: 0 3px 15px #000; }
.hero-copy p { margin: 0 0 5px; color: var(--gold); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; }
.hero-copy strong { display: block; font-family: Georgia, serif; font-size: clamp(1.2rem,3.2vw,2.7rem); line-height: 1.05; }
.game-shell { display: grid; grid-template-columns: minmax(145px,210px) 1fr; gap: 12px; }
.money-board, .play-area { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.money-board { padding: 13px; }
.board-title { padding: 3px 0 10px; color: var(--gold); font-size: .68rem; letter-spacing: .14em; font-weight: 900; text-align: center; }
.money-list { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.money-value { padding: 5px 4px; border-radius: 6px; background: linear-gradient(180deg, #e6ba50, #a36d12); color: #130e05; text-align: center; font-size: .67rem; font-weight: 950; box-shadow: inset 0 1px rgba(255,255,255,.4); transition: .25s ease; }
.money-value.gone { color: #5f6877; background: rgba(255,255,255,.05); box-shadow: none; text-decoration: line-through; transform: scale(.95); }
.play-area { min-width: 0; padding: clamp(14px,2.5vw,26px); }
.instruction-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; }
.instruction-row h2 { margin: 0; font-size: clamp(1.05rem,2.3vw,1.5rem); }
.own-case { flex: 0 0 auto; padding: 8px 12px; border: 1px solid rgba(242,195,92,.38); border-radius: 10px; color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.own-case strong { color: var(--gold-2); font-size: 1.2rem; }
.case-grid { display: grid; grid-template-columns: repeat(7,minmax(68px,1fr)); gap: clamp(7px,1.2vw,12px); }
.case-card { position: relative; min-width: 0; aspect-ratio: 1.32; padding: 0; overflow: visible; border: 1px solid rgba(255,255,255,.14); border-radius: 11px; background: radial-gradient(circle at 50% 20%,#1b3e6d,#0a1830 72%); cursor: pointer; box-shadow: 0 8px 18px rgba(0,0,0,.25); transition: transform .16s ease, border-color .16s ease, opacity .25s ease; }
.case-card:hover:not(:disabled) { transform: translateY(-4px); border-color: var(--gold); }
.case-card:disabled { cursor: default; }
.mini-case { position: absolute; left: 50%; bottom: 12%; width: 78%; height: 58%; transform: translateX(-50%); border: 2px solid #e7e9ea; border-radius: 5px; background: linear-gradient(145deg,#f2f3f3,#9ca2a6 55%,#e7e9ea); box-shadow: inset 0 0 0 2px rgba(34,42,50,.22), 0 5px 10px #0008; }
.mini-case::before { content: ""; position: absolute; left: 33%; top: -24%; width: 34%; height: 25%; border: 2px solid #d5d7d8; border-bottom: 0; border-radius: 4px 4px 0 0; }
.mini-case::after { content: ""; position: absolute; inset: 8% 5%; border: 1px solid rgba(41,49,56,.4); border-radius: 2px; pointer-events: none; }
.case-no { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); display: grid; place-items: center; min-width: 38px; height: 25px; padding: 0 5px; color: #0c1523; background: linear-gradient(#fff2a2,#dba02d); border-radius: 3px; font-size: clamp(.75rem,1.5vw,1rem); font-weight: 950; box-shadow: 0 2px 4px #0006; }
.case-card.owned { border: 3px solid var(--gold-2); box-shadow: 0 0 0 3px rgba(242,195,92,.16), 0 0 30px rgba(242,195,92,.35); }
.case-card.owned::after { content: "YOUR CASE"; position: absolute; left: 50%; top: 5px; transform: translateX(-50%); z-index: 2; white-space: nowrap; color: #10131a; background: var(--gold-2); padding: 3px 6px; border-radius: 99px; font-size: .48rem; font-weight: 950; }
.case-card.opened { opacity: .13; transform: scale(.88); filter: grayscale(1); }
.scrim { position: fixed; z-index: 20; inset: 0; background: rgba(2,7,16,.77); backdrop-filter: blur(8px); }
.settings-panel { position: fixed; z-index: 35; top: 0; right: 0; width: min(420px,92vw); height: 100dvh; padding: 25px; overflow-y: auto; background: #091a34; border-left: 1px solid var(--line); box-shadow: -24px 0 70px #0009; transform: translateX(105%); transition: transform .25s ease; }
.settings-panel.open { transform: none; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.panel-heading h2 { margin: 0; font-size: 1.8rem; }
.close-btn { background: rgba(255,255,255,.07); }
.close-btn svg { fill: none; }
.setting-row, .select-setting { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.setting-row span, .select-setting span { min-width: 0; }
.setting-row strong, .select-setting strong { display: block; }
.setting-row small, .select-setting small { display: block; margin-top: 3px; color: var(--muted); }
.setting-row input { position: absolute; opacity: 0; }
.setting-row i { position: relative; width: 48px; height: 27px; flex: 0 0 auto; border-radius: 99px; background: #34445d; transition: .2s; }
.setting-row i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: .2s; }
.setting-row input:checked + i { background: var(--green); }
.setting-row input:checked + i::after { transform: translateX(21px); }
.select-setting select { max-width: 130px; padding: 9px 10px; color: #fff; background: #102747; border: 1px solid var(--line); border-radius: 9px; }
details { margin: 18px 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
summary { color: #fff; font-weight: 800; cursor: pointer; }
details p { margin-bottom: 2px; line-height: 1.5; }
.text-btn { padding: 8px 0; background: none; color: var(--muted); text-decoration: underline; }
.text-btn.danger:hover { color: #ff8585; }
.version { margin-top: 30px; color: #77869e; font-size: .72rem; }
.modal { position: fixed; z-index: 30; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(520px,92vw); overflow: hidden; border: 1px solid rgba(255,229,145,.3); border-radius: 24px; background: var(--panel-solid); box-shadow: 0 30px 100px #000c; text-align: center; }
.reveal-modal { inset: 0; left: 0; top: 0; transform: none; display: flex; flex-direction: column; justify-content: center; width: 100vw; height: 100dvh; border: 0; border-radius: 0; background: radial-gradient(circle at 50% 38%,#173864,#030914 72%); cursor: pointer; }
.reveal-art { position: relative; flex: 0 1 auto; width: min(100vw,70vh); aspect-ratio: 3 / 4; margin: auto auto 0; background-size: cover; background-position: center 25%; background-repeat: no-repeat; }
.case-number-ribbon { position: absolute; top: 18px; left: 18px; padding: 7px 12px; border-radius: 99px; color: #171007; background: var(--gold-2); font-size: .65rem; font-weight: 900; letter-spacing: .09em; }
.prize-overlay { position: absolute; top: 40%; left: 50%; transform: translate(-50%,-50%) rotate(-1deg); width: 55%; color: var(--gold-2); font-size: clamp(1.35rem,6vw,2.6rem); font-weight: 950; text-shadow: 0 3px 8px #000, 0 0 20px #000; }
.reveal-copy { width: 100%; margin: 0 auto auto; padding: 11px 18px 16px; background: linear-gradient(180deg,rgba(6,17,36,.1),#061124); }
.reveal-copy h2 { margin: 0; font-size: 1.1rem; }
.reveal-copy p { margin: 7px 0 0; color: var(--muted); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.banker-modal { left: auto; right: clamp(12px,3vw,36px); top: clamp(88px,13vh,140px); transform: none; width: min(520px,calc(100vw - 260px)); max-height: calc(100dvh - clamp(100px,16vh,165px)); padding: 30px clamp(20px,5vw,44px); overflow-y: auto; }
.modal-x { position: absolute; top: 12px; right: 12px; }
.phone-ring { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 18px; border: 2px solid var(--gold); border-radius: 50%; background: rgba(242,195,92,.1); animation: ring 1.15s ease-in-out infinite; }
.phone-ring svg { width: 30px; fill: var(--gold-2); }
.banker-modal h2 { margin: 4px 0 13px; font-family: Georgia,serif; font-size: clamp(1.55rem,6vw,2.4rem); }
.banker-modal p { color: var(--muted); line-height: 1.55; }
.spinner { width: 38px; height: 38px; margin: 20px auto; border: 4px solid rgba(255,255,255,.14); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
.offer-value { margin: 15px 0 8px; color: var(--gold-2); font-size: clamp(2.6rem,10vw,4.8rem); font-weight: 950; letter-spacing: -.055em; }
.offer-history { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.11); }
.offer-history-title { display: block; margin-bottom: 8px; color: var(--muted); font-size: .68rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.offer-history-list { display: flex; flex-wrap: wrap; gap: 7px; }
.offer-history-item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid rgba(242,195,92,.2); border-radius: 999px; background: rgba(242,195,92,.08); white-space: nowrap; }
.offer-history-item small { color: var(--muted); font-size: .62rem; font-weight: 850; }
.offer-history-item strong { color: var(--gold-2); font-size: .78rem; }
.deal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 25px; }
.deal-btn { min-height: 75px; border: 0; border-radius: 14px; cursor: pointer; box-shadow: 0 8px 25px #0005; }
.deal-btn span, .deal-btn small { display: block; }
.deal-btn span { font-size: 1.25rem; font-weight: 950; }
.deal-btn small { margin-top: 2px; opacity: .75; }
.deal-btn.yes { color: #082019; background: linear-gradient(135deg,#75f0c1,#24a774); }
.deal-btn.no { color: #250707; background: linear-gradient(135deg,#ff9999,#d54242); }
.final-choice-modal { padding: 30px; }
.final-choice-modal h2 { margin: 5px 0; font-family: Georgia,serif; font-size: 2rem; }
.final-choice-modal > p { color: var(--muted); }
.final-cases { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.final-case-btn { padding: 20px 10px; border: 1px solid var(--line); border-radius: 15px; color: #fff; background: #102849; cursor: pointer; }
.final-case-btn strong { display: block; margin-top: 5px; color: var(--gold-2); font-size: 2rem; }
.ending { position: fixed; z-index: 40; inset: 0; display: grid; grid-template-columns: minmax(300px,1fr) minmax(360px,1fr); background: #061124; }
.ending-art { position: relative; min-height: 44vh; background-size: cover; background-position: center 25%; background-repeat: no-repeat; }
.ending-prize { position: absolute; top: 40%; left: 50%; transform: translate(-50%,-50%); width: 52%; color: var(--gold-2); text-align: center; font-size: clamp(1.6rem,4vw,3rem); font-weight: 950; text-shadow: 0 3px 10px #000; }
.ending-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px,7vw,95px); background: radial-gradient(circle at 0 50%,#183864,#071327 60%); }
.ending-outcome { width: fit-content; margin-bottom: 18px; padding: 10px 18px; border: 2px solid currentColor; border-radius: 999px; font-size: clamp(1rem,2.2vw,1.45rem); font-weight: 950; letter-spacing: .15em; box-shadow: 0 0 28px rgba(59,213,155,.25); }
.ending-win .ending-outcome { color: #78f3c5; background: rgba(25,139,99,.22); }
.ending-loss .ending-outcome { color: #ff9696; background: rgba(185,50,50,.22); box-shadow: 0 0 28px rgba(228,73,73,.25); }
.ending-loss .ending-copy { background: radial-gradient(circle at 0 50%,#54233a,#071327 62%); }
.ending-loss .ending-prize { color: #ffd0d0; }
.ending-copy h2 { margin: 4px 0 10px; font-family: Georgia,serif; font-size: clamp(2.5rem,6vw,5.5rem); line-height: .95; }
.ending-copy > p { max-width: 600px; color: var(--muted); font-size: 1.05rem; line-height: 1.55; }
.ending-copy .ending-comparison { margin: 4px 0 0; color: #fff; font-size: clamp(1.05rem,2vw,1.35rem); font-weight: 850; }
.control-btn.large { width: fit-content; min-height: 54px; margin-top: 20px; padding: 0 26px; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: max(20px,env(safe-area-inset-bottom)); transform: translate(-50%,30px); max-width: min(430px,90vw); padding: 11px 16px; border: 1px solid var(--line); border-radius: 99px; color: #fff; background: #132b4e; box-shadow: 0 12px 40px #0009; opacity: 0; pointer-events: none; transition: .22s; text-align: center; font-size: .82rem; }
.toast.show { transform: translate(-50%,0); opacity: 1; }
.confetti { position: fixed; z-index: 55; top: -20px; width: 9px; height: 16px; border-radius: 2px; animation: fall var(--duration) linear forwards; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ring { 0%,100% { transform: rotate(0) scale(1); } 20% { transform: rotate(-10deg) scale(1.04); } 40% { transform: rotate(10deg) scale(1.04); } 60% { transform: rotate(-5deg); } }
@keyframes fall { to { transform: translate3d(var(--drift),110vh,0) rotate(850deg); } }
@media (max-width: 900px) {
  .case-grid { grid-template-columns: repeat(5,1fr); }
  .ending { grid-template-columns: 1fr; overflow-y: auto; }
  .ending-art { min-height: 54vh; }
  .ending-copy { min-height: 46vh; }
}
@media (max-width: 620px) {
  .topbar { align-items: flex-start; padding: 8px 7px 6px; }
  .eyebrow { font-size: .52rem; }
  .promptbox-link { margin-top: 3px; font-size: .64rem; }
  .control-btn { min-height: 36px; padding: 0 10px; font-size: .7rem; }
  .icon-btn { width: 36px; height: 36px; padding: 9px; }
  main { padding: 0 6px 24px; }
  .hero-art { min-height: 205px; }
  .hero-model { background-position: center 22%; }
  .hero-copy { width: 65%; }
  .game-shell { grid-template-columns: 88px minmax(0,1fr); gap: 5px; height: calc(100dvh - 73px); min-height: 515px; max-height: 670px; overflow: hidden; }
  .money-board, .play-area { border-radius: 12px; }
  .money-board { display: flex; flex-direction: column; padding: 5px 4px; }
  .board-title { padding: 2px 0 5px; font-size: .48rem; letter-spacing: .09em; }
  .money-list { flex: 1; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(13,1fr); gap: 2px; min-height: 0; }
  .money-value { display: grid; place-items: center; min-height: 0; padding: 1px; border-radius: 4px; font-size: .47rem; line-height: 1; }
  .play-area { display: flex; flex-direction: column; padding: 7px; }
  .instruction-row { align-items: flex-start; gap: 5px; margin-bottom: 6px; }
  .instruction-row .step-label { font-size: .5rem; }
  .instruction-row h2 { font-size: clamp(.76rem,3.3vw,.95rem); line-height: 1.08; }
  .own-case { padding: 4px 5px; border-radius: 6px; font-size: .45rem; }
  .own-case strong { font-size: .82rem; }
  .case-grid { flex: 1; grid-template-columns: repeat(4,1fr); grid-template-rows: repeat(7,1fr); gap: 4px; min-height: 0; }
  .case-card { min-height: 0; aspect-ratio: auto; border-radius: 7px; }
  .mini-case { width: 82%; height: 55%; border-width: 1px; }
  .mini-case::before { border-width: 1px; }
  .case-no { min-width: 26px; height: 18px; padding: 0 3px; font-size: .68rem; }
  .case-card.owned { border-width: 2px; box-shadow: 0 0 0 1px rgba(242,195,92,.18), 0 0 14px rgba(242,195,92,.32); }
  .case-card.owned::after { top: 2px; padding: 2px 4px; font-size: .38rem; }
  .settings-panel { padding: 20px; }
  .banker-modal { inset: 73px 6px 6px 99px; width: auto; max-height: none; padding: 14px 12px; border-radius: 14px; }
  .banker-modal .phone-ring { width: 46px; height: 46px; margin-bottom: 8px; }
  .banker-modal .phone-ring svg { width: 22px; }
  .banker-modal h2 { margin: 2px 0 6px; font-size: clamp(1.25rem,6vw,1.7rem); }
  .banker-modal p { margin: 7px 0; font-size: .76rem; line-height: 1.35; }
  .banker-modal .spinner { margin: 14px auto; }
  .banker-modal .offer-value { margin: 6px 0 2px; font-size: clamp(2rem,11vw,3.3rem); }
  .banker-modal .offer-history { margin-top: 8px; padding-top: 8px; }
  .banker-modal .offer-history-title { margin-bottom: 5px; font-size: .58rem; }
  .banker-modal .offer-history-list { gap: 5px; }
  .banker-modal .offer-history-item { gap: 4px; padding: 4px 7px; }
  .banker-modal .offer-history-item small { font-size: .55rem; }
  .banker-modal .offer-history-item strong { font-size: .68rem; }
  .banker-modal .deal-actions { gap: 7px; margin-top: 12px; }
  .banker-modal .deal-btn { min-height: 58px; border-radius: 10px; }
  .banker-modal .deal-btn span { font-size: 1rem; }
  .banker-modal .deal-btn small { font-size: .62rem; }
}
@media (max-width: 390px) {
  .header-actions { gap: 5px; }
  .control-btn svg { display: none; }
  h1 { font-size: 1.45rem; }
  .hero-art { min-height: 180px; }
  .game-shell { grid-template-columns: 82px minmax(0,1fr); }
  .banker-modal { left: 93px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body.motion-off *, body.motion-off *::before, body.motion-off *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
