/* ============================================================
     ROOT STATE
     One variable drives everything: --heat (0..1)
     Derived hues, shadows, intensities all calc() off it.
============================================================ */
:root {
    --heat: 0;

    /* hue lerps: 200 (icy cyan) -> 30 (amber) -> 0 (scarlet) */
    --bg-hue:   calc(200 - (170 * var(--heat)));
    --bg-sat:   calc(40% + (30% * var(--heat)));
    --bg-light: calc(8% - (5% * var(--heat)));

    --accent-hue:   calc(195 - (195 * var(--heat)));
    --accent-sat:   calc(60% + (40% * var(--heat)));
    --accent-light: calc(55% + (5% * var(--heat)));

    --bg:      hsl(var(--bg-hue) var(--bg-sat) var(--bg-light));
    --bg-deep: hsl(var(--bg-hue) var(--bg-sat) calc(var(--bg-light) - 4%));
    --accent:  hsl(var(--accent-hue) var(--accent-sat) var(--accent-light));
    --accent-glow: hsl(var(--accent-hue) var(--accent-sat) 70% / 0.6);

    /* intensity ramps */
    --shake-px:    calc(var(--heat) * var(--heat) * 6px);  /* quadratic */
    --ember-op:    calc(var(--heat) * var(--heat));
    --ember-speed: calc(8s - (var(--heat) * 6s));
    --pulse-amp:   calc(var(--heat) * 0.35);
    --glow-blur:   calc(8px + var(--heat) * 40px);

    --ink: #f6efe3;
    --ink-dim: #f6efe3aa;
    --paper: #1a0f08;

    --font-display: 'Bowlby One', system-ui, sans-serif;
    --font-body: 'Fraunces', Georgia, serif;
    --font-mono: 'DM Mono', ui-monospace, monospace;

    --font-head-boxes: 'Bebas Neue', sans-serif;
    --font-body-boxes: 'DM Sans', sans-serif;

    --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body:  -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono:  -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --font-head-boxes: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body-boxes: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    
    
    
    --surface-boxes:  #1b1f28;
    --border-boxes:   #252933;
    
}

/* collapsed state damps the chaos to ~30% */
.collapsed-mode {
    --shake-px: calc(var(--heat) * var(--heat) * 0.3px);
    --ember-op: calc(var(--heat) * var(--heat) * 0.3);
    --pulse-amp: calc(var(--heat) * 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    background: #333;
    color: var(--ink);
    font-family: var(--font-body);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* ============================================================
   ATMOSPHERE LAYERS
============================================================ */
.stage {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background:
	radial-gradient(ellipse at 50% 60%,
			var(--bg) 0%,
			var(--bg-deep) 50%,
			#000 100%);
    transition: background 400ms ease;
}

/* grain overlay */
.stage::before {
    content: '';
    position: absolute;
    inset: -50%;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
    opacity: 0.18;
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* vignette intensifies with heat */
.stage::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center,
				transparent 30%,
				rgba(0,0,0,calc(0.3 + var(--heat) * 0.5)) 100%);
    pointer-events: none;
    transition: background 400ms ease;
}

/* shake wrapper - applies translate based on --shake-px
     Animation only runs when .shaking is present (heat > 0.5).
     Below that, the translate would be near-zero anyway but the
     browser would still be doing the work every 80ms. */
.shake {
    position: relative;
    height: 100%;
    width: 100%;
}
.shake.shaking {
    animation: shake 80ms infinite;
    will-change: transform;
}
@keyframes shake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(calc(var(--shake-px) * -1), calc(var(--shake-px) * 0.4)); }
    50% { transform: translate(calc(var(--shake-px) * 0.6), calc(var(--shake-px) * -0.8)); }
    75% { transform: translate(calc(var(--shake-px) * 0.8), calc(var(--shake-px) * 0.6)); }
}

/* ============================================================
     EMBERS (pure CSS particle layer)
     ============================================================ */
.embers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: var(--ember-op);
    transition: opacity 300ms ease;
}
.ember {
    position: absolute;
    bottom: -20px;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #ffd29a 0%, #ff6a00 50%, transparent 100%);
    border-radius: 50%;
    animation: rise var(--ember-speed) linear infinite;
    filter: blur(0.5px);
}
@keyframes rise {
    0%   { transform: translate(0, 0) scale(1); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 0.6; }
    100% { transform: translate(var(--drift, 0px), -110vh) scale(0.3); opacity: 0; }
}

