:root {
    --bg: #faf6f1; --card: #ffffff; --ink: #2b2522; --muted: #7a6f68; --line: #e8dfd6;
    --a: #e0605a; --b: #2a9d8f; --prop: #c9bcae; --accent: #2b2522; --accent-ink: #fff;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #1c1917; --card: #262220; --ink: #f2ebe4; --muted: #a8998e; --line: #3a3330;
      --a: #ff7b73; --b: #4fc4b5; --prop: #5a504a; --accent: #f2ebe4; --accent-ink: #1c1917;
    }
  }
  :root[data-theme="dark"] {
    --bg: #1c1917; --card: #262220; --ink: #f2ebe4; --muted: #a8998e; --line: #3a3330;
    --a: #ff7b73; --b: #4fc4b5; --prop: #5a504a; --accent: #f2ebe4; --accent-ink: #1c1917;
  }
  * { box-sizing: border-box; }
  body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
  main { width: 80vw; margin: 0 auto; padding: 40px 0 24px; min-height: 100vh; display: flex; flex-direction: column; }
  main > :not(.masthead):not(footer) { margin-block: auto; }
  .masthead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
    padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
  .masthead h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.1; letter-spacing: -.01em; }
  .masthead .badge { font-size: .8rem; vertical-align: super; color: var(--a); border: 1.5px solid var(--a);
    border-radius: 999px; padding: 1px 7px; margin-left: 4px; letter-spacing: 0; }
  .tagline { margin: 6px 0 0; color: var(--muted); }
  .pose-layout { display: grid; grid-template-columns: 15fr 50fr 15fr; grid-template-areas: ". title ." "left center right";
    column-gap: 24px; row-gap: 18px; align-items: start; }
  .pose-layout .left { grid-area: left; } .pose-layout .center { grid-area: center; } .pose-layout .right { grid-area: right; }
  .pose-layout .center .card { padding: 10px; }
  .pose-layout .card { margin-top: 0; }
  .side { font-size: .9rem; }
  .side h2 { margin-top: 0; }
  .side dl > dt:first-child { margin-top: 0; }
  .side.left { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-height: var(--card-h, 0px); }
  .meters { display: contents; }
  .meters > div > dt { margin-top: 0; }
  .side .aka { margin-bottom: 0; }
  .rating { display: inline-flex; gap: 4px; margin-top: 2px; }
  .rating svg { width: 26px; height: 26px; fill: currentColor; }
  .rating svg.off { opacity: .2; }
  .rating.diff svg.off { transform: rotate(180deg); }  /* not today */
  .rating.diff { color: var(--a); }
  .rating.cosmo { color: var(--b); }
  .wild.seen { color: var(--b); font-weight: 600; }
  .wild.unseen { color: var(--muted); }
  .wild span { font-size: 1.1rem; }
  @media (max-width: 900px) {
    main { width: auto; max-width: 640px; padding: 24px 16px 24px; }
    .masthead { margin-bottom: 24px; }
    .pose-layout { grid-template-columns: 1fr; grid-template-areas: "left" "center" "right"; }
    .stage-title { display: none; }
    .side.left { min-height: 0; gap: 14px; }
  }
  header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  h1 { font-size: 1.1rem; margin: 0; letter-spacing: .02em; }
  .stats { color: var(--muted); font-size: .85rem; }
  .card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-top: 16px; }
  .stage { width: 100%; height: auto; display: block; }
  .lost { text-align: center; padding: 12px; }
  .lost .stage { max-height: calc(100vh - 300px); }  /* as big as the screen allows, text still visible */
  .lost h2 { margin: 8px 0 4px; }
  /* 5xx page: the lights flicker off about 1.3 times a second (well under the 3-per-second photosensitivity limit) */
  .stage.flicker { background: var(--card); border-radius: 8px; animation: lights .75s infinite; }
  @keyframes lights { 0%, 55% { filter: none; } 60%, 80% { filter: brightness(.06); } 85%, 100% { filter: none; } }
  @media (prefers-reduced-motion: reduce) { .stage.flicker { animation: none; } }
  .stage .prop { stroke: var(--prop); stroke-width: 3; stroke-linecap: round; }
  .stage .fig { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
  .stage .fig .torso { stroke-width: 6.5; }
  .stage .fig .far { opacity: .55; }
  .stage .fig.a { stroke: var(--a); } .stage .fig.a circle { fill: var(--a); stroke: none; }
  .stage .fig.b { stroke: var(--b); } .stage .fig.b circle { fill: var(--b); stroke: none; }
  /* more partners, for the 404 group scene */
  .stage .fig.c { --fig: #e9b949; } .stage .fig.d { --fig: #ff8fab; } .stage .fig.e { --fig: #a78bfa; } .stage .fig.f { --fig: #5ab0f0; } .stage .fig.g { --fig: #f4a261; }
  .stage .fig:is(.c, .d, .e, .f, .g) { stroke: var(--fig); } .stage .fig:is(.c, .d, .e, .f, .g) circle { fill: var(--fig); stroke: none; }
  .stage .fig circle.eye { fill: var(--card); }
  .stage .bubble { opacity: 0; transform: scale(.5); transform-box: fill-box; transform-origin: 50% 100%;
    transition: opacity .12s, transform .25s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
  .stage .bubble.on { opacity: 1; transform: scale(1); }
  .stage .bubble path { fill: #fff; stroke: #2b2522; stroke-width: 1.3; stroke-linejoin: round; }
  .stage .bubble text { fill: #2b2522; font: 700 8.5px "Comic Sans MS", "Chalkboard SE", "Comic Neue", cursive; }
  @media (prefers-reduced-motion: reduce) { .stage .bubble { transition: none; transform: none; } }
  .gated { filter: blur(14px); pointer-events: none; user-select: none; }
  .gate-backdrop { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px;
    background: color-mix(in srgb, var(--bg) 45%, transparent); z-index: 10; }
  .gate { max-width: 420px; width: 100%; margin: 0; box-shadow: 0 20px 60px rgb(0 0 0 / .35); }
  .gate h2 { margin-top: 0; }
  h2 { font-size: 1.6rem; margin: 12px 0 2px; }
  .aka { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
  dl { margin: 0; }
  dt { font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 14px; }
  dd { margin: 4px 0 0; }
  .folk { font-style: italic; }
  .buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
  button, .button { font: inherit; font-weight: 600; padding: 14px 12px; border-radius: 12px; cursor: pointer; border: 2px solid var(--accent); }
  .yes { background: var(--accent); color: var(--accent-ink); }
  .no { background: transparent; color: var(--ink); }
  button:focus-visible { outline: 3px solid var(--b); outline-offset: 2px; }
  footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-top: 40px;
    padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: .7rem; line-height: 1.4; }
  footer a { color: inherit; }
  footer .tip { text-align: right; }
  footer .addr { all: unset; position: relative; cursor: pointer; margin-left: 6px; font-family: ui-monospace, Menlo, monospace; text-decoration: underline dotted; }
  footer .addr:focus-visible { outline: 2px solid var(--b); outline-offset: 2px; }
  footer .qr-card { display: none; position: absolute; bottom: calc(100% + 8px); right: 0; z-index: 3; flex-direction: column; align-items: center; gap: 4px;
    padding: 10px 10px 8px; border-radius: 10px; background: #fff; color: #111; box-shadow: 0 4px 16px #0004; cursor: default; }
  footer .qr-card b { display: flex; align-items: center; gap: 6px; font: 600 15px system-ui, sans-serif; }
  footer .qr-card b svg { width: 20px; height: 20px; }
  footer .qr-card code { font-size: 12px; }
  footer .addr:focus-visible .qr-card { display: flex; }
  @media (hover: hover) { footer .addr:hover .qr-card { display: flex; } }  /* touch screens: no QR, the phone is the wallet */
  @media (max-width: 700px) { footer { flex-direction: column; align-items: center; text-align: center; } footer .tip { text-align: center; } }
  .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
  .grid figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
  .grid figcaption { font-size: .75rem; text-align: center; }
button, .button { width: 100%; display: block; text-align: center; text-decoration: none; }
.buttons form { margin: 0; }
a { color: inherit; }
h1 a { text-decoration: none; }

/* ---------- brand logo: revolver cylinder of 6 vulvas, one penis-bullet ---------- */
.brand { display: inline-flex; align-items: center; gap: .3em; }
.logo { width: 1.35em; height: 1.35em; flex: none; overflow: visible; }
.logo-body { fill: var(--card); stroke: var(--muted); stroke-width: 3; }
.logo-hub { fill: var(--muted); }
.logo-chambers { color: var(--b); fill: var(--b); }
.logo-bullet { fill: var(--a); }
.logo-flash { fill: #ff8fab; opacity: 0; }
.logo-cyl, .logo-bullet, .logo-flash { transform-box: fill-box; transform-origin: center; }
.logo-bullet { transform-origin: right center; }
.logo-cyl { animation: logo-spin 4.8s infinite; }
.logo-bullet { animation: logo-load 4.8s infinite; }
.logo-flash { animation: logo-flash 4.8s infinite; }
@keyframes logo-load {
  0% { transform: translateX(-22px); opacity: 0; }
  10% { opacity: 1; }
  30% { transform: translateX(-7px); opacity: 1; animation-timing-function: ease-in; }  /* tip at the slot's edge */
  42% { transform: translateX(1px) scale(.55); opacity: 1; }                             /* pushed into the slot */
  48%, 100% { transform: translateX(1px) scale(.2); opacity: 0; }
}
@keyframes logo-flash {
  0%, 41% { opacity: 0; transform: scale(.4); }
  47% { opacity: .9; transform: scale(1.2); }
  58%, 100% { opacity: 0; transform: scale(1.7); }
}
@keyframes logo-spin {
  0%, 48% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.15, .85, .25, 1); }
  90%, 100% { transform: rotate(420deg); }  /* full turn + one chamber, like a real revolver */
}

/* ---------- big pose title above the animation ---------- */
.stage-title { grid-area: title; margin: 0; text-align: center; font-weight: 900; line-height: 1; letter-spacing: -.02em;
  font-size: clamp(2.2rem, 4.6vw, 4.2rem); text-transform: uppercase;
  background: linear-gradient(90deg, var(--a), #ff8fab 45%, var(--b) 75%, var(--a)) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: title-shine 6s linear infinite; }
@keyframes title-shine { to { background-position: -200% 0; } }

/* ---------- vote buttons: pink fill sweep, floating penises, vibration on click ---------- */
:root { --pink: #ff8fab; }
.buttons button { position: relative; overflow: visible; color: var(--accent-ink);
  transition: background-size 1s cubic-bezier(.55, .06, .68, .19), color .3s .4s, border-color .3s .4s; }
.buttons .yes { background: linear-gradient(var(--pink), var(--pink)) no-repeat left / 0% 100%, var(--accent); }
.buttons .no { background: linear-gradient(var(--pink), var(--pink)) no-repeat right / 0% 100%, transparent; color: var(--ink); }
.buttons button:hover, .buttons .firing button { background-size: 100% 100%, auto; border-color: var(--pink); color: #2b2522; }
.fx { position: absolute; inset: 0; pointer-events: none; }
.fx svg { position: absolute; left: calc(6% + var(--i) * 16%); top: 18%; width: 24px; height: 24px; fill: #d6336c; opacity: 0; }
.buttons button:hover .fx.up svg, .firing .fx.up svg { animation: fx-up 1.4s ease-out infinite calc(var(--i) * .22s); }
.buttons button:hover .fx.down svg, .firing .fx.down svg { animation: fx-down 1.4s ease-in infinite calc(var(--i) * .22s); }
@keyframes fx-up {
  0% { transform: translateY(0) scale(.5); opacity: 0; }
  25% { opacity: .9; }
  100% { transform: translateY(-58px) scale(1); opacity: 0; }
}
@keyframes fx-down {
  0% { transform: translateY(0) rotate(180deg) scale(.5); opacity: 0; }
  25% { opacity: .9; }
  100% { transform: translateY(58px) rotate(180deg) scale(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .logo-cyl, .logo-bullet, .logo-flash, .stage-title, .fx svg { animation: none !important; }
  .logo-bullet { opacity: 1; }
}

/* ---------- section labels: tilted comic stickers in the title's palette ---------- */
.side dt { display: inline-block; margin: 0 0 8px; padding: 5px 11px 4px; border-radius: 999px;
  font: 800 .72rem/1.1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .14em; text-transform: uppercase;
  color: #1c1917; transform: rotate(-1.6deg); transition: transform .2s; }
.side.left dt { background: linear-gradient(90deg, var(--a), #ff8fab); box-shadow: 3px 3px 0 var(--b); }
.side.right dt { background: linear-gradient(90deg, var(--b), #8be3d6); box-shadow: 3px 3px 0 var(--a); }
.side.left .meters > div:nth-child(even) dt, .side.right dt:nth-of-type(even) { transform: rotate(1.4deg); }
.side dt:hover { animation: sticker-wiggle .4s ease-in-out; }
.side.right dt:not(:first-child) { margin-top: 22px; }
.side.right dd { margin-left: 0; }
@keyframes sticker-wiggle { 25% { transform: rotate(-4deg) scale(1.05); } 75% { transform: rotate(3deg) scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .side dt:hover { animation: none; } }
.swim { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.swim.top { z-index: 20; }
