/* Hero: the toll lane, a CSS 3D scene the visitor drags a coin through, and the receipt it prints.
   Also the size switch (.seg), used in the hero and above the table. Transforms and opacity only while moving. */

/* size switch */
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; background: #0b0b0a; border: 1px solid var(--rule-strong); position: relative; }
.seg button { position: relative; z-index: 1; border: 0; background: none; color: var(--ink-2); font: 700 14px/1 var(--mono); padding: 0 12px; min-height: 40px; min-width: 64px; border-radius: 9px; cursor: pointer; transition: color .2s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { color: #140603; }
.seg .thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; border-radius: 9px; background: var(--stamp); box-shadow: 0 4px 14px -4px rgba(255, 91, 55, .55); transition: transform .35s var(--ease), width .35s var(--ease); }
.seg.light { background: var(--paper-hi); }

/* the lane panel */
.lane { position: relative; border-radius: 22px; padding: 16px 16px 0; background: linear-gradient(180deg, #161614, #0f0f0e 60%); border: 1px solid var(--rule-strong);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 40px 80px -40px rgba(0, 0, 0, .9); }
.lane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 12px; flex-wrap: wrap; }
.lane-head p { font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.lane-head p::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--stamp); box-shadow: 0 0 0 4px var(--stamp-soft); flex: none; }

/* 3D scene. JS sets --s (scale) and the world transform; everything below is laid out in world pixels (640 x 180). */
.road { position: relative; margin: 6px -16px 0; }
.scene { position: relative; aspect-ratio: 600 / 290; overflow: hidden; perspective: calc(1400px * var(--s, 1)); perspective-origin: 50% 20%;
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; border-radius: 4px; outline-offset: -4px; }
.scene.dragging { cursor: grabbing; }
.world { position: absolute; left: 50%; top: 66%; width: 640px; height: 180px; margin: -90px 0 0 -320px; transform-style: preserve-3d;
  transform: scale3d(var(--s, 1), var(--s, 1), var(--s, 1)) rotateX(62deg) rotateZ(-22deg); will-change: transform; }
.world div { position: absolute; }
.world .box, .world .pivot, .world .coin, .world .coin-up { transform-style: preserve-3d; }
.world .f, .world .flat { backface-visibility: visible; }
/* soft edges so the road fades into the panel instead of ending in a hard line */
.scene::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 72%, #0f0f0e), linear-gradient(90deg, #131312, transparent 10%, transparent 90%, #121211); }

.deck { left: -120px; top: -40px; width: 880px; height: 260px;
  background:
    radial-gradient(ellipse 46% 60% at 52% 52%, rgba(255, 91, 55, .09), transparent 70%),
    linear-gradient(90deg, #0f0f0e 0%, transparent 16%, transparent 84%, #0f0f0e 100%),
    linear-gradient(180deg, #0f0f0e 0%, #191917 22%, #1d1d1a 50%, #171715 80%, #0f0f0e 100%); }
.lane-line { left: 0; width: 640px; height: 2px; background: rgba(236, 235, 230, .2); }
.lane-dash { left: 0; width: 640px; height: 2px; background: repeating-linear-gradient(90deg, rgba(236, 235, 230, .13) 0 16px, transparent 16px 34px); }
.stop { width: 4px; height: 118px; border-radius: 2px; background: rgba(236, 235, 230, .14); }
.stop::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--stamp); opacity: 0; transition: opacity .3s; }
.stop.paid::after { opacity: 1; }
.pool { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 91, 55, .34), rgba(255, 91, 55, .08) 45%, transparent 70%); opacity: 0; transition: opacity .4s var(--ease); }
.pool.on { opacity: 1; }
.anchor { width: 2px; height: 2px; }