/* ============================================================
     LAYOUT
     ============================================================ */
.frame {
    position: relative;
    height: 100%;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: env(safe-area-inset-top, 16px) 20px env(safe-area-inset-bottom, 20px);
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 8px;
    z-index: 3;
}
.brand {
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 0.08em;
    color: var(--accent);
    text-shadow: 0 0 calc(var(--glow-blur) * 0.4) var(--accent-glow);
    transition: color 200ms, text-shadow 200ms;
}
.stake {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.stake strong {
    font-weight: 500;
    color: var(--ink);
    font-size: 14px;
}

/* ============================================================
     CENTRE STAGE — flavour + controls row + preview
     Grid layout: flavour is full width, controls row gets all
     available vertical space, preview is full width.
     ============================================================ */
.centre {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: center;
    justify-items: center;
    row-gap: 14px;
    min-height: 0;
    width: 100%;
    z-index: 2;
}

/* Two-column row: ~35% buttons, ~65% thermometer */
.controls-row {
    display: grid;
    grid-template-columns: 35fr 65fr;
    align-items: center;
    justify-items: center;
    width: 100%;
    height: 90%;
    min-height: 0;
    transition: opacity 250ms ease;
}

/* Flavour block — sized for its largest possible content so it
     never causes layout shift when text or "heat" changes.
     The dramatic size growth at high heat is now done via
     transform: scale(), which doesn't affect layout. This avoids
     iOS Safari's first-interaction reflow glitch where em-based
     min-heights recompute mid-frame against a transitioning
     font-size. */
.flavour {
    font-family: var(--font-body);
    font-style: italic;
    font-weight: 400;
    font-size: 17px;
    color: var(--ink);
    text-align: center;
    max-width: 280px;
    line-height: 1.3;
    letter-spacing: calc(var(--heat) * 0.02em);
    transition: letter-spacing 200ms, opacity 250ms;
    /* fixed height tall enough for tier-name + 2 lines of body */
    height: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    contain: layout style;
}
.flavour .tier-name {
    display: block;
    font-family: var(--font-display);
    font-style: normal;
    font-size: 30px;
    color: var(--accent);
    text-shadow: 0 0 calc(var(--glow-blur) * 0.5) var(--accent-glow);
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    /* visual growth via transform — affects pixels, not layout */
    transform: scale(calc(1 + var(--heat) * 0.35));
    transform-origin: center bottom;
    transition: transform 200ms ease, color 200ms, text-shadow 200ms;
    will-change: transform;
}

/* THERMOMETER ----------------------------------------------- */
.thermo {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: min(70vh, 580px);     /* tube can now grow taller */
    display: flex;
    flex-direction: column;
    align-items: center;
    transition:
	transform 380ms cubic-bezier(.6,.05,.2,1),
	width 380ms cubic-bezier(.6,.05,.2,1),
	height 380ms cubic-bezier(.6,.05,.2,1);
    transform-origin: top right;
}
/* tube + zones: tube is flex-centred in the stack; zones float beside
     it via absolute positioning so they don't affect the tube's
     horizontal position. The zones' left offset (50% + 26px) anchors
     them just to the right of the tube regardless of stack width. */
.thermo-stack {
    position: relative;
    flex: 1;
    display: flex;
    align-items: stretch;
    width: 100%;
    justify-content: center;
}
.thermo-tube-wrap {
    position: relative;
    width: 36px;
    height: 100%;
}
/* zones sit absolutely to the right of the tube */
.zones {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(50% + 26px);   /* tube half-width (18) + small gap (8) */
    width: 90px;
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 0;
    transition: opacity 250ms;
}
.thermo-tube {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
				rgba(255,255,255,0.08) 0%,
				rgba(0,0,0,0.4) 100%);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 18px;
    box-shadow:
	inset 2px 0 4px rgba(255,255,255,0.12),
	inset -2px 0 6px rgba(0,0,0,0.5),
	0 0 var(--glow-blur) var(--accent-glow);
    overflow: hidden;
    transition: box-shadow 300ms ease;
}
/* mercury fill */
.thermo-fill {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--heat) * 100%);
    background: linear-gradient(180deg,
				var(--accent) 0%,
				hsl(calc(var(--accent-hue) + 15) var(--accent-sat) 40%) 100%);
    box-shadow:
	inset 0 0 12px rgba(255,255,255,0.3),
	0 0 calc(var(--glow-blur) * 0.6) var(--accent-glow);
    transition: height 120ms ease-out, background 200ms;
}
/* bubbles on high heat */
.thermo-fill::before, .thermo-fill::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    opacity: var(--heat);
    animation: bubble 1.4s ease-in infinite;
}
.thermo-fill::before {
    width: 6px; height: 6px; left: 30%; bottom: 10%;
    animation-delay: 0s;
}
.thermo-fill::after {
    width: 4px; height: 4px; left: 60%; bottom: 20%;
    animation-delay: 0.6s;
}
@keyframes bubble {
    0%   { transform: translateY(0) scale(1); opacity: var(--heat); }
    100% { transform: translateY(-180px) scale(0.2); opacity: 0; }
}

