:root {
  --ink: #172a32;
  --paper: #fffaf0;
  --page: #f3efe6;
  --muted: #6a7572;
  --petrol: #3f7480;
  --petrol-dark: #28515e;
  --mint: #78afa4;
  --coral: #dd715a;
  --coral-dark: #ae5042;
  --mustard: #e4ba4d;
  --skin: #f2bd98;
  --skin-shadow: #d98e68;
}

* { box-sizing: border-box; }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; white-space: nowrap !important; border: 0 !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; }

html { min-width: 320px; overflow-x: hidden; background: var(--page); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle, rgba(23, 42, 50, .045) 1.2px, transparent 1.4px) 0 0 / 16px 16px,
    radial-gradient(circle at 10% 18%, rgba(120, 175, 164, .18) 0 8%, transparent 8.2%),
    radial-gradient(circle at 93% 73%, rgba(221, 113, 90, .12) 0 10%, transparent 10.2%),
    var(--page);
}

a, [role="button"] { -webkit-tap-highlight-color: transparent; }

.page-shell { width: min(1320px, 100%); min-height: 100vh; margin: 0 auto; padding: 24px 38px 42px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }

.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--ink); font-size: 13px; font-weight: 800; text-decoration: none; }
.brand-mark { display: grid; width: 45px; height: 45px; place-items: center; color: var(--paper); font-family: "Unbounded", sans-serif; font-size: 12px; background: var(--coral); border: 2px solid var(--ink); border-radius: 14px 14px 14px 5px; box-shadow: 4px 4px 0 var(--ink); transform: rotate(-3deg); }

.hero { display: flex; flex-direction: column; align-items: center; padding-top: 27px; text-align: center; }
.hero-copy { position: relative; z-index: 3; width: 100%; min-width: 0; }
h1 { margin: 0; font-family: "Unbounded", sans-serif; font-size: clamp(40px, 4.8vw, 64px); font-weight: 800; letter-spacing: -.075em; line-height: 1.05; text-shadow: 4px 4px 0 rgba(120, 175, 164, .35); }
h1 span { display: inline-block; margin: 0 .11em; color: var(--coral); font-size: .42em; letter-spacing: -.04em; transform: translateY(-.35em) rotate(-5deg); }
.subtitle { margin: 13px 0 0; color: var(--muted); font-size: clamp(14px, 1.4vw, 17px); font-weight: 700; }

