/* Fridge Heist, the live page: additions to the approved design system (fh.css) for real buttons, states and layers. */
html, body { background: var(--plum2); overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; text-align: inherit; }
a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 10px; }
[data-a] { cursor: pointer; }

/* loading */
#boot { position: fixed; inset: 0; z-index: 60; background: var(--plum2); }
.bootst { background-image: url(../assets/renders/phone_idle.jpg); }
@media (min-width: 700px) { .bootst { background-image: url(../assets/renders/tablet_idle.jpg); } }
@media (min-width: 1100px) { .bootst { background-image: url(../assets/renders/desktop_wide.jpg); } }
.bootc { position: fixed; inset: 0; display: grid; place-items: center; z-index: 8; text-align: center; }
.bootbar { width: 190px; height: 6px; border-radius: 3px; background: rgba(255, 246, 234, .16); margin: 22px auto 12px; overflow: hidden; }
.bootbar i { display: block; width: 40%; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--pink), var(--gold)); animation: fhload 1.1s ease-in-out infinite alternate; }
@keyframes fhload { from { transform: translateX(-60%); } to { transform: translateX(210%); } }
.bt { font: 600 15px Geist; color: var(--dim); }
.bootf { position: fixed; left: 0; right: 0; bottom: 12px; z-index: 8; }
.nojs { position: fixed; inset: 0; display: grid; place-items: center; font: 600 16px Geist; }