/* THUMB GRIP — visible draggable indicator at current heat ---- */
.thermo-grip {
    position: absolute;
    left: -8px;
    right: -8px;
    /* sit centred on the current heat level */
    bottom: calc(var(--heat) * 100%);
    height: 18px;
    transform: translateY(50%);
    background: linear-gradient(180deg,
				#4a4a4a 0%,
				#1a1a1a 45%,
				#2a2a2a 50%,
				#1a1a1a 55%,
				#4a4a4a 100%);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 4px;
    box-shadow:
	0 2px 4px rgba(0,0,0,0.6),
	inset 0 1px 0 rgba(255,255,255,0.3),
	0 0 calc(var(--glow-blur) * 0.5) var(--accent-glow);
    pointer-events: none;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    transition: bottom 120ms ease-out, box-shadow 200ms ease;
}
.grip-line {
    width: 18px;
    height: 1px;
    background: rgba(255,255,255,0.4);
    box-shadow: 0 1px 0 rgba(0,0,0,0.5);
}

/* ============================================================
     LEFT COLUMN — large, friendly +/- buttons
     "Faded from background" = a slightly darker shade than the
     page background, with a soft inset shadow that gives them
     physical depth. At rest they're quiet; on press they brighten
     and the inset inverts, feeling like they "fire up".
     ============================================================ */
.controls-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-height: min(60vh, 480px);
    padding: 8px 0;
    gap: 24px;
    transition: opacity 280ms ease;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}
.nudge {
    /* large, friendly target — sized to fit the 35% column comfortably */
    width: clamp(88px, 28vw, 116px);
    height: clamp(88px, 28vw, 116px);
    border-radius: 28px;
    /* "faded from background": a touch darker than the page bg.
       Uses hsl with the same hue/sat as bg so it tracks heat. */
    background:
	linear-gradient(155deg,
			hsl(var(--bg-hue) var(--bg-sat) calc(var(--bg-light) + 2%)) 0%,
			hsl(var(--bg-hue) var(--bg-sat) calc(var(--bg-light) - 3%)) 100%);
    border: 1px solid hsl(var(--bg-hue) var(--bg-sat) calc(var(--bg-light) + 8%));
    color: hsl(var(--accent-hue) var(--accent-sat) calc(var(--accent-light) + 10%));
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* soft inset shadow gives the "carved into the panel" feel.
       outer shadow is very subtle - a hint of accent glow. */
    box-shadow:
	inset 0 2px 4px rgba(255,255,255,0.06),
	inset 0 -3px 6px rgba(0,0,0,0.4),
	0 0 calc(8px + var(--heat) * 16px) hsl(var(--accent-hue) var(--accent-sat) 50% / calc(0.1 + var(--heat) * 0.25));
    transition:
	transform 100ms ease,
	box-shadow 180ms ease,
	background 200ms ease,
	color 200ms ease;
}
.nudge:active {
    /* "fires up" — brightens, inverts the inset shadow, icon
       jumps to full accent colour. */
    transform: scale(0.96);
    background:
	linear-gradient(155deg,
			hsl(var(--accent-hue) var(--accent-sat) calc(20% + var(--heat) * 15%)) 0%,
			hsl(var(--accent-hue) var(--accent-sat) calc(10% + var(--heat) * 10%)) 100%);
    color: var(--ink);
    box-shadow:
	inset 0 2px 6px rgba(0,0,0,0.5),
	inset 0 -1px 0 rgba(255,255,255,0.08),
	0 0 calc(var(--glow-blur) * 0.5) var(--accent-glow);
}
/* The SVG inside: explicit size, currentColor stroke, non-interactive.
     pointer-events: none ensures pointerdown/up always target the
     button itself, not the path/svg element. */