/* booth faces, lit from the upper left */
.post .f-top { background: #4a4943; }
.post .f-front { background: linear-gradient(180deg, #34332f, #22221f); }
.post .f-back { background: #1b1b19; }
.post .f-left { background: linear-gradient(90deg, #191917, #2c2b28); }
.post .f-right { background: linear-gradient(90deg, #1a1a18, #121211); }
.cap .f-top { background: linear-gradient(135deg, #55534c, #3b3a35); }
.cap .f-front { background: #2e2d29; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.cap .f-back, .cap .f-right { background: #171715; }
.cap .f-left { background: #24231f; }
.lamp .f { background: #4a2219; transition: background .3s; }
.lamp .f-top { background: #5a2a1e; }
.lamp.lit .f { background: #ff5b37; }
.lamp.lit .f-top { background: #ffb39f; }
.lamp.lit .f-right, .lamp.lit .f-back { background: #c6401f; }
.halo { width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 120, 80, .55), rgba(255, 91, 55, .12) 40%, transparent 68%); opacity: 0; transition: opacity .35s var(--ease); pointer-events: none; }
.halo.on { opacity: 1; }
.arm .f-top { background: repeating-linear-gradient(180deg, #ff5b37 0 18px, #e6e4dc 18px 36px); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.arm .f-front { background: #e6e4dc; }
.arm .f-back { background: #ff5b37; }
.arm .f-left { background: repeating-linear-gradient(180deg, #c6401f 0 18px, #a8a69e 18px 36px); }
.arm .f-right { background: repeating-linear-gradient(180deg, #8f2c15 0 18px, #6f6d67 18px 36px); }

/* the coin: seven stacked discs give it an edge */
.coin { left: 0; top: 0; will-change: transform; }
.coin-up { left: 0; top: 0; }
.coin-l { border-radius: 50%; background: #9a2d14; }
.coin-l.face { background: radial-gradient(circle at 34% 30%, #ffd2c4 0, #ff7a57 26%, #ff5b37 48%, #b9381a 86%);
  box-shadow: inset 0 0 0 2px rgba(80, 18, 6, .45); display: grid; place-items: center; }
.coin-l.face::before { content: ""; position: absolute; inset: 16%; border-radius: 50%; border: 1.5px solid rgba(60, 12, 4, .5); }
.coin-l.mid { background: linear-gradient(180deg, #d24a26, #7d230f); }
.coin-shadow { border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .75), rgba(0, 0, 0, .35) 55%, transparent); }
.chip { width: 9px; height: 9px; border-radius: 2px; background: #ffb39f; box-shadow: 0 0 10px 2px rgba(255, 91, 55, .6); opacity: 0; }

.gate-labels { position: relative; height: 40px; margin: 2px 0 12px; font-size: 12.5px; line-height: 1.15; color: var(--ink-3); }
.gate-labels span { position: absolute; top: 0; transform: translateX(-50%); text-align: center; white-space: nowrap; transition: color .3s; }
.gate-labels span.paid { color: var(--ink); }
.gate-labels br.sm { display: none; }
.gate-labels span b { display: block; font: 700 11px/1 var(--mono); color: var(--ink-3); margin-bottom: 4px; transition: color .3s; }
.gate-labels span.paid b { color: var(--stamp); }

/* receipt */
.receipt { position: relative; margin: 0 -16px; background: linear-gradient(180deg, #1b1b19, #151513); color: var(--ink); border-radius: 4px 4px 21px 21px; padding: 22px 20px 20px;
  border-top: 1px solid var(--rule);
  --tooth: 7px; -webkit-mask: radial-gradient(circle var(--tooth) at var(--tooth) 0, transparent 98%, #000) 0 0 / calc(var(--tooth) * 2) 100% repeat-x;
  mask: radial-gradient(circle var(--tooth) at var(--tooth) 0, transparent 98%, #000) 0 0 / calc(var(--tooth) * 2) 100% repeat-x; }
.receipt .r-title { font: 700 18px/1.2 var(--display); padding-right: 92px; }
.receipt .r-sub { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; padding-right: 92px; min-height: 2.8em; }
.receipt dl { margin: 14px 0 0; display: grid; gap: 0; }
.receipt .line { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--rule-strong); }
.receipt .line dt { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 15px; transition: color .3s; }
.receipt .line dd { margin: 0; font-family: var(--mono); font-size: 15px; transition: color .3s; }
.receipt .line:not(.paid) dt, .receipt .line:not(.paid) dd { color: var(--ink-3); }
.receipt .line .swatch { transition: transform .35s var(--ease); }
.receipt .line.paid .swatch { transform: scale(1.25); }
.receipt .line.total { border-bottom: 0; padding-top: 10px; }
.receipt .line.total dt { font-weight: 700; }
.receipt .line.total dd { font-weight: 700; font-size: 17px; }
.receipt .line.total.paid dd { color: var(--stamp); }
.receipt .note { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.stamp { position: absolute; right: 14px; top: 16px; width: 80px; height: 80px; color: var(--stamp); transform: rotate(-12deg); opacity: 0; pointer-events: none; }
.stamp.on { animation: stamp .45s var(--ease) forwards; }
@keyframes stamp { from { opacity: 0; transform: rotate(-12deg) scale(1.5); } to { opacity: .9; transform: rotate(-12deg) scale(1); } }
@media (max-width: 480px) {
  .lane { padding: 14px 12px 0; }
  .road { margin: 4px -12px 0; }
  .receipt { margin: 0 -12px; padding: 20px 16px 18px; }
  .stamp { width: 62px; height: 62px; right: 10px; top: 14px; }
  .receipt .r-title, .receipt .r-sub { padding-right: 66px; }
  .scene { aspect-ratio: 600 / 340; }
  .gate-labels br.sm { display: inline; }
  .world { top: 63%; }
}