/* buttons made from the design's pieces */
.pk { position: relative; width: 100%; }
.pk.off, .pk[disabled] { opacity: .38; cursor: default; }
.pk.over span { color: #ffb3c0; }
.pk.over:not(.on) { opacity: .62; }
.btn.overb { color: #ffc2cc; border-color: rgba(255, 120, 140, .5); }
.overt { color: #ffb3c0 !important; }
.limline { margin: 8px 2px 2px; text-align: center; font: 500 13px/1.35 Geist; color: var(--dim); }
.limline a { color: var(--gold); font-weight: 700; text-decoration: none; }
.buy { width: 100%; text-align: left; }
.buy[disabled] { opacity: .45; cursor: default; }
button.check { width: 100%; text-align: left; }
button.kv { width: 100%; color: var(--ink); }
.links a { cursor: pointer; }
.seg span { cursor: pointer; }
.seg span.pend { border-style: dashed; border-color: rgba(255, 201, 77, .6); }
.spoon { cursor: pointer; }
button.help { width: 100%; }
.waitb { pointer-events: none; }
.spin { animation: fhspin .8s linear infinite; }
@keyframes fhspin { to { transform: rotate(360deg); } }
.free { font-style: normal; font: 800 10px/1 Bricolage; color: #2a1206; background: #4fd18b; border-radius: 6px; padding: 3px 6px; }
.chip .free { margin-right: 2px; }
.chip img { width: 16px; height: 16px; }
.wallets { display: grid; gap: 8px; margin-top: 14px; }
.wbtn { display: flex; align-items: center; gap: 12px; width: 100%; height: 56px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line2); background: rgba(255, 246, 234, .05); font: 700 16px Geist; }
.wbtn .ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 246, 234, .1); font: 800 15px Bricolage; object-fit: contain; }
.steps { margin: 12px 0 14px 22px; display: grid; gap: 6px; font: 500 14.5px/1.4 Geist; color: var(--dim); }
.steps b { color: var(--ink); }

/* sheets scroll when long; on tablet and desktop they sit in a centred column */
.sheet { max-height: calc(100% - 84px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet.summ { max-height: calc(100% - 58px); padding-top: 14px; }
.rows .rw { width: 100%; text-align: left; color: var(--ink); }
.rw .tw1 i.on { border-color: var(--gold); color: var(--gold); background: rgba(255, 201, 77, .12); }
.rw .n img { width: 16px; height: 16px; vertical-align: -2px; }

/* the ticker swaps with a short fade */
#ticker .feed { transition: opacity .22s; }
#ticker.swap .feed { opacity: 0; }

/* toasts stay above everything, the reveal included, in one column whose place follows the screen (placeToast) */
#toastL .toasts { position: fixed; left: var(--pad); right: var(--pad); z-index: 70; display: grid; gap: 8px; pointer-events: none; transition: top .2s; }
#toastL .toast { z-index: 70; pointer-events: none; }
#toastL .toasts .toast { position: static; }
.toast.warn { background: #3a1420; border-color: rgba(255, 120, 140, .55); }
.toast.undo { background: #2b1428; border-color: rgba(255, 201, 77, .55); padding-top: 6px; padding-bottom: 6px; }
.toast.undo svg { color: var(--gold); }
.toast .tmsg { display: block; font: 500 13px/1.3 Geist; color: var(--dim); margin-top: 2px; }
.toast .tmsg.warn { color: #ffb4c0; }
.undob { pointer-events: auto; margin-left: auto; flex: none; min-height: 44px; padding: 0 18px; border-radius: 12px; font: 800 15px Bricolage; color: var(--gold); border: 1px solid rgba(255, 201, 77, .55); background: rgba(255, 201, 77, .12); }
.toast.warn svg { color: #ffb4c0; }

/* the reveal: full screen on a phone, a phone-shaped frame on wider screens (the transform makes it the frame for its fixed pieces) */
#rv { position: fixed; top: 0; z-index: 40; display: none; overflow: hidden; transform: translateZ(0); background: var(--plum2); touch-action: none; }
#rv.on { display: block; }
#rvback { position: fixed; inset: 0; z-index: 39; display: none; background: rgba(10, 2, 9, .86); backdrop-filter: blur(6px); }
#rvback.on { display: block; }
.rv-scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--plum2); }
.rv-scene .stage { will-change: opacity, transform; }
.lay { position: fixed; inset: 0; pointer-events: none; }
.rv-tint { position: fixed; inset: 0; mix-blend-mode: color; pointer-events: none; opacity: 0; }
.prize { position: relative; }
.prize .val b { font-variant-numeric: tabular-nums; display: inline-block; transform-origin: 0 80%; }
.glint { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.glint i { position: absolute; top: -30%; bottom: -30%; left: 0; width: 42%; background: linear-gradient(100deg, transparent 10%, rgba(255, 246, 220, .38) 50%, transparent 90%); transform: translateX(-180%) skewX(-14deg); }
#rv .char, #rv .bubble { will-change: transform, opacity; }
#rv .bubble.bl { transform-origin: 26px 100%; }

/* "Your pulls" and the numbers */
.side.pulls { left: var(--pad); right: var(--pad); top: 66px; bottom: 0; overflow-y: auto; padding-bottom: 28px; }
.plist button.pr { width: 100%; text-align: left; color: var(--ink); }
.okc.dim { color: var(--dim) !important; }
.okc.bad { color: #ff9aa8 !important; }
.nums { display: grid; gap: 7px; margin: 8px 0 4px; }
.nums div { display: grid; gap: 2px; }
.nums span { font: 500 12px Geist; color: var(--dim); }
.nums code { font: 500 12px/1.35 ui-monospace, Menlo, monospace; word-break: break-all; color: var(--ink); }
.pdet .ticks li svg { flex: none; }

@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; width: 560px; transform: translateX(-50%); }
  #toastL .toasts { left: 50%; right: auto; width: 520px; transform: translateX(-50%); }
  .side.pulls { left: 50%; right: auto; width: 560px; transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) { .bootbar i, .spin { animation-duration: 2.4s; } #ticker .feed { transition: none; } }

/* review 1 fixes (23 Nov) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.sheet:focus, #rv:focus { outline: none; }
/* the sound button and the wallet pill keep their size; the safe areas of notched phones are kept clear */
.iconbtn, .top .pill { flex: none; }
.top { height: calc(62px + env(safe-area-inset-top, 0px)); padding-top: calc(9px + env(safe-area-inset-top, 0px)); padding-left: max(var(--pad), env(safe-area-inset-left, 0px)); padding-right: max(var(--pad), env(safe-area-inset-right, 0px)); }
.feed { top: calc(66px + env(safe-area-inset-top, 0px)); }
.dock { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
.sheet { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
/* the reveal keeps room under its card for the footer line, as the approved preview does */
#rv .rv-dockp { padding-bottom: calc(35px + env(safe-area-inset-bottom, 0px)); }
#rv .rv-dockp.rm { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
#rv .rv-foot, #rv .rv-foot2 { position: fixed; left: 0; right: 0; z-index: 7; margin: 0; padding: 0 8px; }
#rv .rv-foot { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
#rv .rv-foot2 { bottom: calc(33px + env(safe-area-inset-bottom, 0px)); }
#rv .bubble.l { transform-origin: 0 22px; }
.rv-noswap { font: 500 13px/1.35 Geist; color: var(--dim); text-align: center; margin-top: 8px; text-wrap: balance; }
/* tap targets: 44 px at least */
.help { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 6px; }
.limline a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; vertical-align: middle; }
.kv a, .item .act a.ext { min-height: 44px; }
.item .act a.ext { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; color: var(--gold); font: 600 13.5px Geist; text-decoration: none; white-space: nowrap; }
/* small pink buttons: a darker pink keeps white text at 4.5:1 or better */
.btn.pink.sm { background: linear-gradient(180deg, #c93478, #b0225f); }
/* sheets with totals and a main button keep them pinned at the bottom while the list scrolls */
.sheet.haspin { padding-bottom: 0; }
.sheet .pin { position: sticky; bottom: 0; z-index: 3; margin: 8px calc(-1 * var(--pad)) 0; padding: 8px var(--pad) calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--panel); border-top: 1px solid var(--line); }
.sheet .pin > .kv:first-child { border-top: 0; min-height: 40px; }
.sheet .pin > .note:first-child { margin: 2px 0 0; }
.sheet .pin .foot { margin-top: 8px; }
.rw[aria-disabled="true"] { cursor: default; }
.rw .tw1 i.off { color: var(--dim); border-style: dashed; }
/* prizes on their way, in the stash */
.shd { margin-top: 16px; padding-bottom: 6px; font: 700 13px Geist; color: var(--dim); }
.item.sentrow { grid-template-columns: 46px minmax(0, 1fr) auto; }
.item.sentrow .act { justify-items: end; }
.sent.wait { color: var(--dim); }
/* 320 px wide: nothing runs off the side */
.bline { line-height: 1.25; }
@media (max-width: 359px) {
  .top { gap: 6px; }
  .mark { font-size: 18px; }
  .top .pill { padding: 0 10px 0 9px; gap: 6px; font-size: 13px; }
  .bline { white-space: normal; height: auto; min-height: 30px; }
  .bline .wk { display: none; }
  .links { grid-template-columns: 1.1fr 1.1fr .8fr; }
  .links a { font-size: 13px; white-space: nowrap; gap: 4px; }
  .rw { grid-template-columns: 32px minmax(0, 1fr) auto 104px; gap: 6px; padding: 0 4px; }
  .rw > img { width: 32px !important; height: 32px !important; }
  .rw .n { font-size: 13px; }
  .rw .tw1 i { font-size: 11px; padding: 0 4px; }
  .item { grid-template-columns: 46px minmax(0, 1fr) 112px; gap: 10px; }
  .item .th img { width: 46px !important; height: 46px !important; }
  .item .mini { font-size: 12.5px; }
  .foot { font-size: 12px; }
}
/* short phones (iPhone SE and smaller): a more compact prize card leaves the Wife room above it */
@media (max-height: 620px) {
  #rv .prize { padding: 12px 14px; }
  #rv .prize .tier { font-size: 28px !important; }
  #rv .prize .val { margin-top: 4px; }
  #rv .prize .val b { font-size: 40px; }
  #rv .prize.big .val b { font-size: 46px; }
  #rv .prize .paid { margin-top: 8px; padding: 6px 10px; }
  #rv .prize > .btn.pink { height: 50px; margin-top: 10px !important; }
}
.okv.dim { color: var(--dim); }
/* review 2 fixes (24 Nov) */
/* disarmed for 1 s after a sheet or the reveal closes: the card fades back in, and its spend buttons don't answer yet */
#dock.arming .card, #dock.arming .notice { animation: fhArm 1s ease-out both; animation-delay: var(--armd, 0ms); }
@keyframes fhArm { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #dock.arming .card, #dock.arming .notice { animation: none; opacity: .75; } }
[aria-disabled="true"] { cursor: default; }
.seg + .seg { margin-top: 6px; }
/* a sealed pull says until when */
.plist .okc.sealed { align-items: flex-start; }
.okc.sealed > span { display: flex; flex-direction: column; line-height: 1.15; }
.okc.sealed small { font: 500 11px Geist; color: var(--faint); white-space: nowrap; }
.mini[disabled] { opacity: .6; cursor: default; }
/* a $WCM swap button: the verb on top, its amount (short, exact) below, so long coin amounts fit the small buttons */
.sw2 { flex-direction: column; gap: 2px; line-height: 1.05; }
.sw2 small { font: 700 11.5px/1.1 Geist; opacity: .85; white-space: nowrap; letter-spacing: 0; }
.sealline { margin-top: 6px; color: var(--gold); }
/* review 3 fixes (24 Nov) */
/* the stop-for-good refund: the total once; a clock (not a tick) on what still waits */
.reftotal { margin-top: 12px; font: 500 15px/1.35 Geist; }
.reftotal b { color: var(--gold); font-weight: 700; }
.ticks.refl li.wait svg { color: var(--dim); }
.ticks.refl li.wait { color: var(--dim); }
.refwait { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font: 500 13.5px/1.35 Geist; color: var(--dim); }
.refwait svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
/* 320 wide: the Sound and Less motion switches stack, so neither runs off the screen */
@media (max-width: 359px) { .sheet .row2.sw { grid-template-columns: 1fr; } }
/* round 4: refunds from the kitchen's state */
.refwait.go svg { color: #6fe0a0; }
.refwait a.ext { display: inline-flex; align-items: center; min-height: 44px; margin-left: 4px; color: var(--gold); font-weight: 600; text-decoration: none; white-space: nowrap; }
/* ux fix 4 (24 Nov) */
/* a $WCM sell-back control: "Swap", the exact $WCM, and what it is worth today in CRO, three short lines that fit a 44 px button */
.sw2 { gap: 1px; }
.sw2 > span { font-size: 13.5px; line-height: 1.05; }
.sw2 small.wc, .sw3 small.wc { font: 600 11px/1.1 Geist; opacity: .86; letter-spacing: 0; white-space: nowrap; }
.rw .tw1 i.sw3 { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1.05; padding: 0 4px; }
.rw .tw1 i.sw3 > span { font-size: 12px; }
.rw .tw1 i.sw3 small { font: 700 11px/1.1 Geist; white-space: nowrap; }
.rw .tw1 i.sw3 small.wc { font-size: 11px; }
/* round 3: no money figure under 11 px; on the narrowest phones a summary chip drops the word "today", never the amount */
@media (max-width: 359px) { .rw .tw1 i.sw3 > span { font-size: 11px; } .rw .tw1 i.sw3 small { font-size: 11px; } .rw .tw1 i.sw3 small.wc { font-size: 11px; } .rw .tw1 i.sw3 .td { display: none; } }
/* the sell-back rule under the stash and in What's inside */
.note.swaprule { text-wrap: balance; }
/* the day's limit in view: under Open on the fridge, and under "Open again" on the card */
.limq { margin: 7px 2px 0; text-align: center; font: 500 12.5px/1.3 Geist; color: var(--dim); }
.rv-lim { margin-top: 7px; text-align: center; font: 500 12.5px/1.3 Geist; color: var(--dim); }
/* a bought pack can wait: a quiet "Later" under the closed container's buttons */
.rv-later { display: block; width: 100%; min-height: 44px; margin-top: 4px; text-align: center; font: 600 14px Geist; color: var(--dim); border-radius: 12px; }
@media (max-height: 620px) { .rv-later { margin-top: 2px; } }
/* Keep: the prize flies into "Your stash", whose count bounces once */
.flyer { position: fixed; left: 0; top: 0; z-index: 66; width: 56px; height: 56px; object-fit: contain; pointer-events: none; will-change: transform, opacity; }
.links .n.bump { animation: fhBump .34s ease-out; }
@keyframes fhBump { 40% { transform: scale(1.32); } }
@media (prefers-reduced-motion: reduce) { .links .n.bump { animation: none; } }
/* a phone held sideways during the reveal: a calm layer asks to turn it upright (the reveal waits behind it, as it was) */
#turn { display: none; }
/* round 3: the layer covers the fridge too on a sideways phone (its home hid the Wife behind the card); the words say where you are.
   A phone only: short, wide (13:9 or wider, so an on-screen keyboard can't trigger it) and touch */
@media (orientation: landscape) and (max-height: 500px) and (min-aspect-ratio: 13/9) and (pointer: coarse) {
  #turn { display: grid; place-items: center; position: fixed; inset: 0; z-index: 80; padding: 24px; text-align: center; background: radial-gradient(80% 90% at 50% 40%, #3a1033 0%, #1b0819 62%, var(--plum2) 100%); }
  #rv.on ~ #turn .t-home, #rv:not(.on) ~ #turn .t-rv { display: none; }
}
#turn .turnc { max-width: 340px; display: grid; justify-items: center; gap: 10px; }
#turn svg { width: 54px; height: 54px; color: var(--gold); }
#turn .h2 { padding: 0; font-size: 26px; }
#turn p { font: 500 15px/1.4 Geist; color: var(--dim); text-wrap: balance; }
/* round 3 */
/* a stash row's line (e.g. "5 CRO, paid as $WCM. Claim only") wraps in full, never cut to "Claim…" */
.item .t2.wrap { display: block; -webkit-line-clamp: unset; overflow: visible; text-overflow: clip; }
/* the one main heading: the mark (phone, tablet) or the big title (desktop), as they looked */
h1.mark, h1.h-hero { margin: 0; }
/* ---------- ux2 (25 Nov): pulls upgrade, Phase A ---------- */
/* the build-up's tells: the Wife leans in from the side (Anniversary and up) */
.rv-lean { position: fixed; right: 0; z-index: 4; pointer-events: none; transform-origin: 0 100%; will-change: transform, opacity; -webkit-mask-image: linear-gradient(180deg, #000 56%, transparent 86%); mask-image: linear-gradient(180deg, #000 56%, transparent 86%); }
/* the steps for Date Night and up: the shelf, then the name */
.rv-shelf { position: fixed; left: 50%; top: calc(76px + env(safe-area-inset-top, 0px)); z-index: 6; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px 0 13px; border-radius: 999px; background: rgba(27, 8, 25, .84); border: 1px solid var(--line); backdrop-filter: blur(10px); font: 800 16px/1 Bricolage; color: var(--ink); white-space: nowrap; pointer-events: none; will-change: transform, opacity; }
.rv-shelf i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 10px currentColor; }
.rv-name { position: fixed; left: 50%; z-index: 6; font: 400 46px/1 Shrikhand, serif; white-space: nowrap; text-shadow: 0 0 26px currentColor, 0 3px 0 rgba(0, 0, 0, .4); pointer-events: none; transform-origin: 50% 60%; will-change: transform, opacity; }
@media (max-width: 379px) { .rv-name { font-size: 40px; } }
/* the holo sheen on a top-tier card: under the words, moved by the tilt (still with Less motion) */
.prize .htop { position: relative; }
.prize.holo .htop { isolation: isolate; margin: -8px -8px 0; padding: 8px 8px 4px; border-radius: 18px; will-change: transform; transform-origin: 50% 80%; }
.prize.holo .holo-l, .fc .holo-l { position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; mix-blend-mode: screen; opacity: .58;
  -webkit-mask-image: linear-gradient(180deg, #000 0 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 0 55%, transparent 100%);
  background: linear-gradient(112deg, transparent 12%, rgba(255, 105, 170, .55) 25%, rgba(255, 186, 90, .6) 35%, rgba(255, 228, 150, .45) 43%, rgba(120, 220, 190, .38) 52%, rgba(160, 130, 255, .48) 62%, transparent 75%) var(--hx, 50%) var(--hy, 50%) / 300% 300% no-repeat,
    repeating-linear-gradient(64deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 6px); }
/* the bright band that runs across the foil as it tilts */
.prize.holo .holo-b { position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(180deg, #000 0 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 0 55%, transparent 100%);
  background: linear-gradient(104deg, transparent 40%, rgba(255, 250, 235, .34) 49%, rgba(255, 250, 235, .1) 54%, transparent 60%) var(--hx, 50%) 0 / 260% 100% no-repeat; }
/* a practice card and a replay: no amount, just the name (and, for a replay, when) */
.rv-when { margin-top: 6px; font: 500 14.5px/1.3 Geist; color: var(--dim); }
.top .pill.prac { color: var(--gold); border-color: rgba(255, 201, 77, .45); font-weight: 700; }
/* Practice: a quiet gold link under Open for first-timers, in the welcome, and in What's inside */
.pracb { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; margin-top: 2px; font: 700 14.5px Geist; color: var(--gold); border-radius: 12px; }
.help.prac2 { color: var(--gold); font-weight: 700; }
.help.prac2[disabled] { opacity: .4; cursor: default; }
/* Today in the fridge: one quiet line */
.today { display: flex; align-items: center; justify-content: center; gap: 7px; font: 500 12.5px/1.25 Geist; color: var(--dim); text-wrap: balance; }
.today b { color: var(--ink); font-weight: 700; }
.today .tb { display: inline-flex; flex: none; }
.today .tb img { width: 22px !important; height: 22px !important; border-radius: 50%; object-fit: cover !important; border: 1.5px solid rgba(255, 201, 77, .75); box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.today .tb img + img { margin-left: -7px; }
/* the day's count in the feed pill (every third turn): one line where it fits, two on the narrowest phones */
.feed .pill.td { height: auto; min-height: 34px; padding: 7px 14px; white-space: normal; text-align: center; line-height: 1.25; text-wrap: balance; max-width: 100%; }
.feed .pill.td b { color: var(--ink); font-weight: 700; }
/* where the pill would sit on the Wife's line or her face (short screens), it stays hidden */
#ticker.clash .feed { visibility: hidden; }
@media (max-width: 419px) { .today.insh .tb { display: none; } }
.today.insh { justify-content: flex-start; margin: 12px 0 12px; }
.today.wd { justify-content: flex-start; margin-top: 16px; font-size: 13.5px; }
/* Watch again: a win's picture in the stash plays it again */
.item .th.wa { position: relative; cursor: pointer; }
.wa-i { position: absolute; right: -3px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #2a1206; box-shadow: 0 2px 6px rgba(0, 0, 0, .45); }
.wa-i svg { width: 13px; height: 13px; margin-left: 1px; }
.wa2 svg { width: 16px; height: 16px; }
/* the pack fan */
.fan-dim { background: radial-gradient(90% 60% at 50% 46%, rgba(18, 5, 17, .5), rgba(10, 2, 9, .88)); }
.fan-hd { position: fixed; left: 0; right: 0; top: calc(66px + env(safe-area-inset-top, 0px)); z-index: 6; text-align: center; padding: 0 16px; pointer-events: none; }
.fan-hd .h2 { padding: 0; font-size: 28px; }
.fan-hd p { margin-top: 5px; min-height: 18px; font: 500 14px/1.3 Geist; color: var(--dim); }
.fan-grid { position: fixed; left: 0; right: 0; z-index: 5; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 24px 16px; touch-action: pan-y; }
/* more cards below: the bottom edge fades */
.fan-grid.more { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 46px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 46px), transparent); }
.fan-wrap { margin: auto; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; perspective: 1000px; }
.fan-wrap .fc { flex: none; }
#rv .fan-dock { z-index: 7; }
.fc { position: relative; display: block; border-radius: 12px; touch-action: manipulation; }
.fc-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .52s cubic-bezier(.3, 1.35, .5, 1); }
.fc.up .fc-in { transform: rotateY(180deg); }
.fc.top.up .fc-in { transform: rotateY(180deg) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .52s cubic-bezier(.3, 1.35, .5, 1); }
.fc-b, .fc-f { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.fc-b { background: url(../assets/img/w.webp) center / 40% no-repeat, radial-gradient(120% 95% at 30% 18%, #ff8cbc 0%, #cf3a7f 42%, #5a1240 100%); border: 1.5px solid rgba(255, 214, 150, .6); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .07), 0 6px 16px rgba(0, 0, 0, .45); }
.fc-f { transform: rotateY(180deg); isolation: isolate; background: #22091f; border: 1.5px solid var(--line2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(3px * var(--fs, 1)); padding: 6px 4px; text-align: center; }
.fc-th { width: calc(58px * var(--fs, 1)); height: calc(58px * var(--fs, 1)); object-fit: contain; flex: none; border-radius: 8px; }
/* the name always fits: at most two lines, broken at a space or a soft break (sized by fan.js) */
.fc-nm { display: block; max-width: 100%; font: 400 calc(15px * var(--fs, 1))/1.02 Shrikhand, serif; white-space: normal; text-wrap: balance; overflow-wrap: normal; -webkit-hyphens: manual; hyphens: manual; }
.fc-v { font: 800 calc(18px * var(--fs, 1))/1 Bricolage; color: var(--gold); white-space: nowrap; flex: none; }
.fc-v small { font: 700 calc(11px * var(--fs, 1)) Bricolage; margin-left: 2px; }
.fc .free { position: absolute; top: 5px; left: 5px; }
.fc-sp { position: absolute; top: 4px; right: 4px; line-height: 0; }
.fc-sp img { width: 14px !important; height: 14px !important; }
.fc.win .fc-f { border-color: color-mix(in srgb, var(--tc) 85%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 35%, transparent), 0 0 18px color-mix(in srgb, var(--tc) 42%, transparent); }
.fc.big .fc-f { border-width: 2px; box-shadow: inset 0 0 22px color-mix(in srgb, var(--tc) 30%, transparent), 0 0 28px color-mix(in srgb, var(--tc) 60%, transparent); }
.fc.top.tier-cake .fc-f { border: 2px solid transparent; background: linear-gradient(#22091f, #22091f) padding-box, linear-gradient(135deg, #ffd7a8, #ff7fb4, #ffc94d, #ffd7a8) border-box; box-shadow: 0 0 0 3px rgba(255, 190, 160, .16), 0 0 30px rgba(255, 120, 170, .5); }
.fc.top .holo-l { opacity: .42; -webkit-mask-image: linear-gradient(180deg, #000 0 48%, transparent 72%); mask-image: linear-gradient(180deg, #000 0 48%, transparent 72%); animation: fcHolo 3.4s ease-in-out infinite alternate; }
@keyframes fcHolo { from { background-position: 18% 30%, 0 0; } to { background-position: 82% 70%, 0 0; } }
.fc-ring { position: absolute; left: 50%; top: 50%; width: 100%; aspect-ratio: 1; margin: -50% 0 0 -50%; border-radius: 50%; border: 2px solid var(--tc, var(--gold)); pointer-events: none; z-index: 3; }
.fc-ring.gold { border-color: #ffd36a; box-shadow: 0 0 20px rgba(255, 201, 77, .6); }
.fc-spark { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border-radius: 2px; background: #fff6ea; box-shadow: 0 0 8px var(--tc, #fff); pointer-events: none; z-index: 3; }
.fc-spark.gold { background: #ffd36a; box-shadow: 0 0 10px rgba(255, 201, 77, .9); }
/* Less motion: no deal, no turn; the face simply shows */
.fc.rm .fc-in, .fc.rm.up .fc-in { transform: none; transition: none; }
.fc.rm .fc-f { transform: none; }
.fc.rm.up .fc-b { visibility: hidden; }
.fc.rm .holo-l { animation: none; }
@media (prefers-reduced-motion: reduce) { .fc-in { transition: none; } .fc.top .holo-l { animation: none; } }
/* ux2 review 2: on 360 to 379 wide phones the top bar keeps its right gutter (the mark and the wallet pill a little smaller);
   the links never wrap ("Your stash 25") */
@media (max-width: 379px) { .top { gap: 6px; } .mark { font-size: 21px; } .top .pill { padding: 0 10px 0 9px; gap: 6px; font-size: 13px; } }
@media (max-width: 359px) { .mark { font-size: 18px; } }
.links a { white-space: nowrap; }

/* ---------- launch features (25 Nov): kitchen ranks, gifts for a friend, gifts received, the kitchen streak ---------- */
/* the chips row: under the top bar on phones and tablets (the feed pill moves below it), in the top bar on desktop */
.fchips { position: fixed; top: calc(66px + env(safe-area-inset-top, 0px)); left: var(--pad); right: var(--pad); z-index: 8; display: flex; justify-content: center; gap: 8px; }
.fchips.inl { position: static; top: auto; left: auto; right: auto; margin-right: 2px; }
body.hasstrip .feed { top: calc(116px + env(safe-area-inset-top, 0px)); }
.hchip { flex: none; height: 44px; min-width: 44px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px 0 9px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font: 700 13.5px/1 Geist; color: var(--ink); white-space: nowrap; }
.hchip svg { width: 20px; height: 20px; flex: none; }
.hchip.rk { padding: 0 14px 0 8px; gap: 8px; }
.hchip .rkn { width: 27px; height: 27px; border-radius: 9px; display: grid; place-items: center; font: 800 13.5px/1 Bricolage; color: #2a1206; background: linear-gradient(160deg, #ffe08a, var(--gold)); flex: none; }
.hchip .rkt { display: flex; flex-direction: column; gap: 5px; align-items: stretch; }
.hchip .rkt b { font: 800 13.5px/1 Bricolage; }
.hchip .rkbar { display: block; min-width: 64px; height: 4px; border-radius: 2px; background: rgba(255, 246, 234, .16); overflow: hidden; }
.hchip .rkbar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--gold), #ffb020); }
.hchip.st span, .hchip.gf span { font: 800 14px/1 Bricolage; }
.hchip.st.due { border-color: rgba(255, 201, 77, .6); color: var(--gold); background: rgba(40, 14, 30, .82); }
/* the name frames: copper, silver, gold, on the rank and the wallet pill */
.fr-copper { border: 1.5px solid #d58a57 !important; box-shadow: 0 0 0 2px rgba(213, 138, 87, .18); }
.fr-silver { border: 1.5px solid #d9e0ea !important; box-shadow: 0 0 0 2px rgba(217, 224, 234, .18); }
.fr-gold { border: 1.5px solid var(--gold) !important; box-shadow: 0 0 0 2px rgba(255, 201, 77, .22), 0 0 14px rgba(255, 201, 77, .25); }
.rank .lv.fr-copper, .rank .lv.fr-silver, .rank .lv.fr-gold { border-width: 2px !important; }
@media (max-width: 379px) { .hchip.gf span { display: none; } .hchip.gf { padding: 0; width: 44px; justify-content: center; } .fchips { gap: 6px; } }
@media (max-width: 349px) { .hchip.rk .rkn { display: none; } .hchip.rk { padding: 0 12px; } .hchip.st { padding: 0 11px 0 8px; } }
/* Kitchen ranks */
.shd { font: 700 13px Geist; color: var(--dim); margin: 14px 0 6px; }
.wlist { display: grid; gap: 6px; }
.wrow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255, 246, 234, .04); }
.wrow svg { width: 18px; height: 18px; color: var(--gold); flex: none; margin-top: 1px; }
.wrow span { display: flex; flex-direction: column; gap: 3px; }
.wrow b { font: 700 14px/1.25 Geist; }
.wrow small { font: 500 13px/1.3 Geist; color: var(--dim); }
.gain svg { width: 22px; height: 22px; flex: none; }
.ladder .lr .gf { overflow-wrap: anywhere; }
/* the streak's days */
.sdays div { height: 54px; gap: 2px; }
.sdays div b { font: 800 14px Bricolage; }
.sdays div.done b { color: var(--gold); }
.sdays svg { width: 18px; height: 18px; }
a.btn { text-decoration: none; display: flex; align-items: center; justify-content: center; }
a.btn.ghost { color: var(--ink); }
/* the moments (rank-up, a gift received): the approved rank-up screen */
.mscrim { position: fixed; inset: 0; z-index: 0; background: rgba(12, 3, 11, .45); }
.mcard .gifts { margin-top: 10px; }
.gift .gic { width: 36px; height: 36px; display: grid; place-items: center; flex: none; }
.gift .gic svg { width: 30px; height: 30px; }
.mcard .gtitle { font: 400 26px/1.1 Shrikhand, serif; color: var(--ink); white-space: normal; }
.mcard .glines { margin-top: 10px; font: 500 14px Geist; color: var(--dim); }
.mcard .bar { margin-top: 8px; }
/* buying for a friend */
.forseg { margin-top: 12px; }
.gfield { margin-top: 12px; }
.gin { padding: 4px 4px 4px 12px !important; min-height: 52px !important; }
.gin input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; color: var(--ink); font: 500 16px/1 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: -.02em; outline: none; }
.gin:focus-within { outline: 2px solid var(--gold); outline-offset: 1px; }
.gin .mini { padding: 0 14px; flex: none; }
.gmsg { display: flex; gap: 7px; align-items: flex-start; min-height: 20px; margin-top: 7px; font: 500 13px/1.4 Geist; color: var(--faint); }
.gmsg svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.gmsg.ok { color: #8fe7b4; }
.gmsg.bad { color: #ffb4a8; }
.gmsg.bad svg { color: #ff8f7d; }
.btn.dis[aria-disabled="true"] { opacity: .55; }
.sentic { width: 58px; height: 58px; margin: 2px 0 6px; }
.sentic svg { width: 58px; height: 58px; }
.wq { font: 400 19px/1.3 Kalam, cursive; color: var(--cream, #fbeed6); margin-top: 12px; }
/* gifts on the shelf, in the stash and on the card */
.cans i.g { background: linear-gradient(180deg, #ff7fb4 0 22%, #fff6ea 22% 60%, #e83e8f 60% 72%, #fff6ea 72%); box-shadow: 0 0 0 1.5px #ff9cc6, 0 1px 0 rgba(0, 0, 0, .3); }
.giftln { display: flex; gap: 7px; align-items: center; margin: -2px 0 8px; font: 600 13px/1.3 Geist; color: var(--dim); }
.giftln svg { width: 18px; height: 18px; flex: none; }
.item .t3 { display: flex; gap: 6px; align-items: center; margin-top: 3px; font: 600 12.5px/1.3 Geist; color: #ffb3d2; }
.item .t3 svg { width: 15px; height: 15px; flex: none; }
.rw .free.gft { background: #ff7fb4; color: #2a0616; }
.rv-gift { display: flex; gap: 7px; align-items: center; margin: 4px 0 2px; font: 600 13.5px/1.3 Geist; color: #ffb3d2; }
.rv-gift svg { width: 18px; height: 18px; flex: none; }

.sline { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font: 500 14.5px/1.4 Geist; color: var(--ink); }
.sline svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }

/* ---------- the share card (v1.1, in v1) ---------- */
.rv-shelf { position: fixed; left: 50%; top: calc(76px + env(safe-area-inset-top, 0px)); z-index: 6; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px 0 13px; border-radius: 999px; background: rgba(27, 8, 25, .84); border: 1px solid var(--line); backdrop-filter: blur(10px); font: 800 16px/1 Bricolage; color: var(--ink); white-space: nowrap; pointer-events: none; will-change: transform, opacity; }
.rv-shelf i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 10px currentColor; }
.card.prize.hassh { position: relative; }
.rv-sh { position: absolute; top: -17px; right: 14px; z-index: 4; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid rgba(255, 201, 77, .6); background: rgba(27, 8, 25, .94); color: var(--ink); font: 600 13px Geist, system-ui, sans-serif; letter-spacing: .01em; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rv-sh::after { content: ''; position: absolute; inset: -6px -4px; }
.rv-sh svg { width: 16px; height: 16px; color: var(--gold); }
.rv-sh:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.shimg { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; margin: 12px 0; background: var(--panel); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.btn.pink svg, .btn.ghost svg { vertical-align: -4px; margin-right: 6px; }
#sheetL.overrv .scrim { z-index: 45; }
#sheetL.overrv .sheet { z-index: 46; }
.rv-sh.busy { opacity: .7; }
.rv-sh.busy svg { animation: fcPulse 1s ease-in-out infinite alternate; }
@keyframes fcPulse { from { opacity: .4; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rv-sh.busy svg { animation: none; } }
@media (max-width: 360px) { .rv-sh { top: -23px; height: 32px; } .rv-sh::after { inset: -6px -4px; } }

/* ---------- v1.1: invites and the day-7 streak treat ---------- */
.invlink { display: flex; gap: 8px; margin-top: 12px; }
.invlink input { flex: 1; min-width: 0; height: 44px; border-radius: 12px; border: 1px solid rgba(255, 246, 234, .18); background: rgba(255, 246, 234, .06); color: var(--ink); font: 500 13px Geist, system-ui, sans-serif; padding: 0 12px; text-overflow: ellipsis; }
.invlink .mini { height: 44px; padding: 0 16px; }
.invstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.invstats .tile { text-align: center; padding: 10px 6px; }
.invstats .v { font: 700 18px Geist, system-ui, sans-serif; color: var(--ink); white-space: nowrap; }
.invstats .v small { font-size: 12px; font-weight: 600; opacity: .75; }
.invstats .k { font-size: 12px; opacity: .72; margin-top: 2px; }
@media (max-width: 360px) { .invstats .v { font-size: 16px; } .invstats .k { font-size: 11.5px; } }
.kv.invrow .k { display: inline-flex; align-items: center; gap: 8px; }
.kv.invrow .k svg { width: 18px; height: 18px; color: var(--gold); }
.kv.invrow .v { font: 600 13px Geist, system-ui, sans-serif; opacity: .75; }
.invhow { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.invhow summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font: 600 14px Geist, system-ui, sans-serif; color: var(--ink); list-style: none; }
.invhow summary::-webkit-details-marker { display: none; }
.invhow summary::after { content: '+'; margin-left: auto; font-size: 18px; opacity: .7; }
.invhow[open] summary::after { content: '\2212'; }