.nudge svg {
    width: 44px;
    height: 44px;
    display: block;
    pointer-events: none;
    /* subtle glow on the icon, scales with heat */
    filter: drop-shadow(0 0 calc(3px + var(--heat) * 6px)
			hsl(var(--accent-hue) var(--accent-sat) 55% / calc(0.4 + var(--heat) * 0.4)));
    transition: filter 200ms ease;
}

/* the actual input — fills the tube-wrap, transparent, on top */
.thermo-input {
    position: absolute;
    inset: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    -webkit-appearance: slider-vertical;
    appearance: slider-vertical;
    background: transparent;
    cursor: ns-resize;
    opacity: 0;
    touch-action: none;
    z-index: 3;  /* above the grip so dragging works */
}
/* fallback: use rotated horizontal slider on browsers without vertical */
@supports not (appearance: slider-vertical) {
    .thermo-input {
	-webkit-appearance: none;
	writing-mode: vertical-lr;
	direction: rtl;
    }
}

/* zone labels — now tappable buttons */
.zones li { display: block; }
.zone {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-dim);
    white-space: nowrap;
    position: relative;
    padding: 8px 8px 8px 16px;        /* 44px+ tap target with the line-height */
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    border-radius: 3px;
    transition: color 150ms ease, background 150ms ease, text-shadow 200ms ease;
}
.zone::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    width: 8px;
    height: 1px;
    background: currentColor;
    transition: width 150ms ease;
}
.zone:active {
    background: rgba(255,255,255,0.05);
}
.zone.active {
    color: var(--accent);
    font-weight: 500;
    text-shadow: 0 0 8px var(--accent-glow);
}
.zone.active::before {
    width: 12px;
}

/* preview readout */
.preview {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink-dim);
    text-align: center;
    letter-spacing: 0.05em;
    min-height: 32px;
}
.preview .odds {
    color: var(--accent);
    font-size: 18px;
    font-weight: 500;
    text-shadow: 0 0 calc(var(--glow-blur) * 0.3) var(--accent-glow);
}

/* ============================================================
     ACTION BUTTON
     ============================================================ */
/* Both action buttons share one grid cell so they occupy the same
     physical slot; only one is visible at a time (controlled by
     opacity + the .collapsed-mode body class). */
.action-slot {
    display: grid;
    grid-template-areas: "stack";
    width: 100%;
}
.action-slot > .go {
    grid-area: stack;
}
/* default: primary "place bet" visible, confirm hidden */
.go-confirm {
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms ease;
}
/* in collapsed (result) mode: swap them */
.collapsed-mode .go {
    opacity: 0;
    pointer-events: none;
}
.collapsed-mode .go-confirm {
    opacity: 1;
    pointer-events: auto;
}

.go {
    position: relative;
    width: 100%;
    padding: 18px 24px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    background: linear-gradient(180deg,
				hsl(var(--accent-hue) var(--accent-sat) calc(15% + var(--heat) * 20%)) 0%,
				hsl(var(--accent-hue) var(--accent-sat) calc(8% + var(--heat) * 15%)) 100%);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 17px;
    letter-spacing: calc(0.08em + var(--heat) * 0.05em);
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    transition:
	transform 100ms,
	box-shadow 200ms,
	letter-spacing 200ms;
    box-shadow:
	0 0 calc(var(--glow-blur) * 0.8) var(--accent-glow),
	inset 0 1px 0 rgba(255,255,255,0.15);
    animation: btn-pulse calc(2s - var(--heat) * 1.2s) ease-in-out infinite;
    z-index: 2;
}
@keyframes btn-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(calc(1 + var(--pulse-amp) * 0.04)); }
}
.go:active { transform: scale(0.97); }
.go:disabled { opacity: 0.6; cursor: wait; animation: none; }

