/* Look taken from the Unilab "Bottle of the Hands UI" deck. Titles, hands and bottle are CSS stand-ins
   until the final renders are dropped into public/art/. All sizes are em; 1em = 1/27 of the stage width. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0c0218; overflow: hidden; overscroll-behavior: none; }
.stage { container-type: size; position: relative; overflow: hidden; margin: 0 auto; }
.stage.screen { height: 100vh; aspect-ratio: 9 / 16; max-width: 100vw; }
.stage.phone { width: 100vw; height: 100vh; height: 100dvh; }
.view { position: absolute; inset: 0; font-size: 3.7037cqw; color: #fff; font-family: Barlow, system-ui, sans-serif; font-weight: 500;
  display: flex; flex-direction: column; align-items: center; text-align: center; padding: 2.2em 1.75em 1.6em; gap: 1em;
  background: linear-gradient(rgba(22,5,47,.55), rgba(22,5,47,.15) 30%, rgba(22,5,47,.2) 70%, rgba(22,5,47,.75)), url(art/arena-dark.webp) center / cover, #2a0a55; }
.phone .view { font-size: 4.1cqw; }
.view.bright { background: linear-gradient(rgba(42,10,85,.35), rgba(42,10,85,0) 30%, rgba(42,10,85,0) 75%, rgba(42,10,85,.55)), url(art/arena-bright.webp) center / cover, #b9a8e6; }
.view.win { background: radial-gradient(70% 34% at 50% 50%, rgba(200,140,255,.9), transparent 70%), linear-gradient(#6b4fb0, #7a2fe0 50%, #2a0a55); }
.view.lose { background: radial-gradient(70% 34% at 50% 50%, rgba(120,100,150,.6), transparent 70%), linear-gradient(#2b2540, #3a2f55 50%, #16052f); }
.ropes { display: none; position: absolute; left: 0; right: 0; top: 58%; height: 12%; background: repeating-linear-gradient(180deg, transparent 0 30%, rgba(255,130,205,.5) 30% 34%); pointer-events: none; }
.view > * { position: relative; }
.view > .ropes { position: absolute; }
.boh { font-family: Anton, Impact, sans-serif; text-transform: uppercase; line-height: .95; color: #e9e0fa; font-size: 2.3em;
  text-shadow: 0 .06em 0 #8a4be0, 0 .12em 0 #4a1a94, 0 .22em .3em rgba(0,0,0,.6); }
.boh small { font-size: .5em; }
.boh.stack { font-size: 2.9em; line-height: .88; }
.boh.stack small { display: block; font-size: .42em; line-height: 1.25; letter-spacing: .12em; }
.bts { font-family: 'Rubik Distressed', Anton, Impact, sans-serif; text-transform: uppercase; line-height: .9; font-size: 5.6em; text-shadow: 0 .06em 0 rgba(0,0,0,.5); }
.bts small { font-size: .44em; }
.bts:not(.sm) small { display: block; line-height: 1.05; }
.bts.sm { font-size: 3.9em; }
.big { font-style: italic; }
.grow { flex: 1 1 0; min-height: 0; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1em; }
.lead { font-size: 1.4em; font-weight: 700; line-height: 1.25; }
.note { font-size: .85em; line-height: 1.3; }
.logos { align-self: stretch; background: #f3eef9; color: #3b0f78; border-radius: .25em; padding: .7em; font-size: .72em; font-weight: 700; letter-spacing: .06em; }
.card { background: #f3eef9; color: #3b0f78; border: .2em solid #8a4be0; border-radius: .45em; box-shadow: 0 0 0 .12em #e9e0fa; }
.num { font-family: Anton, Impact, sans-serif; line-height: 1; font-variant-numeric: tabular-nums; }
.qr { padding: 1.1em; display: flex; flex-direction: column; align-items: center; gap: .5em; font-weight: 700; font-size: 1em; line-height: 1.2; }
.qr .url { font-size: 1.45em; overflow-wrap: anywhere; }
.qr .wifi { font-size: 1.05em; font-weight: 500; }
.qr img { width: 12.5em; height: 12.5em; display: block; }
.stats { display: flex; gap: 1.5em; }
.stat { display: flex; flex-direction: column; gap: .4em; align-items: center; font-weight: 700; letter-spacing: .08em; font-size: 1.15em; }
.stat .card { font-size: 2.6em; width: 2.8em; padding: .3em 0; letter-spacing: 0; }
.loader { width: 12em; height: 3.2em; border-radius: 1.6em; border: .12em solid rgba(255,255,255,.6); box-shadow: 0 0 1.4em rgba(190,120,255,.8);
  background: repeating-linear-gradient(90deg, #b866ff 0 1em, #f3eef9 1em 2em); background-size: 2em 100%; animation: slide .7s linear infinite; }
@keyframes slide { to { background-position: 2em 0; } }
/* bottle */
.bottle { display: flex; flex-direction: column; align-items: center; width: var(--bw, 9em); }
.bottle .cap { width: 56%; aspect-ratio: 1.55; border-radius: 14% 14% 8% 8%; background: linear-gradient(90deg, rgba(60,20,120,.35), transparent 25%, transparent 75%, rgba(60,20,120,.4)), repeating-linear-gradient(90deg, #fff 0 7%, #cbb9ea 7% 10%); box-shadow: 0 .1em .5em rgba(42,10,85,.55); }
.bottle .glass { position: relative; width: 100%; aspect-ratio: .68; overflow: hidden; border: .16em solid #fff; border-radius: 16% / 11%; background: linear-gradient(100deg, rgba(255,255,255,.55) 0 6%, rgba(255,255,255,.12) 14% 80%, rgba(255,255,255,.4) 92%), rgba(120,80,190,.28); box-shadow: 0 .3em 1.4em rgba(42,10,85,.6), inset 0 0 1.2em rgba(255,255,255,.35); }
.bottle .liq { position: absolute; left: 0; right: 0; bottom: 0; height: 86%; overflow: hidden; background: linear-gradient(rgba(226,208,255,.5), rgba(196,168,245,.6)); border-top: .12em solid rgba(255,255,255,.8); }
/* settled medicine at the bottom: shrinks as it mixes in */
.bottle .liq::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: calc((1 - var(--mix, 0)) * 30%); background: linear-gradient(#7a2fe0, #43148c); border-radius: 45% 55% 0 0 / 22% 16% 0 0; transition: height .25s linear; }
/* mixed medicine with suspended particles: fades in as it mixes */
.bottle .liq::after { content: ''; position: absolute; inset: 0; opacity: var(--mix, 0); transition: opacity .25s linear, background-position .18s ease-out;
  background: radial-gradient(circle, rgba(255,255,255,.6) 0 .09em, transparent .11em) 0 0 / 1.3em 1.5em, radial-gradient(circle, rgba(255,255,255,.4) 0 .06em, transparent .08em) .6em .7em / 1.1em 1.3em, linear-gradient(100deg, rgba(255,255,255,.3) 0 6%, transparent 16%), linear-gradient(#b866ff, #5a14c4); }
.bottle.wob .liq::after { background-position: .5em .6em, .1em .2em, 0 0, 0 0; }
.bottle.tap { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; }
.bottle.wob { animation: wob .18s ease-in-out; }
@keyframes wob { 30% { transform: rotate(-7deg); } 70% { transform: rotate(7deg); } }
.pair { display: flex; gap: 1.5em; align-items: flex-end; justify-content: center; }
.pair .bottle:first-child { transform: rotate(-14deg); }
.pair .bottle:last-child { transform: rotate(14deg); }
/* progress bars */
.bars { align-self: stretch; flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: .9em; }
.bar-row { display: flex; flex-direction: column; gap: .2em; text-align: left; }
.bar-row.off { opacity: .45; }
.bar-row.ahead .bar { border-color: #fff; box-shadow: 0 0 1.4em rgba(255,255,255,.9); }
.timer { display: flex; align-items: center; gap: .6em; font-weight: 700; letter-spacing: .1em; font-size: 1.1em; }
.timer .card { font-size: 2em; padding: .15em .45em; letter-spacing: 0; }
.hero { width: 100%; flex: 1 1 0; min-height: 0; object-fit: cover; object-position: 50% 60%; border-radius: .6em; -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 55%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 70% 70% at 50% 55%, #000 55%, transparent 100%); }
.tappable { cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; }
.tapstart { font-size: 4.2em; padding: .1em .2em .25em; animation: tappulse 1.6s ease-in-out infinite; }
@keyframes tappulse { 50% { transform: scale(1.07); opacity: .75; } }
.ghost { position: absolute !important; left: 50%; top: 56%; transform: translate(-50%, -50%); opacity: .55; filter: blur(.12em); }
.lose .ghost { opacity: .22; filter: blur(.12em) grayscale(.7); }
.bar-lab { display: flex; justify-content: space-between; font-size: 1.2em; line-height: 1.15; white-space: nowrap; text-shadow: 0 .08em .2em rgba(0,0,0,.7); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.bar { height: 2.1em; border-radius: .5em; border: .16em solid #e9e0fa; box-shadow: 0 0 .9em rgba(190,120,255,.7); background: #16052f; overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: .3em; background: repeating-linear-gradient(115deg, #d3a3ff 0 1em, #8a4be0 1em 1.5em); transition: width .15s linear; }
.pop { font-size: 3.2em; transform: rotate(-4deg); white-space: nowrap; animation: pop .35s ease-out; min-height: 1.1em; }
@keyframes pop { from { transform: rotate(-4deg) scale(.6); opacity: 0; } }
/* phone bits */
.top { align-self: stretch; display: flex; justify-content: space-between; align-items: center; gap: .4em; }
.chip { background: #f3eef9; color: #3b0f78; border: .16em solid #8a4be0; border-radius: .45em; padding: .3em .6em; font-size: .75em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; max-width: 7.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
form { align-self: stretch; display: flex; flex-direction: column; gap: .7em; margin: 0; }
.in { width: 100%; height: 3em; border: .18em solid #8a4be0; border-radius: .6em; background: #f3eef9; color: #2a0a55; font: 700 1.05em Barlow, system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 .1em #e9e0fa; }
.in::placeholder { color: #5d4a80; }
.consent { display: flex; gap: .6em; align-items: flex-start; text-align: left; font-size: .8em; line-height: 1.35; min-height: 44px; }
.consent input { width: 22px; height: 22px; flex-shrink: 0; margin: .1em 0 0; }
.btn { width: 100%; min-height: 2.3em; border: 0; border-radius: .45em; background: linear-gradient(#c58bff, #7a2fe0); color: #fff; font: 400 1.6em Anton, Impact, sans-serif; letter-spacing: .08em; box-shadow: 0 .2em 0 #3b0f78; cursor: pointer; }
.btn:disabled { opacity: .6; }
.err { min-height: 1.3em; font-size: .85em; font-weight: 700; color: #ffd9ec; }
.dark-text { color: #2a0a55; }
.conn { position: absolute; left: 0; right: 0; bottom: 0; padding: .5em; font: 700 14px Barlow, system-ui, sans-serif; text-align: center; background: #16052f; color: #ffd9ec; z-index: 5; }
.conn[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .loader, .pop, .bottle.wob, .tapstart { animation: none; } }
