/* Styles for static/extras.js (14/11): the summoning-circle Lab, the discovery ceremony, live notices, eggs, the
   pair of the day and the fusion quiz. Dark look first; the light look (html.light) at the end of each part. */

/* ------------------------------------------------------------------ the Lab: two summoning circles and a fusion orb */
.sl-lab { --S: clamp(96px, 27vw, 156px); --C: clamp(78px, 21vw, 116px); --B: clamp(12px, 3vw, 40px);
  position: relative; overflow: hidden; isolation: isolate; margin-bottom: 14px; padding: 50px 8px 18px; border-radius: 26px; color: #fff;
  background: radial-gradient(120% 90% at 50% 0%, #43217e, #1a1040 58%, #0c0a22); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4); text-shadow: 0 1px 2px rgba(20, 10, 50, .5); }
.sl-lab::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 52%; width: 640px; height: 640px; margin: -320px 0 0 -320px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 255, 255, .07) 0 6deg, transparent 6deg 16deg);
  -webkit-mask: radial-gradient(circle, #000 15%, transparent 60%); mask: radial-gradient(circle, #000 15%, transparent 60%); animation: slspin 60s linear infinite; }
.sl-motes { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sl-motes b { position: absolute; bottom: -8px; left: var(--x); width: 4px; height: 4px; border-radius: 50%; background: #fff; opacity: 0;
  box-shadow: 0 0 6px #fff; animation: slmote var(--t) linear var(--d) infinite; }
@keyframes slmote { 10% { opacity: .8; } 100% { transform: translateY(-340px); opacity: 0; } }
.sl-hud { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 8px;
  max-width: calc(100% - 24px); padding: 5px 14px; border-radius: 99px; white-space: nowrap; overflow: hidden;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font: 400 10.5px var(--lcd); letter-spacing: 1px; text-transform: uppercase; }
.sl-hud .ch-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff; }
.sl-hud.ok .ch-dot { background: #4fe3b0; box-shadow: 0 0 8px #4fe3b0; }
.sl-hud.bad .ch-dot { background: #ff6f91; box-shadow: 0 0 8px #ff6f91; }
.sl-hud.busy .ch-dot { animation: blink .6s infinite; }
.sl-stage { display: grid; grid-template-columns: var(--S) var(--B) var(--C) var(--B) var(--S); justify-content: center; align-items: start; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.sl-circle { position: relative; width: var(--S); aspect-ratio: 1; display: grid; place-items: center; }
.sl-r1, .sl-r2, .sl-r3 { position: absolute; border-radius: 50%; pointer-events: none; }
.sl-r1 { inset: 0; border: 2px solid rgba(255, 255, 255, .6); box-shadow: 0 0 16px rgba(160, 200, 255, .55), inset 0 0 16px rgba(255, 160, 220, .35); transition: box-shadow .3s; }
.sl-r2 { inset: 7%; background: repeating-conic-gradient(rgba(255, 255, 255, .8) 0 2.5deg, transparent 2.5deg 22.5deg);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%, #000 72%, transparent 73%); mask: radial-gradient(circle, transparent 60%, #000 61%, #000 72%, transparent 73%);
  animation: slspin 16s linear infinite; }
.sl-r3 { inset: 19%; border: 2px dashed rgba(255, 210, 240, .75); animation: slspin 11s linear infinite reverse; }
@keyframes slspin { to { transform: rotate(360deg); } }
/* sl-ring / sl-spec (14/11): own names, "ring" and "specimen" belong to the pack tear and the old Lab tubes in style.css
   (their opacity 0 hid the creatures in the circles) */
.sl-ring { position: relative; z-index: 1; width: 60%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, rgba(255, 255, 255, .38), rgba(255, 255, 255, .06) 70%); }
.sl-ring .sl-spec { width: 125%; max-width: none; height: auto; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .35)); animation: slfloat 3s ease-in-out infinite; }
@keyframes slfloat { 50% { transform: translateY(-6px); } }
.sl-ring .tube-plus { font: 700 36px/1 Fredoka, sans-serif; opacity: .9; animation: slq 1.8s ease-in-out infinite; }
.slot.empty .sl-r2, .slot.empty .sl-r3 { opacity: .45; }
.slot.target .sl-r1 { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35), 0 0 26px #fff; animation: sltarget 1.4s ease-in-out infinite; }
@keyframes sltarget { 50% { box-shadow: 0 0 0 7px rgba(255, 255, 255, .12), 0 0 34px #fff; } }
.sl-plate { display: flex; flex-direction: column; align-items: center; gap: 1px; max-width: 100%; padding: 5px 10px; border-radius: 12px;
  background: rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); text-align: center; }
.sl-plate .tube-label { font: 400 8.5px var(--lcd); letter-spacing: 1.5px; color: inherit; opacity: .85; }
.sl-plate .tube-name { font: 700 14px/1.15 Fredoka, sans-serif; color: inherit; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-plate .tube-sub { font: 700 11px Nunito, sans-serif; color: inherit; opacity: .8; }
.sl-beam { position: relative; height: 4px; margin-top: calc(var(--S) / 2 - 2px); border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .2); }
.sl-beam i { position: absolute; top: 0; bottom: 0; width: 60%; left: -60%; background: linear-gradient(90deg, transparent, #fff, transparent); opacity: 0; }
.sl-lab.has-head .sl-beam.l i, .sl-lab.has-body .sl-beam.r i { opacity: .7; animation: slbeam 1.4s linear infinite; }
.sl-beam.r i { animation-direction: reverse !important; }
.sl-lab.ready .sl-beam i { opacity: 1; animation-duration: .8s; }
@keyframes slbeam { to { left: 100%; } }
.sl-mid { position: relative; display: flex; flex-direction: column; align-items: center; margin-top: calc(var(--S) / 2 - var(--C) / 2); }
.sl-core { position: relative; width: var(--C); height: var(--C); display: grid; place-items: center; }
.sl-halo { position: absolute; inset: -32%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .55), rgba(255, 138, 214, .25) 40%, transparent 70%);
  animation: slpulse 2.6s ease-in-out infinite; }
@keyframes slpulse { 50% { transform: scale(.88); opacity: .6; } }
.sl-orbit { position: absolute; inset: -9%; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: slspin 3.2s linear infinite; }
.sl-orbit.b { inset: -18%; border-color: transparent; border-bottom-color: #ffd6f0; border-left-color: rgba(255, 214, 240, .5); animation-duration: 5s; animation-direction: reverse; }
.sl-face { position: relative; width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #ffffff, #eadfff 45%, #b98fff 100%);
  box-shadow: 0 0 26px rgba(255, 255, 255, .6), inset 0 -6px 14px rgba(90, 40, 170, .35); text-shadow: none; }
.sl-face > img { position: absolute; width: 88%; height: 88%; object-fit: contain; animation: slfloat 3s ease-in-out infinite; }
.sl-face > img.sil { opacity: .5; animation: none; }
.sl-face .q { position: relative; font: 700 38px/1 Fredoka, sans-serif; color: #8a55f0; }
.sl-face .q.secret { color: #fff; text-shadow: 0 0 10px #ff78c4, 0 0 22px #a470ff; animation: slq 1.2s ease-in-out infinite; }
@keyframes slq { 50% { transform: scale(1.15); } }
.sl-lab.ready .sl-halo { animation-duration: 1.2s; }
.sl-lab.ready .sl-r1 { box-shadow: 0 0 24px rgba(255, 255, 255, .75), inset 0 0 18px rgba(255, 160, 220, .45); }
.sl-lab.secret .sl-face { background: radial-gradient(circle at 35% 30%, #fff6fd, #ffc6ea 40%, #a470ff 100%); }
.sl-chip { position: absolute; top: calc(var(--C) + 14px); left: 50%; transform: translateX(-50%); z-index: 2; padding: 3px 10px; border-radius: 99px;
  background: #fff; color: #a14fe0; font: 800 10.5px Nunito, sans-serif; white-space: nowrap; text-shadow: none; box-shadow: 0 4px 12px rgba(80, 40, 160, .35);
  animation: slchip 1.8s ease-in-out infinite; }
@keyframes slchip { 50% { transform: translateX(-50%) translateY(-2px); } }
.sl-lab .lab-swap { position: absolute; left: 50%; top: calc(var(--C) + 44px); bottom: auto; transform: translateX(-50%); margin: 0; white-space: nowrap; padding: 3px 10px; border-radius: 99px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .35); color: #fff; font: 800 10.5px Nunito, sans-serif; box-shadow: none; }
/* mixing: the two creatures spiral into the orb, the circles race, the orb flares */
.sl-lab.fusing .slot.head .sl-spec { animation: slinl 1.3s cubic-bezier(.55, 0, .75, .35) forwards; }
.sl-lab.fusing .slot.body .sl-spec { animation: slinr 1.3s cubic-bezier(.55, 0, .75, .35) forwards; }
@keyframes slinl { to { transform: translateX(calc(var(--S) / 2 + var(--B) + var(--C) / 2)) rotate(540deg) scale(.1); opacity: 0; } }
@keyframes slinr { to { transform: translateX(calc((var(--S) / 2 + var(--B) + var(--C) / 2) * -1)) rotate(-540deg) scale(.1); opacity: 0; } }
.sl-lab.fusing .sl-r2, .sl-lab.fusing .sl-r3, .sl-lab.fusing .sl-orbit { animation-duration: .5s; }
.sl-lab.fusing .sl-beam i { opacity: 1; animation-duration: .25s; }
.sl-lab.fusing .sl-face { animation: slboom 1.6s ease-in forwards; }
@keyframes slboom { 70% { transform: scale(1.12); box-shadow: 0 0 40px #fff, 0 0 80px #ff9ad8; } 100% { transform: scale(1.35); box-shadow: 0 0 60px #fff, 0 0 120px #ffd6f0; filter: brightness(1.8); } }
.sl-lab.fusing::before { animation-duration: 3s; }
body.reduce .sl-lab *, body.reduce .sl-lab::before { animation: none !important; }
html.light .sl-lab { background: var(--dusk), url(/art/card-back.webp?v=2) center 45% / max(160%, 620px) auto no-repeat, var(--dockgrad);
  border: 3px solid #fff; outline: 2px dotted rgba(255, 255, 255, .85); outline-offset: -10px; box-shadow: 0 14px 34px rgba(140, 90, 220, .3);
  text-shadow: 0 1px 2px rgba(30, 12, 70, .55); }
html.light .sl-lab::before { background: repeating-conic-gradient(rgba(255, 255, 255, .22) 0 6deg, transparent 6deg 16deg); }
html.light .sl-hud, html.light .sl-plate, html.light .sl-lab .lab-swap { background: rgba(30, 15, 80, .3); border-color: rgba(255, 255, 255, .4); }

/* ------------------------------------------------------------------ the discovery ceremony */
#cer { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; overflow-y: auto; padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  opacity: 0; transition: opacity .3s; }
#cer.on { opacity: 1; }
.cer-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(circle at 50% 38%, #4a2488, #160d36 65%, #07051a); }
html.light .cer-bg { background: var(--dusk), url(/art/card-back.webp?v=2) center / cover, linear-gradient(115deg, #5ca8ff, #a470ff, #ff78c4, #ffb870); }
.cer-rays { position: absolute; left: 50%; top: 36%; width: 1600px; height: 1600px; margin: -800px 0 0 -800px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 255, 255, .13) 0 7deg, transparent 7deg 18deg); animation: slspin 40s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 10%, transparent 60%); mask: radial-gradient(circle, #000 10%, transparent 60%); }
.cer-glow { position: absolute; left: 50%; top: 36%; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .7), rgba(255, 170, 230, .25) 40%, transparent 70%); animation: slpulse 3s ease-in-out infinite; }
.cer-box { width: min(100%, 420px); display: flex; flex-direction: column; align-items: center; gap: 14px; color: #fff; text-align: center;
  text-shadow: 0 1px 3px rgba(40, 15, 90, .5); }
.cer-kick { font: 400 12px var(--lcd); letter-spacing: 2.5px; text-transform: uppercase; }
.cer-card { width: min(62vw, 250px); }
.cer-card .card { width: 100%; box-shadow: 0 24px 50px rgba(20, 10, 60, .55), 0 0 0 3px rgba(255, 255, 255, .8), 0 0 60px rgba(255, 190, 240, .7); }
#cer.on .cer-card { animation: cerrise .9s cubic-bezier(.2, 1.3, .4, 1) .15s backwards; }
@keyframes cerrise { from { transform: translateY(60px) scale(.6) rotateY(180deg); opacity: 0; } }
.cer-plaque { display: flex; flex-direction: column; gap: 2px; padding: 8px 18px; border-radius: 12px; color: #6b4a00; text-shadow: none;
  background: linear-gradient(180deg, #fff7da, #f2cd6e); border: 2px solid #fff; box-shadow: 0 8px 20px rgba(120, 80, 0, .35); font: 700 13px Nunito, sans-serif; }
.cer-plaque b { font: 700 18px Fredoka, sans-serif; letter-spacing: 1px; }
#cer.on .cer-plaque { animation: cerpop .5s cubic-bezier(.2, 1.4, .4, 1) .7s backwards; }
@keyframes cerpop { from { transform: scale(.5); opacity: 0; } }
.cer-naming { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border-radius: 18px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); }
.cer-q { font: 700 16px Fredoka, sans-serif; }
.cer-opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.cer-opt { padding: 7px 14px; border-radius: 99px; border: 2px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .2); color: #fff;
  font: 700 15px Fredoka, sans-serif; cursor: pointer; text-shadow: inherit; }
.cer-opt.on { background: #fff; color: #7d3fe0; text-shadow: none; box-shadow: 0 4px 14px rgba(60, 20, 120, .35); }
.cer-naming small { font-size: 11.5px; opacity: .9; }
.cer-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ------------------------------------------------------------------ live notices */
.live-n { position: fixed; z-index: 125; top: calc(70px + env(safe-area-inset-top, 0px)); left: 50%; width: min(calc(100% - 24px), 480px);
  transform: translate(-50%, -160%); transition: transform .45s cubic-bezier(.2, 1.2, .4, 1); display: flex; align-items: center; gap: 10px;
  padding: 8px 12px 8px 8px; border-radius: 16px; border: 0; cursor: pointer; text-align: left; text-decoration: none; font: 700 13.5px/1.3 Nunito, sans-serif;
  color: #fff; background: linear-gradient(115deg, #3a1f7a, #6a2f9e); box-shadow: 0 12px 30px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .15); }
.live-n.on { transform: translate(-50%, 0); }
.live-n b { color: #ffd6f0; }
.ln-img { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .15); }
.ln-img img { width: 90%; height: 90%; object-fit: contain; }
.ln-x { font: 700 20px Fredoka, sans-serif; opacity: .8; }
@media (min-width: 1024px) { .live-n { top: 70px; left: calc(50% + 130px); } }
html.light .live-n { color: var(--text); background: #fff; box-shadow: 0 12px 30px rgba(112, 84, 196, .3), 0 0 0 2px transparent;
  border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--dockgrad) border-box; }
html.light .live-n b { color: #8a3fe0; }
html.light .ln-img { background: var(--tint); }

/* ------------------------------------------------------------------ eggs */
.egg { position: relative; width: 64px; height: 82px; flex: none; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; border: 3px solid #fff;
  background: radial-gradient(circle at 30% 30%, #ffd1ea 0 9%, transparent 10%), radial-gradient(circle at 70% 55%, #c7dcff 0 12%, transparent 13%),
    radial-gradient(circle at 40% 76%, #ffe2c2 0 8%, transparent 9%), linear-gradient(160deg, #ffffff, #ece0ff);
  box-shadow: 0 8px 18px rgba(112, 84, 196, .35), 0 0 22px rgba(255, 120, 196, .4); }
.egg.sm { width: 50px; height: 64px; }
.egg.big { width: 110px; height: 140px; margin: 10px auto 14px; }
.egg.wobble { animation: eggwob 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes eggwob { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-7deg); } 84% { transform: rotate(6deg); } 92% { transform: rotate(-3deg); } }
.egg.ready { box-shadow: 0 8px 18px rgba(112, 84, 196, .35), 0 0 30px rgba(255, 210, 90, .9); animation-duration: 1s; }
.egg-crack { position: absolute; left: 22%; top: 42%; width: 56%; height: 14%; border-top: 2px solid #8a62e8; opacity: 0;
  clip-path: polygon(0 0, 20% 100%, 40% 0, 60% 100%, 80% 0, 100% 100%, 100% 30%, 0 30%); }
.egg.ready .egg-crack, .egg.hatching .egg-crack { opacity: 1; }
.egg.hatching { animation: egghatch 1.4s ease-in forwards; }
@keyframes egghatch { 0%, 60% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); }
  100% { transform: scale(1.5); opacity: 0; filter: brightness(2.2); } }
.eggs { margin-bottom: 14px; padding: 12px 14px; border-radius: 20px; background: rgba(22, 31, 60, .88); border: 1px solid rgba(255, 255, 255, .08); }
.eggs-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 10px; }
.eggs-h b { font: 600 16px Fredoka, sans-serif; } .eggs-h span { font-size: 12px; color: var(--muted); font-weight: 700; }
.egg-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.egg-slot { flex: none; width: 130px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 16px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.egg-par { display: flex; align-items: center; gap: 2px; font: 700 12px Fredoka, sans-serif; }
.egg-par img { width: 28px; height: 28px; object-fit: contain; }
.egg-t { font: 400 12px var(--lcd); color: var(--muted); min-height: 14px; }
.egg-modal { text-align: center; }
html.light .eggs { background: rgba(255, 255, 255, .9); border-color: var(--line); box-shadow: var(--soft); }
html.light .egg-slot { background: var(--tint); }

/* ------------------------------------------------------------------ the pair of the day */
.daily { padding: 12px 14px; border-radius: 20px; margin-bottom: 14px; color: #fff; background: linear-gradient(120deg, #3b2280, #7a2f8f);
  border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 10px 26px rgba(0, 0, 0, .3); }
.dl-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dl-k { font: 400 10.5px var(--lcd); letter-spacing: 1.5px; text-transform: uppercase; }
.dl-r { padding: 2px 10px; border-radius: 99px; background: rgba(255, 255, 255, .2); font: 800 12px Nunito, sans-serif; }
.dl-pair { display: flex; align-items: center; justify-content: center; gap: 8px; font: 700 16px Fredoka, sans-serif; }
.dl-pair span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px 3px 4px; border-radius: 99px; background: rgba(255, 255, 255, .16); }
.dl-pair img { width: 34px; height: 34px; object-fit: contain; }
.dl-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.daily.done { opacity: .85; }
html.light .daily { background: url(/art/card-back.webp?v=2) center 30% / max(170%, 520px) auto, var(--dockgrad); border: 3px solid #fff;
  box-shadow: 0 10px 26px rgba(140, 90, 220, .28); color: #2c2650; text-shadow: 0 1px 0 rgba(255, 255, 255, .55); }
html.light .dl-k { color: #3f2a96; }
html.light .dl-r, html.light .dl-pair span { background: rgba(255, 255, 255, .62); }

/* ------------------------------------------------------------------ the fusion quiz */
.qz-card { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; background: rgba(22, 31, 60, .88); border: 1px solid var(--line); }
.qz-left { font: 800 12px Nunito, sans-serif; color: var(--muted); }
.qz-sil { position: relative; width: min(70vw, 260px); aspect-ratio: 1; border-radius: 24px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #ffffff, #e7dcff 55%, #b48cff); box-shadow: 0 10px 26px rgba(60, 30, 140, .35); }
.qz-rays { position: absolute; inset: -40%; background: repeating-conic-gradient(rgba(255, 255, 255, .5) 0 6deg, transparent 6deg 16deg); animation: slspin 30s linear infinite; }
.qz-sil img { position: relative; width: 82%; height: 82%; object-fit: contain; transition: filter .5s; }
.qz-q { position: absolute; right: 14px; top: 8px; font: 700 34px Fredoka, sans-serif; color: #fff; text-shadow: 0 0 10px #a470ff; }
.qz-sil.shown .qz-q { display: none; }
.qz-sil.shown img { animation: qzpop .6s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes qzpop { from { transform: scale(.7); filter: brightness(0); } }
.qz-opts { width: 100%; max-width: 440px; display: grid; gap: 8px; }
.qz-o { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 10px; border-radius: 14px; cursor: pointer;
  border: 2px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--text); font: 700 14px Fredoka, sans-serif; }
.qz-o span { display: inline-flex; align-items: center; gap: 4px; }
.qz-o img { width: 30px; height: 30px; object-fit: contain; }
.qz-o.right { border-color: #1faa68; background: rgba(31, 170, 104, .18); }
.qz-o.wrong { border-color: #e5435d; background: rgba(229, 67, 93, .14); }
.qz-res { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 10px; }
.qz-name { font: 700 22px Fredoka, sans-serif; }
html.light .qz-card { background: rgba(255, 255, 255, .92); box-shadow: var(--soft); }
html.light .qz-o { background: #fff; }

/* ------------------------------------------------------------------ profile: player card, discovery wall, medals */
.pc-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 4px 0 16px; }
.pcard { width: min(100%, 380px); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 16px 16px; border-radius: 26px;
  color: #fff; text-align: center; text-shadow: 0 1px 2px rgba(40, 15, 90, .45);
  background: radial-gradient(120% 90% at 50% 0%, #4a2488, #1c1145 62%, #0f0a2a); border: 3px solid rgba(255, 255, 255, .85);
  outline: 2px dotted rgba(255, 255, 255, .7); outline-offset: -11px; box-shadow: 0 16px 40px rgba(20, 10, 60, .45); }
.pc-kick { font: 400 10px var(--lcd); letter-spacing: 2px; text-transform: uppercase; opacity: .9; }
.pcard .avatar.xl { border: 3px solid #fff; box-shadow: 0 6px 16px rgba(40, 15, 90, .35); }
.pcard h1 { margin: 0; font-size: 28px; }
.pc-since { font-size: 12.5px; font-weight: 700; opacity: .92; }
.pc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; margin-top: 6px; }
.pc-stats span { display: flex; flex-direction: column; padding: 6px 2px; border-radius: 12px; background: rgba(255, 255, 255, .16); font: 800 10.5px Nunito, sans-serif; }
.pc-stats b { font: 700 18px Fredoka, sans-serif; }
.pc-wall { width: 100%; margin-top: 6px; padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, .14); }
.pc-wl { display: block; margin-bottom: 8px; font: 400 10px var(--lcd); letter-spacing: 1.5px; text-transform: uppercase; }
.pc-wgrid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pc-w { position: relative; width: 58px; height: 58px; padding: 0; border-radius: 14px; cursor: pointer; border: 2px solid #fff;
  background: radial-gradient(circle at 50% 60%, rgba(255, 255, 255, .6), rgba(255, 255, 255, .15)); box-shadow: 0 4px 10px rgba(40, 15, 90, .3); }
.pc-w img { width: 92%; height: 92%; object-fit: contain; }
.pc-w em { position: absolute; top: -7px; right: -8px; padding: 0 5px; border-radius: 99px; background: #ffd23d; color: #6b4a00; font: 800 10px Nunito, sans-serif;
  font-style: normal; text-shadow: none; border: 2px solid #fff; }
.pc-wempty { font-size: 12.5px; opacity: .9; }
.pc-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
html.light .pcard { background: url(/art/card-back.webp?v=2) center / cover, var(--dockgrad); border-color: #fff; outline-color: rgba(255, 255, 255, .9);
  box-shadow: 0 16px 36px rgba(140, 90, 220, .3); color: #2c2650; text-shadow: 0 1px 0 rgba(255, 255, 255, .55); }
html.light .pc-kick, html.light .pc-wl { color: #3f2a96; }
html.light .pc-stats span, html.light .pc-wall { background: rgba(255, 255, 255, .62); }
.medals { margin-bottom: 16px; padding: 14px; border-radius: 20px; background: rgba(22, 31, 60, .88); border: 1px solid var(--line); }
.md-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.md-h b { font: 600 17px Fredoka, sans-serif; } .md-h span { font-size: 12px; font-weight: 700; color: var(--muted); }
.md-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.md { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.md i { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font: 700 16px Fredoka, sans-serif; font-style: normal;
  color: var(--muted); background: rgba(255, 255, 255, .06); border: 2px dashed var(--line); }
.md.got i { color: #6b4a00; background: radial-gradient(circle at 35% 30%, #fff6c8, #ffd23d 55%, #d69a00); border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(160, 110, 0, .35); }
.md b { font: 800 12px/1.15 Nunito, sans-serif; }
.md small { font-size: 10.5px; line-height: 1.2; color: var(--muted); }
html.light .medals { background: rgba(255, 255, 255, .9); box-shadow: var(--soft); }
html.light .md i { background: var(--tint); }

/* ------------------------------------------------------------------ Infinidex constellation */
.cst { margin-bottom: 14px; padding: 14px; border-radius: 22px; color: #fff; overflow: hidden;
  background: radial-gradient(110% 90% at 50% 10%, #2c1a66, #120c33 65%, #0a0820); border: 1px solid rgba(255, 255, 255, .1); }
.cst-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.cst-h b { font: 600 17px Fredoka, sans-serif; } .cst-h span { font-size: 12.5px; font-weight: 700; opacity: .85; }
.cst-wrap { max-width: 460px; margin: 6px auto 0; }
#cst { width: 100%; height: auto; display: block; overflow: visible; }
/* 14/11 (owner): the 3D constellation (constellation3d.js): a canvas as wide as the card, a little taller than wide */
.cst.is3d .cst-wrap { max-width: 520px; min-height: 240px; margin: 8px auto 0; border-radius: 18px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.cst-cv { display: block; width: 100%; cursor: grab; }
.cst-cv:active { cursor: grabbing; }
.cst-e { stroke: rgba(255, 255, 255, .13); stroke-width: 1.2; transition: stroke .25s, stroke-width .25s, opacity .25s; }
.cst-e.lit { stroke: url(#cstg); stroke-width: 3.5; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(255, 140, 220, .7)); }
.cst-e.lit.own { stroke-width: 4.5; }
.cst-f { cursor: pointer; }
.cst-f circle { fill: #fff; stroke: url(#cstg); stroke-width: 3; }
.cst-n { cursor: pointer; }
.cst-n circle { fill: rgba(255, 255, 255, .92); stroke: rgba(255, 255, 255, .5); stroke-width: 2; transition: stroke .2s; }
.cst-n:not(.own) image { opacity: .55; }
.cst-n.sel circle { stroke: #ffd23d; stroke-width: 4; }
#cst.focus .cst-e:not(.hl), #cst.focus .cst-f:not(.hl) { opacity: .15; }
#cst.focus .cst-e.hl:not(.lit) { stroke: rgba(255, 214, 240, .75); stroke-dasharray: 4 5; stroke-width: 2; }
.cst-tip { text-align: center; color: rgba(255, 255, 255, .8) !important; margin: 6px 0 0; }
@media (prefers-reduced-motion: no-preference) { .cst-e.lit { animation: cstglow 2.6s ease-in-out infinite; } }
@keyframes cstglow { 50% { opacity: .65; } }
html.light .cst { background: var(--dusk), url(/art/card-back.webp?v=2) center / max(170%, 600px) auto, var(--dockgrad); border: 3px solid #fff;
  outline: 2px dotted rgba(255, 255, 255, .85); outline-offset: -10px; box-shadow: 0 14px 34px rgba(140, 90, 220, .28); text-shadow: 0 1px 2px rgba(30, 12, 70, .55); }
html.light .cst-e { stroke: rgba(255, 255, 255, .3); }

/* ------------------------------------------------------------------ My cards: piles, a fan per pile, "Your best" */
.seg.seg3 { grid-template-columns: repeat(3, 1fr); }
.best-h { margin: 6px 0 6px; font: 400 10.5px var(--lcd); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.best-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.best-strip::-webkit-scrollbar { display: none; }
.best-strip .ccell { flex: none; width: 96px; scroll-snap-align: start; cursor: pointer; }
.grid.stacks { row-gap: 22px; }
.ccell.pile { position: relative; cursor: pointer; isolation: isolate; }
.ccell.pile.multi::before, .ccell.pile.tall::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 7% / 4.75%;
  background: url(/art/card-back.webp?v=2) center / cover; border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 4px 10px rgba(0, 0, 0, .3); }
.ccell.pile.multi::before { transform: rotate(-5deg) translate(-5px, 3px); }
.ccell.pile.tall::after { transform: rotate(6deg) translate(6px, 2px); }
.ccell.pile:hover > .card, .ccell.pile:focus-within > .card { transform: translateY(-4px) rotate(-1deg); }
.pile-k { position: absolute; left: 50%; bottom: -10px; z-index: 8; transform: translateX(-50%); padding: 1px 9px; border-radius: 99px; white-space: nowrap;
  font: 800 10.5px Nunito, sans-serif; color: #fff; background: linear-gradient(115deg, #5ca8ff, #a470ff, #ff78c4); border: 2px solid #fff; }
.fan-box .fan { display: flex; justify-content: center; padding: 18px 0 10px; min-height: 200px; }
.fan-c { width: min(34vw, 150px); margin: 0 calc(min(34vw, 150px) * -.18); transform: rotate(calc((var(--i) - (var(--n) - 1) / 2) * 9deg)) translateY(calc(var(--i) * 0px));
  transform-origin: 50% 120%; animation: fanin .45s cubic-bezier(.2, 1.3, .4, 1) backwards; animation-delay: calc(var(--i) * 60ms); transition: transform .2s; }
.fan-c:hover { z-index: 3; transform: rotate(0) translateY(-10px) scale(1.04); }
.fan-c .ccell { cursor: pointer; }
@keyframes fanin { from { transform: rotate(0) translateY(30px) scale(.8); opacity: 0; } }

/* ------------------------------------------------------------------ Packs: a turning showcase */
.pk-show { position: relative; display: flex; align-items: center; justify-content: center; height: clamp(250px, 66vw, 330px); margin: 6px 0 4px;
  touch-action: pan-y; user-select: none; }
.pk-show::before { content: ""; position: absolute; left: 50%; top: 52%; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(255, 255, 255, .55), rgba(164, 112, 255, .18) 45%, transparent 70%); animation: slpulse 3s ease-in-out infinite; }
.pk-3d { position: relative; width: clamp(130px, 38vw, 180px); height: 100%; perspective: 900px; }
.pk-item { position: absolute; left: 0; right: 0; top: 50%; transform: translate(calc(var(--d) * 78%), -50%) rotateY(calc(var(--d) * -38deg)) scale(calc(1 - (var(--d) * var(--d)) * .24));
  z-index: calc(3 - var(--d) * var(--d)); opacity: calc(1 - (var(--d) * var(--d)) * .25); transition: transform .45s cubic-bezier(.2, 1, .3, 1), opacity .3s; cursor: pointer; }
.pk-item .pack3 { width: 100%; }
.pk-item:not(.on) .pack3 { pointer-events: none; filter: saturate(.8); }
.pk-item.on { animation: pkbob 3s ease-in-out infinite; }
@keyframes pkbob { 50% { margin-top: -6px; } }
.pk-nav { position: absolute; top: 50%; z-index: 5; width: 38px; height: 38px; margin-top: -19px; border-radius: 50%; cursor: pointer; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font: 700 22px/1 Fredoka, sans-serif; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.pk-nav.l { left: 0; } .pk-nav.r { right: 0; }
.pk-cta { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 18px; }
.pk-name { font: 700 20px Fredoka, sans-serif; }
.pk-ringwrap { position: relative; padding: 5px; border-radius: 22px; margin-top: 4px;
  background: conic-gradient(#ffd23d var(--p), rgba(164, 112, 255, .22) var(--p)); }
.pk-open { min-width: 170px; font-size: 17px; padding: 13px 22px; }
.pk-pity { font-size: 12.5px; font-weight: 800; color: var(--accent); }
html.light .pk-nav { box-shadow: 0 4px 12px rgba(112, 84, 196, .2); }

/* ------------------------------------------------------------------ Trade: a table between two, a value balance, friends */
.tbs.table { position: relative; padding: 10px; border-radius: 18px; background: radial-gradient(120% 100% at 50% 0%, rgba(164, 112, 255, .18), rgba(0, 0, 0, .12));
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, .18); }
.tb-scale { display: flex; flex-direction: column; align-items: center; gap: 0; font-size: 15px; }
.tb-scale svg { width: 44px; height: 36px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tb-scale svg .beam { transform-origin: 24px 12px; transform: rotate(var(--tilt)); transition: transform .6s cubic-bezier(.3, 1.6, .5, 1); }
.tb-scale svg circle { fill: currentColor; }
.friends { display: flex; align-items: center; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 6px; scrollbar-width: none; }
.friends::-webkit-scrollbar { display: none; }
.fr-h { flex: none; font: 400 10px var(--lcd); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.fr { flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font: 800 11.5px Nunito, sans-serif; color: var(--text); text-decoration: none; }
.fr .avatar { width: 46px; height: 46px; font-size: 19px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px #a470ff; }
html.light .tbs.table { background: radial-gradient(120% 100% at 50% 0%, #f3ecff, #fbf9ff); box-shadow: inset 0 2px 8px rgba(112, 84, 196, .12); border: 1px solid var(--line); }
html.light .tb.give { background: linear-gradient(180deg, #fff0f4, #ffffff); }
html.light .tb.get { background: linear-gradient(180deg, #ebfbf3, #ffffff); }
html.light .tb-lbl { color: var(--muted); }
html.light .tb-arrow { color: #8a55f0; text-shadow: none; }

/* ------------------------------------------------------------------ Activity: the "Now" stories */
.stories { display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 4px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.sty-h { flex: none; align-self: center; font: 400 10px var(--lcd); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.sty { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; }
.sty-ring { padding: 3px; border-radius: 50%; background: conic-gradient(#5ca8ff, #a470ff, #ff78c4, #ffb870, #5ca8ff); }
.sty-ring.seen { background: var(--line); }
.sty-in { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--panel); border: 3px solid var(--bg); }
.sty-in img { width: 90%; height: 90%; object-fit: contain; }
.sty-n { max-width: 70px; font: 800 11.5px Nunito, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#story { position: fixed; inset: 0; z-index: 128; display: flex; flex-direction: column; color: #fff; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 20px;
  background: radial-gradient(circle at 50% 40%, #4a2488, #160d36 70%); animation: fadein .2s; }
html.light #story { background: var(--dusk), url(/art/card-back.webp?v=2) center / cover, var(--dockgrad); text-shadow: 0 1px 2px rgba(30, 12, 70, .55); }
.sty-bars { display: flex; gap: 4px; }
.sty-bars i { flex: 1; height: 3px; border-radius: 99px; background: rgba(255, 255, 255, .35); overflow: hidden; position: relative; }
.sty-bars i.done { background: #fff; }
.sty-bars i.now::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: stybar 4.5s linear forwards; }
@keyframes stybar { from { transform: scaleX(0); } }
.sty-top { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.sty-x { margin-left: auto; position: relative; z-index: 3; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .2); color: #fff; font-size: 22px; cursor: pointer; }
.sty-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.sty-card { width: min(62vw, 270px); animation: cerrise .5s cubic-bezier(.2, 1.3, .4, 1); }
.sty-card .card { width: 100%; box-shadow: 0 20px 40px rgba(20, 10, 60, .5), 0 0 0 3px rgba(255, 255, 255, .8); }
.sty-body p { margin: 0; max-width: 340px; font: 700 16px Nunito, sans-serif; }
.sty-minis { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.sty-minis .mini { width: 52px; }
.sty-prev, .sty-next { position: absolute; top: 80px; bottom: 0; width: 35%; border: 0; background: none; cursor: pointer; z-index: 2; }
.sty-prev { left: 0; } .sty-next { right: 0; width: 65%; }

/* ------------------------------------------------------------------ Recycle: the machine */
.rmach { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0 14px; }
.rm-body { position: relative; width: 210px; height: 128px; border-radius: 28px 28px 36px 36px; display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(180deg, #c7b3f7, #8a62e8); box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .14), 0 10px 24px rgba(80, 50, 160, .35);
  border: 3px solid #fff; transition: transform .2s; }
.rm-eyes { display: flex; gap: 46px; margin-top: 14px; }
.rm-eyes i { width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: inset 4px -3px 0 #2c2650; transition: transform .2s; }
.rmach.hungry .rm-eyes i { transform: scale(1.2); box-shadow: inset 2px 3px 0 #2c2650; }
.rm-mouth { position: relative; width: 132px; height: 16px; margin-top: 10px; border-radius: 99px; background: #2c2650; overflow: hidden; transition: height .2s;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, .5); }
.rm-mouth i { position: absolute; left: 6px; right: 6px; top: 0; height: 6px; background: repeating-linear-gradient(90deg, #fff 0 8px, transparent 8px 14px); }
.rmach.hungry .rm-mouth, .rmach.over .rm-mouth { height: 28px; }
.rmach.over .rm-body { transform: scale(1.06); }
.rmach.chomp .rm-body, .rmach.eating .rm-body { animation: rmchomp .18s 5 alternate; }
@keyframes rmchomp { to { transform: translateY(3px) scaleY(.95); } }
.rm-screen { margin-top: auto; margin-bottom: 10px; padding: 3px 12px; border-radius: 10px; background: #1b1544; color: #c9fff7; font: 800 12px Nunito, sans-serif; }
.rm-gear { position: absolute; right: -14px; top: -14px; width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff;
  background: repeating-conic-gradient(#ffd23d 0 20deg, #f0a800 20deg 40deg); animation: slspin 6s linear infinite; }
.rmach.eating .rm-gear { animation-duration: .6s; }
.rm-hint { font-size: 12px; font-weight: 700; color: var(--muted); }
.rm-ghost { position: fixed; z-index: 140; pointer-events: none; transform: translate(-50%, -50%) rotate(-8deg); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .35)); }
.rm-fly { position: fixed; z-index: 140; pointer-events: none; transform: translate(-50%, -50%); transition: left .7s cubic-bezier(.5, 0, .7, .4), top .7s cubic-bezier(.5, 0, .7, .4), transform .7s, opacity .7s; }

/* ------------------------------------------------------------------ the pack stage in the light look (the 3D sky follows, pack3d.js)
   14/11 v2: the pale pastel swallowed every glow (light added to near-white stays white), so the stage is the card
   back's colours at dusk: deep enough for sparks, rays and the white letters, still pastel in hue. */
html.light #stage.k-free { background: radial-gradient(circle at 50% 42%, #7fcfc0, #4f8cc6 48%, #3b338c 100%); }
html.light #stage.k-standard { background: radial-gradient(circle at 50% 42%, #98aaf8, #6a6cdc 48%, #382d8a 100%); }
html.light #stage.k-premium { background: radial-gradient(circle at 50% 42%, #f7bb8c, #cc78b0 48%, #47308c 100%); }
html.light #stage h2, html.light #stage .st-hint, html.light #stage .tear-hint { text-shadow: 0 1px 3px rgba(30, 12, 70, .6); }

/* ------------------------------------------------------------------ screens slide in from the dock's side; the top bar shrinks */
#view.enter[data-dir="r"] { animation: slidein-r .34s cubic-bezier(.2, .9, .3, 1); }
#view.enter[data-dir="l"] { animation: slidein-l .34s cubic-bezier(.2, .9, .3, 1); }
@keyframes slidein-r { from { opacity: 0; transform: translateX(42px); } }
@keyframes slidein-l { from { opacity: 0; transform: translateX(-42px); } }
body.reduce #view.enter { animation: none; }
#top { transition: height .25s, margin-bottom .25s, box-shadow .25s; }
#top .logo small, #top .lens { transition: opacity .2s, transform .25s; }
@media (min-width: 900px) and (max-width: 1023px) {     /* 20/11: a phone folds with the scroll (style.css, app.js topFold) */
  body.scrolled #top { height: 50px; margin-bottom: 14px; }   /* 50 + 14 = 64: the page below doesn't move */
  body.scrolled #top .logo small { opacity: 0; height: 0; margin: 0; overflow: hidden; }
  body.scrolled #top .lens { transform: scale(.8); }
  body.scrolled #top .coins { transform: scale(.92); }
}

/* ------------------------------------------------------------------ the island */
.isl-stage { position: relative; height: min(64vh, 520px); margin-bottom: 14px; border-radius: 24px; overflow: hidden; background: #2a1760;
  border: 3px solid rgba(255, 255, 255, .85); box-shadow: 0 14px 34px rgba(20, 10, 60, .35); }
html.light .isl-stage { background: #e9e1fb; box-shadow: 0 14px 34px rgba(140, 90, 220, .28); }
.isl-stage canvas { display: block; width: 100%; height: 100%; }
.isl-tip { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 2; padding: 3px 12px; border-radius: 99px; white-space: nowrap;
  font: 800 11px Nunito, sans-serif; color: #fff; background: rgba(30, 15, 70, .45); pointer-events: none; }
.isl-name { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 2; padding: 5px 14px; border-radius: 99px; white-space: nowrap;
  font: 700 15px Fredoka, sans-serif; color: #2c2650; background: #fff; box-shadow: 0 6px 16px rgba(40, 20, 90, .3); animation: cerpop .3s cubic-bezier(.2, 1.4, .4, 1); }
.isl-empty { position: absolute; inset: auto 16px 50px; z-index: 2; text-align: center; padding: 8px 12px; border-radius: 14px; color: #fff; background: rgba(30, 15, 70, .5); font-weight: 700; }

/* ------------------------------------------------------------------ expeditions map */
.map { position: relative; aspect-ratio: 10 / 8; max-height: 560px; margin: 0 auto 14px; border-radius: 24px; overflow: hidden;
  background: radial-gradient(circle at 30% 30%, #a9dcff, #6fb6f0 60%, #4d8fd8); border: 3px solid #fff; box-shadow: 0 14px 34px rgba(40, 60, 140, .3); }
.map-sea { position: absolute; inset: 0; background: repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .12) 0 2px, transparent 2px 26px); animation: slpulse 8s ease-in-out infinite; }
.reg { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: 25%; aspect-ratio: 1.25; padding: 0; border: 0; background: none;
  cursor: pointer; display: grid; place-items: center; color: #fff; font: inherit; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.reg-blob { position: absolute; inset: 0; border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%; border: 3px solid rgba(255, 255, 255, .9);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 45%, #fff), var(--c) 70%); box-shadow: 0 6px 0 rgba(0, 0, 0, .12), 0 8px 18px rgba(0, 0, 0, .2);
  transition: transform .2s; }
.reg:hover .reg-blob, .reg:focus-visible .reg-blob { transform: scale(1.07); }
.reg-name { position: relative; font: 700 clamp(10px, 2.6vw, 14px)/1.1 Fredoka, sans-serif; text-align: center; padding: 1px 6px; max-width: 96%;
  border-radius: 8px; color: #2c2650; background: rgba(255, 255, 255, .9); text-shadow: none; box-shadow: 0 2px 6px rgba(30, 20, 80, .2); }
.reg-el { position: absolute; bottom: 8%; font: 400 clamp(7px, 1.8vw, 9px) var(--lcd); letter-spacing: 1px; text-transform: uppercase;
  padding: 1px 5px; border-radius: 99px; color: #fff; background: rgba(30, 18, 70, .6); text-shadow: none; }
.reg-who { position: absolute; top: -14%; right: -6%; width: 42%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: #fff;
  border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); animation: slfloat 2s ease-in-out infinite; }
.reg-who img { width: 92%; height: 92%; object-fit: contain; }
.reg-who.ready { box-shadow: 0 0 0 3px #ffd23d, 0 0 16px #ffd23d; }
.exp-prize { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 12px 14px; margin-bottom: 12px; border-radius: 18px; font-size: 12.5px; font-weight: 700;
  background: rgba(22, 31, 60, .88); border: 1px solid var(--line); }
.exp-prize b { width: 100%; font: 600 15px Fredoka, sans-serif; }
.exp-list { display: grid; gap: 8px; margin-bottom: 16px; }
.exp { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: rgba(22, 31, 60, .88); border: 1px solid var(--line); }
.exp img { width: 46px; height: 46px; object-fit: contain; }
.exp small { display: block; color: var(--muted); font-size: 12px; }
.exp-t { font: 400 13px var(--lcd); }
.exp-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.exp-c { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; cursor: pointer; border: 2px solid var(--line);
  background: rgba(255, 255, 255, .04); color: var(--text); font: inherit; }
.exp-c img { width: 54px; height: 54px; object-fit: contain; }
.exp-c b { font: 700 13px Fredoka, sans-serif; } .exp-c small { font-size: 11px; color: var(--muted); }
.exp-c.match { border-color: #ffd23d; box-shadow: 0 0 0 2px rgba(255, 210, 61, .35); }
.exp-c.match small { color: #c48600; font-weight: 800; }
html.light .exp-prize, html.light .exp { background: rgba(255, 255, 255, .92); box-shadow: var(--soft); }
html.light .exp-c { background: #fff; }

/* ------------------------------------------------------------------ element duel */
.beats { padding: 12px 14px; margin-bottom: 12px; border-radius: 18px; background: rgba(22, 31, 60, .88); border: 1px solid var(--line); }
.beats > b { display: block; margin-bottom: 6px; font: 600 15px Fredoka, sans-serif; }
.beats > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; font-size: 12.5px; }
.duel { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border-radius: 16px; background: rgba(22, 31, 60, .88); border: 1px solid var(--line); }
.duel small { display: block; font-size: 12px; color: var(--muted); }
.duel.off { opacity: .6; }
.duel-res { padding: 2px 10px; border-radius: 99px; font: 800 12px Nunito, sans-serif; color: #fff; }
.duel-res.won { background: #1faa68; } .duel-res.lost { background: #e5435d; } .duel-res.draw { background: #8b86b3; }
button.fr { padding: 0; border: 0; background: none; cursor: pointer; }
.dpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin: 10px 0 12px; max-height: 52vh; overflow-y: auto; padding: 4px; }
.dp { position: relative; cursor: pointer; border-radius: 10px; transition: transform .15s; }
.dp.on { transform: translateY(-3px); box-shadow: 0 0 0 3px #a470ff; }
.dp-n { position: absolute; top: -6px; right: -6px; z-index: 9; width: 24px; height: 24px; border-radius: 50%; display: none; place-items: center;
  font: 800 13px Nunito, sans-serif; color: #fff; background: linear-gradient(115deg, #5ca8ff, #a470ff, #ff78c4); border: 2px solid #fff; }
.dp.on .dp-n { display: grid; }
#arena { position: fixed; inset: 0; z-index: 129; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px 14px;
  color: #fff; background: radial-gradient(circle at 50% 45%, #4a2488, #160d36 70%); animation: fadein .2s; text-shadow: 0 1px 2px rgba(20, 10, 50, .5); }
html.light #arena { background: var(--dusk), url(/art/card-back.webp?v=2) center / cover, var(--dockgrad); }
.ar-top { display: flex; align-items: center; gap: 14px; font: 700 16px Fredoka, sans-serif; }
.ar-score { padding: 4px 14px; border-radius: 99px; background: rgba(255, 255, 255, .2); font: 700 22px Fredoka, sans-serif; }
.ar-field { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.ar-side { width: min(38vw, 190px); transition: transform .3s, filter .3s, opacity .3s; }
.ar-side .card { width: 100%; box-shadow: 0 16px 30px rgba(20, 10, 60, .5); }
.ar-side.in.l { animation: arinl .5s cubic-bezier(.2, 1.3, .4, 1); } .ar-side.in.r { animation: arinr .5s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes arinl { from { transform: translateX(-60px) rotate(-12deg); opacity: 0; } }
@keyframes arinr { from { transform: translateX(60px) rotate(12deg); opacity: 0; } }
.ar-side.win { transform: scale(1.08); filter: drop-shadow(0 0 18px #ffd23d); }
.ar-side.lose { transform: scale(.9) rotate(-4deg); filter: grayscale(.6) brightness(.8); opacity: .8; }
.ar-vs { font: 700 30px Fredoka, sans-serif; color: #ffd6f0; }
html.light .ar-score { background: rgba(30, 15, 80, .3); }
.ar-msg { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 48px; font: 700 17px Nunito, sans-serif; text-align: center; }
.ar-final { font: 700 30px Fredoka, sans-serif; }
html.light .beats, html.light .duel { background: rgba(255, 255, 255, .92); box-shadow: var(--soft); }

/* ------------------------------------------------------------------ Home: the places to play */
.play { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }   /* 15/11: the duel left */
.pl { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 18px; text-decoration: none; color: #fff;
  font: 700 13px Fredoka, sans-serif; text-align: center; text-shadow: 0 1px 2px rgba(20, 10, 50, .4); box-shadow: 0 8px 18px rgba(40, 20, 90, .25); border: 2px solid rgba(255, 255, 255, .8); }
.pl svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pl.isl { background: linear-gradient(150deg, #33b886, #2a80d2); } .pl.mp { background: linear-gradient(150deg, #e57a32, #d63f8f); }
html.light .pl, html.light .pl:visited { color: #fff; } .pl.du { background: linear-gradient(150deg, #a470ff, #5c4ae0); }

/* section headers wrap on narrow phones (the Infinidex legend was wider than the screen) */
.sec-h { flex-wrap: wrap; row-gap: 4px; }
.sec-h .mx-legend { flex-wrap: wrap; }

/* ------------------------------------------------------------------ the zoomed card stays put on a phone (14/11)
   Moving a finger on the zoom used to scroll the page behind it: the page re-laid out under a blurred backdrop on
   every frame and phones dropped the card layer (it blinked and vanished). Now the page behind is locked, the zoom
   takes every touch, the backdrop is a plain dark veil (no live blur) and the card keeps its own layer. */
html:has(#zoom), html:has(#zoom) body { overflow: hidden; overscroll-behavior: none; }
#zoom { touch-action: none; overscroll-behavior: contain; }
#zoom .zoom-bg { -webkit-backdrop-filter: none; backdrop-filter: none;
  background: radial-gradient(circle at 50% 45%, #1c2554, #04060f 70%); }
html.light #zoom .zoom-bg { background: radial-gradient(circle at 50% 45%, #45337f, #150c33 70%); }
/* Zoom v3 (14/11, phone screenshots): pieces of the zoomed card went missing or slid apart while it was turned (the
   Retro ghost showed as a grey box, the glare covered the plate, part of the veil and the buttons vanished). The phone
   ran out of graphics memory: every card on the page behind keeps its own animated layers. So:
   - once the veil has faded in, the page behind is hidden (app.js zoomCard adds body.zoomed), freeing those layers;
     the veil is opaque, so nothing changes to the eye;
   - the card is drawn flat first and then turned as one picture (the tiny filter makes the browser do that), so masks,
     blend modes and the rounded clip can no longer come apart on a tilt;
   - it is smaller and turns less, with a softer perspective, so its near edge stays on the screen. */
body.zoomed > :not(#zoom) { visibility: hidden; }
#zoom .zoom-wrap { width: min(84vw, calc((100vh - 150px) / 1.48), 500px); width: min(84vw, calc((100dvh - 150px) / 1.48), 500px); }
#zoom .zoom-wrap > .card { will-change: transform; filter: contrast(1.01);
  transform: perspective(1400px) rotateX(calc(var(--rx) * .7)) rotateY(calc(var(--ry) * .7)); }

/* ------------------------------------------------------------------ the ceremony stops blinking on phones (14/11)
   The 1600 px masked ray wheel turning over the whole screen (plus the page under it) was more than phones could
   keep in graphics memory: the background blinked. The rays now stand still on touch screens (they still turn with a
   mouse), there is no live blur, and the page behind is hidden while the ceremony is up (extras.js ceremony). */
body.cer-open > :is(#top, #view, #tabs, #modal, #side, #chat, #chat-fab, #stage, #spot, #tdone) { visibility: hidden; }
.cer-rays { width: 170vmax; height: 170vmax; margin: -85vmax 0 0 -85vmax; animation: none; }
@media (hover: hover) and (pointer: fine) { .cer-rays { width: 1600px; height: 1600px; margin: -800px 0 0 -800px; animation: slspin 40s linear infinite; } }

/* the card menu's flip in two halves (app.js flipCard): flat, no backface-visibility */
.cflip-inner { transform-style: flat; transition: transform .21s ease-out; }
.cflip.on .cflip-inner { transform: none; }
.cflip-front, .cflip-back { backface-visibility: visible; -webkit-backface-visibility: visible; }
.cflip-back { transform: none; visibility: hidden; }
.cflip.on .cflip-back { visibility: visible; }
.cflip.on .cflip-front { visibility: hidden; }
.cflip.turn-out .cflip-inner { transform: rotateY(90deg); transition: transform .21s ease-in; }
.cflip.turn-in .cflip-inner { transform: rotateY(-90deg); transition: none; }

/* ------------------------------------------------------------------ no text selection (14/11)
   A game, not a document: pressing and dragging on a phone selected words (and Android opened Google's search panel).
   Only the fields you type in can be selected; pictures can't be dragged out either. */
html, body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
input, textarea, select, [contenteditable="true"] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img, svg { -webkit-user-drag: none; user-drag: none; }

/* ------------------------------------------------------------------ graphics diet (14/11)
   Pinch-zooming the page made the whole screen blink on phones: every card on it was a 3D layer of its own
   (perspective transform + will-change), so a zoom asked the phone to redraw dozens of big layers at once and it ran
   out of graphics memory. Now a card at rest is flat and only the one being turned (tilting / grabbed) goes 3D; the
   page itself can't be pinch-zoomed any more (index.html viewport), cards have their own zoom. */
.card { transform: none; will-change: auto; }
.card.tilting, .card.grabbed { transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry)); }
html, body { touch-action: pan-x pan-y; }
/* 15/11 (owner: "the chat and the menu sit over the button; make this screen simpler, to be tapped next to the
   recycler"): no bar at the bottom any more. The machine and its button share a strip that sticks under the top bar,
   so it stays in reach (and is the drop target) while you scroll the cards; the price list folds away. */
.rprice { margin: 0 0 12px; border-radius: 14px; background: color-mix(in srgb, var(--muted) 8%, transparent); }
.rprice summary { padding: 8px 12px; font: 800 13px Nunito, sans-serif; color: var(--muted); cursor: pointer; list-style: none; }
.rprice summary::-webkit-details-marker { display: none; }
.rprice summary::after { content: " ▾"; }
.rprice[open] summary::after { content: " ▴"; }
.rprice .lab-costs { padding: 0 10px; }
.rprice p { margin: 6px 12px 10px; }
.rdock { position: sticky; top: 72px; z-index: 9; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px;
  margin: 0 0 12px; padding: 12px 14px 12px 18px; border-radius: 22px; background: rgba(28, 20, 66, .94); color: #fff;
  box-shadow: 0 10px 26px rgba(40, 20, 110, .3); border: 2px solid rgba(170, 140, 255, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
html.light .rdock { background: rgba(255, 255, 255, .95); color: #2c2650; border-color: #d9ccff; }
@media (max-width: 1023px) { body.scrolled .rdock { top: 58px; } }
.rdock.ready { border-color: #23d6b0; box-shadow: 0 10px 26px rgba(40, 20, 110, .3), 0 0 0 3px rgba(35, 214, 176, .25); }
.rdock .rmach { margin: 0; gap: 0; }
.rdock .rm-body { width: 108px; height: 76px; border-radius: 20px 20px 26px 26px; border-width: 2px; }
.rdock .rm-eyes { gap: 28px; margin-top: 12px; }
.rdock .rm-eyes i { width: 12px; height: 12px; box-shadow: inset 3px -2px 0 #2c2650; }
.rdock .rm-mouth { width: 72px; height: 11px; margin-top: 9px; }
.rdock .rm-mouth i { left: 4px; right: 4px; height: 4px; background: repeating-linear-gradient(90deg, #fff 0 6px, transparent 6px 10px); }
.rdock .rmach.hungry .rm-mouth, .rdock .rmach.over .rm-mouth { height: 20px; }
.rdock .rm-gear { right: -11px; top: -11px; width: 26px; height: 26px; border-width: 2px; }
.rd-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rd-sum { font: 700 12.5px/1.3 Nunito, sans-serif; opacity: .85; }
.rd-sum b { font-size: 14px; }
.rd-clear { border: 0; padding: 0; background: none; font: 800 12.5px Nunito, sans-serif; color: #ff6f9c; text-decoration: underline; cursor: pointer; }
.rd-go { width: 100%; min-height: 46px; justify-content: center; font-size: 15px; white-space: nowrap; }
.rd-go:disabled { opacity: .55; }
.rf-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.rf-chips::-webkit-scrollbar { display: none; }
.rf-chips .chip { flex: none; }
.rtools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 0 0 12px; }
.rtools .search { margin: 0; min-width: 0; }
/* 15/11 (owner: "put the card in the recycler and make a shredder animation"): a feed slot on the machine's head where
   the chosen cards stand (fanned, newest in front), an exit slit at its foot; recycling shakes and grinds the machine
   while each card goes down the slot and comes out of the slit as strips */
.rdock .rmach { position: relative; padding-top: 40px; }
.rm-feed { position: absolute; left: 50%; top: 0; width: 100px; margin-left: -50px; height: 51px; overflow: hidden; pointer-events: none; }
.rm-feed:empty::before { content: "↓"; position: absolute; left: 50%; bottom: -14px; width: 34px; height: 46px; margin-left: -17px; box-sizing: border-box;
  padding-top: 4px; text-align: center; border-radius: 6px; border: 2px dashed rgba(164, 140, 240, .85); font: 800 15px/1 Nunito, sans-serif;
  color: rgba(164, 140, 240, .95); animation: rf-hint 1.4s ease-in-out infinite; }
@keyframes rf-hint { 50% { translate: 0 -5px; } }
.rf-card { position: absolute; left: 50%; bottom: -12px; width: 36px; height: 50px; box-sizing: border-box; border-radius: 5px; border: 2px solid #fff;
  background-color: #5b40b8; background-size: 130%; background-position: 50% 30%; background-repeat: no-repeat; box-shadow: 0 2px 6px rgba(10, 4, 30, .45); transform-origin: 50% 100%;
  transform: translateX(calc(-50% + var(--k, 0) * 11px)) rotate(calc(var(--k, 0) * 9deg)); transition: transform .25s; }
.rf-card.in { animation: rf-in .4s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes rf-in { from { translate: 0 -44px; opacity: 0; } 50% { opacity: 1; } }
.rm-slot { position: absolute; left: 22px; right: 22px; top: 7px; height: 6px; border-radius: 99px; background: #2c2650;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .6), 0 1px 0 rgba(255, 255, 255, .55); }
.rdock .rm-eyes { margin-top: 18px; }
.rdock .rm-mouth { margin-top: 6px; }
.rm-exit { position: absolute; left: 30px; right: 30px; bottom: 6px; height: 4px; border-radius: 99px; background: #2c2650; box-shadow: 0 1px 0 rgba(255, 255, 255, .45); }
.rm-toss { position: fixed; z-index: 140; pointer-events: none; transform: translate(-50%, -50%) rotate(-8deg); border-radius: 5px;
  transition: left .36s cubic-bezier(.4, 0, .6, 1), top .36s cubic-bezier(.3, -.4, .7, 1), width .36s, opacity .36s; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }
.rmach.shredding .rm-body { animation: rm-shake .07s linear infinite alternate; }
@keyframes rm-shake { from { transform: translate(-1px, 0) rotate(-1.2deg); } to { transform: translate(1px, 1px) rotate(1.2deg); } }
.rmach.shredding .rm-eyes i { transform: scaleY(.35); }
.rmach.shredding .rm-mouth { height: 20px; }
.rmach.shredding .rm-mouth i { animation: rm-grind .16s linear infinite; }
.rmach.shredding .rm-mouth::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 0; height: 4px;
  background: repeating-linear-gradient(90deg, #fff 0 6px, transparent 6px 10px); animation: rm-grind .16s linear infinite reverse; }
@keyframes rm-grind { to { background-position: 10px 0; } }
.rmach.shredding .rm-gear { animation-duration: .35s; }
.rmach.shredding .rm-slot, .rmach.shredding .rm-exit { background: #1a1238; box-shadow: 0 0 8px #23d6b0, inset 0 2px 3px rgba(0, 0, 0, .6); }
.rm-strips { position: fixed; z-index: 140; overflow: hidden; pointer-events: none; }
.rm-strips i { position: absolute; top: 0; box-sizing: border-box; background-color: #5b40b8; background-repeat: no-repeat;
  border-top: 2px solid #fff; border-bottom: 2px solid #fff; box-shadow: 0 2px 3px rgba(10, 4, 30, .35); }
.rm-strips i.l { border-left: 2px solid #fff; border-radius: 4px 0 0 4px; }
.rm-strips i.r { border-right: 2px solid #fff; border-radius: 0 4px 4px 0; }
.rm-bit { position: absolute; width: 5px; height: 7px; border-radius: 1px; box-shadow: 0 1px 1px rgba(10, 4, 30, .3); }
@media (prefers-reduced-motion: reduce) { .rm-feed:empty::before, .rf-card.in { animation: none; } }
/* 15/11 (owner: "after the card menu, zooming the card makes the background blink fast"): with the zoom open the page
   behind (Home's rare finds alone run over 100 animations) kept animating under the veil and the dock's 3D pack kept
   drawing, and the zoomed card was re-flattened (its filter) on every frame of its own sparkles and float. On a phone
   that is more than the graphics memory holds, so the background blinked. While zoomed: everything behind pauses and
   drops its extra layers, the dock's pack stops (app.js busy), the zoomed card doesn't float and is only flattened
   while a finger turns it. */
body.zoomed > :not(#zoom), body.zoomed > :not(#zoom) *, body.zoomed > :not(#zoom) *::before, body.zoomed > :not(#zoom) *::after {
  animation-play-state: paused !important; will-change: auto !important; }
#zoom .zoom-wrap > .card { filter: none; }
#zoom .zoom-wrap > .card.grabbed { filter: contrast(1.01); }
#zoom .card .art img, #zoom .card .art::after { animation: none !important; }
/* 15/11 (owner: "let me move around and zoom in the Infinidex"): the constellation's buttons and its full screen */
.cst.is3d .cst-wrap { position: relative; }
.cst-ui { position: absolute; right: 8px; bottom: 8px; z-index: 2; display: flex; gap: 6px; }
.cst-ui button, .cst-x { min-width: 40px; height: 40px; padding: 0 11px; border-radius: 13px; border: 1px solid rgba(255, 255, 255, .4);
  color: #fff; font: 800 20px/1 Nunito, sans-serif; background: rgba(12, 6, 34, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); cursor: pointer; }
.cst-ui button.wide { font-size: 13.5px; }
.cst-ui button[hidden], .cst-x[hidden], .cst-flabel[hidden] { display: none; }
.cst-ui button:active, .cst-x:active { transform: scale(.94); }
html.cst-open, html.cst-open body { overflow: hidden; overscroll-behavior: none; }
.cst-full { position: fixed; inset: 0; z-index: 125; background: #0b0722; }
.cst-full.pastel { background: #5a4cc4; }
.cst-full .cst-wrap { position: absolute; inset: 0; max-width: none; min-height: 0; margin: 0; border-radius: 0; overflow: hidden; box-shadow: none; }
.cst-full .cst-ui { right: 12px; bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px)); }
.cst-x { position: absolute; z-index: 3; top: max(12px, env(safe-area-inset-top)); right: 12px; }
.cst-flabel { position: absolute; z-index: 2; left: 16px; right: 64px; top: max(20px, calc(env(safe-area-inset-top) + 8px)); margin: 0;
  font: 800 14px/1.3 Nunito, sans-serif; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); pointer-events: none; }
/* 15/11 (owner: "improve this button and put a timer on top saying the time to the next one"): the countdown to the next
   free pack over the button, a calm "waiting" button instead of a half-lit ring, the shiny pity as a slim bar under it */
.pk-timer { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; padding: 5px 14px 5px 5px; border-radius: 99px;
  background: linear-gradient(110deg, rgba(61, 214, 255, .16), rgba(164, 112, 255, .22)); border: 1.5px solid rgba(61, 214, 255, .55);
  font: 800 12.5px/1.2 Nunito, sans-serif; color: var(--text); box-shadow: 0 0 16px rgba(61, 214, 255, .18); }
.pk-timer[hidden] { display: none; }
.pk-timer i { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-size: 14px;
  background: linear-gradient(135deg, #5fe3ff, #3d8bff); box-shadow: 0 2px 0 rgba(10, 4, 40, .35); animation: pk-tick 2s ease-in-out infinite; }
.pk-timer b { font: 700 17px/1 Fredoka, sans-serif; letter-spacing: .05em; color: #ffd23d; font-variant-numeric: tabular-nums; text-shadow: 0 0 10px rgba(255, 210, 61, .45); }
html.light .pk-timer b { color: #c27a00; text-shadow: none; }
@keyframes pk-tick { 0%, 80%, 100% { transform: rotate(0); } 88% { transform: rotate(180deg); } }
.pk-open { min-width: 220px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; margin-top: 4px; font-size: 18px; padding: 14px 26px; border-radius: 18px; }
.pk-oi { font-size: 16px; line-height: 1; }
.pk-open.wait, .pk-open.wait:disabled { opacity: 1; filter: none; cursor: default; animation: none; color: rgba(255, 255, 255, .9); font: 700 18px/1.1 Fredoka, sans-serif;
  background: linear-gradient(180deg, #3d3180, #2a2163); box-shadow: inset 0 0 0 2px rgba(164, 112, 255, .5), 0 4px 0 #17113a; }
.pk-open.wait::before, .pk-open.wait::after { display: none; }
html.light .pk-open.wait { color: #5b4fa0; background: linear-gradient(180deg, #f3eeff, #e3daff); box-shadow: inset 0 0 0 2px rgba(164, 112, 255, .45), 0 4px 0 #c6b8f2; }
.pk-pitybar { width: 220px; height: 7px; margin-top: 6px; border-radius: 99px; overflow: hidden; background: rgba(164, 112, 255, .22); }
.pk-pitybar i { display: block; height: 100%; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, #ffd23d, #ff9a3d, #ff4fa3); box-shadow: 0 0 8px rgba(255, 210, 61, .6); }
/* 17/11: a known pair's egg hatches without the "first" plaque */
.cer-plaque[hidden] { display: none; }

/* 17/11 (owner: "improve the egg's art; three.js"): the 3D egg (eggart.js) over the CSS one */
.egg.is3d { background: none !important; border-color: transparent !important; box-shadow: none !important; animation: none !important; overflow: visible; }
.egg.is3d::before, .egg.is3d::after, .egg.is3d .egg-crack { display: none !important; }
.egg3d-cv { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 1; }

/* 19/11 (polish: in a fight the notice covered the foe's plate): during a descent on a phone it is one thin line over the
   top bar, and it goes away sooner (extras.js liveNotice) */
@media (max-width: 720px) {
  body.inrun .live-n { top: calc(3px + env(safe-area-inset-top, 0px)); padding: 5px 10px; gap: 8px; font-size: 12px; border-radius: 14px; }
  body.inrun .live-n .ln-img, body.inrun .live-n .ln-img img { width: 26px; height: 26px; }
  body.inrun .live-n .grow { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
}

/* 20/11 (owner: "a button to ask for a new picture"): the card sheet's art check tab */
.artc-run { display: flex; align-items: center; gap: 6px; margin: 4px 0; color: var(--muted); animation: artc-pulse 1.2s ease-in-out infinite; }
@keyframes artc-pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .artc-run { animation: none; } }
.artc-list { list-style: none; margin: 6px 0 8px; padding: 0; display: grid; gap: 4px; }
.artc-list li { display: flex; align-items: flex-start; gap: 7px; padding: 6px 8px; border-radius: 10px; background: var(--panel2, rgba(127, 127, 127, .08)); font-size: 12.5px; }
.artc-list li .gi { flex: none; width: 18px; height: 18px; }
.artc-list li span { display: flex; flex-direction: column; gap: 1px; }
.artc-list li small { color: var(--muted); font-size: 11px; }
.artc-list li.ok { opacity: .75; }
.artc-list li.bad { box-shadow: inset 0 0 0 1.5px #ff8a3d; }
.artc-ok { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-weight: 800; color: var(--good, #2bb673); }
.artc-left { margin: 4px 0 0; text-align: center; }

/* 20/11: a personal notice (server/notices.py) */
.notice-pop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 6px 4px 2px; }
.notice-pop .np-ic { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c8, #ffd23d 55%, #ff9f43);
  box-shadow: 0 8px 26px rgba(255, 170, 40, .45); }
.notice-pop .np-ic .gi { width: 40px; height: 40px; }
.notice-pop h2 { margin: 2px 0 0; }
.notice-pop p { margin: 2px 0 10px; font: 700 15px/1.4 Nunito, sans-serif; }

/* 20/11 (owner: "in the profile, the descents into InfiniWorld"): five numbers now */
.pc-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.pc-stats span { font-size: 10px; line-height: 1.2; }
