/* game-feel round, group snap (snap.js): the payer spread as tarot cards and its เจ้าหนี้ seal (3 looks), the hours wheel
   (3 looks), the cover fader, the shutter lever and the slide rails. Overrides round12.css where the old payer tiles lived. */

/* ---------- the payer spread: each person a tarot card (numeral, arched art window, name plate, star corners) ---------- */
.py-grid { position: relative; gap: 14px 10px; padding-top: 18px;
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0C11 7 13 9 20 10C13 11 11 13 10 20C9 13 7 11 0 10C7 9 9 7 10 0Z' fill='%23F2B33D' stroke='%2318213D' stroke-width='1.3'/%3E%3C/svg%3E") }
.py-t { aspect-ratio: 5 / 8; min-height: 0; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 6px; padding: 12px 10px 11px; border-radius: 9px; transform: none;
  background: radial-gradient(120% 70% at 50% 0%, #FBF1D8, var(--parch) 55%, #E7D2A6);
  box-shadow: inset 0 0 0 2px var(--navy), inset 0 0 0 5px var(--parch), inset 0 0 0 6.5px var(--gold), 0 10px 16px rgba(0,0,0,.42) }
.py-t::before { content: ""; position: absolute; inset: 9px; pointer-events: none;
  background: var(--star) left top / 9px no-repeat, var(--star) right top / 9px no-repeat, var(--star) left bottom / 9px no-repeat, var(--star) right bottom / 9px no-repeat }
.py-no { font: 600 12.5px/1 var(--plex); letter-spacing: .14em; color: var(--navy); padding-top: 1px }
.py-art { width: 100%; display: grid; place-items: center; border-radius: 999px 999px 5px 5px; overflow: hidden;
  background: repeating-conic-gradient(from 0deg at 50% 58%, rgba(242,179,61,.45) 0 5deg, transparent 5deg 15deg), radial-gradient(circle at 50% 58%, #3B77C4, var(--navy) 78%);
  box-shadow: inset 0 0 0 1.5px var(--navy), inset 0 0 0 3.5px var(--parch), inset 0 0 0 4.5px var(--gold) }
.py-art .face { margin-top: 14% }
.py-t .py-nm { max-width: calc(100% - 20px); padding: 3px 8px 4px; border-radius: 3px; background: var(--navy); color: var(--parch); font: 600 14px/1.25 var(--plex); box-shadow: 0 0 0 1px var(--gold) }
.py-t[aria-pressed=true] { transform: none; background: radial-gradient(120% 70% at 50% 0%, #FFF7E0, #F8EACB 55%, #EBD3A0);
  box-shadow: inset 0 0 0 2px var(--navy), inset 0 0 0 5px #F8EACB, inset 0 0 0 6.5px var(--gold), 0 0 0 2.5px var(--gold), 0 0 22px rgba(242,179,61,.35), 0 14px 22px rgba(0,0,0,.5) }

/* a drag must never select text or start the browser's own drag */
#phone [data-g], #phone [data-g] * { -webkit-user-select: none; user-select: none; -webkit-user-drag: none }

/* ---------- the seal: pressed over its card's top corner so the face stays seen; flown and pressed by snap.js ---------- */
.py-seal { position: relative; z-index: 2; align-self: start; justify-self: end; width: 74px; height: 74px; margin: -12px -6px 0 0; translate: 0px; touch-action: none; cursor: grab }
.py-seal i { position: absolute; font-style: normal }
.py-seal .disc { inset: 0; display: grid; place-items: center }
/* A: red wax, pressed in: a squashed blob under a domed disc with the word sunk into it */
.py-seal.wax { rotate: -9deg }
.wax .blob { inset: -7px; border-radius: 46% 54% 41% 59% / 57% 42% 58% 43%; background: radial-gradient(circle at 40% 35%, #C23A2D, #7A1B13 75%); box-shadow: 0 4px 7px rgba(0,0,0,.45), inset 0 -2px 4px rgba(40,0,0,.4) }
.wax .disc { inset: 7px; border-radius: 50%; background: radial-gradient(circle at 38% 30%, #DA5244, #A82B1F 62%, #8A2017); box-shadow: inset 0 2px 3px rgba(255,190,170,.4), inset 0 -3px 6px rgba(50,0,0,.55) }
.wax .disc::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px dashed rgba(255,214,200,.55) }
.wax b { font: 700 13.5px/1 var(--plex); color: #FBD9CD; text-shadow: 0 -1px 0 rgba(60,0,0,.75), 0 1px 0 rgba(255,215,200,.3) }
/* B: a rubber stamp, slanted, red ink with the rubber's grain, a little ink spread round it */
.py-seal.ink { width: 96px; height: 52px; margin: 2px -8px 0 0; rotate: 14deg;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 2.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") }
.py-seal.ink::before { content: ""; position: absolute; inset: 0; border-radius: 7px; background: rgba(251,241,216,.8) } /* the paper under the ink, so the word reads over a face */
.ink .disc { border: 3.5px solid #E2453A; border-radius: 7px; -webkit-mask: var(--grain); mask: var(--grain) }
.ink .disc::before { content: ""; position: absolute; inset: 3px; border: 1.5px solid #E2453A; border-radius: 3px }
.ink b { font: 800 19px/1 var(--plex); color: #D23A2F; letter-spacing: .02em }
.ink .splat { inset: -9px; border-radius: 16px; opacity: .45; background: radial-gradient(closest-side, rgba(226,69,58,.55), rgba(226,69,58,.18) 70%, transparent); filter: blur(2px) }
/* C: a notary's brass embosser: a gold foil burst with the word raised in it; the press head comes down and lifts away */
.py-seal.brass { width: 80px; height: 80px; margin: -14px -6px 0 0; filter: drop-shadow(0 3px 3px rgba(0,0,0,.45)) }
.brass .disc { background: radial-gradient(circle at 35% 28%, #FFF3C4, #EDBF55 34%, #B9822A 68%, #E5B44C 92%);
  clip-path: polygon(50% 0%,56.9% 6.5%,65.5% 2.4%,70% 10.8%,79.4% 9.5%,81.1% 18.9%,90.5% 20.6%,89.2% 30%,97.6% 34.5%,93.5% 43.1%,100% 50%,93.5% 56.9%,97.6% 65.5%,89.2% 70%,90.5% 79.4%,81.1% 81.1%,79.4% 90.5%,70% 89.2%,65.5% 97.6%,56.9% 93.5%,50% 100%,43.1% 93.5%,34.5% 97.6%,30% 89.2%,20.6% 90.5%,18.9% 81.1%,9.5% 79.4%,10.8% 70%,2.4% 65.5%,6.5% 56.9%,0% 50%,6.5% 43.1%,2.4% 34.5%,10.8% 30%,9.5% 20.6%,18.9% 18.9%,20.6% 9.5%,30% 10.8%,34.5% 2.4%,43.1% 6.5%) }
.brass .disc::before { content: ""; position: absolute; inset: 12px; border-radius: 50%;
  box-shadow: inset 1px 1px 1px rgba(255,250,225,.9), inset -1px -1px 1px rgba(110,70,10,.7), 1px 1px 1px rgba(255,250,225,.75), -1px -1px 1px rgba(110,70,10,.6) }
.brass .disc::after { content: ""; position: absolute; inset: 17px; border-radius: 50%; border: 1px dotted rgba(110,70,10,.55) }
.brass b { position: relative; font: 800 13.5px/1 var(--plex); color: #7A5110; text-shadow: -1px -1px 0 rgba(255,250,225,.85), 1px 1px 0 rgba(255,236,170,.35) }
.brass .head { inset: -3px; border-radius: 50%; opacity: 0; background: radial-gradient(circle at 36% 30%, #EADBA8, #9C7A35 45%, #4E3A14 85%); box-shadow: inset 0 0 0 4px rgba(0,0,0,.25), 0 12px 16px rgba(0,0,0,.5) }
.brass .head::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: repeating-conic-gradient(rgba(0,0,0,.3) 0 4deg, transparent 4deg 8deg);
  -webkit-mask: radial-gradient(closest-side, transparent 80%, #000 83%); mask: radial-gradient(closest-side, transparent 80%, #000 83%) }

/* ---------- item 4: the hours wheel, three looks; --h is the hours (a float while it turns) ---------- */
.dial { position: relative; width: max-content; margin: 10px auto 2px; display: grid; justify-items: center; touch-action: none; cursor: grab; border-radius: 14px; outline-offset: 6px }
.dial:focus-visible, .fader:focus-visible { outline: 2.5px solid var(--cobalt) }
.dl-marks { position: absolute; inset: 0; pointer-events: none }
.dl-marks i { position: absolute; left: 50%; top: 0; width: 0; height: 50%; transform-origin: 50% 100%; rotate: var(--ang) }
.dl-marks b { position: absolute; left: 0; translate: -50% 0; rotate: calc(-1 * var(--ang)); font: 600 12px/1 var(--plex); color: var(--navy); display: none }
.dl-read { display: flex; align-items: baseline; gap: 5px; margin-top: 10px; pointer-events: none }
.dl-v { font: 700 30px/1 var(--plex); font-variant-numeric: tabular-nums; color: var(--navy) }
.dl-read small { font-size: 15px; font-weight: 600; color: var(--parch-muted) }
/* A: a hardware knob on a navy plate, a gold arc lit up to the hours, a red LED readout (P'Ek's refs/ref-knob.jpg) */
.dl-ring { position: relative; width: 200px; height: 200px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #24325C, var(--navy) 72%); box-shadow: 0 0 0 2px var(--gold), 0 0 0 4px var(--navy), 0 10px 18px rgba(24,33,61,.35) }
.dl-ring svg { position: absolute; inset: 0; overflow: visible; rotate: 135deg }
.dl-ring circle { fill: none; stroke-width: 5; stroke-linecap: round }
.dl-track { stroke: rgba(243,230,200,.16); stroke-dasharray: 75 100 }
.dl-lit { stroke: var(--gold); stroke-dasharray: calc(clamp(.004, (var(--h) - 1) / 23, 1) * 75) 100; filter: drop-shadow(0 0 4px rgba(242,179,61,.75)) }
[data-kind=knob] .dl-marks i { --ang: calc(-135deg + (var(--t) - 1) * 11.7391deg) }
[data-kind=knob] .dl-marks i::before { content: ""; position: absolute; left: -1px; top: 18px; width: 2px; height: 6px; border-radius: 1px; background: rgba(243,230,200,.45) }
[data-kind=knob] .dl-marks i:is(:first-child, :nth-child(6n))::before { height: 10px; background: var(--parch) }
[data-kind=knob] .dl-marks i:is(:first-child, :nth-child(12), :last-child) b { display: block; top: 32px; font-size: 11px; color: var(--parch) }
.dl-knob { position: relative; width: 112px; height: 112px; border-radius: 50%; rotate: calc(-135deg + (var(--h) - 1) * 11.7391deg);
  background: radial-gradient(circle at 50% 34%, #3A4672, #161D36 72%); box-shadow: inset 0 0 0 2px rgba(242,179,61,.7), inset 0 2px 3px rgba(255,255,255,.2), 0 8px 16px rgba(0,0,0,.6) }
.dl-knob::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: repeating-conic-gradient(rgba(255,255,255,.1) 0 3deg, transparent 3deg 6deg);
  -webkit-mask: radial-gradient(closest-side, transparent 84%, #000 86%); mask: radial-gradient(closest-side, transparent 84%, #000 86%) }
.dl-knob i { position: absolute; left: 50%; top: 11px; width: 4px; height: 24px; margin-left: -2px; border-radius: 2px; background: var(--gold); box-shadow: 0 0 6px rgba(242,179,61,.8) }
[data-kind=knob] .dl-read { min-width: 104px; justify-content: center; padding: 6px 12px; border-radius: 6px; background: #0B0D12; box-shadow: inset 0 0 0 1.5px #000, 0 0 0 2px var(--gold) }
[data-kind=knob] .dl-v { color: #FF4A3A; text-shadow: 0 0 8px rgba(255,74,58,.7) }
[data-kind=knob] .dl-read small { color: #FFA59A }
/* B: a 24-hour clock face you wind: the hand drags round, the time given fills in gold */
.dl-face { position: relative; width: 224px; height: 224px; border-radius: 50%; background: radial-gradient(circle, #FBF4E2, var(--parch) 70%, #E8D4A8);
  box-shadow: inset 0 0 0 2px var(--navy), inset 0 0 0 6px #FBF4E2, inset 0 0 0 7.5px var(--gold), 0 10px 18px rgba(24,33,61,.3) }
.dl-pie { position: absolute; inset: 11px; border-radius: 50%; background: conic-gradient(rgba(242,179,61,.62) 0 calc(var(--h) * 15deg), transparent 0) }
[data-kind=clock] .dl-marks i { --ang: calc(var(--t) * 15deg) }
[data-kind=clock] .dl-marks i::before { content: ""; position: absolute; left: -1px; top: 12px; width: 2px; height: 6px; background: rgba(24,33,61,.45) }
[data-kind=clock] .dl-marks i:nth-child(3n)::before { height: 9px; background: var(--navy) }
[data-kind=clock] .dl-marks i:nth-child(3n) b { display: block; top: 25px; font-size: 13px; font-weight: 700 }
.dl-hand { position: absolute; left: 50%; top: 50%; width: 6px; height: 80px; margin: -80px 0 0 -3px; border-radius: 3px; transform-origin: 50% 100%; rotate: calc(var(--h) * 15deg); background: var(--navy) }
.dl-hand::after { content: ""; position: absolute; left: 50%; top: -10px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--navy), 0 3px 6px rgba(0,0,0,.35) }
.dl-cap { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px; border-radius: 50%; background: var(--navy); box-shadow: 0 0 0 2px var(--gold) }
/* C: the Wheel of Fortune (arcana X): it turns under a fixed gold pointer whose flap ticks over the pegs */
.dl-win { position: relative; width: 300px; height: 200px; overflow: hidden; border-radius: 150px 150px 12px 12px;
  background: radial-gradient(circle at 50% 80%, #24325C, var(--navy) 70%); box-shadow: inset 0 0 0 2px var(--gold), inset 0 0 0 4px var(--navy), 0 10px 18px rgba(24,33,61,.35) }
.dl-wheel { position: absolute; left: 5px; top: 16px; width: 290px; height: 290px; border-radius: 50%; rotate: calc((1 - var(--h)) * 15deg);
  background: repeating-conic-gradient(from -7.5deg, #2D63AE 0 15deg, #1E3F78 15deg 30deg); box-shadow: inset 0 0 0 3px var(--gold), inset 0 0 0 6px var(--navy), 0 0 0 2px var(--navy) }
[data-kind=wheel] .dl-marks i { --ang: calc((var(--t) - 1) * 15deg) }
[data-kind=wheel] .dl-marks i::before { content: ""; position: absolute; left: -3px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 1px var(--navy); transform-origin: 3px 137px; rotate: 7.5deg }
[data-kind=wheel] .dl-marks b { display: block; top: 20px; rotate: none; font-size: 14px; font-weight: 700; color: var(--parch) }
[data-kind=wheel] .dl-marks i:nth-child(6n) b { color: var(--gold) }
.dl-hub { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px; border-radius: 50%; background: url(art/t1-eye.webp) center / 118% no-repeat, var(--parch); box-shadow: 0 0 0 3px var(--gold), 0 0 0 5px var(--navy) }
.dl-flap { position: absolute; left: 50%; top: 0; width: 24px; height: 32px; margin-left: -12px; transform-origin: 50% 0; background: linear-gradient(#FFD76E, #C98B1E); clip-path: polygon(0 0, 100% 0, 50% 100%) }
.dl-win::after { content: ""; position: absolute; left: 50%; top: 14px; width: 44px; height: 70px; margin-left: -22px; pointer-events: none; background: radial-gradient(ellipse at 50% 0, rgba(255,215,110,.38), transparent 70%) }
.dl-hub, .dl-pie, .dl-hand, .dl-cap { pointer-events: none }

/* ---------- item 5: the cover fader, four stops (the rack's fader cap from refs/ref-rack-faders.jpg) ---------- */
.su-cover { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding-top: 6px }
.fader { position: relative; width: 112px; padding: 4px 0; touch-action: none; cursor: grab; border-radius: 8px; outline-offset: 4px }
.fd-track { position: relative; display: block; height: 154px }
.fd-slot { position: absolute; left: 21px; top: 7px; bottom: 7px; width: 8px; border-radius: 4px; background: #0B0D12; box-shadow: inset 0 1px 3px rgba(0,0,0,.9), 0 0 0 1px rgba(24,33,61,.35) }
.fd-stop { position: absolute; left: 0; right: 0; bottom: calc(11px + var(--k) / 3 * 132px); height: 0; display: flex; align-items: center }
.fd-stop::before { content: ""; flex: none; width: 42px; height: 2px; margin-left: 4px; background: var(--navy) }
.fd-stop small { padding-left: 7px; font: 600 14px/1 var(--plex); color: var(--navy); white-space: nowrap }
.fd-cap { position: absolute; left: 4px; bottom: 0; width: 42px; height: 22px; border-radius: 4px; translate: 0 calc(var(--f) / -3 * 132px);
  background: linear-gradient(#41475A, #15181F 55%, #2A2E38); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 8px rgba(0,0,0,.45) }
.fd-cap::after { content: ""; position: absolute; left: 4px; right: 4px; top: 10px; height: 2px; background: #fff }
.fader:active .fd-cap { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 0 0 2px var(--gold), 0 6px 12px rgba(0,0,0,.5) }
.fd-read { display: grid; gap: 6px; align-content: center }

/* ---------- item 6: the slide rail (list, payer, open for ticks) ---------- */
.rail { position: relative; height: 64px; display: grid; align-items: center; border-radius: 12px; container-type: inline-size; touch-action: pan-y; cursor: grab;
  background: rgba(7,11,24,.62); box-shadow: inset 0 0 0 1.5px var(--gold), inset 0 3px 10px rgba(0,0,0,.6) }
.rail::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: clamp(52px, 52px + var(--r) * (100cqw - 64px), 100cqw - 12px); border-radius: 9px; background: rgba(242,179,61,.22) }
.rail:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 3px }
.rail-l { justify-self: center; display: inline-flex; align-items: center; gap: 4px; padding-left: 56px; font: 600 16.5px/1.2 var(--plex); color: #fff; opacity: calc(1 - var(--r) * 1.8); pointer-events: none }
.rail-l .ic { color: var(--gold) }
.rail-k { position: absolute; left: 6px; top: 6px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 9px; background: var(--gold);
  box-shadow: inset 0 0 0 2px var(--navy), 0 4px 10px rgba(0,0,0,.45); translate: clamp(-12px, var(--r) * (100cqw - 64px), 100cqw - 52px) 0; transition: scale .12s }
.rail:active .rail-k { scale: .95 }
.rail-c .rail-l { padding-left: 0 }   /* the word centred on the whole rail */
.rail-c .rail-k { color: var(--navy) }
.rail-card {width: 30px; height: 44px; border-radius: 4px; background: url(art/t1-back.webp) center / cover; box-shadow: 0 0 0 1.5px var(--navy) }

/* ---------- the camera: a shutter lever pulled down, and the long-receipt key latches with a red LED ---------- */
.cam-bar { padding: 8px 28px 28px }
.lever { position: relative; width: 64px; height: 120px; display: grid; justify-items: center; touch-action: none; cursor: grab; border-radius: 32px; outline-offset: 4px }
.lever:focus-visible { outline: 2.5px solid var(--gold) }
.lv-slot { position: absolute; top: 10px; bottom: 4px; width: 24px; padding-bottom: 4px; display: grid; align-items: end; justify-items: center; border-radius: 12px; color: var(--gold);
  background: #000; box-shadow: inset 0 3px 6px rgba(0,0,0,.9), 0 0 0 1.5px rgba(242,179,61,.5) }
.lv-knob { position: absolute; top: 0; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #07090f; translate: 0 calc(var(--l) * 56px);
  box-shadow: inset 0 0 0 4px var(--gold), 0 8px 14px rgba(0,0,0,.6) }
.lv-knob i { width: 50px; height: 50px; border-radius: 50%; background: radial-gradient(circle at 40% 32%, #fff, #E4E7EE 60%, #B8BDCB) }
.lever:active .lv-knob { box-shadow: inset 0 0 0 4px #FFD47A, 0 0 16px rgba(242,179,61,.5), 0 8px 14px rgba(0,0,0,.6) }
.cam-long { background: #161B2B; box-shadow: inset 0 0 0 1.5px rgba(242,179,61,.6), 0 3px 0 #000 }
.cam-long::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #4A1712 }
.cam-long[aria-pressed=true] { background: #161B2B; color: #fff; translate: 0 2px; box-shadow: inset 0 0 0 1.5px var(--gold), 0 1px 0 #000 }
.cam-long[aria-pressed=true]::before { background: #FF4A3A; box-shadow: 0 0 8px 2px rgba(255,74,58,.65) }

/* the card being read can be pushed about */
.t2-photo[data-g] { touch-action: none; cursor: grab }