.poll-card { position: relative; width: min(1040px, 100%); aspect-ratio: 1000 / 620; margin-top: 23px; overflow: hidden; background: #a7bfba; border: 5px solid var(--ink); border-radius: 42px; box-shadow: 14px 16px 0 rgba(23, 42, 50, .13); -webkit-user-select: none; user-select: none; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-user-select: none; user-select: none; }
.scene text { -webkit-user-select: none; user-select: none; }
.wall { fill: url(#bricks); }
.wall-art { opacity: .58; pointer-events: none; }
.arrow { fill: var(--mint); paint-order: stroke fill; stroke: var(--paper); stroke-linejoin: round; stroke-width: 16; filter: drop-shadow(7px 8px 0 rgba(23, 42, 50, .58)); }
.arrow-right { fill: var(--mustard); }
.burst { fill: var(--coral); opacity: .68; }
.burst-right { fill: var(--mustard); }
.tag { fill: none; font-family: "Unbounded", sans-serif; font-size: 42px; font-style: italic; font-weight: 800; stroke: var(--ink); stroke-width: 3; transform: rotate(-8deg); transform-origin: center; }
.tag-right { transform: rotate(8deg); }
.spray { fill: var(--coral); }
.spray-right { fill: var(--mustard); }

.sleeve-outline, .sleeve-fill { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sleeve-outline { stroke: #101a20; stroke-width: 94; }
.sleeve-fill { stroke: var(--petrol); stroke-width: 76; }

.ground { fill: rgba(15, 26, 31, .29); }
.torso-outline { fill: var(--paper); stroke: #101a20; stroke-linejoin: round; stroke-width: 10; }
.torso { fill: var(--petrol); stroke: #101a20; stroke-linejoin: round; stroke-width: 7; }
.torso-shadow { fill: var(--petrol-dark); }
.hood-back, .hood-front { fill: var(--mint); stroke: #101a20; stroke-linejoin: round; stroke-width: 7; }
.pocket { fill: var(--petrol-dark); stroke: #7198a1; stroke-linejoin: round; stroke-width: 4; }
.drawstring { fill: none; stroke: var(--coral); stroke-linecap: round; stroke-width: 9; }
.knot { fill: var(--coral); stroke: #101a20; stroke-width: 4; }
.neck, .ear, .head { fill: var(--skin); stroke: #101a20; stroke-linecap: round; stroke-linejoin: round; stroke-width: 8; }
.face-shadow { fill: var(--skin-shadow); opacity: .75; }
.hair { fill: #111a20; stroke: #111a20; stroke-linejoin: round; stroke-width: 6; }
.cap, .cap-brim { fill: var(--mint); stroke: #101a20; stroke-linejoin: round; stroke-width: 9; }
.cap-brim { fill: var(--coral); }
.cap-panel { fill: none; stroke: #c9f1e9; stroke-linecap: round; stroke-width: 6; }
.cap-strap { fill: var(--petrol); stroke: #101a20; stroke-width: 5; }
.brow { fill: none; stroke: #101a20; stroke-linecap: round; stroke-width: 8; }
.eye-white { fill: #fffdf7; stroke: #101a20; stroke-width: 6; }
.pupil, .nose { fill: #101a20; }
.mouth { fill: #101a20; stroke: #101a20; stroke-linejoin: round; stroke-width: 5; }
.teeth { fill: #fffdf7; }
.tongue { fill: #df655e; }
.earring { fill: none; stroke: var(--mustard); stroke-width: 8; }

.hand-button { cursor: pointer; outline: none; touch-action: manipulation; }
.hand-hit { fill: transparent; pointer-events: all; }
.cuff { fill: var(--mint); stroke: #101a20; stroke-linejoin: round; stroke-width: 8; }
.palm, .finger, .thumb { fill: var(--skin); stroke: #101a20; stroke-linecap: round; stroke-linejoin: round; stroke-width: 8; transition: fill 180ms ease; }
.palm-line { fill: none; opacity: .7; stroke: #c57d5a; stroke-linecap: round; stroke-width: 5; }
.focus-ring { fill: none; opacity: 0; stroke: var(--mustard); stroke-dasharray: 10 10; stroke-width: 7; }
.hand-button:hover .palm, .hand-button:hover .finger, .hand-button:hover .thumb, .hand-button:focus-visible .palm, .hand-button:focus-visible .finger, .hand-button:focus-visible .thumb { fill: #ffd0ad; }
.hand-button:focus-visible .focus-ring { opacity: 1; }
.hand-button.is-popping .palm { animation: hand-pop 520ms cubic-bezier(.2, 1.5, .5, 1); transform-box: fill-box; transform-origin: center; }

.digit { font-family: "Unbounded", sans-serif; font-size: 126px; font-style: italic; font-weight: 800; }
.digit-group { pointer-events: none; }
.digit-six, .digit-seven { paint-order: stroke fill; stroke: #101a20; stroke-linejoin: round; stroke-width: 11; filter: drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff); }
.digit-six { fill: var(--mustard); transform: rotate(-7deg); transform-origin: 178px 342px; }
.digit-seven { fill: var(--coral); transform: rotate(7deg); transform-origin: 820px 342px; }
.digit-six-shadow, .digit-seven-shadow { fill: #101a20; opacity: .85; }
.digit-shadow { fill: rgba(16, 26, 32, .17); transition: fill 200ms ease, transform 200ms ease; transform-box: fill-box; transform-origin: center; }
.digit-group.is-selected .digit-shadow { fill: var(--mustard); transform: scale(1.35); }

.result-card { position: absolute; z-index: 5; top: 25px; display: flex; width: 132px; flex-direction: column; align-items: center; padding: 16px 11px 15px; text-align: center; background: var(--paper); border: 3px solid var(--ink); border-radius: 17px; box-shadow: 7px 8px 0 rgba(23, 42, 50, .2); transition: transform 700ms cubic-bezier(.2, .86, .2, 1); }
.result-six { left: 25px; transform: rotate(-4deg) translateY(calc(var(--six-offset, 0) * -.22px)); }
.result-seven { right: 25px; transform: rotate(4deg) translateY(calc(var(--seven-offset, 0) * -.22px)); }
.result-percent { font-family: "Unbounded", sans-serif; font-size: 29px; font-weight: 800; letter-spacing: -.06em; line-height: 1.05; }
.result-six .result-percent { color: var(--coral-dark); }
.result-seven .result-percent { color: var(--petrol-dark); }

.tap-hint { position: absolute; z-index: 6; bottom: 15px; left: 50%; display: flex; align-items: center; gap: 7px; margin: 0; padding: 9px 14px; color: var(--ink); font-size: 11px; font-weight: 800; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; transform: translateX(-50%); transition: opacity 250ms ease, transform 250ms ease; }
.tap-hint span { color: var(--coral-dark); font-size: 16px; animation: point-up 1.4s ease-in-out infinite; }
.tap-hint.is-hidden { opacity: 0; transform: translate(-50%, 5px); }

.poll-meta { display: flex; width: max-content; max-width: 100%; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 13px; margin-top: 23px; padding: 9px 14px; background: var(--paper); border: 1px solid rgba(23, 42, 50, .13); border-radius: 18px; }
.poll-meta p { min-width: 0; margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.poll-meta strong { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.click-breakdown { display: flex; align-items: center; gap: 7px; }
.click-counter { display: inline-flex; min-width: 0; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; white-space: nowrap; background: rgba(23, 42, 50, .055); border-radius: 999px; }
.click-counter strong { max-width: 14ch; overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
.click-choice { display: grid; width: 21px; height: 21px; flex: 0 0 auto; place-items: center; color: var(--ink); font-family: "Unbounded", sans-serif; font-size: 9px; font-weight: 800; border-radius: 50%; }
.click-six .click-choice { background: var(--mustard); }
.click-seven .click-choice { background: var(--coral); }
.meta-divider { width: 1px; height: 23px; background: rgba(23, 42, 50, .15); }
.vote-status { min-height: 17px; margin: 8px 0 0; color: var(--coral-dark); font-size: 11px; font-weight: 800; }

.site-credit { display: flex; width: max-content; max-width: 100%; flex: 0 0 auto; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-decoration: none; text-transform: uppercase; background: rgba(255, 250, 240, .82); border: 1px solid rgba(23, 42, 50, .13); border-radius: 13px; transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.site-credit:hover, .site-credit:focus-visible { border-color: rgba(23, 42, 50, .35); box-shadow: 4px 5px 0 rgba(23, 42, 50, .12); outline: none; transform: translateY(-2px); }
.site-credit img { display: block; width: 120px; height: auto; background: #000; border-radius: 2px; }

.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 10px; padding: 12px 16px 12px 12px; color: var(--paper); font-size: 13px; background: var(--ink); border-radius: 15px; box-shadow: 0 16px 40px rgba(23, 42, 50, .22); opacity: 0; pointer-events: none; transform: translateY(15px); transition: opacity 250ms ease, transform 250ms ease; }
.toast > span { display: grid; width: 25px; height: 25px; place-items: center; color: var(--ink); background: var(--mint); border-radius: 50%; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@keyframes hand-pop { 0% { transform: scale(1); } 45% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes point-up { 0%, 100% { transform: translateY(1px); } 50% { transform: translateY(-3px); } }

@media (max-width: 760px) {
  .page-shell { padding: 16px 14px 28px; }
  .brand > span:last-child { display: none; }
  .hero { padding-top: 28px; }
  h1 { font-size: clamp(36px, 10.5vw, 52px); }
  .subtitle { max-width: 320px; margin-right: auto; margin-left: auto; }
  .poll-card { width: calc(100vw - 20px); min-height: 500px; aspect-ratio: auto; margin-top: 20px; border-radius: 30px; box-shadow: 8px 10px 0 rgba(23, 42, 50, .13); }
  .scene { left: 50%; width: 775px; max-width: none; transform: translateX(-50%); }
  .result-card { top: 18px; width: 98px; padding: 10px 7px; }
  .result-six { left: 14px; }
  .result-seven { right: 14px; }
  .result-percent { font-size: 22px; }
  .tap-hint { bottom: 12px; }
  .poll-meta { gap: 8px 10px; padding: 8px 10px; }
  .toast { right: 14px; bottom: 14px; left: 14px; justify-content: center; }
}

@media (max-width: 420px) {
  .topbar { gap: 10px; }
  .site-credit { gap: 7px; padding: 5px 6px 5px 8px; font-size: 8px; }
  .site-credit img { width: 94px; }
  .poll-card { min-height: 470px; }
  .scene { width: 735px; }
  .poll-meta p { font-size: 10px; }
  .click-counter { gap: 5px; padding-right: 7px; }
  .click-counter strong { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
