/* Mishap — the social screens, laid out from the 14-screen design:
   Home, parties, settings, invite, the round (quest, photo, submissions,
   vote, results), leaderboard, stats and profile. Base tokens live in app.css. */

/* ---------- faces ---------- */
.face{--size:40px;position:relative;display:inline-grid;place-items:center;flex:none;
  width:var(--size);height:var(--size);border-radius:50%;overflow:hidden;
  background:var(--tone,#151515);color:#fff;font:700 calc(var(--size) * .42)/1 var(--display)}
.face img{width:100%;height:100%;object-fit:cover}
.face.sm{--size:28px}
.face.md{--size:42px}
.face.lg{--size:clamp(50px,9vmin,58px)}
.face.xl{--size:clamp(96px,17vmin,118px)}
.face.more{background:var(--fill);color:var(--ink);font:600 calc(var(--size) * .3) "Inter",sans-serif}

.loading{display:flex;justify-content:center;gap:6px;padding:28px 0}
.loading i{width:8px;height:8px;border-radius:50%;background:var(--orange);animation:blink 1s infinite ease-in-out}
.loading i:nth-child(2){animation-delay:.15s}
.loading i:nth-child(3){animation-delay:.3s}
@keyframes blink{0%,80%,100%{opacity:.25;transform:scale(.8)}40%{opacity:1;transform:none}}

.mini-btn{flex:none;border-radius:9px;background:var(--orange);color:#fff;padding:7px 14px;
  font:600 12.5px "Inter",sans-serif;transition:.15s}
.mini-btn.ghost{background:var(--surface);color:var(--ink);border:1px solid var(--line)}
.mini-btn.danger{background:var(--orange-soft);color:var(--note-bad)}
.mini-btn:hover{filter:brightness(1.05)}

/* ---------- 1. home ---------- */
.greet{margin:clamp(4px,1.6vmin,12px) 0 0;font:400 clamp(15px,2.3vmin,18px) "Inter",sans-serif}
.h1.name{margin:0;font-size:clamp(30px,6vmin,42px)}
.party-title{display:flex;align-items:center;gap:6px;padding:0;text-align:left}
.party-title i{display:grid}
.party-title i svg{width:22px;height:22px}
.members-count{margin:2px 0 0;font-size:13px;color:var(--ink-60)}
.face-row{display:flex;align-items:center;gap:8px;margin-top:clamp(12px,2.2vmin,18px);padding:0}

.next-card{display:flex;flex-direction:column;width:100%;margin-top:clamp(18px,3vmin,26px);
  border:1px solid var(--line);border-radius:18px;background:var(--surface);padding:18px 20px;
  text-align:left;box-shadow:var(--shadow)}
/* Same voice as the Mishap time card: a small kicker, then a big title. */
.nc-kicker{font:600 11px "IBM Plex Mono",monospace;letter-spacing:.16em;text-transform:uppercase;color:var(--orange)}
.nc-title{margin-top:4px;font:700 clamp(19px,3.2vmin,24px)/1.1 var(--display);text-transform:uppercase}
.nc-sub{margin-top:6px;font-size:clamp(12px,1.8vmin,13px);color:var(--ink-60)}

.live-card{display:flex;flex-direction:column;align-items:flex-start;gap:4px;width:100%;
  margin-top:clamp(16px,2.6vmin,22px);border-radius:18px;background:var(--card-dark);color:#fff;
  padding:16px 20px;text-align:left;transition:.18s}
.live-card.hot{background:var(--orange);box-shadow:0 14px 28px #ff6b3540}
/* voting: Lucky Green, dark ink on it, and a bell that rings until you go */
.live-card.vote{position:relative;padding-right:70px;background:var(--green);color:#151515;box-shadow:0 14px 28px #a8d94a5c}
.lc-bell{position:absolute;right:18px;top:50%;display:grid;place-items:center;width:38px;height:38px;
  margin-top:-19px;border-radius:50%;background:#15151514;transform-origin:50% 22%;
  animation:lcRing 2.2s ease-in-out infinite}
.lc-bell svg{width:20px;height:20px}
@keyframes lcRing{0%,58%,100%{rotate:0deg}62%{rotate:14deg}68%{rotate:-11deg}74%{rotate:8deg}80%{rotate:-6deg}86%{rotate:0deg}}
@media (prefers-reduced-motion: reduce){.lc-bell{animation:none}}
.live-card:hover{transform:translateY(-2px)}
.lc-kicker{font:600 11px "IBM Plex Mono",monospace;letter-spacing:.16em;text-transform:uppercase;opacity:.85}
/* two mishaps on the go: one card wide each, swipe between them or tap the
   arrow. The rail runs a little past the page on both sides and gives the
   room back as padding, so a card keeps its round corners and its shadow
   instead of being clipped at the edge of the scroller. */
.live-stack{position:relative;margin-top:clamp(16px,2.6vmin,22px)}
.live-rail{display:flex;gap:10px;margin-block:-14px;margin-inline:calc(-1 * var(--pad));padding:14px var(--pad);
  overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.live-rail::-webkit-scrollbar{display:none}
.live-rail .live-card{flex:0 0 100%;margin-top:0;scroll-snap-align:center}
.live-nav{position:absolute;top:50%;translate:0 -50%;z-index:2;display:grid;place-items:center;
  width:36px;height:36px;border-radius:50%;background:#1515153d;color:#fff;transition:.18s}
.live-nav.next{right:10px}
.live-nav.back{left:10px}
.live-nav.back svg{scale:-1 1}
.live-nav[hidden]{display:none}
.live-nav:hover{background:#15151559}
.live-nav svg{width:18px;height:18px}
/* room on the right for the arrow, and for the bell beside it; room on the
   left only where the arrow back can appear, which is never the first card */
.live-stack .live-card{padding-right:52px}
.live-stack .live-card.vote{padding-right:96px}
.live-rail .live-card:not(:first-child){padding-left:50px}
.live-stack .lc-bell{right:52px}
.live-card b{font:700 clamp(19px,3.2vmin,24px)/1.1 var(--display);text-transform:uppercase}
.lc-cta{display:flex;align-items:center;gap:6px;margin-top:8px;font:600 13px "Inter",sans-serif}
.lc-cta svg{width:16px;height:16px}

.quote-hand{margin:clamp(18px,3vmin,28px) 0;text-align:center;
  font:600 clamp(27px,5vmin,34px)/1.05 "Caveat","Space Grotesk",cursive;transform:rotate(-4deg)}

.invite-cards{display:grid;gap:8px;margin-top:16px}
.invite-card{display:flex;align-items:center;gap:8px;border-radius:var(--radius);background:var(--orange-soft);
  padding:12px 14px;font-size:13px;line-height:1.35}
.invite-card > span{flex:1;min-width:0}
.invite-card small{display:block;color:var(--ink-60)}

/* 5 — the notification, when it lands with the app open */
.push-banner{position:absolute;z-index:20;top:calc(env(safe-area-inset-top) + 10px);left:50%;
  width:min(calc(100% - 24px), 420px);transform:translateX(-50%);display:flex;flex-direction:column;gap:2px;
  border-radius:20px;padding:12px 16px 14px;text-align:left;background:#2c2f33eb;color:#fff;
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);box-shadow:0 18px 40px #00000052;
  animation:drop .35s ease}
@keyframes drop{from{opacity:0;transform:translate(-50%,-16px)}to{opacity:1;transform:translate(-50%,0)}}
.pb-app{display:flex;align-items:center;gap:8px;font:600 12px "Inter",sans-serif;letter-spacing:.04em}
.pb-app img{width:24px;height:24px;object-fit:contain;border-radius:6px;background:#fff;padding:2px}
.pb-app em{margin-left:auto;font-style:normal;font-weight:400;opacity:.6}
.push-banner b{margin-top:6px;font:700 15px "Inter",sans-serif}
.push-banner > span:last-child{font-size:13px;line-height:1.4;opacity:.92}

/* ---------- party tab ---------- */
.party-cards{display:grid;gap:9px;margin-top:16px}
.party-card{display:flex;align-items:center;gap:12px;width:100%;border:1px solid var(--line);
  border-radius:var(--radius);background:var(--surface);padding:14px 16px;text-align:left;
  box-shadow:var(--shadow);transition:.18s}
.party-card.on{border-color:var(--orange);box-shadow:0 0 0 1px var(--orange),var(--shadow)}
.pc-main{flex:1;min-width:0}
.pc-main b{display:block;font:700 15px var(--display)}
.pc-main > small{font-size:12px;color:var(--ink-60)}
.pc-main small small{font-size:inherit}
.pc-main .live-now{font-style:normal;color:var(--orange);font-weight:600}
.pc-faces{display:flex;padding-left:8px}
.pc-faces .face{margin-left:-8px;box-shadow:0 0 0 2px var(--surface)}
.join-row{display:flex;gap:8px}
.join-row input{flex:1;min-width:0;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);
  padding:13px 16px;font:600 16px "IBM Plex Mono",monospace;letter-spacing:.24em;text-transform:uppercase;color:var(--ink)}
.join-row input:focus{outline:2px solid var(--orange);outline-offset:-1px;border-color:transparent}
.join-row .btn{width:auto;padding-inline:26px}

/* ---------- 2. create ---------- */
.die-small{display:grid;place-items:center;margin-top:clamp(8px,2vmin,16px)}
.die-small img{width:clamp(110px,22vmin,150px)}

.input-row{display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:12px;
  background:var(--surface);padding:0 6px 0 14px}
.input-row:focus-within{outline:2px solid var(--orange);outline-offset:-1px;border-color:transparent}
.input-row input{flex:1;min-width:0;border:0;background:none;padding:13px 0;color:var(--ink);outline:none}
.input-row input:disabled{color:var(--ink-60)}
.input-row.search > i{display:grid;color:var(--ink-40)}
.input-row.search > i svg{width:18px;height:18px}
.input-row .icon-btn{width:40px;height:40px}

/* a settings row with its current choice underneath */
.row-text{flex:1;min-width:0}
.row-text b{display:block}
.row-text small{display:block;margin-top:1px;font-size:12px;color:var(--ink-60);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.people-list{display:grid;margin-top:4px}
.person{display:flex;align-items:center;gap:12px;padding:9px 2px;border-bottom:1px solid var(--hair)}
.person:last-child{border-bottom:0}
.person b{font:500 14px "Inter",sans-serif}
.person-state{display:inline-flex;align-items:center;gap:5px;font:500 13px "Inter",sans-serif;color:var(--ink-60)}
.person-state.joined{color:var(--orange)}
.person-state.admin{color:var(--ink-60)}
.person-state.admin svg{width:15px;height:15px;color:#E9A800}
.person.pending b{color:var(--ink-60)}

/* ---------- 4. invite ---------- */
.code-card{position:relative;display:flex;flex-direction:column;align-items:center;
  margin-top:clamp(16px,2.6vmin,22px);border:1px solid var(--line);border-radius:var(--radius);
  background:var(--surface);padding:14px 16px 16px;box-shadow:var(--shadow)}
.code-card span{font-size:13px;color:var(--ink-60)}
.code-card b{margin-top:2px;font:700 clamp(30px,6vmin,38px) "IBM Plex Mono",monospace;letter-spacing:.08em}
.code-card .icon-btn{position:absolute;right:14px;bottom:18px}
.share-row{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:14px;text-align:center}
.share-row button{display:flex;flex-direction:column;align-items:center;gap:5px}
.share-row i{display:grid;place-items:center;width:clamp(42px,7vmin,50px);height:clamp(42px,7vmin,50px);
  border-radius:50%;color:#fff}
.share-row i svg{width:22px;height:22px}
.share-row span{font-size:11px;color:var(--ink-60)}
.s-green{background:#34c759}
.s-green2{background:#25d366}
.s-pink{background:linear-gradient(45deg,#f9a03f,#e1306c 55%,#a02fc4)}
.s-grey{background:var(--fill);color:var(--ink)!important}
.roster-list{display:grid;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);
  padding:2px 14px;box-shadow:var(--shadow)}

/* ---------- 3. party settings ---------- */
.seg-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin-top:14px;border:1px solid var(--line);
  border-radius:12px;background:var(--fill-soft);padding:4px}
.seg-tabs button{border-radius:9px;padding:9px 0;font:500 13.5px "Inter",sans-serif;color:var(--ink-60)}
.seg-tabs button.on{background:var(--surface);color:var(--ink);font-weight:600;box-shadow:0 1px 4px #15151514}
.seg-tabs.line{margin-top:18px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;padding:0;gap:0}
.seg-tabs.line button{border-radius:0;padding:11px 0;border-bottom:2px solid transparent;margin-bottom:-1px}
.seg-tabs.line button.on{background:none;box-shadow:none;border-bottom-color:var(--ink)}

.opts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.opts.two{grid-template-columns:1fr 1fr}
.opts.four{grid-template-columns:repeat(4,1fr)}
/* five: three on top, two below, each row filling the width */
.opts.five{grid-template-columns:repeat(6,1fr)}
.opts.five .opt{grid-column:span 2}
.opts.five .opt:nth-child(n+4){grid-column:span 3}
.opt{border:1px solid var(--line);border-radius:8px;background:var(--surface);padding:10px 4px;
  font:500 13px "Inter",sans-serif;transition:.15s}
.opt:hover:not(:disabled){border-color:var(--orange)}
.opt.on{background:var(--orange);border-color:var(--orange);color:#fff;font-weight:600}
.opt:disabled{opacity:.6}
.stepper{display:flex;align-items:center;gap:14px}
.stepper button{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--line);
  border-radius:10px;background:var(--surface);font:600 20px "Inter",sans-serif}
.stepper button:disabled{opacity:.5}
.stepper b{min-width:2ch;text-align:center;font:700 22px "IBM Plex Mono",monospace}
.stepper span{font-size:12.5px;color:var(--ink-60)}

/* ---------- 11. leaderboard ---------- */
.board{display:grid;margin-top:16px;border:1px solid var(--line);border-radius:var(--radius);
  background:var(--surface);box-shadow:var(--shadow);overflow:hidden}
.board-row{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--hair)}
.board-row:last-child{border-bottom:0}
.board-row.you{background:var(--orange-soft)}
.place{display:grid;place-items:center;width:28px;flex:none;font:700 15px "IBM Plex Mono",monospace;color:var(--ink-60)}
.place svg{width:24px;height:24px}
.place.p1{color:#E9A800}
.place.p2{color:#9AA3AD}
.place.p3{color:#C77B3B}
.br-name{min-width:0}
.br-name b{display:block;font:600 14.5px "Inter",sans-serif}
/* a row, so the Ranked badge and the wins and votes sit on one centre line;
   when it doesn't fit, the wins and votes go under the badge */
.br-name small{display:flex;flex-wrap:wrap;align-items:center;column-gap:8px;font-size:11.5px;line-height:16px;color:var(--ink-60)}
.board-row strong{font:700 16px "IBM Plex Mono",monospace}

/* ---------- 6. quest ---------- */
.pill-mono{align-self:flex-start;margin-top:clamp(2px,1.4vmin,10px);border:1px solid var(--ink-30);border-radius:8px;
  padding:5px 10px;font:600 11px "IBM Plex Mono",monospace;letter-spacing:.08em}
.quest-big{margin:clamp(14px,2.8vmin,22px) 0 0;font:700 clamp(40px,12.5cqi,64px)/.98 var(--display);
  letter-spacing:-.03em;text-transform:uppercase;overflow-wrap:anywhere}
/* the wildcards you can play on a mishap (round.js), in the Store's tints */
.quest-note{display:flex;align-items:center;justify-content:center;gap:7px;margin:clamp(10px,2vmin,14px) 0 0;
  font-size:clamp(12px,1.8vmin,13.5px);color:var(--ink-60)}
.quest-note svg{width:15px;height:15px}
.wild-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin-top:clamp(12px,2.4vmin,18px)}
.wild-on{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 12px;
  font:600 12px var(--display);font-style:normal}
.wild-on svg{width:14px;height:14px}
.wild-open{display:inline-flex;align-items:center;gap:10px;border:0;border-radius:999px;
  background:var(--st-violet);color:#fff;padding:13px 22px;font:700 15px var(--display);
  box-shadow:0 10px 22px #8b3dff4d;transition:.18s}
.wild-open:hover{transform:translateY(-1px)}
.wild-open svg{width:19px;height:19px;color:#fff}
.wild-open small{border-radius:999px;background:#ffffff2e;padding:2px 10px;
  font:700 14px var(--display);color:#fff}
.wild-scrim{position:fixed;inset:0;z-index:40;background:#0000005c}
.wild-sheet{position:fixed;left:0;right:0;bottom:0;z-index:41;display:grid;gap:8px;max-height:86dvh;overflow-y:auto;
  border-radius:22px 22px 0 0;background:var(--surface);box-shadow:0 -18px 44px #00000030;
  padding:14px 16px calc(env(safe-area-inset-bottom) + 18px);
  margin-inline:max(0px, (100% - var(--barw)) / 2);animation:wildUp .22s cubic-bezier(.2,.8,.2,1)}
@keyframes wildUp{from{translate:0 100%}}
.wild-head{display:flex;align-items:center;gap:8px;padding:2px 2px 6px}
.wild-head b{font:700 16px var(--display)}
.wild-row{display:flex;align-items:center;gap:11px;width:100%;border-radius:16px;padding:11px 14px;text-align:left;transition:.18s}
.wild-row:disabled{opacity:.45}
.wild-row.armed{box-shadow:inset 0 0 0 2px currentColor}
.wild-row > i{display:grid;place-items:center;width:30px;height:30px;flex:none;border-radius:50%;background:var(--st-wash)}
.wild-row > i svg{width:17px;height:17px}
.wild-row b{display:block;font:700 13.5px var(--display)}
.wild-row small{font-size:11.5px;opacity:.8}
.wild-row em{font:700 13px var(--display);font-style:normal}
.wild-row em svg{width:16px;height:16px}
.wild-group{margin:6px 2px 0;font:700 11px var(--display);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-60)}
/* what the others played on this mishap (partyWildcards in round.js) */
.party-wild{display:grid;gap:6px;width:100%;max-width:420px;margin:clamp(10px,2vmin,14px) auto 0;padding:0;list-style:none;text-align:left}
.party-wild li{display:flex;align-items:center;gap:10px;border-radius:14px;padding:7px 12px}
.party-wild li > i{display:grid;place-items:center;width:26px;height:26px;flex:none;border-radius:50%;background:var(--st-wash)}
.party-wild li > i svg{width:15px;height:15px}
.party-wild small{display:block;font-size:11.5px;line-height:1.3;opacity:.85}
.party-wild b{display:block;font:700 13.5px/1.25 var(--display)}
.hidden-face{display:grid;place-items:center;background:var(--st-yellow);color:var(--st-yellow-ink)}
.hidden-face svg{width:17px;height:17px}

.quest-sub{margin:clamp(12px,2vmin,16px) 0 0;font-size:clamp(15px,2.3vmin,18px);line-height:1.4}
.ring{position:relative;align-self:center;display:grid;place-items:center;width:clamp(190px,42vmin,280px);
  aspect-ratio:1;margin-top:clamp(20px,4vmin,34px)}
.ring svg{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg)}
.ring-track{fill:none;stroke:var(--fill);stroke-width:5}
.ring-arc{fill:none;stroke:var(--orange);stroke-width:5;stroke-linecap:round;transition:stroke-dashoffset .25s linear}
.ring b{font:700 clamp(44px,9.5vmin,64px) "IBM Plex Mono",monospace;letter-spacing:.02em}
.ring.over b{color:var(--ink-40)}
.cam-big{align-self:center;display:grid;place-items:center;width:clamp(84px,15vmin,104px);aspect-ratio:1;
  border-radius:50%;background:var(--orange);color:#fff;box-shadow:0 12px 26px #ff6b3552;
  margin-top:clamp(16px,3vmin,24px);transition:.18s}
.cam-big:hover:not(:disabled){transform:scale(1.05)}
.cam-big:disabled{opacity:.6}
.cam-big svg{width:40%;height:40%}
.cam-caption{margin:10px 0 0;text-align:center;font:600 14px "Inter",sans-serif}

/* ---------- 7. submit photo ---------- */
.clock-chip{display:grid;place-items:center;height:30px;border-radius:8px;background:var(--fill);padding:0 8px;
  font:600 12px "IBM Plex Mono",monospace}
/* The picture is absolutely placed so its own height never stretches the
   screen: the frame takes what is left above Retake and Submit. */
.shot-frame{position:relative;flex:1 1 0;min-height:220px;border-radius:18px;overflow:hidden;
  background:var(--fill);box-shadow:var(--shadow)}
.shot-frame img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}

/* ---------- 8. submissions ---------- */
/* The grid takes all the height left under the title (flex 1 1 0: only what is
   left, so a short phone keeps the fine print and the button on screen), and
   its rows share it; each photo fills its cell. --cols comes from subColumns()
   in round.js. */
.sub-grid{flex:1 1 0;min-height:260px;display:grid;grid-template-columns:repeat(var(--cols, 3),1fr);
  grid-auto-rows:minmax(0,1fr);gap:10px;margin-top:14px}
.sub-tile{margin:0;display:flex;flex-direction:column;gap:6px;min-width:0;min-height:0}
.sub-tile img,.sub-tile .sub-hidden{flex:1 1 0;min-height:0;width:100%;border-radius:14px;object-fit:cover;display:block}
.sub-hidden{display:grid;place-items:center;align-content:center;gap:6px;background:var(--fill-soft);
  border:1.5px dashed var(--line-strong);color:var(--ink-40);text-align:center}
.sub-tile .sub-hidden{display:grid}
.sub-hidden svg{width:22px;height:22px}
.sub-hidden small{font-size:11px;padding:0 6px}
.sub-tile figcaption{display:flex;align-items:center;justify-content:space-between;gap:4px;font:500 12.5px "Inter",sans-serif}
.sub-tile figcaption i{display:grid;color:var(--orange)}
.sub-tile figcaption i svg{width:15px;height:15px}
.sub-tile.wait figcaption{color:var(--ink-60)}

/* ---------- a photo, big (zoomFrom in app.js) ---------- */
[data-zoom]{cursor:zoom-in}
.zoom{position:fixed;inset:0;z-index:90;display:flex;flex-direction:column;background:#000;color:#fff;
  animation:zoomIn .18s ease}
@keyframes zoomIn{from{opacity:0}}
.zoom-bar{position:absolute;top:0;left:0;right:0;z-index:1;display:flex;align-items:center;
  padding:calc(env(safe-area-inset-top) + 10px) 14px 10px}
.zoom-count{font:600 13px "IBM Plex Mono",monospace;letter-spacing:.08em;opacity:.8}
.zoom-close{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#ffffff26;color:#fff}
.zoom-close svg{width:20px;height:20px}
.zoom-track{flex:1;display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;
  overscroll-behavior:contain}
.zoom-track::-webkit-scrollbar{display:none}
.zoom-slide{flex:0 0 100%;margin:0;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:12px;padding:calc(env(safe-area-inset-top) + 60px) 0 calc(env(safe-area-inset-bottom) + 20px);
  scroll-snap-align:center;scroll-snap-stop:always}
.zoom-slide img{max-width:100%;max-height:100%;min-height:0;object-fit:contain;display:block}
.zoom-slide figcaption{font:600 14px "Inter",sans-serif;opacity:.9}
@media (prefers-reduced-motion: reduce){.zoom{animation:none}}

/* ---------- 9. vote ---------- */
/* The photos take all the height the screen has left: the track grows into it,
   and each card is as tall as the track, 4:5, never wider than the screen
   allows. Half the width of padding on each side lets any card, whatever its
   width, snap to the centre. */
.vote-track{flex:1 1 0;min-height:240px;display:flex;align-items:stretch;gap:12px;
  margin:12px calc(-1 * var(--pad)) 0;padding:4px 50%;
  overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.vote-track::-webkit-scrollbar{display:none}
.vote-card{position:relative;flex:0 0 auto;height:100%;max-width:88cqw;margin:0;scroll-snap-align:center;aspect-ratio:4/5;border-radius:18px;
  overflow:hidden;background:var(--fill);box-shadow:var(--shadow);cursor:pointer}
.vote-card img{width:100%;height:100%;object-fit:cover;display:block}
.vote-card .sub-hidden{height:100%;border:0}
.voted-mark{position:absolute;right:10px;top:10px;display:grid;place-items:center;width:34px;height:34px;
  border-radius:50%;background:var(--orange);color:#fff}
.voted-mark svg{width:17px;height:17px}
.vote-dots{display:flex;justify-content:center;gap:6px;margin-top:12px}
.vote-dots i{width:6px;height:6px;border-radius:9px;background:var(--ink-30);transition:.2s}
.vote-dots i.on{width:18px;background:var(--orange)}
.vote-who{display:flex;align-items:center;justify-content:center;gap:8px;min-height:32px;margin-top:10px;
  font:600 14px "Inter",sans-serif}
.vote-btn{align-self:stretch;margin-top:12px}
/* a button is display:flex, which wins over the hidden attribute on its own */
.vote-btn[hidden]{display:none}
/* your own photo: the same room as the button, saying why there isn't one */
.vote-screen .note.own{align-self:stretch;margin-top:12px;padding:15px 20px;border-radius:var(--radius);
  background:var(--fill);color:var(--ink-60);text-align:center;font:600 13px/1.4 var(--display)}
.vote-btn.voted{background:var(--card-dark)}
.vote-btn svg{width:17px;height:17px}

/* ---------- 10. results ---------- */
.trophy-burst{position:relative;display:grid;place-items:center;width:130px;height:112px;margin:0 auto;color:#F2B01E}
.trophy-burst svg{width:80px;height:80px;filter:drop-shadow(0 8px 14px #f2b01e55)}
.trophy-burst i{position:absolute;width:11px;height:4px;border-radius:2px;background:var(--orange)}
.trophy-burst i:nth-of-type(1){left:4px;top:34px;transform:rotate(-35deg)}
.trophy-burst i:nth-of-type(2){left:20px;top:8px;transform:rotate(50deg);background:var(--ink)}
.trophy-burst i:nth-of-type(3){right:6px;top:30px;transform:rotate(30deg)}
.trophy-burst i:nth-of-type(4){right:22px;top:6px;transform:rotate(-55deg);background:var(--ink)}
.trophy-burst i:nth-of-type(5){left:12px;bottom:18px;transform:rotate(15deg)}
.trophy-burst i:nth-of-type(6){right:12px;bottom:22px;transform:rotate(-20deg)}
.results{display:grid;gap:10px;margin-top:18px}
.result-row{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:var(--radius);
  background:var(--surface);padding:10px 14px;box-shadow:var(--shadow)}
.result-row.you{border-color:#ff6b3566}
.medal{display:grid;place-items:center;width:30px;height:30px;flex:none;border-radius:50%;background:var(--fill);
  font:700 13px "IBM Plex Mono",monospace}
.medal.m1{background:#F5C542;color:#fff}
.medal.m2{background:#B9C0C8;color:#fff}
.medal.m3{background:#E09A5F;color:#fff}
.result-row img,.thumb-empty{width:48px;height:48px;flex:none;border-radius:10px;object-fit:cover;background:var(--fill)}
.rr-name{min-width:0}
.rr-name b{display:block;font:600 14.5px "Inter",sans-serif}
.rr-name small{font-size:12px;color:var(--ink-60)}
.rr-votes{flex:none;font:500 13px "Inter",sans-serif;color:var(--ink-60)}

.card-row{margin-top:12px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
.card-row b{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---------- 12. stats ---------- */
.me-card{display:flex;align-items:center;gap:14px;margin-top:16px}
.me-card b{display:block;font:700 16px var(--display)}
.me-card small{display:block;font-size:12.5px;color:var(--ink-60)}
.stat-trio{display:grid;grid-template-columns:repeat(3,1fr);margin-top:18px;border:1px solid var(--line);
  border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
.stat-trio > div{display:flex;flex-direction:column;align-items:center;gap:2px;padding:16px 6px 14px;
  border-right:1px solid var(--hair)}
.stat-trio > div:last-child{border-right:0}
.stat-trio i{display:grid;color:var(--orange)}
.stat-trio i.ink{color:var(--ink)}
.stat-trio i svg{width:20px;height:20px}
.stat-trio b{font:700 clamp(22px,4vmin,28px)/1.2 "IBM Plex Mono",monospace}
.stat-trio span{font-size:12px;color:var(--ink-60)}

.hist{display:grid}
.hist-row{display:flex;align-items:center;gap:12px;width:100%;padding:10px 0;border-bottom:1px solid var(--hair);text-align:left}
.hist-row:last-child{border-bottom:0}
.hist-thumb{display:grid;place-items:center;width:48px;height:48px;flex:none;border-radius:10px;object-fit:cover;font-style:normal}
.hist-thumb svg{width:50%;height:50%}
.hist-text{flex:1;min-width:0}
.hist-text b{display:block;font:600 14px/1.3 "Inter",sans-serif}
.hist-text small{font-size:12px;color:var(--ink-60)}
.hist-text small.won{color:var(--orange);font-weight:600}
.hist-when{flex:none;font-size:11.5px;color:var(--ink-40)}

/* the profile header: picture (tap to change), name, Edit */
.me-text{flex:1;min-width:0}
.me-card .avatar-edit > i{width:24px;height:24px;right:-3px;bottom:-3px;border-width:2px}
.me-card .avatar-edit > i svg{width:11px;height:11px}
.seg-tabs.three{grid-template-columns:repeat(3,1fr)}

/* History: every photo sent, three across */
.photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:14px}
.pg-tile{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;padding:0;background:var(--fill)}
.pg-tile img{width:100%;height:100%;object-fit:cover;display:block}
.pg-tile em{display:grid;place-items:center;width:100%;height:100%;font-style:normal}
.pg-tile em svg{width:34%;height:34%}
.pg-won{position:absolute;top:6px;right:6px;display:grid;place-items:center;width:24px;height:24px;
  border-radius:50%;background:var(--orange);color:#fff;box-shadow:0 2px 6px #00000033}
.pg-won svg{width:13px;height:13px}

/* ---------- 13. profile ---------- */
.profile-head{display:flex;flex-direction:column;align-items:center;text-align:center;margin-top:4px}
.avatar-edit{position:relative;padding:0;border-radius:50%}
.avatar-edit > i{position:absolute;right:2px;bottom:2px;display:grid;place-items:center;width:30px;height:30px;
  border-radius:50%;background:var(--orange);color:#fff;border:3px solid var(--paper)}
.avatar-edit > i svg{width:14px;height:14px}
.profile-head .h2{margin-top:12px}
.handle{margin:2px 0 0;font-size:13px;color:var(--ink-60)}
.tagline{color:var(--ink-60)}
.profile-head .tagline{margin:4px 0 0;font-size:13.5px}

.badge-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px 10px;margin-top:20px}
/* One hexagon per achievement: lit in its family's colour once earned, dark
   while it is locked, with a spark on the ones waiting to be claimed. */
.badge-hex{display:flex;flex-direction:column;align-items:center;gap:9px;text-align:center}
.bdg-wrap{position:relative;display:grid;place-items:center}
.badge-hex i{position:relative;display:grid;place-items:center;width:clamp(62px,12vmin,76px);aspect-ratio:1/1.09;
  background:var(--fill);color:var(--ink-40);transition:.18s;
  clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)}
.badge-hex i em{display:grid;place-items:center;width:100%;height:100%}
.badge-hex i em svg{width:40%;height:40%}
.badge-hex:hover i{transform:translateY(-2px)}
.badge-hex.on i{background:var(--bdg);color:var(--bdg-ink)}
.badge-hex.open i{outline:2px solid var(--ink);outline-offset:3px}
/* claimed: a small tick in the corner, so a paid badge is not just a lit one */
.bdg-done{position:absolute;right:-3px;bottom:0;display:grid;place-items:center;width:20px;height:20px;
  border-radius:50%;background:var(--ink);color:var(--surface)}
.bdg-done svg{width:12px;height:12px;stroke-width:3}
.badge-hex span{font:500 12px/1.25 "Inter",sans-serif;color:var(--ink-60)}
.badge-hex.on span{color:var(--ink);font-weight:600}
/* waiting to be claimed: a ring in its colour, breathing */
.badge-hex.waiting i:after{content:"";position:absolute;inset:-5px;background:var(--bdg-ink);opacity:.35;z-index:-1;
  clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);animation:bdgPulse 1.8s ease-in-out infinite}
@keyframes bdgPulse{0%,100%{opacity:.18;scale:1}50%{opacity:.5;scale:1.06}}
@media (prefers-reduced-motion: reduce){.badge-hex.waiting i:after{animation:none}}
.peach{--bdg:var(--st-peach);--bdg-ink:var(--st-peach-ink)}
.lilac{--bdg:var(--st-lilac);--bdg-ink:var(--st-lilac-ink)}
.pink{--bdg:var(--st-pink);--bdg-ink:var(--st-pink-ink)}
.mint{--bdg:var(--st-mint);--bdg-ink:var(--st-mint-ink)}
.sky{--bdg:var(--st-sky);--bdg-ink:var(--st-sky-ink)}
.yellow{--bdg:var(--st-yellow);--bdg-ink:var(--st-yellow-ink)}
.sage{--bdg:var(--st-sage);--bdg-ink:var(--st-sage-ink)}

.badge-waiting{display:flex;align-items:center;gap:9px;margin:16px 0 0;border-radius:14px;
  background:var(--st-lilac);padding:10px 13px;font-size:12.5px;color:var(--st-lilac-ink)}
.badge-waiting svg{width:16px;height:16px;flex:none}

/* claiming a prize: the wildcards fly to the Store tab */
.claim-fly{position:fixed;z-index:60;display:grid;place-items:center;width:44px;aspect-ratio:1/1.09;
  translate:-50% -50%;pointer-events:none;background:var(--bdg);color:var(--bdg-ink);
  clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  transition:translate .72s cubic-bezier(.4,0,.2,1), scale .72s ease-in, opacity .72s ease-in}
.claim-fly svg{width:46%;height:46%}
.tab.bump{animation:tabBump .7s cubic-bezier(.3,1.4,.5,1)}
@keyframes tabBump{0%,100%{scale:1}30%{scale:1.22}60%{scale:.96}}
.bs-total{display:flex;align-items:center;gap:8px;margin:10px 0 0;font:600 13px var(--display)}
.bs-total i{display:grid;place-items:center;width:26px;aspect-ratio:1/1.09;flex:none;
  background:var(--bdg);color:var(--bdg-ink);
  clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)}
.bs-total i svg{width:52%;height:52%}
.bs-total b{font:700 15px var(--display);color:var(--orange)}
@media (prefers-reduced-motion: reduce){.tab.bump{animation:none}}

.badge-scrim{position:fixed;inset:0;z-index:40;background:#0000005c}
.badge-sheet{position:fixed;left:0;right:0;bottom:0;z-index:41;
  border-radius:22px 22px 0 0;background:var(--surface);box-shadow:0 -18px 44px #00000030;
  padding:16px 16px calc(env(safe-area-inset-bottom) + 18px);
  margin-inline:max(0px, (100% - var(--barw)) / 2);animation:wildUp .22s cubic-bezier(.2,.8,.2,1)}
.bs-head{display:flex;align-items:center;gap:12px}
.hex-mark{display:grid;place-items:center;width:52px;aspect-ratio:1/1.09;flex:none;
  background:var(--fill);color:var(--ink-40);
  clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)}
.hex-mark.on{background:var(--bdg);color:var(--bdg-ink)}
.hex-mark svg{width:42%;height:42%}
.bs-head b{display:block;font:700 16px var(--display)}
.bs-head small{font-size:12.5px;color:var(--ink-60)}
.bs-count{margin:8px 0 0;font-size:12px;color:var(--ink-60)}
.bs-prize{display:flex;align-items:center;gap:8px;margin:12px 0 0;border-radius:14px;background:var(--fill);
  padding:10px 13px;font:600 13px var(--display)}
.bs-prize svg{width:17px;height:17px;color:var(--st-violet)}
.badge-sheet .btn{margin-top:14px}
/* #50: the Mishap star, orange on black, in light and dark alike */
.world{--bdg:#151515;--bdg-ink:var(--orange)}
.badge-hex.world.on i{box-shadow:0 0 0 2px var(--orange)}
/* the tier, in the sheet and on the full list: green, yellow, red */
.tier-pill{display:block;width:fit-content;margin:4px 0 5px;border-radius:999px;padding:2px 10px;font:700 11px var(--display);font-style:normal}
.tier-pill.easy,.ach-tiers .easy i{background:#DDF3E1;color:#1F7A3A}
.tier-pill.medium,.ach-tiers .medium i{background:#FCEFC7;color:#8A6300}
.tier-pill.hard,.ach-tiers .hard i{background:#FBD9D2;color:#B3321B}
.see-all{margin-top:18px}
.seg-tabs.four{grid-template-columns:repeat(4,1fr)}

/* the full list (screens.achievements in me.js) */
.ach-summary{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:6px 14px;margin-top:16px;
  border:1px solid var(--line);border-radius:18px;background:var(--surface);padding:14px 16px}
.ach-summary > i{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;
  background:var(--st-peach);color:var(--st-peach-ink)}
.ach-summary > i svg{width:24px;height:24px}
.ach-summary b{display:block;font:700 22px var(--display)}
.ach-summary small{font-size:12.5px;color:var(--ink-60)}
.ach-summary .bar{grid-column:1 / -1;margin-top:6px}
.ach-tiers{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:10px}
.ach-tiers > div{display:flex;flex-direction:column;align-items:flex-start;gap:2px;border:1px solid var(--line);
  border-radius:14px;background:var(--surface);padding:10px 12px}
.ach-tiers i{width:14px;height:14px;border-radius:50%}
.ach-tiers b{font:700 15px var(--display)}
.ach-tiers span{font-size:11.5px;color:var(--ink-60)}

/* YOUR WORLD.: the whole screen, dark, the star in the middle */
.your-world{position:fixed;inset:0;z-index:70;display:grid;place-items:center;background:#0B0B0C;color:#fff;
  padding:24px 20px;text-align:center;animation:ywIn .5s ease both}
@keyframes ywIn{from{opacity:0}}
.yw-inner{display:grid;justify-items:center;gap:6px;width:min(100%, 360px)}
.yw-kicker{margin:0;font:700 12px var(--display);letter-spacing:.18em;text-transform:uppercase;color:var(--orange)}
.yw-badge{display:grid;place-items:center;width:150px;aspect-ratio:1/1.09;margin:18px 0 10px;
  clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background:radial-gradient(circle at 50% 40%,#2A2A2E,#151515 70%)}
.yw-badge i{display:grid;place-items:center;width:62%;height:62%;color:var(--orange);animation:ywStar 2.4s ease-in-out infinite}
.yw-badge svg{width:100%;height:100%;fill:var(--orange);stroke:var(--orange)}
@keyframes ywStar{50%{scale:1.08;filter:drop-shadow(0 0 14px #ff6b3599)}}
.your-world h2{margin:4px 0 8px;font:800 clamp(34px,10vw,46px)/1 var(--display);letter-spacing:-.02em}
.yw-line{margin:0;font-size:15px;color:#ffffffb3}
.yw-line.strong{color:#fff;font-weight:600}
.your-world .btn{margin-top:26px}
@media (prefers-reduced-motion: reduce){.your-world,.yw-badge i{animation:none}}

/* ---------- quest packs ---------- */
.pk-halloween{background:linear-gradient(115deg,#1f0d05 0%,#6b2a0b 55%,#c4540f 100%)}
.pk-christmas{background:linear-gradient(115deg,#051c13 0%,#0f4a33 55%,#1d7048 100%)}
.pk-movie{background:linear-gradient(115deg,#140b24 0%,#3f1a55 55%,#8a2a3f 100%)}
.pk-thanksgiving{background:linear-gradient(115deg,#2d1b0f 0%,#7a3e1d 55%,#c05621 100%)}
.pk-nye{background:linear-gradient(115deg,#0b0b0f 0%,#1e1e2e 55%,#8c6d1c 100%)}

/* the packs card on Home: the packs side by side, swiped or dragged, snapping to one */
.pack-ad{position:relative;display:block;width:100%;height:clamp(148px,23vmin,172px);flex:none;
  margin-top:clamp(16px,2.6vmin,22px);border-radius:18px;overflow:hidden;color:#fff;
  box-shadow:0 14px 30px #15151524;transition:transform .18s}
.pack-ad:hover{transform:translateY(-2px)}
.pa-track{display:flex;height:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;
  overscroll-behavior-x:contain;scrollbar-width:none;cursor:grab}
.pa-track::-webkit-scrollbar{display:none}
.pa-track.dragging{scroll-snap-type:none;cursor:grabbing}
.pa-track.dragging .pa-slide{pointer-events:none}
.pa-slide{position:relative;flex:0 0 100%;display:flex;align-items:center;gap:14px;padding:16px 18px;
  scroll-snap-align:start;scroll-snap-stop:always;border:0;color:inherit;font:inherit;text-align:left;
  cursor:inherit;user-select:none;-webkit-user-select:none}
.pa-slide img{width:clamp(96px,30%,124px);aspect-ratio:1;flex:none;border-radius:14px;object-fit:cover;
  box-shadow:0 8px 20px #00000059;-webkit-user-drag:none}
.pa-text{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start}
.pa-text small{font:600 9.5px "IBM Plex Mono",monospace;letter-spacing:.14em;text-transform:uppercase;opacity:.75}
.pa-text b{margin-top:3px;font:700 clamp(21px,3.6vmin,25px)/1.05 var(--display)}
.pa-text > span{margin-top:3px;font-size:12.5px;line-height:1.35;opacity:.88}
.pa-price{margin-top:10px;border-radius:999px;background:var(--orange);padding:5px 12px;
  font:700 12.5px var(--display);font-style:normal}
.pa-dots{position:absolute;right:16px;bottom:14px;display:flex;gap:5px;pointer-events:none}
.pa-dots i{width:6px;height:6px;border-radius:9px;background:#ffffff59;transition:width .25s,background .25s}
.pa-dots i.on{width:16px;background:#fff}

/* Home's cards share one gap, whichever of them are showing: invites, the
   live round, Next Mishap and the packs card. */
.home{--card-gap:clamp(14px,2.4vmin,18px)}
.home .invite-cards,.home .live-card,.home .live-stack,.home .next-card,.home .pack-ad{margin-top:var(--card-gap)}

/* All of Home's cards are as tall as Your Mishaps, the tallest of them: its
   two lines of title, its line of small print and the photos beside them. The
   rest keep their corners instead of being cut off at that height. */
.home{--card-h:150px}
.home .live-card,.home .live-stack,.home .next-card,.home .pack-ad,.home .access-card{height:var(--card-h);flex:none}
/* The rail is taller than the cards by its padding, and gives that back with a
   negative margin: a scroller clips at its padding box, so the card's corners
   and its shadow stay well inside it. */
.home .live-rail{height:calc(100% + 28px)}
/* Home gives its cards a margin; the ones in the rail take theirs from the
   rail instead, or they sit 14px low inside it. */
.home .live-rail .live-card{height:100%;margin-top:0}
.home .next-card{justify-content:center;padding-block:14px}
.home .nc-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* two lines at most, so a longer translation can never push past the card */
.home .nc-sub{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.home .live-card{justify-content:center;padding-block:12px}
.home .live-card b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  font-size:clamp(17px,2.9vmin,21px)}
.home .lc-cta{margin-top:6px}
.home .pa-slide{padding:14px 16px}
.home .pa-slide img{width:calc(var(--card-h) - 28px)}
.home .pa-price{margin-top:8px}

/* All Access, on Home: the words on the left, a tilted wall of packs on the
   right (the current ones, then "?" tiles for the ones still to come). */
.access-card{position:relative;display:flex;align-items:center;width:100%;margin-top:var(--card-gap,16px);
  border-radius:18px;overflow:hidden;padding:14px 18px;text-align:left;color:#fff;
  background:radial-gradient(120% 140% at 0% 0%,#3a1a0c 0%,#151515 55%),#151515;
  box-shadow:0 14px 30px #15151530;transition:transform .18s}
.access-card:hover{transform:translateY(-2px)}
.ac-text{flex:0 0 52%;min-width:0;display:flex;flex-direction:column}
.ac-text small{display:flex;align-items:center;gap:6px;font:600 10px "IBM Plex Mono",monospace;
  letter-spacing:.2em;text-transform:uppercase;color:var(--orange)}
.ac-crown{display:grid;color:#fff}
.ac-crown svg{width:16px;height:16px}
.ac-text b{margin-top:3px;font:700 clamp(21px,3.6vmin,25px)/1.05 var(--display);text-transform:uppercase;letter-spacing:-.01em}
.ac-text > span{margin-top:5px;font-size:12.5px;line-height:1.3;opacity:.85}
.ac-collage{position:absolute;z-index:1;right:-26px;top:50%;display:grid;grid-template-columns:repeat(3,58px);gap:8px;
  transform:translateY(-50%) rotate(-12deg);
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 28%);mask-image:linear-gradient(90deg,transparent 0%,#000 28%)}
/* six packs, the same pictures as All Access (PACKS, then NEXT_PACKS) */
.ac-collage img{width:58px;height:58px;border-radius:12px;object-fit:cover;
  border:2px solid #ffffff2e;box-shadow:0 6px 14px #00000080}

/* All Access, alive: a warm aura drifts behind it, a sheen sweeps across,
   the wall of packs sways, the crown glows, and sparks twinkle. */
.ac-text{position:relative;z-index:1}
.ac-collage{animation:acDrift 5s ease-in-out infinite alternate}
@keyframes acDrift{
  0%{transform:translateY(-50%) rotate(-12deg) translateX(0)}
  100%{transform:translateY(-56%) rotate(-10deg) translateX(-12px)}}
.access-card::before{content:"";position:absolute;z-index:0;width:220px;height:220px;left:-70px;top:-90px;border-radius:50%;
  background:radial-gradient(circle,#ff6b3573 0%,#ff6b3526 45%,transparent 70%);
  animation:acAura 6s ease-in-out infinite alternate;pointer-events:none}
@keyframes acAura{0%{transform:translate(0,0) scale(1)}100%{transform:translate(170px,60px) scale(1.25)}}
.access-card::after{content:"";position:absolute;z-index:2;top:-50%;bottom:-50%;left:-70%;width:40%;
  background:linear-gradient(100deg,transparent 0%,#ffffff26 40%,#ffffff66 50%,#ffffff26 60%,transparent 100%);
  transform:skewX(-20deg);animation:acSheen 3.2s ease-in-out infinite;pointer-events:none}
@keyframes acSheen{0%,35%{left:-70%}75%,100%{left:140%}}
.ac-crown{animation:acGlow 2.4s ease-in-out infinite}
@keyframes acGlow{
  0%,100%{filter:drop-shadow(0 0 0 #ff6b3500);color:#fff}
  50%{filter:drop-shadow(0 0 6px #ff6b35);color:#ffd9c8}}
.ac-spark{position:absolute;z-index:2;width:12px;height:12px;background:var(--orange);pointer-events:none;
  clip-path:polygon(50% 0%,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0% 50%,39% 39%);
  filter:drop-shadow(0 0 4px #ff6b35);animation:acTwinkle 2s ease-in-out infinite}
.ac-spark.s1{left:84px;top:12px}
.ac-spark.s2{left:12px;bottom:14px;width:9px;height:9px;animation-delay:.7s}
.ac-spark.s3{right:30px;top:14px;width:10px;height:10px;animation-delay:1.3s}
@keyframes acTwinkle{0%,100%{opacity:0;transform:scale(.3) rotate(0)}50%{opacity:1;transform:scale(1.15) rotate(90deg)}}
@media (prefers-reduced-motion:reduce){
  .access-card::before,.access-card::after,.ac-crown,.ac-spark{animation:none}
  .access-card::after{display:none}
  .ac-spark{opacity:.8}
}

/* All Access, the paywall: its perks list (the rest of All Access is in access.css) */
.as-list{list-style:none;margin:clamp(14px,2.4vmin,20px) 0 0;padding:0;display:grid;gap:10px}
.as-list li{display:flex;align-items:center;gap:12px;font-size:15px}
.as-list i{display:grid;place-items:center;width:22px;height:22px;flex:none;border-radius:50%;background:#fff;color:#151515}
.as-list i svg{width:13px;height:13px;stroke-width:2.6}

/* the Mishaps tab */
.live-list{display:grid;gap:6px}
.live-party{margin:6px 0 0;font-size:12px;color:var(--ink-60)}
.live-list .live-card,.live-list .live-stack{margin-top:0}
.mishap-list{display:grid;gap:10px}
.mishap-card{display:flex;align-items:center;gap:14px;width:100%;border:1px solid var(--line);border-radius:var(--radius);
  background:var(--surface);padding:12px 14px;text-align:left;box-shadow:var(--shadow);transition:transform .18s}
.mishap-card:hover{transform:translateY(-2px)}
.photo-stack{position:relative;width:88px;height:96px;flex:none}
.photo-stack .st{position:absolute;top:8px;width:60px;height:78px;border-radius:9px;object-fit:cover;
  border:2px solid var(--surface);box-shadow:0 4px 12px #15151529;background:var(--photo-empty)}
.photo-stack .st0{left:26px;z-index:3;transform:rotate(5deg)}
.photo-stack .st1{left:13px;z-index:2;transform:rotate(-5deg)}
.photo-stack .st2{left:0;z-index:1;transform:rotate(-14deg)}
.photo-stack .st-empty{display:grid;place-items:center;color:var(--ink-40)}
.photo-stack .st-empty svg{width:20px;height:20px}
.mc-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.mc-text small{font-size:11.5px;color:var(--ink-60)}
.mc-text b{font:700 15px/1.25 var(--display)}
.mc-meta{display:flex;align-items:center;gap:4px;font-size:12px;color:var(--ink-60)}
.mc-meta i{display:grid;color:#E9A800}
.mc-meta i svg{width:13px;height:13px}
.mc-you{align-self:flex-start;margin-top:4px;border-radius:999px;background:var(--fill-soft);padding:3px 9px;
  font:600 11.5px "Inter",sans-serif;font-style:normal;color:var(--ink-60)}
.mc-you.won{background:var(--orange-soft);color:var(--orange)}
.mc-you.missed{color:var(--ink-40)}

/* one round's photos */
.gallery-title{margin:14px 0 0;font:700 clamp(26px,6cqi,36px)/1.02 var(--display);
  text-transform:uppercase;letter-spacing:-.02em}
.gallery{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}
.g-card{position:relative;margin:0;border-radius:14px;overflow:hidden;background:var(--surface);box-shadow:var(--shadow)}
.g-card.win{outline:3px solid var(--orange);outline-offset:-3px}
.g-card img,.g-wait{display:block;width:100%;aspect-ratio:3/4;object-fit:cover;background:var(--photo-empty)}
.g-wait{display:grid;place-items:center}
.g-crown{position:absolute;top:8px;right:8px;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;
  background:var(--orange);color:#fff;box-shadow:0 3px 8px #00000040}
.g-crown svg{width:16px;height:16px}
.g-card figcaption{display:flex;align-items:center;gap:7px;padding:8px 10px;font-size:12.5px}
.g-card figcaption b{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.g-card figcaption em{flex:none;font-style:normal;color:var(--ink-60)}

/* the store */
.pack-filters{display:flex;gap:8px;margin-top:16px;overflow-x:auto;scrollbar-width:none}
.pack-filters::-webkit-scrollbar{display:none}
.pack-filters button{flex:none;border:1px solid var(--line);border-radius:999px;background:var(--surface);
  padding:8px 16px;font:500 13px "Inter",sans-serif;color:var(--ink-60)}
.pack-filters button.on{background:var(--ink);border-color:var(--ink);color:var(--surface)}
.pack-list{display:grid;gap:12px;margin-top:16px}
.pack-card{position:relative;display:flex;align-items:center;gap:14px;width:100%;min-height:116px;
  border-radius:18px;overflow:hidden;padding:12px 16px 12px 12px;text-align:left;color:#fff;
  box-shadow:0 10px 24px #1515151f;transition:transform .18s}
.pack-card:hover{transform:translateY(-2px)}
.pack-card.focus{outline:3px solid var(--orange);outline-offset:2px}
.pack-card img{width:92px;height:92px;flex:none;border-radius:12px;object-fit:cover;box-shadow:0 6px 16px #00000059}
.pc-text{flex:1;min-width:0;display:flex;flex-direction:column;padding-bottom:22px}
.pc-text b{font:700 19px var(--display)}
.pc-text span{margin-top:2px;font-size:12.5px;line-height:1.35;opacity:.88}
.pc-text small{margin-top:6px;font-size:12px;opacity:.8}
.pc-price{position:absolute;right:14px;bottom:12px;border-radius:999px;background:var(--orange);
  padding:6px 13px;font:700 13px var(--display);font-style:normal}

/* a pack's page: its picture fading into a dark band with the price, then a sheet */
.pd-screen{padding:0}
.pd-hero{--art-h:clamp(300px,82vw,440px);position:relative;overflow:hidden;background:var(--deep,#151515);color:#fff}
.pd-art{position:absolute;inset:0 0 auto;width:100%;height:var(--art-h);object-fit:cover}
.pd-hero::before{content:"";position:absolute;inset:0 0 auto;z-index:1;height:var(--art-h);
  background:linear-gradient(180deg,#000000a6 0%,#0000 24%,#0000 48%,var(--deep,#151515) 100%)}
.pd-in{position:relative;z-index:2;display:flex;flex-direction:column;
  padding-block:calc(env(safe-area-inset-top) + clamp(14px,3vw,24px)) 44px;
  padding-inline:max(var(--pad), (100% - var(--content)) / 2)}
.pd-hero .icon-btn{color:#fff}
.pd-hero .icon-btn:hover{background:#ffffff1f}
.pd-title{margin:clamp(120px,40vw,250px) 0 0;font:700 clamp(34px,8vmin,46px)/1 var(--display);
  letter-spacing:-.03em;text-shadow:0 2px 18px #000000b3}
.pd-blurb{margin:8px 0 0;max-width:36ch;font-size:clamp(15px,2.2vmin,17px);line-height:1.35;color:#ffffffd9}
.pd-stats{display:grid;grid-template-columns:repeat(3,1fr);margin-top:clamp(20px,3.4vmin,28px);text-align:center}
.pd-stats span{display:flex;flex-direction:column;align-items:center;padding:0 6px;font-size:12.5px;line-height:1.25;color:#ffffffcc}
.pd-stats span + span{border-left:1px solid #ffffff2e}
.pd-stats svg{width:24px;height:24px;margin-bottom:6px;color:#fff}
.pd-stats b{font:700 15px var(--display);color:#fff}
.pd-buy{flex-direction:column;gap:0;margin-top:clamp(20px,3.4vmin,28px);padding-block:11px;box-shadow:0 12px 26px #ff6b3540}
.pd-buy b{font:700 21px/1.2 var(--display)}
.pd-buy small{font:500 13px "Inter",sans-serif;opacity:.92}
.pd-sheet{position:relative;z-index:3;flex:1;margin-top:-22px;border-radius:24px 24px 0 0;background:var(--surface);
  padding-block:24px 28px;padding-inline:max(var(--pad), (100% - var(--content)) / 2)}
.pd-sheet h2{margin:0;font:700 18px var(--display)}
.pd-sheet > p{margin:8px 0 0;font-size:14.5px;line-height:1.5;color:var(--ink-60)}
.pd-photos{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:16px}
.pd-photos img{display:block;width:100%;aspect-ratio:1;border-radius:12px;object-fit:cover;
  outline:1px solid var(--line);outline-offset:-1px}
.pd-quests{display:flex;align-items:center;gap:12px;width:100%;margin-top:16px;border:1px solid var(--line);
  border-radius:var(--radius);background:var(--surface);padding:12px 14px;text-align:left;color:var(--ink)}
.pd-quests i{display:grid;place-items:center;width:40px;height:40px;flex:none;border-radius:12px;
  background:var(--orange-soft);color:var(--orange)}
.pd-quests i svg{width:21px;height:21px}
.pd-quests span{flex:1;min-width:0;display:flex;flex-direction:column}
.pd-quests b{font:700 15px var(--display)}
.pd-quests small{font-size:12.5px;color:var(--ink-60)}
.pd-quests > svg{width:18px;height:18px;flex:none;color:var(--ink-40)}

/* a pack's quest list */
.pq-head{display:flex;align-items:center;gap:14px;margin-top:4px}
.pq-head img{width:64px;height:64px;flex:none;border-radius:16px;object-fit:cover;box-shadow:0 8px 18px #15151533}
.pq-head .h1{margin:0}
.pq-head small{font-size:13px;color:var(--ink-60)}
.pq-screen .pack-filters{margin-top:18px}
.pq-list{margin:8px 0 0;padding:0;list-style:none}
.pq-list li{display:flex;align-items:center;gap:14px;padding:clamp(12px,2vmin,15px) 2px;border-bottom:1px solid var(--line)}
.pq-list b{width:24px;flex:none;text-align:center;font:700 15px var(--display)}
.pq-list span{flex:1;min-width:0;font-size:14.5px;line-height:1.35}
.pq-list i{display:grid;flex:none;color:var(--ink-40)}
.pq-list i svg{width:20px;height:20px}
.pq-more{display:flex;align-items:center;justify-content:center;gap:7px;margin:16px 0 0;font-size:12.5px;color:var(--ink-60)}
.pq-more svg{width:13px;height:13px;flex:none}
/* the unlock button stays in reach while the list scrolls */
.pq-foot{position:sticky;bottom:0;z-index:2;padding-top:16px;background:linear-gradient(#0000,var(--paper) 16px)}
.pq-foot .btn{margin-top:10px}

/* ---------- ranked series ---------- */
/* The tier badge: a faceted hexagon in the tier's colour with the Mishap star. */
.rank-badge{--size:40px;display:inline-grid;place-items:center;flex:none;width:var(--size);height:var(--size)}
.rank-badge svg{width:100%;height:100%;filter:drop-shadow(0 3px 6px #15151533)}
.rank-badge .rb-rim{fill:color-mix(in srgb,var(--tier) 62%,#000)}
.rank-badge .rb-face{fill:var(--tier)}
.rank-badge .rb-light{fill:#ffffff47}
.rank-badge .rb-shade{fill:#00000021}
.rank-badge .rb-star{fill:color-mix(in srgb,var(--tier) 40%,#000)}
.rank-badge.star-light .rb-star{fill:#ffffffeb}
.rank-badge.xs{--size:16px}
.rank-badge.xs svg{filter:none}
.rank-badge.sm{--size:30px}
.rank-badge.md{--size:48px}
.rank-badge.lg{--size:96px}
.rank-badge.hero{--size:clamp(140px,32vmin,220px)}
.rank-badge.hero svg{filter:drop-shadow(0 14px 22px #15151545)}

/* Profile card */
.rank-card{display:flex;align-items:center;gap:14px;width:100%;margin-top:16px;border:1px solid var(--line);
  border-radius:var(--radius);background:var(--surface);padding:12px 14px;text-align:left;box-shadow:var(--shadow);
  transition:transform .18s}
button.rank-card:hover{transform:translateY(-2px)}
/* Your division's cards (Profile and the Ranked tab) wear its league's colour,
   bronze for Bronze, gold for Gold, and stay alive: a sheen sweeps across, the
   glow breathes in the league's colour, the badge floats and a star twinkles. */
.rank-card.tinted,.rk-tier-card.tinted{position:relative;overflow:hidden;isolation:isolate;
  border-color:color-mix(in srgb,var(--tier) 55%,transparent);
  background:linear-gradient(115deg,color-mix(in srgb,var(--tier) 48%,var(--tint-base)) 0%,color-mix(in srgb,var(--tier) 16%,var(--tint-base)) 100%);
  animation:rankGlow 3.2s ease-in-out infinite}
.rank-card.tinted .rc-text small{color:color-mix(in srgb,var(--tier) 45%,var(--tint-ink))}
.rank-card.tinted .rc-text span,.rk-tier-card.tinted p{color:color-mix(in srgb,var(--tier) 25%,var(--ink))}
.rank-card.tinted em{color:color-mix(in srgb,var(--tier) 45%,var(--tint-ink))}
.rank-card.tinted::after,.rk-tier-card.tinted::after{content:"";position:absolute;z-index:2;top:-40%;bottom:-40%;left:-60%;
  width:36%;background:linear-gradient(100deg,transparent 0%,#ffffff47 40%,#ffffffb3 50%,#ffffff47 60%,transparent 100%);
  transform:skewX(-20deg);animation:rankSheen 3.6s ease-in-out infinite;pointer-events:none}
.rank-card.tinted::before,.rk-tier-card.tinted::before{content:"";position:absolute;z-index:1;top:16%;right:14%;
  width:14px;height:14px;background:#fff;filter:drop-shadow(0 0 5px #fff);pointer-events:none;
  clip-path:polygon(50% 0%,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0% 50%,39% 39%);
  animation:rankTwinkle 2.4s ease-in-out infinite}
.rk-tier-card.tinted::before{width:22px;height:22px;top:12%;right:16%}
.rank-card.tinted .rank-badge,.rk-tier-card.tinted .rank-badge{animation:rankFloat 3s ease-in-out infinite}
@keyframes rankSheen{0%,40%{left:-60%}80%,100%{left:130%}}
@keyframes rankGlow{
  0%,100%{box-shadow:0 6px 16px color-mix(in srgb,var(--tier) 20%,transparent)}
  50%{box-shadow:0 10px 32px color-mix(in srgb,var(--tier) 55%,transparent)}}
@keyframes rankFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@keyframes rankTwinkle{0%,100%{opacity:0;transform:scale(.3) rotate(0)}50%{opacity:.95;transform:scale(1) rotate(90deg)}}
@media (prefers-reduced-motion:reduce){
  .rank-card.tinted,.rk-tier-card.tinted,.rank-card.tinted .rank-badge,.rk-tier-card.tinted .rank-badge{animation:none}
  .rank-card.tinted::after,.rk-tier-card.tinted::after,.rank-card.tinted::before,.rk-tier-card.tinted::before{display:none}
}
.rank-card .loading{flex:1;padding:18px 0}
.rc-text{flex:1;min-width:0;display:flex;flex-direction:column}
.rc-text small{font:600 10.5px "IBM Plex Mono",monospace;letter-spacing:.14em;text-transform:uppercase;color:var(--orange)}
.rc-text b{font:700 clamp(20px,3.4vmin,24px)/1.15 var(--display)}
.rc-text span{font-size:12.5px;color:var(--ink-60)}
.rc-text strong{font-weight:600;color:var(--ink)}
.rank-card em{display:grid;color:var(--ink-40)}
.rank-card em svg{width:17px;height:17px}

/* a party's Leaderboard: your badge top right, everyone's tier by their name */
.rank-btn .rank-badge{--size:30px}
.rank-btn .rank-badge svg{width:100%;height:100%}
.rank-tag{display:inline-flex;align-items:center;gap:3px;font-weight:600;color:var(--ink-60)}

/* shared */
.rk-empty{display:flex;flex-direction:column;align-items:center;gap:8px;margin-top:28px;text-align:center}
.rk-empty b{font:700 20px var(--display)}
.rk-empty p{margin:0;max-width:32ch;font-size:13.5px;line-height:1.45;color:var(--ink-60)}

/* 1 — intro: the die takes whatever height the screen has */
.rk-intro .h1{margin-top:clamp(6px,2.5vmin,24px)}
.rk-die{flex:1;min-height:170px;display:grid;place-items:center;margin:clamp(10px,2.5vmin,22px) 0}
.rk-die img{width:min(74%,320px);height:auto}
.rk-facts{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid #ff6b3524;border-radius:var(--radius);
  background:#ff6b350d;padding:clamp(14px,2.8vmin,22px) 2px}
.rk-facts > div{display:flex;flex-direction:column;align-items:center;gap:2px;padding:0 6px;text-align:center;
  border-right:1px solid var(--fill)}
.rk-facts > div:last-child{border-right:0}
.rk-facts svg{width:24px;height:24px;margin-bottom:5px}
.rk-facts b{font:700 13px var(--display)}
.rk-facts small{font-size:11px;line-height:1.3;color:var(--ink-60)}

/* 2 — the series: the tier card grows into the height the screen has, and the
   tier strip sits at the bottom, over the tab bar */
.rk-ends{margin:clamp(8px,2.5vmin,20px) 0 0;text-align:center;font-size:14px;color:var(--ink-60)}
.rk-countdown{display:flex;justify-content:center;gap:10px;margin-top:10px}
.rk-countdown span{display:flex;align-items:baseline;gap:2px;min-width:68px;justify-content:center;border-radius:12px;
  background:#ff6b3514;padding:clamp(6px,1.4vmin,10px) 14px}
.rk-countdown b{font:700 clamp(22px,4.4vmin,30px) var(--display)}
.rk-countdown small{font:700 clamp(13px,2.4vmin,16px) var(--display)}
.rk-tier-card{flex:1;min-height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center;
  margin-top:clamp(14px,3vmin,24px);border:1px solid var(--line);border-radius:22px;
  background:linear-gradient(180deg,var(--surface) 0%,var(--warm) 100%);padding:clamp(18px,4vmin,36px) 16px;text-align:center;
  box-shadow:var(--shadow)}
.rk-tier-card h2{margin:clamp(10px,2.4vmin,20px) 0 0;font:700 clamp(24px,4.8vmin,32px) var(--display)}
.rk-tier-card p{margin:6px 0 0;font-size:clamp(13.5px,2.2vmin,15.5px);line-height:1.5;color:var(--ink-60)}
.rk-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:clamp(16px,3.2vmin,28px)}
.rk-pill{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:999px;
  background:var(--surface);padding:9px 15px;font:600 13px "Inter",sans-serif;box-shadow:0 2px 8px var(--fill)}
.rk-pill svg{width:16px;height:16px}
.rk-pill .ico-trophy{display:grid;color:#E9A800}
.rk-strip{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin-top:14px}
.rk-strip button{display:flex;flex-direction:column;align-items:center;gap:4px;border:1.5px solid transparent;
  border-radius:12px;background:var(--surface);padding:8px 2px 6px;box-shadow:var(--shadow)}
.rk-strip button.on{border-color:var(--orange);background:var(--warm)}
.rk-strip small{font:500 10.5px "Inter",sans-serif;color:var(--ink-60)}
.rk-strip button.on small{font-weight:700;color:var(--ink)}

/* 3 — a division's leaderboard */
.rk-pill small{font-weight:500;color:var(--ink-60)}
.rk-board{display:grid;gap:3px;margin-top:12px}
.rk-row{display:flex;align-items:center;gap:12px;border-radius:12px;padding:7px 12px}
.rk-row b{font:500 14px "Inter",sans-serif}
.rk-row strong{font:600 14px "Inter",sans-serif}
.rk-row.top{background:var(--warm-2)}
.rk-row.bottom{background:#ff2d550f}
.rk-row.you{box-shadow:inset 0 0 0 1.5px var(--orange)}
.rk-place{display:grid;place-items:center;width:26px;height:26px;flex:none;border-radius:7px;
  font:700 13px "Inter",sans-serif;color:var(--ink-60)}
.rk-row.top .rk-place{color:#fff}
.rk-row.top .rk-place.p1{background:#F5B400}
.rk-row.top .rk-place.p2{background:#9AA3AD}
.rk-row.top .rk-place.p3{background:#F07A2E}

/* how it works */
.rk-tiers{display:grid;grid-template-columns:repeat(6,1fr);gap:4px;margin-top:12px}
.rk-tiers span{display:flex;flex-direction:column;align-items:center;gap:5px}
.rk-tiers small{font:600 11px "Inter",sans-serif}
.rk-steps{list-style:none;display:grid;gap:14px;margin:12px 0 0;padding:0;counter-reset:rk}
.rk-steps li{display:grid;grid-template-columns:34px 1fr;column-gap:12px;counter-increment:rk}
.rk-steps li::before{content:counter(rk);grid-row:span 2;display:grid;place-items:center;width:34px;height:34px;
  border-radius:50%;background:var(--orange);color:#fff;font:700 15px var(--display)}
.rk-steps b{font:700 15px var(--display)}
.rk-steps span{font-size:13px;line-height:1.4;color:var(--ink-60)}
.rk-points{display:grid;gap:6px;margin-top:12px}
.rk-pt{display:flex;align-items:center;gap:12px;border-radius:12px;background:#ff6b350b;padding:10px 14px;font-size:14px}
.rk-pt i{display:grid;width:22px;color:var(--ink)}
.rk-pt i svg{width:20px;height:20px}
.rk-pt.gold i{color:#F5B400}
.rk-pt.silver i{color:#9AA3AD}
.rk-pt.bronze i{color:#C77B3B}
.rk-pt span{flex:1}
.rk-pt b{font-weight:600}
.rk-tip{display:flex;align-items:center;gap:12px;margin-top:10px;border-radius:12px;background:var(--tip);padding:12px 14px;font-size:13px}
.rk-tip svg{width:24px;height:24px;flex:none;color:#E9A800}
.rk-tip b{display:block}

/* 4 — series complete */
.rk-complete{position:relative;overflow:hidden}
.rk-sc{display:flex;align-items:center;gap:14px;margin-top:12px;border-radius:18px;padding:16px;color:#151515}
.rk-sc.up{background:#dff3dc}
.rk-sc.stay{background:#cdbfb4}
.rk-sc.down{background:#f9c4c9}
.rk-sc-ico{display:grid;place-items:center;width:42px;height:42px;flex:none;border-radius:50%;color:#fff}
.rk-sc-ico svg{width:20px;height:20px}
.rk-sc.up .rk-sc-ico{background:#2f9e44}
.rk-sc.up .rk-sc-ico svg{transform:rotate(-90deg)}
.rk-sc.stay .rk-sc-ico{background:#8a6a55}
.rk-sc.down .rk-sc-ico{background:#e5383b}
.rk-sc.down .rk-sc-ico svg{transform:rotate(90deg)}
.rk-sc b{display:block;font:600 15px "Inter",sans-serif}
.rk-sc small{display:block;margin-top:6px;font-size:12px;color:#151515a6}
.rk-faces{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.rk-you{margin:16px 0 0;text-align:center;font-size:14px;color:#ffffffb3}
.rk-confetti i{position:absolute;width:5px;height:14px;border-radius:2px;background:var(--orange)}
.rk-confetti i:nth-child(1){top:70px;left:9%;transform:rotate(-30deg)}
.rk-confetti i:nth-child(2){top:48px;right:22%;width:5px;height:5px;border-radius:50%}
.rk-confetti i:nth-child(3){top:100px;right:7%;transform:rotate(35deg)}
.rk-confetti i:nth-child(4){bottom:120px;left:6%;transform:rotate(-40deg)}
.rk-confetti i:nth-child(5){bottom:150px;right:9%;background:#F5C542;transform:rotate(25deg)}
.rk-confetti i:nth-child(6){bottom:108px;left:18%;width:5px;height:5px;border-radius:50%}

/* ---------- dark mode extras ---------- */
/* Faces toned near-black would vanish on the dark ground. */
[data-theme="dark"] .face{box-shadow:inset 0 0 0 1.5px #ffffff1f}
[data-theme="dark"] .rank-badge svg{filter:drop-shadow(0 3px 6px #00000080)}

/* ---------- short screens (laptops) ---------- */
/* The Ranked card and its badge give back height so the league strip stays on screen. */
@media (max-height:880px) and (min-width:760px){
  .rank-badge.hero{--size:clamp(110px,20vh,170px)}
  .rk-tier-card{min-height:0}
}

/* ---------- wider columns ---------- */
@container app (min-width:620px){
  .vote-track{margin-inline:0}
  .vote-card{max-width:60cqw}
  .badge-grid{grid-template-columns:repeat(5,1fr)}
}
