/* Pato's Deal or No Deal (#/games/deal): js/views/deal.js. The stage, Pato, the ticket, the case, the phone and the prize picture are the layered rigs (js/dealrigs.js): every part is its own group (data-part) and moves
   around its local 0,0, the pivot the kit registered. Motions are short, state-driven and run once (a wing wave, the lid and clasps, the receiver lift, coins rising, curtains opening, bulbs brightening); under
   prefers-reduced-motion nothing moves and every state is still shown. Words, numbers, amounts and buttons are HTML on solid surfaces (cream cards), never part of a picture. Shared breakpoints only (820, 640, 480). */
.page.dl { --dl-paper: #EFE6D2; --dl-ink: #191814; --dl-lime: #C6F432; --dl-coral: #FF4B2B; --dl-forest: #1E3B2C; max-width: 1100px; }
.dl a:focus-visible, .dl button:focus-visible, .dl summary:focus-visible, .dl input:focus-visible { outline: 3px solid var(--dl-lime); outline-offset: 3px; }
.dl .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- the rigs: every named part is independently movable ---- */
.dr { display: block; width: 100%; height: auto; overflow: visible; pointer-events: none; }
.dr [data-part] { transform-origin: 0 0; transition: transform .6s ease, opacity .35s ease; }
.dr-briefcase.is-open [data-part=lid-front] { opacity: 0; transform: translateY(-100px); }
.dr-briefcase.is-open [data-part=lid-back] { opacity: 1; transform: translateY(-100px); }
.dr-briefcase.is-open [data-part=clasp-left] { transform: rotate(-45deg); }
.dr-briefcase.is-open [data-part=clasp-right] { transform: rotate(45deg); }
.dl-pato.wave [data-part=wing-right] { animation: dlWave .45s ease-in-out 1; }
.dl-pato.wave [data-part=wing-left] { animation: dlWave .45s ease-in-out .08s 1 reverse; }
.dl-ticket.has [data-part=medallion] { animation: dlPop .5s ease-out 1; }
.dl-phone.ring [data-part=receiver] { animation: dlPhone .45s ease-out both; }
.dl-prize [data-part^=coin], .dl-prize [data-part^=spark] { opacity: 0; }
.dl-prize.is-paid [data-part^=coin] { animation: dlRise .55s ease-out both; }
.dl-prize.is-paid [data-part=coin-center] { animation-delay: .08s; } .dl-prize.is-paid [data-part=coin-right] { animation-delay: .16s; }
.dl-prize.is-paid [data-part^=spark] { animation: dlTwinkle .6s ease-out .3s both; }
.dl-stage [data-part=curtain-left] { animation: dlCurtainL .9s ease-out both; } .dl-stage [data-part=curtain-right] { animation: dlCurtainR .9s ease-out both; }
.dl-stage [data-part^=bulb] { opacity: .55; }
.dl-stage.is-offer [data-part^=bulb] { opacity: 1; }
@keyframes dlWave { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-12deg); } }
@keyframes dlPop { 0% { transform: scale(.9) rotate(-4deg); } 100% { transform: scale(1) rotate(0deg); } }
@keyframes dlPhone { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(-75px) rotate(-7deg); } }
@keyframes dlRise { from { transform: translateY(90px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes dlTwinkle { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes dlCurtainL { from { transform: translateX(95px); } to { transform: translateX(0); } }
@keyframes dlCurtainR { from { transform: translateX(-95px); } to { transform: translateX(0); } }
.dl-prize.is-paid [data-part^=coin], .dl-prize.is-paid [data-part^=spark] { opacity: 1; }

/* ---- the page ---- */
.dl-stage { height: clamp(150px, 27vw, 300px);          /* (cropped from the top, so the three bulbs on each side stay in the picture) */
  overflow: hidden; border: 2px solid #0E0C0A; border-radius: 24px; background: #191B29; box-shadow: 5px 5px 0 var(--shadow-c); }
.dl-stage .dr { width: 100%; height: 100%; }
.dl-head { position: relative; max-width: 780px; margin: -34px auto 0; padding: 14px 22px 16px; text-align: center; border: 2px solid #0E0C0A; border-radius: 22px; background: #191814; color: var(--dl-paper); box-shadow: 4px 4px 0 var(--shadow-c); }
.dl-brand { margin: 0; font: 600 12px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dl-lime); }
.dl-head h1 { margin: 2px 0 4px; font-family: var(--f-display); font-size: clamp(30px, 5vw, 56px); font-weight: 800; letter-spacing: -.04em; line-height: 1.04; overflow-wrap: break-word; }
.dl-dates { margin: 0; font: 500 13px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.dl-chip { display: inline-block; margin: 8px 0 0; padding: 3px 12px; border: 2px solid var(--dl-lime); border-radius: 999px; color: var(--dl-lime); font: 700 12px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.dl-card { min-width: 0; margin-top: 18px; padding: 22px; border: 2px solid #0E0C0A; border-radius: 22px; background: var(--dl-paper); color: var(--dl-ink); box-shadow: 5px 5px 0 var(--shadow-c); }
.dl-card h2 { margin: 0 0 8px; font-family: var(--f-display); font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; }
.dl-card h3 { margin: 0 0 6px; font-size: 17px; }
.dl-card p { margin: 0 0 10px; line-height: 1.45; overflow-wrap: break-word; }
.dl-quiet { font-size: 14px; color: #5C5240; }
.dl-warn { padding: 8px 12px; border: 2px solid var(--dl-coral); border-radius: 10px; background: #FFE3DB; color: #7A1A06; font-weight: 600; }
.dl-link { display: inline-flex; align-items: center; min-height: 44px; margin-left: 14px; color: var(--dl-ink); font-weight: 700; }
.dl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.dl-actions .btn, .dl-go, .dl-card .btn { min-height: 48px; }
.dl-banner { padding: 10px 14px; border: 2px dashed var(--dl-ink); border-radius: 12px; background: #F5EEDC; font-weight: 600; }
.dl-skel i { display: block; height: 18px; margin: 14px 0; border-radius: 9px; background: rgba(25, 24, 20, .12); width: 70%; } .dl-skel i:first-child { width: 40%; }

/* ---- the hub: Pato, the tickets, the purchase, the challenges, the prizes, the rules ---- */
.dl-intro, .dl-inv, .dl-buy, .dl-result { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px; }
.dl-pato { display: block; width: 170px; } .dl-pato.small { width: 96px; }
.dl-ticket { display: block; width: 170px; } .dl-ticket.small { width: 130px; } .dl-ticket.tiny { width: 76px; }
.dl-ticket.none { opacity: .55; }
.dl-count { margin: 0 0 6px; font-size: 18px; } .dl-count b { font: 800 44px var(--f-display); letter-spacing: -.04em; line-height: 1; }
.dl-where { margin: 0 0 8px; padding-left: 18px; font-size: 14px; }
.dl-inv, .dl-buy { grid-template-columns: auto minmax(0, 1fr); }
.dl-acct { margin: 10px 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .dl-acct legend { padding: 0; margin-bottom: 6px; font: 600 12px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.dl-radio { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; border: 2px solid var(--dl-ink); border-radius: 14px; cursor: pointer; background: #F5EEDC; } .dl-radio.on { background: var(--dl-lime); }
.dl-radio input { width: 20px; height: 20px; accent-color: var(--dl-ink); } .dl-radio small { display: block; font-size: 13px; opacity: .85; }
.dl-qty { display: flex; align-items: center; gap: 12px; margin: 8px 0; } .dl-qty b { min-width: 32px; text-align: center; font: 800 28px var(--f-display); }
.dl-step { width: 48px; height: 48px; border: 2px solid var(--dl-ink); border-radius: 12px; background: #F5EEDC; color: var(--dl-ink); font: 800 24px var(--f-display); cursor: pointer; } .dl-step[aria-disabled=true] { opacity: .4; cursor: default; }
.dl-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; margin: 10px 0 12px; padding: 12px 14px; border: 2px solid var(--dl-ink); border-radius: 14px; background: #F5EEDC; }
.dl-sum div { display: flex; justify-content: space-between; gap: 8px; } .dl-sum dt { font-size: 14px; } .dl-sum dd { margin: 0; text-align: right; } .dl-sum .short { color: #A12A10; font-weight: 700; }
.dl-ch ul, .dl-hist ul, .dl-rules ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.dl-ch li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border: 2px solid var(--dl-ink); border-radius: 16px; background: #F5EEDC; } .dl-ch li.done { background: #E5EEBF; }
.dl-ch p { margin: 0 0 6px; font-size: 14px; } .dl-ch small { font-family: var(--f-mono); }
.dl-meter { height: 12px; margin: 4px 0; border: 2px solid var(--dl-ink); border-radius: 7px; overflow: hidden; background: #fff8; } .dl-meter i { display: block; height: 100%; background: var(--dl-coral); }
.dl-got { padding: 4px 12px; border: 2px solid var(--dl-ink); border-radius: 999px; background: var(--dl-lime); font-weight: 700; font-size: 14px; }
.dl-rules ul { list-style: disc; padding-left: 20px; gap: 8px; } .dl-rules li { line-height: 1.45; }
.dl-hist li { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px dashed #b9b09b; } .dl-hist li:last-child { border-bottom: 0; } .dl-hist small { color: #5C5240; }

/* ---- the ladder: all 26 amounts, with text and a mark (never colour alone) ---- */
.dl-ladder { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.dl-ladder li { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 10px; border: 2px solid var(--dl-ink); border-radius: 10px; background: var(--dl-lime); font-size: 15px; }
.dl-ladder li small { margin-left: auto; font: 600 11px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; opacity: .8; }
.dl-board .dl-ladder li small { display: none; }                  /* (in the narrow column beside the cases the state is the box, the cross, the dashed border and the line through the amount; the words are in each item's label and in the full list on The prizes) */
.dl-ladder li.eliminated { background: transparent; border-style: dashed; opacity: .6; } .dl-ladder li.eliminated b { text-decoration: line-through; }
.dl-mark { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border: 2px solid var(--dl-ink); border-radius: 5px; font: 800 12px var(--f-mono); line-height: 1; }
.dl-prizes .dl-ladder { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* ---- the case grid: one briefcase rig per case, 44px+ targets, numbers and amounts are HTML ---- */
.dl-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.dl-grid.is-waiting { opacity: .75; }
.dl-case { position: relative; container-type: inline-size; display: block; min-width: 0; min-height: 76px; padding: 0 0 22px; border: 2px solid rgba(25, 24, 20, .35); border-radius: 16px; background: #2A2530; color: var(--dl-paper); cursor: pointer; text-align: center; }
.dl-case:hover { border-color: var(--dl-ink); background: #35303D; }
.dl-case[aria-disabled=true] { cursor: default; }
.dl-case .dl-rig { display: block; padding: 6px 6px 0; } .dl-case .dr { width: 100%; }
.dl-num { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font: 800 24cqw var(--f-display); letter-spacing: -.04em; color: #191814; text-shadow: 0 1px 0 rgba(255, 255, 255, .45); pointer-events: none; transition: opacity .3s ease; }
.dl-case.is-opened .dl-num { opacity: 0; }
.dl-tag { position: absolute; left: 0; right: 0; bottom: 3px; padding: 0 4px; font: 700 clamp(11px, 13cqw, 15px) var(--f-mono); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-case.is-opened .dl-tag { color: var(--dl-lime); }
.dl-case.is-held { border-color: var(--dl-lime); box-shadow: 0 0 0 3px var(--dl-lime); background: #2F3A24; } .dl-case.is-held .dl-tag { color: var(--dl-lime); }
.dl-case.is-picked { border-color: var(--dl-lime); box-shadow: 0 0 0 3px var(--dl-lime); background: #2F3A24; }
.dl-confirm { margin-top: 14px; padding: 14px 16px; border: 2px dashed var(--dl-ink); border-radius: 14px; background: #F5EEDC; } .dl-confirm p { margin: 0 0 4px; }
.dl-status { margin: 0 0 8px; padding: 8px 12px; border: 2px solid var(--dl-ink); border-radius: 12px; background: #F5EEDC; font-weight: 700; } .dl-status:focus { outline: 3px solid var(--dl-lime); }

/* ---- the game board: cases beside the case you hold and the prize board ---- */
.dl-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 20px; align-items: start; }
.dl-main-col { min-width: 0; }
.dl-side { display: grid; gap: 14px; min-width: 0; }
.dl-yours { padding: 12px 14px; border: 2px solid var(--dl-ink); border-radius: 16px; background: #F5EEDC; text-align: center; } .dl-yours p { margin: 6px 0 0; font-size: 14px; }
.dl-yours-case { position: relative; container-type: inline-size; width: min(100%, 190px); margin: 0 auto; } .dl-yours .dl-num-big { font-size: 24cqw; }
.dl-ladder-box { border: 2px solid var(--dl-ink); border-radius: 16px; background: #F5EEDC; } .dl-ladder-box > summary { display: flex; align-items: center; min-height: 48px; padding: 0 14px; font-weight: 700; cursor: pointer; } .dl-ladder-box .dl-ladder { margin: 0; padding: 0 12px 12px; }
.dl-offer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; margin: 12px 0; padding: 14px 16px; border: 2px solid var(--dl-ink); border-radius: 18px; background: var(--dl-forest); color: var(--dl-paper); }
.dl-offer h3 { margin: 0; font: 600 13px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; } .dl-offer h3:focus { outline: 3px solid var(--dl-lime); outline-offset: 3px; }
.dl-offer .dl-quiet { color: rgba(239, 230, 210, .85); }
.dl-offer-amt { margin: 4px 0 6px; } .dl-offer-amt b { font: 800 clamp(36px, 6vw, 60px) var(--f-display); letter-spacing: -.04em; color: var(--dl-lime); line-height: 1; }
.dl-phone { width: 150px; }
.dl-final { grid-template-columns: auto minmax(0, 1fr); } .dl-final h3 { font: 800 24px var(--f-display); letter-spacing: -.03em; text-transform: none; }
.dl-result { grid-template-columns: auto minmax(0, 1fr) auto; }
.dl-prize { width: 190px; }
.dl-paid { padding: 6px 12px; border: 2px solid var(--dl-ink); border-radius: 10px; background: var(--dl-lime); font-weight: 700; display: inline-block; }
.dl-result-t h2:focus { outline: none; }

@media (max-width: 820px) {
  .dl-board { grid-template-columns: minmax(0, 1fr); }
  .dl-intro, .dl-result { grid-template-columns: auto minmax(0, 1fr); } .dl-intro .dl-pato.small, .dl-result .dl-pato.small { display: none; }
  .dl-offer { grid-template-columns: auto minmax(0, 1fr); } .dl-offer > .dl-pato { display: none; }
  .dl-pato { width: 120px; } .dl-ticket { width: 120px; } .dl-prize { width: 130px; } .dl-phone { width: 110px; }
}
@media (max-width: 640px) {
  .dl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .dl-card { padding: 16px; } .dl-head { margin-top: -26px; padding: 12px 16px 14px; }
  .dl-acct, .dl-sum { grid-template-columns: minmax(0, 1fr); }
  .dl-ch li { grid-template-columns: minmax(0, 1fr); } .dl-ch li .dl-ticket { display: none; }
  .dl-ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .dl-intro, .dl-result, .dl-inv, .dl-buy, .dl-offer, .dl-final { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .dl-pato, .dl-ticket, .dl-prize, .dl-phone { width: 110px; }
  .dl-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .dl *, .dr [data-part] { animation: none !important; transition: none !important; } .dl-stage [data-part^=bulb] { opacity: 1; } .dl-prize [data-part^=coin], .dl-prize [data-part^=spark] { opacity: 1; } }

/* ---- the card that opens the game, on Home and in the casino lobby (js/dealpromo.js) ---- */
#hm-deal:empty { display: none; }
.dl-strip { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 10px 20px; margin: 0 0 18px; padding: 10px 20px; border: 2px solid #0E0C0A; border-radius: 18px; background: #191B29; color: #F2EADB; box-shadow: 4px 4px 0 var(--shadow-c); }
.dl-strip-art { display: block; width: 84px; pointer-events: none; } .dl-strip-art .dr { width: 84px; height: auto; }
.dl-strip-t { min-width: 0; }
.dl-strip-k { font: 600 12px var(--f-mono); letter-spacing: .13em; text-transform: uppercase; color: #F2C230; }
.dl-strip h2 { margin: 2px 0 0; font-family: var(--f-display); font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; overflow-wrap: break-word; }
.dl-strip-t p { margin: 2px 0 0; font-size: 15px; line-height: 1.35; overflow-wrap: break-word; }
.dl-strip-go { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 2px solid #0E0C0A; border-radius: 6px; background: #F2C230; color: #191814; font: 700 16px var(--f-body); text-decoration: none; } .dl-strip-go svg { width: 18px; height: 18px; }
.dl-strip-go:focus-visible { outline: 3px solid #C6F432; outline-offset: 3px; }
@media (max-width: 640px) {
  .dl-strip { grid-template-columns: 64px minmax(0, 1fr); padding: 12px 16px; } .dl-strip-art, .dl-strip-art .dr { width: 64px; } .dl-strip-go { grid-column: 1 / -1; }
  .dl-strip h2 { font-size: clamp(24px, 7vw, 30px); }
}
