body { min-height: 100%; overscroll-behavior: none; }
.a-top { display: flex; justify-content: space-between; align-items: center; padding: max(14px, env(safe-area-inset-top)) 16px 10px; }
.a-top .logos img.aidata { height: 38px; }
.me-chip { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.15); border: 1px solid var(--line); max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-main { padding: 8px 16px 40px; max-width: 560px; margin: 0 auto; }
.card { padding: 22px 20px; margin-bottom: 14px; animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.card h2 { margin: 0 0 6px; font-size: 24px; font-weight: 800; line-height: 1.25; }
.card p { margin: 0 0 6px; }
.kick { font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.btn.block { width: 100%; padding: 15px; font-size: 17px; margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips span { background: rgba(255,255,255,.18); padding: 6px 12px; border-radius: 999px; font-weight: 600; }
.input-row { display: flex; gap: 8px; margin-top: 14px; }
.input-row input { flex: 1; }
.input-row .btn { flex: none; }

.opts { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.opt { position: relative; text-align: left; border: 1px solid var(--line); background: rgba(255,255,255,.1); color: #fff; border-radius: 14px; padding: 14px 14px 14px 52px; font-weight: 600; line-height: 1.3; cursor: pointer; overflow: hidden; width: 100%; }
.opt .n { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.opt .fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,111,181,.25); z-index: 0; transition: width .5s; }
.opt .tx { position: relative; z-index: 1; display: block; }
.opt .pc { position: relative; z-index: 1; font-size: 12px; color: var(--muted); }
.opt.sel { border-color: #fff; background: linear-gradient(135deg, rgba(216,45,139,.75), rgba(165,0,100,.75)); box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.opt.sel .n { background: #fff; color: var(--momo); }
.opt:disabled { cursor: default; }

.qitem { padding: 14px; border-radius: 14px; background: rgba(255,255,255,.1); border: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin-top: 10px; }
.qitem .t { font-weight: 600; line-height: 1.35; }
.qitem .by { font-size: 12px; color: var(--muted); margin-top: 4px; }
.up { border: 1px solid var(--line); background: rgba(255,255,255,.12); color: #fff; border-radius: 12px; padding: 8px 10px; min-width: 56px; font-weight: 800; cursor: pointer; }
.up.on { background: #fff; color: var(--momo); }
.check { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--momo); }

.stars-in { display: flex; gap: 6px; }
.stars-in button { background: none; border: 0; font-size: 34px; line-height: 1; color: rgba(255,255,255,.35); cursor: pointer; padding: 2px; }
.stars-in button.on { color: #ffd43b; text-shadow: 0 0 12px rgba(255,212,59,.6); }

.center { text-align: center; }
.big-emoji { font-size: 64px; margin: 6px 0; }
.wait-dots::after { content: '…'; animation: dots 1.4s steps(4) infinite; display: inline-block; width: 1em; text-align: left; overflow: hidden; vertical-align: bottom; }
@keyframes dots { 0% { width: 0; } 100% { width: 1.2em; } }

/* race */
.tap-zone { position: fixed; inset: 0; z-index: 30; user-select: none; -webkit-user-select: none; touch-action: none; -webkit-tap-highlight-color: transparent; background: #0b4f8a; overflow: hidden; }
.tap-zone canvas#zWater { position: absolute; inset: 0; width: 100%; height: 100%; }
.z-top { position: absolute; left: 16px; right: 16px; top: max(14px, env(safe-area-inset-top)); pointer-events: none; }
.z-pos { font-size: 18px; font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.z-pos b { font-size: 46px; font-weight: 900; }
.z-track { position: relative; height: 14px; border-radius: 7px; background: rgba(255,255,255,.25); margin-top: 8px; }
.z-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; background: linear-gradient(90deg, #ffd43b, #ff6fb5); transition: width .25s; }
.z-track span { position: absolute; top: 50%; transform: translate(-50%, -55%); font-size: 26px; transition: left .25s; }
.z-track em { position: absolute; right: -6px; top: 50%; transform: translateY(-55%); font-style: normal; font-size: 22px; }
.z-center { position: absolute; left: 0; right: 0; top: 11%; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.z-lights { display: flex; gap: 16px; padding: 12px 18px; border-radius: 20px; background: rgba(20,0,12,.8); }
.z-lights span { width: 46px; height: 46px; border-radius: 50%; background: #3b0a2a; }
.z-lights span.on { background: radial-gradient(circle at 35% 35%, #ff8787, #e03131); box-shadow: 0 0 24px #ff2a2a; }
.z-lights span.go { background: radial-gradient(circle at 35% 35%, #8ce99a, #2f9e44); box-shadow: 0 0 30px #40ff6a; }
.tap-zone .count { font-size: 96px; line-height: 1.1; font-weight: 900; text-shadow: 0 8px 40px rgba(0,0,0,.5); }
.z-bottom { position: absolute; left: 16px; right: 16px; bottom: max(24px, env(safe-area-inset-bottom)); text-align: center; pointer-events: none; }
.tap-zone .tap-hint { font-size: 34px; font-weight: 900; letter-spacing: 1px; text-shadow: 0 4px 20px rgba(0,0,0,.45); margin-bottom: 12px; }
.tap-zone.boost .tap-hint { color: #ffe066; animation: shake .25s infinite; }
@keyframes shake { 50% { transform: translateX(3px) rotate(-1deg); } }
.z-speed { height: 16px; border-radius: 8px; background: rgba(0,0,0,.3); overflow: hidden; }
.z-speed i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4dd0e1, #ffd43b, #ff3d7f); transition: width .15s; }
.z-speed-lbl { margin-top: 6px; font-weight: 800; font-size: 16px; }
.duck-pre { width: 160px; height: 110px; display: block; margin: 0 auto; }
.sync-bar { max-width: 560px; margin: 0 auto 8px; padding: 0 16px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync-bar b { color: #fff; }
.sync-bar .live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); margin-right: 8px; vertical-align: middle; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.25); margin: 8px 0 4px; }
.seg button { border: 0; background: none; color: #fff; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; }
.seg button.on { background: #fff; color: var(--momo); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 10px 0 14px; }
.swatches button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); cursor: pointer; }
.swatches button.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.35); transform: scale(1.1); }
.p-timer { color: #fff; }
.p-timer.urgent { color: #ff8787; }
.top3 { margin: 14px 0 4px; padding: 12px 14px; border-radius: 14px; background: rgba(255,212,59,.12); border: 1px solid rgba(255,212,59,.45); }
.top3 .kick { color: #ffe066; margin-bottom: 6px; }
.top3-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; font-weight: 600; line-height: 1.3; }
.top3-row .m { font-size: 22px; }
.top3-row b { color: #ffe066; }
.top3-row.mine .tt { text-decoration: underline; text-decoration-color: #ff6fb5; text-underline-offset: 3px; }

.opt .spk, .top3-row .spk { display: block; font-size: 12px; font-weight: 700; opacity: .8; margin-top: 3px; }
/* image slide (uploaded image / imported presentation page) */
.slide-img { display: block; width: 100%; height: auto; border-radius: 12px; margin: 6px 0; background: rgba(0,0,0,.2); }
/* quiz */
.qz-btns { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 12px 0 8px; }
.qz-btns.n2 { grid-template-columns: 1fr 1fr; }
.qz-btns.n2 .qz-btn { min-height: 120px; flex-direction: column; justify-content: center; text-align: center; font-size: 20px; }
.qz-btn { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 16px; padding: 16px; color: #fff; font: inherit; font-size: 17px; font-weight: 800; text-align: left; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.25); transition: transform .08s, opacity .2s; }
.qz-btn:active { transform: scale(.97); }
.qz-btn span, .qz-ans span { flex: none; width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.25); display: grid; place-items: center; font-size: 20px; font-weight: 900; }
.qz-btn:disabled:not(.picked) { opacity: .35; }
.qz-btn.picked { box-shadow: 0 0 0 4px #fff; }
.c0 { background: #d6336c; } .c1 { background: #1c7ed6; } .c2 { background: #e67700; } .c3 { background: #2b8a3e; } .c4 { background: #6741d9; } .c5 { background: #0c8599; }
.qz-bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.2); overflow: hidden; margin: 10px 0 4px; }
.qz-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff6fb5, #ffd43b); transition: width .2s linear; }
.qz-bar i.urgent { background: #ff6b6b; }
.qz-left { font-size: 13px; font-weight: 700; text-align: right; color: var(--muted); }
.qz-count { font-size: 96px; font-weight: 900; line-height: 1.1; }
.qz-pts { font-size: 34px; font-weight: 900; color: #ffe066; }
.qz-ans { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; font-weight: 800; text-align: left; margin-top: 6px; color: #fff; }
.card h2.ok { color: #8ce99a; } .card h2.bad { color: #ffa8a8; }
.qz-score { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.qz-score > div { background: rgba(255,255,255,.1); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: center; }
.qz-score b { display: block; font-size: 26px; font-weight: 900; }
.qz-score span { font-size: 12px; color: var(--muted); }
.lb-ph { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.lb-ph li { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.08); }
.lb-ph li.me { background: rgba(255,212,59,.25); box-shadow: 0 0 0 2px #ffd43b; }
.lb-ph li span { font-weight: 900; text-align: center; } .lb-ph li em { font-style: normal; font-weight: 800; color: #ffe066; }

/* Phone background: one static image — no blur over it, and no resize/jump when the
   mobile address bar shows or hides (100lvh = the largest viewport height). */
.bg { bottom: auto; height: 100vh; height: 100lvh; background-attachment: scroll; }
.glass { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(30, 0, 20, .42); }