/* scanline shimmer */
.go::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 600ms;
}
.go:hover::after { left: 100%; }

/* ============================================================
     COLLAPSED MODE — thermometer shrinks to top-right
     ============================================================ */
.thermo.collapsed {
    position: fixed;
    top: calc(env(safe-area-inset-top, 12px) + 56px);
    right: 16px;
    width: 36px;
    height: 110px;
    cursor: pointer;
    z-index: 50;
}
.thermo.collapsed .thermo-stack { gap: 0; }
.thermo.collapsed .thermo-tube-wrap { width: 22px; }
.thermo.collapsed .thermo-tube { border-radius: 11px; }
.thermo.collapsed .zones {
    display: none;
}
.thermo.collapsed .thermo-grip {
    height: 10px;
    left: -4px;
    right: -4px;
}
.thermo.collapsed .grip-line { display: none; }
.thermo.collapsed .thermo-input { pointer-events: none; }
.thermo.collapsed .tap-hint {
    opacity: 1;
    animation: hint-fade 4s ease forwards infinite;
}
@keyframes hint-fade {
    0%, 60% { opacity: 1; }
    80%     { opacity: 0; }
    100%    { opacity: 1; }
}
/* When the thermometer is collapsed (revealed mode), the whole
     left button column fades out smoothly rather than snap-hiding.
     JS toggles .collapsed-mode on body. */
.collapsed-mode .controls-buttons {
    opacity: 0;
    pointer-events: none;
}
.collapsed-mode .controls-row {
    /* let the result panel claim the space */
    pointer-events: none;
}
/* ...but the collapsed thermometer must stay tappable (tap to
     return), so it explicitly re-enables pointer events that the
     parent .controls-row turned off. */
.collapsed-mode .thermo.collapsed {
    pointer-events: auto;
}

.tap-hint {
    position: absolute;
    top: 50%;
    right: calc(100% + 8px);
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-dim);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}

/* ============================================================
     LOADING SPINNER (replaces button content while fetching)
     ============================================================ */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
     ACCESSIBILITY — reduced motion
     ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .shake { animation: none; }
    .embers { display: none; }
    .go { animation: none; }
    .thermo-fill::before, .thermo-fill::after { display: none; }
    * { transition-duration: 0.01ms !important; }
}

/* small screens */
@media (max-height: 640px) {
    .thermo { height: 40vh; }
    .flavour { font-size: 15px; height: 84px; }
}


/* Outcome boxes and their innards */

.boxes-list { display: flex; flex-direction: column; gap: 12px; }

.box-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.box-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.box-left { display: flex; align-items: center; gap: 10px; }

.box-outcome {
    font-family: var(--font-head-boxes);
    font-size: 20px;
    letter-spacing: 1px;
    word-spacing: 10px;
    color: var(--text);
}

.box-price {
    font-family: var(--font-head-boxes);
    font-size: 22px;
    letter-spacing: 1px;
    color: var(--accent);
}

.box-chevron {
    transition: transform 0.3s;
    color: var(--muted);
    flex-shrink: 0;
    margin-left: 8px;
}
.box-card.open .box-chevron { transform: rotate(180deg); }

.box-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.box-card.open .box-body { max-height: 400px; }

.box-explanations {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.box-number {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--surface-boxes);
    border: 1px solid var(--border-boxes);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head-boxes);
    font-size: 16px;
    color: var(--muted);
    flex-shrink: 0;
}


.explanation-row {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 10px;
    font-family: var(--font-body-boxes);
}

.expl-teams {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.expl-teams img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}
.expl-sep { color: var(--muted); font-size: 10px; }

.expl-text {
    font-size: 12px;
    color: #c0c5d0;
    line-height: 1.5;
    padding-top: 1px;
}


.btn-take {
    width: 100%;
    font-family: var(--font-body-boxes);
    font-weight: 700;
    font-size: 15px;
    color: #0b0d11;
    background: var(--accent);
    border: none;
    border-radius: 99px;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s, transform 0.15s;
}
.btn-take:active { transform: scale(0.97); }
.btn-take:disabled { opacity: 0.5; pointer-events: none; }
.btn-take .take-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(11,13,17,0.3);
    border-top-color: #0b0d11;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: none;
}
.btn-take.loading .take-spinner { display: block; }
.btn-take.loading .take-label { display: none; }
