/* Menu screens polish: Records, Style, Settings (loaded after style.css, so these rules win). */

/* ================================================================ shared: sticky screen header */
.scr-top { position: sticky; top: calc(-1 * clamp(16px, calc(var(--vs) * 3), 30px)); z-index: 4; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  margin: calc(-1 * clamp(16px, calc(var(--vs) * 3), 30px)) calc(-1 * clamp(18px, 3vw, 34px)) 0; padding: clamp(12px, calc(var(--vs) * 2.4), 22px) clamp(18px, 3vw, 34px) 12px;
  background: linear-gradient(180deg, rgba(22, 17, 48, 0.98) 70%, rgba(22, 17, 48, 0.88)); border-bottom: 1px solid rgba(140, 125, 230, 0.16); backdrop-filter: blur(8px); }
.scr-top h2.eyebrow { margin: 0; min-width: 0; text-align: left; font-family: var(--serif); font-weight: 400; letter-spacing: 0.01em; text-transform: none; font-size: clamp(26px, calc(var(--vs) * 4.4), 36px); line-height: 1;
  color: #fff1d6; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); overflow: hidden; padding-bottom: 2px; text-overflow: ellipsis; white-space: nowrap; }
.scr-top h2.eyebrow::before, .scr-top h2.eyebrow::after { display: none; }
.scr-back { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; cursor: pointer; color: #ffe6b0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)); border: 1px solid rgba(190, 180, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 3px 0 rgba(0, 0, 0, 0.35); transition: transform 0.15s, border-color 0.2s; }
.scr-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.scr-back:hover { border-color: rgba(255, 210, 140, 0.6); transform: translateX(-2px); }
.scr-back:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.scr-back:focus-visible, .lb-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ================================================================ Records */
#records .panel.rec-panel { width: min(820px, 100%); gap: 12px; }
.lb-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 14px; cursor: pointer; white-space: nowrap;
  font: 800 15px Nunito, Inter, system-ui, sans-serif; color: #2a1606; border: 0;
  background: linear-gradient(180deg, #ffe39a, #ffb24a); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 0 rgba(160, 80, 10, 0.45), 0 4px 0 rgba(0, 0, 0, 0.35), 0 0 22px rgba(255, 180, 74, 0.25);
  transition: transform 0.15s, filter 0.2s; }
.lb-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lb-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.lb-btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), 0 1px 0 rgba(0, 0, 0, 0.35); }
#records .rec-local { margin: 0; font-size: 13px; }

/* stat tiles: a hero best score with its medal, then three compact tiles */
#records .rec-stats { grid-template-columns: 1.6fr repeat(3, 1fr); gap: 10px; }
#records .rs { padding: 12px 14px; border-radius: 16px; gap: 0; grid-template-columns: auto 1fr; column-gap: 10px; align-content: center;
  background: linear-gradient(180deg, rgba(48, 38, 98, 0.6), rgba(16, 12, 36, 0.7)); border: 1px solid rgba(140, 125, 230, 0.28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07); }
#records .rs .rs-ico { grid-row: 1 / 3; width: 30px; height: 30px; padding: 6px; border-radius: 10px; fill: none; stroke: #9fdcff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  background: rgba(115, 230, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(115, 230, 255, 0.25); align-self: center; }
#records .rs b { font-size: 22px; }
#records .rs span { font-size: 11.5px; letter-spacing: 0.02em; }
#records .rs-heat { grid-column: 1 / -1; grid-template-columns: auto auto 1fr; align-items: center; }
#records .rs-heat .rs-ico { grid-row: auto; }
#records .rs-heat b { color: #ffc27a; }
#records .rs-main { grid-template-columns: auto 1fr; padding: 14px 18px; border-color: rgba(255, 205, 120, 0.55);
  background: radial-gradient(120% 140% at 0% 50%, rgba(255, 190, 90, 0.26), transparent 60%), linear-gradient(180deg, rgba(70, 48, 40, 0.65), rgba(20, 14, 34, 0.8));
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.18), 0 0 26px rgba(255, 180, 74, 0.12); }
#records .rs-main .rs-art { grid-row: 1 / 3; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 122, 0.22), transparent 70%); }
#records .rs-main .rs-art img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(255, 199, 90, 0.5)); }
#records .rs-main .rs-art:empty::before { content: '\2605'; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 20px; color: #ffd27a;
  background: radial-gradient(circle at 40% 35%, rgba(255, 230, 170, 0.35), rgba(160, 100, 30, 0.35)); box-shadow: inset 0 0 0 2px rgba(255, 210, 140, 0.45), 0 0 16px rgba(255, 190, 90, 0.3); }
#records .rs-main b { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, calc(var(--vs) * 5), 40px); letter-spacing: 0.01em; }
#records .rs-main span:not(.rs-art) { color: #f1d79a; font-weight: 700; }

/* best runs: a clean leaderboard list */
#records .rec-runs { padding: 14px 16px 12px; border-radius: 18px; background: linear-gradient(180deg, rgba(18, 14, 42, 0.75), rgba(9, 7, 22, 0.6)); border-color: rgba(140, 125, 230, 0.25); }
#records .rec-runs-head h3, #records .ach-head b { font-family: var(--serif); font-weight: 400; font-size: 21px; color: #fff1d6; }
#records .rec-list { gap: 6px; }
#records .rec-list li { position: relative; grid-template-columns: 30px minmax(90px, auto) auto 1fr; padding: 9px 14px 9px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(140, 125, 230, 0.16); }
#records .rec-list li:nth-child(1):not(.rb-empty) { background: linear-gradient(90deg, rgba(255, 199, 90, 0.16), rgba(255, 255, 255, 0.03) 60%); border-color: rgba(255, 205, 120, 0.45); }
#records .rec-list li:nth-child(2):not(.rb-empty) { background: linear-gradient(90deg, rgba(205, 214, 234, 0.1), rgba(255, 255, 255, 0.03) 60%); }
#records .rec-list li:nth-child(3):not(.rb-empty) { background: linear-gradient(90deg, rgba(208, 138, 82, 0.12), rgba(255, 255, 255, 0.03) 60%); }
#records .rec-list .rb-i { width: 28px; height: 28px; font-weight: 900; }
#records .rec-list .rb-s { font-size: 18px; }
#records .rec-list .rb-w { justify-self: start; padding: 2px 8px; border-radius: 999px; background: rgba(115, 230, 255, 0.1); color: #9fdcff; font-weight: 700; font-size: 12px; }
#records .rec-list .rb-n { justify-self: end; text-align: right; color: #d8d0f4; max-width: 100%; }
#records .rec-list .rb-empty { display: grid !important; grid-template-columns: 1fr; justify-items: center; gap: 6px; padding: 16px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.02); font-size: 14px; }
#records .rec-list .rb-empty::before { content: ''; width: 34px; height: 34px; opacity: 0.6; background: #ffd27a;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4h10v5a5 5 0 0 1-10 0z'/%3E%3Cpath d='M7 6H4v1a3 3 0 0 0 3 3M17 6h3v1a3 3 0 0 1-3 3M12 14v4M8 20h8'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4h10v5a5 5 0 0 1-10 0z'/%3E%3Cpath d='M7 6H4v1a3 3 0 0 0 3 3M17 6h3v1a3 3 0 0 1-3 3M12 14v4M8 20h8'/%3E%3C/svg%3E") center / contain no-repeat; }

/* achievements: total, a tier summary that doubles as filters, then status chips */
#records .rec-ach { display: grid; gap: 10px; margin-top: 6px; padding-top: 14px; border-top: 1px solid rgba(140, 125, 230, 0.16); }
#records .rec-ach > * { min-width: 0; }
#records .ach-head { margin: 0; grid-template-columns: auto minmax(60px, 1fr); }
#records .ach-head .ach-total { margin-left: 10px; font-family: Nunito, Inter, system-ui, sans-serif; font-size: 14px; font-weight: 800; color: #ffd27a; }
#records .ach-head .gbar { height: 10px; border-radius: 6px; background: rgba(6, 4, 18, 0.7); box-shadow: inset 0 0 0 1px rgba(140, 125, 230, 0.25); }
#records .ach-head .gbar > span { border-radius: 6px; background: linear-gradient(90deg, #ffb24a, #ffd27a 70%, #fff2c8); box-shadow: 0 0 10px rgba(255, 190, 90, 0.6); min-width: 10px; }
.ach-tiers { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.ach-tiers button { --tc: #c99466; display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 6px; align-items: center; text-align: left;
  min-height: 48px; padding: 6px 8px; border-radius: 12px; cursor: pointer; font: inherit; color: var(--text);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 14%, rgba(14, 11, 34, 0.8)), rgba(14, 11, 34, 0.8)); border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s; }
.ach-tiers .t-uncommon { --tc: #5fe08a; } .ach-tiers .t-rare { --tc: #5ab4ff; } .ach-tiers .t-epic { --tc: #b97cff; } .ach-tiers .t-legendary { --tc: #ffc94a; } .ach-tiers .t-secret { --tc: #8a7ab8; }
.ach-tiers img { grid-row: 1 / 3; width: 30px; height: 30px; object-fit: contain; }
.ach-tiers span { font-size: 12px; font-weight: 800; color: color-mix(in srgb, var(--tc) 65%, #fff); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ach-tiers b { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; color: #f1eaff; }
.ach-tiers button.full b { color: color-mix(in srgb, var(--tc) 60%, #fff); }
.ach-tiers button:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--tc) 65%, transparent); }
.ach-tiers button.on { border-color: var(--tc); box-shadow: inset 0 0 0 1px var(--tc), 0 0 16px color-mix(in srgb, var(--tc) 35%, transparent); }
.ach-tiers button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#records .ach-filter { gap: 6px; }
#records .ach-filter button { min-height: var(--b-h, 44px); padding: 0 16px; font-weight: 700; }
#records #recList { gap: 8px 12px; }
#records #recList .gbar { height: 7px; border-radius: 4px; background: rgba(6, 4, 18, 0.7); box-shadow: inset 0 0 0 1px rgba(140, 125, 230, 0.2); margin-top: 6px; }
#records #recList .gbar > span { border-radius: 4px; min-width: 6px; }
#records #recList .rp { font-weight: 800; }
#records .panel > .row.panel-foot { position: sticky; bottom: calc(-1 * clamp(16px, calc(var(--vs) * 3), 30px)); z-index: 3; margin: 0 calc(-1 * clamp(18px, 3vw, 34px)) calc(-1 * clamp(16px, calc(var(--vs) * 3), 30px));
  padding: 12px clamp(18px, 3vw, 34px) clamp(12px, calc(var(--vs) * 2.4), 22px); background: linear-gradient(0deg, rgba(11, 9, 28, 0.98) 70%, rgba(11, 9, 28, 0)); }

@media (max-width: 700px) {
  #records .rec-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #records .rs-main { grid-column: 1 / -1; }
  #records .rs:not(.rs-main):not(.rs-heat) { grid-template-columns: 1fr; padding: 10px 10px; }
  #records .rs:not(.rs-main) .rs-ico { grid-row: auto; width: 26px; height: 26px; padding: 5px; margin-bottom: 4px; }
  #records .rs-heat .rs-ico { margin-bottom: 0; }
  .ach-tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ach-tiers button { grid-template-columns: 1fr; justify-items: center; text-align: center; row-gap: 1px; padding: 8px 4px; }
  .ach-tiers img { grid-row: auto; width: 28px; height: 28px; }
  .ach-tiers span { font-size: 11.5px; max-width: 100%; }
}
@media (max-width: 560px) {
  #records .ach-head { grid-template-columns: 1fr; gap: 8px; }
  #records .ach-head b { white-space: normal; }
  .lb-btn span { display: none; }
  .lb-btn { padding: 0 12px; }
  #records .rec-list li { grid-template-columns: 30px auto 1fr; }
  #records .rec-list .rb-w { justify-self: end; }
  #records .rec-list .rb-n { grid-column: 2 / -1; justify-self: start; text-align: left; margin-top: -4px; }
}
@media (max-width: 360px) { .ach-tiers span { font-size: 10px; } }
@media (max-height: 520px) and (min-width: 700px) {
  #records .rec-stats { grid-template-columns: 1.6fr repeat(3, 1fr); }
  #records .rs-main { grid-column: auto; }
  #records .rs-main .rs-art, #records .rs-main .rs-art img { width: 40px; height: 40px; }
  .ach-tiers { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ach-tiers button { min-height: var(--b-h, 44px); grid-template-columns: 30px minmax(0, 1fr); justify-items: start; text-align: left; padding: 4px 8px; }
  .ach-tiers img { grid-row: 1 / 3; }
  .scr-top { padding-top: 8px; padding-bottom: 8px; }
  .scr-top h2.eyebrow { font-size: 24px; }
  .scr-back, .lb-btn { min-height: var(--b-h, 44px); height: auto; }
  .scr-back { width: 38px; }
  #records .panel > .row.panel-foot { display: none; } /* the header's Back does it on a short screen */
}

/* ================================================================ Style */
:is(#style, #shop) .set-h { scroll-margin-top: 86px; }
/* the preview: a framed showcase with a slow light sweep */
.sty-stage { position: relative; flex-shrink: 0; padding: 5px; border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 220, 150, 0.55), rgba(115, 230, 255, 0.25) 40%, rgba(160, 120, 255, 0.25) 65%, rgba(255, 190, 90, 0.5));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 40px color-mix(in srgb, var(--sw-stage, #ffb24a) 18%, transparent); }
.sty-stage .style-prev { height: clamp(150px, calc(var(--vs) * 24), 210px); border-radius: 17px; border: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 -40px 50px rgba(6, 4, 16, 0.55); }
.sty-stage .sp-shine { position: absolute; inset: 5px; z-index: 2; border-radius: 17px; overflow: hidden; pointer-events: none; }
.sty-stage .sp-shine::before { content: ''; position: absolute; top: -40%; bottom: -40%; width: 30%; left: -40%; transform: rotate(14deg);
  background: linear-gradient(90deg, transparent, rgba(255, 245, 220, 0.12), transparent); animation: spSweep 6s ease-in-out infinite; }
.sty-stage .sp-shine::after { content: ''; position: absolute; left: 10%; right: 10%; bottom: -30px; height: 60px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 220, 160, 0.22), transparent); animation: spFloor 4s ease-in-out infinite; }
@keyframes spSweep { 0%, 15% { transform: rotate(14deg); } 60%, 100% { transform: translateX(533%) rotate(14deg); } } /* transform, not left: no layout every frame */
@keyframes spFloor { 50% { opacity: 0.5; transform: scaleX(0.85); } }
.sty-stage .sp-tag { position: absolute; z-index: 3; top: 14px; right: 14px; padding: 3px 10px; border-radius: 999px; font: 800 10.5px Nunito, Inter, system-ui, sans-serif; letter-spacing: 0.14em; text-transform: uppercase;
  color: #ffe6b0; background: rgba(8, 6, 20, 0.65); border: 1px solid rgba(255, 210, 140, 0.35); }
#stylePrevName { left: 16px; bottom: 12px; padding: 5px 12px 5px 10px; border-radius: 10px; font-size: 13px; letter-spacing: 0.04em; background: rgba(8, 6, 20, 0.6); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(4px); }
body.reduced .sty-stage .sp-shine::before, body.reduced .sty-stage .sp-shine::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .sty-stage .sp-shine::before, .sty-stage .sp-shine::after { animation: none; } }

/* section tabs: a segmented control with icons */
:is(#style, #shop) .sty-nav { gap: 4px; padding: 5px; margin: 4px 0; border-radius: 16px; background: rgba(8, 6, 20, 0.94); border: 1px solid rgba(140, 125, 230, 0.3); box-shadow: 0 -16px 0 16px #17132f, 0 8px 18px rgba(0, 0, 0, 0.35); } /* the band above hides cards scrolling under it */
:is(#style, #shop) .sty-nav button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; border-radius: 11px; font-size: 14px; color: #b9b2e0; transition: color 0.2s, background 0.25s, box-shadow 0.25s; }
:is(#style, #shop) .sty-nav svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:is(#style, #shop) .sty-nav button:hover { color: #fff1d6; background: rgba(255, 255, 255, 0.06); }
:is(#style, #shop) .sty-nav button.on { color: #2a1606; background: linear-gradient(180deg, #ffe39a, #ffb24a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -2px 0 rgba(160, 80, 10, 0.4), 0 0 14px rgba(255, 180, 74, 0.3); }
:is(#style, #shop) .sty-nav button:focus-visible { outline: 2px solid var(--blast); outline-offset: 1px; }

/* Create your Spark: a premium banner */
:is(#style, #shop) .spark-make { margin: 4px 0 8px; padding: 16px 18px; border-radius: 20px; border: 0; gap: 16px;
  background: radial-gradient(90% 160% at 0% 50%, rgba(255, 170, 70, 0.32), transparent 55%), linear-gradient(110deg, #2b1a5c, #3a1f63 50%, #4a2a2a);
  box-shadow: inset 0 0 0 1.5px rgba(255, 210, 122, 0.75), inset 0 1px 0 rgba(255, 245, 220, 0.35), 0 5px 0 rgba(0, 0, 0, 0.35), 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 180, 74, 0.16); }
:is(#style, #shop) .spark-make .sm-glow { width: 56px; height: 56px; }
:is(#style, #shop) .spark-make .sm-tag { display: inline-block; margin-bottom: 3px; padding: 2px 8px; border-radius: 999px; font: 800 11px Nunito, Inter, system-ui, sans-serif; font-style: normal; letter-spacing: 0.12em; text-transform: uppercase; color: #2a1606; background: linear-gradient(180deg, #ffe39a, #ffb24a); }
:is(#style, #shop) .spark-make b { font-size: 24px; color: #fff1d6; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
:is(#style, #shop) .spark-make .sm-go { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; animation: none; color: #2a1606;
  background: linear-gradient(180deg, #ffe39a, #ffb24a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 0 rgba(160, 80, 10, 0.45), 0 3px 0 rgba(0, 0, 0, 0.35); transition: transform 0.2s; }
:is(#style, #shop) .spark-make .sm-go svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
:is(#style, #shop) .spark-make:hover .sm-go { transform: translateX(3px); }
:is(#style, #shop) .spark-make:hover { box-shadow: inset 0 0 0 2px #ffd27a, inset 0 1px 0 rgba(255, 245, 220, 0.35), 0 5px 0 rgba(0, 0, 0, 0.35), 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 40px rgba(255, 180, 74, 0.28); }
:is(#style, #shop) .spark-make:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* trail cards: a big swatch on top, then name and state */
#style #trailGrid.swatches { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
:is(#style, #shop) .sty.trail { --tc: #ffc75a; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; row-gap: 2px; align-items: start; padding: 8px 8px 10px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, rgba(36, 28, 76, 0.9), rgba(16, 12, 36, 0.92)); border: 1px solid rgba(140, 125, 230, 0.25); }
:is(#style, #shop) .sty.trail .sw { grid-row: 1; width: 100%; height: 58px; margin-bottom: 6px; border-radius: 11px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 120% at 70% 20%, color-mix(in srgb, var(--tc) 22%, transparent), transparent 60%), rgba(6, 4, 16, 0.7) !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important; }
:is(#style, #shop) .sty.trail .sw .trail-art { width: 100px; height: 58px; max-width: none; }
:is(#style, #shop) .sty.trail .nm, :is(#style, #shop) .sty.trail .tg { grid-column: 1; padding: 0 4px; }
:is(#style, #shop) .sty.trail .nm { font-size: 15px; }
:is(#style, #shop) .sty.trail:hover:not(.sel), :is(#style, #shop) .sty.trail:focus-visible:not(.sel) { border-color: color-mix(in srgb, var(--tc) 70%, transparent); }
:is(#style, #shop) .sty.trail.sel { border-color: var(--tc); box-shadow: 0 0 0 1px var(--tc), 0 0 22px color-mix(in srgb, var(--tc) 40%, transparent), inset 0 0 22px color-mix(in srgb, var(--tc) 12%, transparent); }
:is(#style, #shop) .sty.trail.sel::after { content: ''; position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--tc);
  box-shadow: 0 0 10px var(--tc); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12'/%3E%3C/svg%3E"); }
:is(#style, #shop) .sty.trail.sel::before { content: ''; position: absolute; z-index: 1; top: 17px; right: 18px; width: 9px; height: 5px; border: solid #1a1030; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }
/* locked: a lock badge on the swatch; priced ones get the prism colour */
:is(#style, #shop) .sty.locked { position: relative; }
:is(#style, #shop) .sty.trail.locked::after { content: ''; position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 8px;
  background: rgba(8, 6, 20, 0.8) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cfc8f0' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2.5'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / 14px no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
:is(#style, #shop) .sty.trail.locked .nm { color: #cfc8f0; }
:is(#style, #shop) .sty.trail.priced .tg { color: var(--blast); }
:is(#style, #shop) .sty.trail.priced.locked::after { box-shadow: inset 0 0 0 1px rgba(115, 230, 255, 0.5); }
:is(#style, #shop) .sty.trail.armed { border-color: var(--blast); box-shadow: 0 0 0 2px rgba(115, 230, 255, 0.4), 0 0 20px rgba(115, 230, 255, 0.25); }
:is(#style, #shop) .cos-grid { gap: 10px; }
:is(#style, #shop) .sty.cos { border-radius: 16px; }

@media (max-width: 560px) {
  #style #trailGrid.swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  :is(#style, #shop) .sty-nav button { flex-direction: column; gap: 2px; min-height: 48px; padding: 0 2px; font-size: 11px; }
  :is(#style, #shop) .spark-make { padding: 14px; gap: 12px; }
  :is(#style, #shop) .spark-make b { font-size: 20px; }
  :is(#style, #shop) .spark-make .sm-glow { width: 44px; height: 44px; }
  :is(#style, #shop) .spark-make .sm-go { width: 36px; height: 36px; }
  .sty-stage .style-prev { height: 140px; }
}
@media (max-height: 520px) {
  .sty-stage .style-prev { height: 96px; }
  :is(#style, #shop) .sty-nav button { flex-direction: row; min-height: var(--b-h, 44px); }
  :is(#style, #shop) .sty.trail .sw { height: 44px; }
}

/* ================================================================ Settings */
#settings { --row: #17132f; --div: rgba(140, 125, 230, 0.18); }
/* tabs: a solid segmented control; the chosen tab is a lit gold key */
#settings .set-tabs { border-radius: 18px; padding: 5px; gap: 4px; background: rgba(6, 4, 18, 0.7); border-color: rgba(140, 125, 230, 0.3); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35); }
#settings .set-tabs button { border-radius: 13px; color: #b9b2e0; font-weight: 700; }
#settings .set-tabs button .ti { width: 20px; height: 20px; }
#settings .set-tabs button[aria-selected=true] { color: #2a1606; background: linear-gradient(180deg, #ffe39a, #ffb24a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 0 rgba(160, 80, 10, 0.4), 0 3px 0 rgba(0, 0, 0, 0.35), 0 0 16px rgba(255, 180, 74, 0.25); }
#settings .set-tabs button[aria-selected=true]::after, #settings .set-tabs button[aria-selected=true]::before { display: none; }
#settings .set-tabs button:focus-visible { outline: 2px solid var(--blast); outline-offset: 2px; }

/* section labels over grouped cards */
#settings .set-page { gap: 8px; }
#settings .set-page .set-h { margin: 8px 2px 0; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 14px; letter-spacing: 0.01em; text-transform: none; color: var(--gilt, #e8c26b); } /* the house label voice (docs/DESIGN_SYSTEM.md) */
#settings .set-page .set-h:first-child { margin-top: 0; }
#settings .set-page .set-h .set-note { display: block; margin: 3px 0 0; letter-spacing: 0; text-transform: none; font-size: 12px; font-weight: 600; }
#settings .set-page .sliders, #settings .set-page .toggles { gap: 1px; margin: 0; border-radius: 16px; overflow: hidden; background: var(--div); border: 1px solid var(--div); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22); }
#settings .set-page .toggles { grid-template-columns: 1fr; }
#settings .set-page .sliders label, #settings .toggle { border: 0; border-radius: 0; background: var(--row); }
#settings .set-page .sliders label:hover, #settings .set-page .sliders label:focus-within, #settings .toggle:hover { background: #1d1839; }
#settings .set-page .sliders label > span { font-weight: 700; }
/* value pills */
#settings .sliders output { justify-self: end; min-width: 50px; padding: 3px 8px; border-radius: 999px; text-align: center; font-size: 13px; font-weight: 800; color: #ffe2a6;
  background: rgba(255, 199, 90, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 210, 130, 0.4); }
/* toggles: ON/OFF reads at a glance */
#settings .toggle { padding: 10px 16px; font-weight: 700; }
#settings .toggle span small { font-weight: 600; }
#settings .toggle::after { content: var(--t-off, 'OFF'); width: 56px; height: 28px; border-radius: 14px; box-sizing: border-box; padding: 0 8px; text-align: right; font: 900 10px/28px Nunito, Inter, system-ui, sans-serif; letter-spacing: 0.08em;
  color: #8a84b8; background: #120e28; box-shadow: inset 0 0 0 1.5px #4a4185, inset 0 2px 4px rgba(0, 0, 0, 0.4); }
#settings .toggle::before { right: 50px; width: 22px; height: 22px; margin-top: -11px; background: radial-gradient(circle at 38% 32%, #d8d4f0, #8a84b8); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.4); }
#settings .toggle:has(input:checked)::after { content: var(--t-on, 'ON'); text-align: left; padding-left: 10px; color: #2a1606; background: linear-gradient(180deg, #ffd27a, #f2a640); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 12px rgba(255, 190, 90, 0.35); }
#settings .toggle:has(input:checked)::before { transform: translateX(28px); background: radial-gradient(circle at 38% 32%, #fff, #fff4dc); box-shadow: 0 2px 4px rgba(120, 60, 0, 0.5); }
#settings .toggle:has(input:checked) { background: linear-gradient(90deg, var(--row), rgba(255, 199, 90, 0.07)); }
#settings .toggle:has(input:focus-visible) { outline-offset: -3px; }

/* footer: Reset and Back together; Erase records apart, in red */
#settings .set-foot { gap: 10px; align-items: center; flex-wrap: nowrap; justify-content: flex-end; }
#settings .set-foot .btn { min-width: 0; }
#settings .set-foot #eraseBtn { order: -1; margin-right: auto; flex: 0 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #ff9aae; background: rgba(255, 70, 110, 0.06);
  border: 1.5px solid rgba(255, 90, 122, 0.65); box-shadow: none; }
#settings .set-foot #eraseBtn::before { content: ''; flex: none; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v6M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v6M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat; }
#settings .set-foot #eraseBtn:hover { background: rgba(255, 70, 110, 0.14); border-color: #ff5a7a; color: #ffc0cc; }
#settings .set-foot #eraseBtn.armed { color: #fff; background: linear-gradient(180deg, #ff5a7a, #c82850); border-color: #ff8aa0; }
#settings .set-foot #eraseBtn:disabled { opacity: 0.55; }
#settings .set-foot #resetBtn, #settings .set-foot #settingsBack { flex: 0 1 190px; min-width: 130px; }
#settings .set-foot #eraseBtn:not(.armed) { white-space: nowrap; }
@media (max-width: 560px) {
  #settings .set-foot { display: grid; grid-template-columns: 1fr 1fr; }
  #settings .set-foot #resetBtn, #settings .set-foot #settingsBack { flex: none; }
  #settings .set-foot #eraseBtn { order: 3; grid-column: 1 / -1; margin: 2px 0 0; min-height: var(--b-h, 44px); font-size: var(--b-fs, 15px); }
}
body.tall #settings .set-foot { display: grid; grid-template-columns: 1fr 1fr; }
body.tall #settings .set-foot #eraseBtn { order: 3; grid-column: 1 / -1; margin: 2px 0 0; min-height: var(--b-h, 44px); font-size: var(--b-fs, 15px); }
@media (max-height: 520px) and (min-width: 700px) {
  #settings .set-page .toggles { grid-template-columns: 1fr 1fr; }
  #settings .toggle { padding-top: 4px; padding-bottom: 4px; }
}

/* ---------------------------------------------------------------- Style, the locker (2026-11-05)
   A collection header with its progress ring, one section per tab (with its own count), bigger living previews,
   clear states (owned, selected, locked with progress, NEW), tier frames and an equip burst. Crisp inked edges, no soft
   glows; motion is transform/opacity only and stops with reduced motion. */
:is(#style, #shop) .style-panel { position: relative; }
:is(#style, #shop) .sty-hero { position: absolute; z-index: 3; top: clamp(12px, 2.6vh, 26px); right: clamp(14px, 3vw, 32px); display: flex; align-items: center; gap: var(--sp-2, 8px); }
:is(#style, #shop) .sty-ring { position: relative; width: clamp(46px, calc(var(--vs, 8px) * 7), 60px); aspect-ratio: 1; flex: none; display: grid; place-items: center; }
:is(#style, #shop) .sty-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
:is(#style, #shop) .sty-ring circle { fill: none; stroke-width: 5; }
:is(#style, #shop) .sty-ring .rt { stroke: #1a1433; }
:is(#style, #shop) .sty-ring .rf { stroke: #ffc75a; stroke-linecap: round; stroke-dasharray: calc(var(--k, 0) * 100) 100; transition: stroke-dasharray 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
:is(#style, #shop) .sty-ring b { font: 900 clamp(11px, calc(var(--vs, 8px) * 1.7), 14px) Nunito, Inter, system-ui, sans-serif; color: #ffe6b0; }
:is(#style, #shop) .sty-count { margin: 0; font-size: var(--fs-s, 14px); color: #b9b2e0; }
:is(#style, #shop) .sty-nav .sty-n { font: 800 11px Nunito, Inter, system-ui, sans-serif; font-style: normal; padding: 1px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: #cfc8f2; }
:is(#style, #shop) .sty-nav .sty-n.full { background: #ffc75a; color: #2a1606; }
:is(#style, #shop) .sty-nav button.on .sty-n { background: rgba(42, 22, 6, 0.2); color: #2a1606; }
:is(#style, #shop) .sty-sec[hidden] { display: none !important; }
:is(#style, #shop) .sty-nav { margin-top: 12px; box-shadow: 0 -12px 0 0 #17132f, 0 8px 18px rgba(0, 0, 0, 0.35); } /* the band fills only the gap above the bar, never the preview */

/* cards: bigger previews, inked frames, a tier edge, clear states */
:is(#style, #shop) .sty { position: relative; overflow: hidden; border: 2px solid #2f2860; box-shadow: 0 3px 0 #0b0820; transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.18s; }
#style button.sty:hover { transform: translateY(-3px); border-color: #6a5fc4; }
#style button.sty:active { transform: translateY(1px) scale(0.98); box-shadow: 0 1px 0 #0b0820; }
:is(#style, #shop) .sty.t-rare { border-color: #3d6fa8; }
:is(#style, #shop) .sty.t-epic { border-color: #7a4fc4; }
:is(#style, #shop) .sty.t-legend { border-color: #c48a2e; }
:is(#style, #shop) .sty.t-legend::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 40%, rgba(255, 230, 160, 0.16) 50%, transparent 60%); transform: translateX(-100%); animation: styFoil 4.5s ease-in-out infinite; }
:is(#style, #shop) .sty .cos-ico { transform: scale(1.5); margin: 6px; }
:is(#style, #shop) .sty.badge .badge-img { width: clamp(40px, calc(var(--vs, 8px) * 6), 52px); height: auto; transition: transform 0.25s; }
#style button.sty.badge:hover .badge-img { transform: rotate(-6deg) scale(1.08); }
:is(#style, #shop) .sty.sel { border-color: #ffc75a; box-shadow: 0 3px 0 #8a4f0e, 0 0 0 2px rgba(255, 199, 90, 0.35); }
:is(#style, #shop) .sty.sel::after { content: '✓'; position: absolute; top: 0; right: 0; width: 30px; height: 26px; display: grid; place-items: center; padding-left: 6px; font: 900 14px Nunito, system-ui, sans-serif; color: #2a1606; background: #ffc75a; border-bottom-left-radius: 12px; }
:is(#style, #shop) .sty.sel .nm { padding-right: 24px; }
:is(#style, #shop) .sty.locked { border-style: dashed; }
:is(#style, #shop) .sty.locked .cos-ico, :is(#style, #shop) .sty.locked .sw, :is(#style, #shop) .sty.locked .badge-img { filter: grayscale(0.85) brightness(0.6); }
:is(#style, #shop) .sty.locked .nm { opacity: 0.7; }
:is(#style, #shop) .sty .sty-prog { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 4px; }
:is(#style, #shop) .sty .sty-prog i { flex: 1; height: 6px; border-radius: 6px; background: #1a1433; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
:is(#style, #shop) .sty .sty-prog i::after { content: ''; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--k, 0)); background: linear-gradient(90deg, #73f2ff, #ffc75a); }
:is(#style, #shop) .sty .sty-prog small { font: 800 11px Nunito, system-ui, sans-serif; color: #cfc8f2; font-variant-numeric: tabular-nums; }
:is(#style, #shop) .sty .sty-new { position: absolute; top: 6px; left: 6px; font: 900 10px Nunito, system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; font-style: normal; color: #2a1606; background: #73f2ff; padding: 2px 7px; border-radius: 999px; box-shadow: 0 2px 0 #0b5a66; animation: styNew 1.6s ease-in-out infinite; }
:is(#style, #shop) .sty.pop { animation: styPop 0.45s cubic-bezier(0.22, 1.6, 0.36, 1); }
:is(#style, #shop) .sty.arena { cursor: default; display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: var(--r-m, 14px); background: var(--btn, rgba(26, 20, 52, 0.92)); }
:is(#style, #shop) .sty.arena .bgthumb { height: clamp(52px, calc(var(--vs, 8px) * 9), 76px); }
:is(#style, #shop) .sty.arena .tg { font-size: 12px; color: #b9b2e0; }

/* the stage: your name with its badge, and a burst when something is equipped */
:is(#style, #shop) .sp-badge { position: absolute; z-index: 3; right: 12px; bottom: 8px; left: auto; display: inline-flex; align-items: center; gap: 6px; font: 800 12px Nunito, system-ui, sans-serif; letter-spacing: 0; color: #fff1d6; text-shadow: 0 1px 2px #05030d; }
:is(#style, #shop) .sp-badge::before { content: attr(data-who); }
:is(#style, #shop) .sp-badge .badge-img { width: 22px; height: auto; }
:is(#style, #shop) .sty-burst { position: absolute; z-index: 4; left: 50%; top: 50%; width: 112px; height: 108px; margin: -54px 0 0 -56px; overflow: hidden; opacity: 0; pointer-events: none; }
:is(#style, #shop) .sty-burst img { display: block; width: 3360px; height: 108px; max-width: none; image-rendering: pixelated; }
:is(#style, #shop) .sty-burst.go { opacity: 1; animation: styBurstHide 0.01s 0.75s forwards; }
:is(#style, #shop) .sty-burst.go img { animation: styPfx 0.75s steps(30) forwards; }

/* a tab's cards come in one after another */
:is(#style, #shop) .sty-sec.reveal :is(.swatches, .cos-grid) > * { animation: styIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both; }
:is(#style, #shop) .sty-sec.reveal :is(.swatches, .cos-grid) > :nth-child(2) { animation-delay: 0.03s; }
:is(#style, #shop) .sty-sec.reveal :is(.swatches, .cos-grid) > :nth-child(3) { animation-delay: 0.06s; }
:is(#style, #shop) .sty-sec.reveal :is(.swatches, .cos-grid) > :nth-child(4) { animation-delay: 0.09s; }
:is(#style, #shop) .sty-sec.reveal :is(.swatches, .cos-grid) > :nth-child(5) { animation-delay: 0.12s; }
:is(#style, #shop) .sty-sec.reveal :is(.swatches, .cos-grid) > :nth-child(6) { animation-delay: 0.15s; }
:is(#style, #shop) .sty-sec.reveal :is(.swatches, .cos-grid) > :nth-child(n+7) { animation-delay: 0.18s; }
@keyframes styIn { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
@keyframes styPop { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes styNew { 50% { transform: translateY(-2px); } }
@keyframes styFoil { 0%, 70% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes styBurstHide { to { opacity: 0; } }
@keyframes styPfx { to { transform: translateX(-3360px); } }
body.reduced #style *, body.reduced #style *::before, body.reduced #style *::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) { #style *, #style *::before, #style *::after { animation: none !important; transition-duration: 0s !important; } }

/* ---------------------------------------------------------------- Shop (Prisms only; Style is where you wear things) */
#shop .shop-stage { margin: 4px 0 10px; }
#shop .shop-feat-h .set-h { margin-top: 4px; }
#shop .shop-feat { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 12px; }
#shop .sty.feat { border-color: #c48a2e; background: linear-gradient(160deg, rgba(255, 199, 90, 0.16), rgba(255, 255, 255, 0.03)); }
#shop .sty.feat { padding-top: 26px; }
#shop .shop-today { position: absolute; top: 6px; left: 10px; padding: 1px 8px; border-radius: 999px; font: 900 10px Nunito, system-ui, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; font-style: normal;
  color: #2a1606; background: linear-gradient(#ffe08a, #f2b636); border: 1.5px solid #2a1606; }
#shop .shop-nav { flex-wrap: wrap; }
#shop .sty.priced .tg { color: #ffd27a; font-weight: 900; }
#shop .sty.short .tg { color: #c9bfe8; }
#shop .sty.armed { border-color: #ffd27a; border-style: solid; box-shadow: 0 0 0 2px rgba(255, 210, 122, 0.55), 0 0 18px rgba(255, 199, 90, 0.35); animation: shopArm 0.9s ease-in-out infinite alternate; }
@keyframes shopArm { to { box-shadow: 0 0 0 3px rgba(255, 210, 122, 0.8), 0 0 26px rgba(255, 199, 90, 0.55); } }
#shop .shop-grid.reveal > * { animation: styIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both; }
#shop .face-chip { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 45% 40%, #fff, #ffc75a 60%); box-shadow: 0 0 0 2px #1a1433; }
#shop .face-chip::before { line-height: 30px; font-size: 17px; }
#shop .sty .bgthumb { width: 44px; height: 30px; border-radius: 8px; }
@media (max-width: 520px) { #shop .shop-feat, #shop .cos-grid { grid-template-columns: 1fr 1fr; } }
body.reduced #shop .sty.armed, body.reduced #shop .shop-grid.reveal > * { animation: none; }
@media (prefers-reduced-motion: reduce) { #shop .sty.armed, #shop .shop-grid.reveal > * { animation: none; } }
/* the Shop's new cosmetics, as card icons */
.cos-ico.aura-orbit { background: radial-gradient(circle at 18% 50%, #ffd27a 0 12%, transparent 14%), radial-gradient(circle at 82% 50%, #ffd27a 0 12%, transparent 14%), radial-gradient(circle, #fff1cf 0 18%, #ffc75a 30%, transparent 50%); }
.cos-ico.aura-petals { background: radial-gradient(circle, #fff1cf 0 16%, #ffc75a 26%, transparent 34%), repeating-conic-gradient(#ffb3d0 0 18deg, transparent 18deg 60deg); }
.cos-ico.victory-fireworks { background: radial-gradient(circle at 30% 30%, #ffd27a 0 12%, transparent 14%), radial-gradient(circle at 72% 36%, #ff8fb8 0 12%, transparent 14%), radial-gradient(circle at 48% 74%, #6fe0c8 0 12%, transparent 14%); }
.cos-ico.victory-ripple { background: radial-gradient(circle, transparent 20%, #8fd8ff 22% 28%, transparent 30% 46%, #8fd8ff 48% 54%, transparent 56% 72%, #8fd8ff 74% 80%, transparent 82%); }
.cos-ico.victory-fireworks, .cos-ico.victory-ripple { animation: cosripple 2.2s ease-out infinite; }
.f-heart::before { content: '♥'; position: absolute; inset: 0; font: 13px/16px sans-serif; color: #ff6b8f; text-align: center; }
.f-moon::before { content: '☾'; position: absolute; inset: 0; font: 900 13px/16px sans-serif; color: #2a1606; text-align: center; }
/* the Shop: Today's picks read as one set (art on top, name and price under it); a short screen keeps the preview slim */
#shop .shop-feat .sty.feat { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; gap: 6px; }
#shop .shop-feat .sty.feat .nm, #shop .shop-feat .sty.feat .tg { width: 100%; }
@media (max-height: 520px) { #shop .shop-stage { height: 96px; overflow: hidden; margin-bottom: 6px; } }
/* Shop: the price line already carries the lock, so drop the extra corner/side lock badges */
#shop .sty.trail.locked::after, #shop .sty.cos.badge.locked::after { content: none; }
#shop .shop-feat .sty.trail.feat { border-width: 2px; border-color: #c48a2e; background: linear-gradient(160deg, rgba(255, 199, 90, 0.16), rgba(255, 255, 255, 0.03)); } /* match the other Today's picks */
@media (min-height: 521px) { #shop .sty-stage .style-prev { height: clamp(130px, 18dvh, 180px); } } /* slimmer than Style: the tabs and first cards stay in view */
/* ---- the preview stage as a showcase (2026-11-09): the Spark loops through a dark, softly lit stage in its trail's own
   light; what is shown is named in a plate at the bottom, your name and badge sit top left like a player tag */
.sty-stage .style-prev::before { z-index: 0; background: radial-gradient(46% 70% at 50% 52%, color-mix(in srgb, var(--sh, #ffd27a) 22%, transparent), transparent 70%),
  radial-gradient(ellipse at 50% 50%, rgba(8, 6, 22, 0.5) 20%, rgba(5, 3, 14, 0.9)); }
.sty-stage .style-prev::after { opacity: 0.14; }
.sty-stage .style-prev canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.sty-stage #stylePrevName { z-index: 3; left: 14px; bottom: 12px; display: flex; flex-direction: column; gap: 1px; padding: 6px 13px 7px; border-radius: 12px; text-shadow: none;
  background: rgba(8, 6, 20, 0.72); border: 1px solid color-mix(in srgb, var(--sw, #ffd27a) 40%, rgba(255, 255, 255, 0.1)); backdrop-filter: none; }
.sty-stage #stylePrevName small { font: 800 10px Nunito, system-ui, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: color-mix(in srgb, var(--sh, #ffd27a) 70%, #fff); }
.sty-stage #stylePrevName b { font: 400 17px 'Lilita One', Nunito, system-ui, sans-serif; letter-spacing: 0.01em; color: #fff6e4; }
:is(#style, #shop) .sty-stage .sp-badge { top: 12px; left: 14px; right: auto; bottom: auto; padding: 3px 10px 3px 4px; border-radius: 999px; flex-direction: row-reverse; gap: 6px;
  background: rgba(8, 6, 20, 0.6); border: 1px solid rgba(255, 255, 255, 0.12); font-size: 13px; text-shadow: none; }
:is(#style, #shop) .sty-stage .sp-badge:empty { padding-left: 10px; }
:is(#style, #shop) .sty-stage .sp-badge .badge-img { width: 24px; }
@media (max-height: 520px) { .sty-stage #stylePrevName { bottom: 8px; padding: 3px 10px 4px; } .sty-stage #stylePrevName b { font-size: 14px; } .sty-stage #stylePrevName small { display: none; } :is(#style, #shop) .sty-stage .sp-badge { top: 8px; } }
/* ---- cosmetics as live previews (src/cosfx.js, drawn by ui.cosLoop): each tile plays its real effect; a locked one
   is an ink silhouette on a dashed card that says how to get it; the worn one carries a gold check */
.cos-cv { display: block; flex: none; width: 56px; height: 56px; grid-row: span 2; }
:is(#style, #shop) .sty.cos .cos-cv { width: clamp(52px, calc(var(--vs, 8px) * 8), 68px); height: clamp(52px, calc(var(--vs, 8px) * 8), 68px); margin: -6px -2px; transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
:is(#style, #shop) .sty.cos:hover .cos-cv { transform: scale(1.1); }
#shop .shop-feat .sty.feat .cos-cv { margin: 0 auto; }
.col-card .col-art .cos-cv { width: 84px; height: 84px; }
.col-art.big:has(.cos-cv) { width: 180px; height: 180px; border-radius: 24px; background: radial-gradient(closest-side, rgba(255, 210, 122, 0.1), transparent); }
.col-art.big .cos-cv { width: 180px; height: 180px; }
.col-card.locked { border-style: dashed; }
.col-card.locked .st { color: #b9b1e0; font-weight: 650; line-height: 1.25; }
.col-card.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold), 0 0 18px rgba(255, 210, 122, 0.22); }
.col-card.on .st { color: var(--gold); font-weight: 800; }
#colGrid .col-card.on::before { content: ''; position: absolute; top: 0; right: 0; width: 26px; height: 24px; border-radius: 0 10px 0 10px; background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' stroke='%231a1433' stroke-width='2.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; z-index: 1; }
body.reduced :is(#style, #shop) .sty.cos:hover .cos-cv { transform: none; }
@media (max-width: 560px), (max-height: 480px) { .col-card .col-art .cos-cv { width: 64px; height: 64px; } .col-art.big:has(.cos-cv), .col-art.big .cos-cv { width: 104px; height: 104px; } }
/* trail tiles are live canvases that draw their own locked silhouette: no extra dimming filter on top */
.locked canvas.trail-art, .col-card:not(.done) canvas.trail-art, :is(#style, #shop) .sty.trail.locked .sw:has(canvas), .sty.trail.locked .sw:has(canvas) { filter: none; }
/* a locked badge is the same ink-violet silhouette as the other locked cosmetics (its shape shows what it will be) */
:is(#style, #shop) .sty.locked .badge-img, .sty.locked .badge-img, #colGrid .col-card:not(.done) .badge-img, #colDetail .badge-img.dim { filter: brightness(0) invert(32%) sepia(35%) hue-rotate(205deg) saturate(2.2) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.12)); }
/* ---- leaderboard titles (src/ui.js renderLeaderboard / hallHtml): a crown per weekly podium place, a medal per daily
   one, gold / silver / bronze, with a count; and the Hall of Fame tab */
.lb-bdgs { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 6px; vertical-align: 1px; }
.lb-pod .lb-bdgs { justify-content: center; margin: 3px 0 2px; }
.lb-bdg { --bc: #ffd27a; display: inline-flex; align-items: center; gap: 1px; height: 20px; padding: 0 6px 0 4px; border-radius: 999px; cursor: help;
  color: var(--bc); background: color-mix(in srgb, var(--bc) 14%, rgba(9, 7, 22, 0.7)); border: 1px solid color-mix(in srgb, var(--bc) 55%, transparent); }
.lb-bdg:not(:has(b)) { padding-right: 4px; }
.lb-bdg svg { width: 14px; height: 14px; fill: currentColor; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--bc) 60%, transparent)); }
.lb-bdg svg .rb { fill: #ff6f8e; opacity: 0.85; }
.lb-bdg b { font: 900 11.5px Nunito, Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.lb-bdg.w2, .lb-bdg.d2 { --bc: #d6dcf0; } .lb-bdg.w3, .lb-bdg.d3 { --bc: #e0a46a; }
.lb-bdg.w1 { background: linear-gradient(180deg, rgba(255, 210, 122, 0.3), rgba(255, 178, 74, 0.12)); box-shadow: 0 0 10px rgba(255, 199, 90, 0.25); }
.lb-table .pl .lb-bdgs { display: flex; margin: 3px 0 0; }
.hof-reign { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 12px; }
.hof-champ { --mc: #ffd27a; position: relative; display: grid; justify-items: center; gap: 1px; min-width: 0; padding: 14px 12px 12px; border-radius: 16px; text-align: center; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--mc) 22%, transparent), transparent 70%), rgba(28, 22, 64, 0.85); border: 1.5px solid color-mix(in srgb, var(--mc) 55%, transparent); }
.hof-champ.dy { --mc: #73f2ff; }
.hof-champ.me { box-shadow: inset 0 0 0 2px var(--blast); }
.hof-ico svg { width: 30px; height: 30px; fill: var(--mc); filter: drop-shadow(0 0 10px color-mix(in srgb, var(--mc) 70%, transparent)); }
.hof-ico svg .rb { fill: #ff6f8e; }
.hof-k { font-size: 11px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mc); }
.hof-champ .lb-nm { font: 400 22px "Lilita One", Nunito, system-ui, sans-serif; letter-spacing: 0.02em; max-width: 100%; }
.hof-sc { font-size: 18px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.hof-table th:nth-child(3) { width: 70px; } .hof-table th:nth-child(4) { width: 78px; } .hof-table th:nth-child(5) { width: 100px; }
.hof-table .hof-pts { font-weight: 900; color: #73f2ff; }
.hof-table tbody tr:nth-child(-n+3) .rk { color: var(--gold); }
.hof-table .pl small.hof-sub { display: none; }
.hof-key { margin: 12px 4px 2px; font-size: 12.5px; line-height: 1.5; color: var(--dim); text-align: center; }
@media (max-width: 560px) {
  .lb-tabs { gap: 2px; width: 100%; }
  .lb-tabs button { flex: 1 1 auto; padding: 7px 6px; font-size: 13px; white-space: nowrap; }
  .hof-reign { grid-template-columns: 1fr 1fr; gap: 6px; }
  .hof-champ { padding: 10px 6px; } .hof-champ .lb-nm { font-size: 17px; } .hof-ico svg { width: 24px; height: 24px; }
  .hof-table th:nth-child(3) { width: 52px; } .hof-table th:nth-child(5) { width: 72px; }
  .hof-table .hof-at { display: none; } .hof-table .pl small.hof-sub { display: block; } /* the all-time place moves under the name */
}

/* Download dialog: the Mac app (a real download), shown for Mac; the browser install is the second choice */
.dl-mac { margin: 14px 0 4px; }
.dl-mac .dl-go { text-decoration: none; font-size: 19px; padding-block: 12px; }
.dl-mac-meta { margin: 8px 0 0; font-size: 13px; color: #b9b0dc; }
.dl-mac-upd { margin: 8px 22px 0; padding: 8px 12px; border-radius: 12px; background: rgba(115, 242, 255, 0.08); color: #bff8ff; font-size: 13px; line-height: 1.4; }
/* ---- leaderboards, polished (Leaderboards screen, Ranked board): medal-framed podium with a crowned, softly glowing #1,
   Lilita rank numbers, fine gold hairlines between rows, your row in cyan, quiet device chips, a shimmer while loading and
   a short fade when a tab's board arrives. Motion stops under body.reduced and prefers-reduced-motion. */
.lb-body { min-height: min(300px, 30vh); background: radial-gradient(120% 60% at 50% 0%, rgba(255, 210, 122, 0.06), transparent 60%), rgba(9, 7, 22, 0.6); border-color: rgba(255, 210, 122, 0.16); }
.lb-note:empty { display: none; } /* an empty note line was what pushed "Remove my scores" under the sticky Back bar */
.lb-body:not(.loading) > * { animation: lbIn 0.28s var(--ease-out, ease-out) both; }
@keyframes lbIn { from { opacity: 0; transform: translateY(6px); } }
.lb-skel { animation: none; }
.lb-skel i, .lb-skel b { background: linear-gradient(100deg, rgba(140, 125, 230, 0.08) 30%, rgba(255, 210, 122, 0.16) 50%, rgba(140, 125, 230, 0.08) 70%) 0 0 / 300% 100%; animation: lbShine 1.3s linear infinite; }
@keyframes lbShine { from { background-position: 100% 0; } to { background-position: 0 0; } }
/* podium: metal frames, #1 crowned and glowing */
.lb-podium { margin-top: 14px; }
.lb-pod { border-width: 2px; background: radial-gradient(90% 70% at 50% 0%, color-mix(in srgb, var(--mc) 22%, transparent), transparent 70%), linear-gradient(180deg, rgba(36, 28, 78, 0.9), rgba(12, 9, 28, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(0, 0, 0, 0.35), 0 6px 16px rgba(0, 0, 0, 0.3); }
.lb-pod.m1 { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 26px rgba(255, 199, 90, 0.28), 0 6px 16px rgba(0, 0, 0, 0.3); animation: lbGlow 2.6s ease-in-out infinite alternate; }
@keyframes lbGlow { to { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 38px rgba(255, 199, 90, 0.42), 0 6px 16px rgba(0, 0, 0, 0.3); } }
.lb-pod.m1 .lb-medal::before { content: ''; position: absolute; left: 50%; top: -17px; width: 24px; height: 18px; transform: translateX(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='2 4 20 16'%3E%3Cpath d='M3 19h18l1.2-11.5-5.7 4.3L12 4.5l-4.5 7.3-5.7-4.3z' fill='%23ffd27a' stroke='%23a8661c' stroke-width='1'/%3E%3C/svg%3E") center / contain no-repeat; filter: drop-shadow(0 0 6px rgba(255, 199, 90, 0.7)); }
.lb-pod.m1 { margin-top: 12px; }
.lb-medal { font: 400 17px "Lilita One", Nunito, system-ui, sans-serif; border: 2px solid color-mix(in srgb, var(--mc) 70%, #000); }
.lb-pod .lb-pmeta { font-size: 11.5px; line-height: 1.35; text-wrap: balance; }
@media (max-width: 560px) { .lb-table th { top: -8px; } } /* the board's own padding there: the sticky header sits flush with its top */
/* rows */
.lb-table th { background: #130f2c; border-bottom-color: rgba(255, 210, 122, 0.28); color: #b9b0e6; }
.lb-table td { border-bottom: 1px solid rgba(255, 210, 122, 0.1); }
.lb-table tbody tr { transition: background 0.15s; }
.lb-table tbody tr:has(.lb-nm[role=button]), .lb-pod:has(.lb-nm[role=button]) { cursor: pointer; } /* the whole row opens the player card */
.lb-table tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }
.lb-table .rk { font: 400 17px "Lilita One", Nunito, system-ui, sans-serif; color: #c9c0f2; letter-spacing: 0.02em; }
.lb-table .sc { font: 400 17px "Lilita One", Nunito, system-ui, sans-serif; letter-spacing: 0.03em; text-shadow: 0 0 10px rgba(255, 199, 90, 0.25); }
.lb-table tr.me td { background: linear-gradient(90deg, rgba(115, 242, 255, 0.16), rgba(115, 242, 255, 0.05)); border-bottom-color: rgba(115, 242, 255, 0.3); }
.lb-table tr.me .lb-nm, .lb-table tr.me .rk { color: #73f2ff; }
.lb-table tr.pin td { border-top: 1px dashed rgba(115, 242, 255, 0.35); }
.lb-pod.me { box-shadow: 0 0 0 2px var(--blast), 0 0 18px rgba(111, 231, 255, 0.3); }
.lb-dev { display: inline-block; padding: 0 6px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; line-height: 16px; color: #b9b0e6; background: rgba(140, 125, 230, 0.14); border: 1px solid rgba(140, 125, 230, 0.22); vertical-align: 1px; }
/* empty, offline and error states */
.lb-empty { margin: 14px auto; max-width: 440px; padding: 30px 20px; border-radius: 18px; border: 1px dashed rgba(255, 210, 122, 0.25); background: radial-gradient(80% 60% at 50% 0%, rgba(255, 210, 122, 0.08), transparent 70%); }
.lb-err { border-color: rgba(255, 160, 140, 0.35); background: radial-gradient(80% 60% at 50% 0%, rgba(255, 140, 120, 0.08), transparent 70%); }
.lb-err::before { content: ''; width: 40px; height: 40px; opacity: 0.85;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffb2a6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18a4.5 4.5 0 0 1-.6-9A6 6 0 0 1 18 9.5a4 4 0 0 1-.5 8.5z'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E") center / contain no-repeat; }
.lb-cup { animation: lbFloat 3s ease-in-out infinite alternate; }
@keyframes lbFloat { to { transform: translateY(-4px); } }
/* the sharing options: a quiet card; "Remove my scores" never sits under the Back bar */
.lb-opts { padding: 8px 12px; border-radius: 14px; background: rgba(9, 7, 22, 0.4); border: 1px solid rgba(255, 210, 122, 0.12); }
.lb-forget { min-height: 36px; }
#leaderboard .panel-foot { margin-top: 8px; }
/* Ranked board: Lilita ranks, medal discs for the top three, your row in cyan */
.rk-board .rk-row { background: linear-gradient(180deg, rgba(36, 28, 78, 0.55), rgba(12, 9, 28, 0.55)); border-color: rgba(255, 210, 122, 0.14); }
.rk-board .rk-rank { min-width: 34px; text-align: center; font: 400 18px "Lilita One", Nunito, system-ui, sans-serif; color: #c9c0f2; letter-spacing: 0.02em; }
.rk-board .rk-row:nth-child(-n+3) .rk-rank { --mc: #ffd76a; display: grid; place-items: center; width: 34px; min-width: 34px; height: 34px; border-radius: 50%; font-size: 15px; color: #2a1404;
  background: radial-gradient(circle at 35% 30%, #fff, var(--mc) 45%, color-mix(in srgb, var(--mc) 60%, #000)); border: 2px solid color-mix(in srgb, var(--mc) 70%, #000); box-shadow: 0 0 10px color-mix(in srgb, var(--mc) 55%, transparent); }
.rk-board .rk-row:nth-child(2) .rk-rank { --mc: #d6dcf0; } .rk-board .rk-row:nth-child(3) .rk-rank { --mc: #e0a46a; }
.rk-board .rk-row:nth-child(1) { border-color: rgba(255, 210, 122, 0.5); box-shadow: 0 0 18px rgba(255, 199, 90, 0.14); }
.rk-board .rk-sc { font: 400 18px "Lilita One", Nunito, system-ui, sans-serif; color: var(--gold); letter-spacing: 0.03em; }
.rk-board .rk-row.me { border-color: rgba(115, 242, 255, 0.6); background: linear-gradient(90deg, rgba(115, 242, 255, 0.14), rgba(115, 242, 255, 0.04)); box-shadow: inset 3px 0 0 #73f2ff; }
.rk-board .rk-row.me .rk-who { color: #73f2ff; }
.rk-board .rk-empty { padding: 26px 16px; border-radius: 14px; border: 1px dashed rgba(255, 210, 122, 0.25); }
@media (prefers-reduced-motion: reduce) { .lb-body > *, .lb-pod.m1, .lb-cup, .lb-skel i, .lb-skel b { animation: none !important; } }
body.reduced :is(.lb-body > *, .lb-pod.m1, .lb-cup, .lb-skel i, .lb-skel b) { animation: none !important; }
/* two-column settings grids: a lone last row spans both columns instead of leaving an empty cell */
#settings .set-page .sliders > :last-child:nth-child(odd), #settings .set-page .toggles > :last-child:nth-child(odd) { grid-column: 1 / -1; }
/* group headings in the Help list sit on their own row above their cards */
.help-list > .help-g { grid-column: 1 / -1; }
/* leaderboard: the next target above the podium */
#leaderboard .lb-chase { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 10px; padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: var(--fs-s, 14px); color: #ffe6b0;
  background: linear-gradient(90deg, rgba(255, 199, 90, 0.04), rgba(255, 199, 90, 0.14), rgba(255, 199, 90, 0.04)); border: 1px solid rgba(255, 199, 90, 0.3); }
#leaderboard .lb-chase svg { width: 16px; height: 16px; flex: none; fill: var(--gold); filter: drop-shadow(0 0 4px rgba(255, 199, 90, 0.6)); }
#leaderboard .lb-chase.top { color: #fff3c9; border-color: rgba(255, 199, 90, 0.6); }
#leaderboard .lb-chase span { min-width: 0; overflow-wrap: anywhere; }
/* leaderboard: the sharing options as one compact wrapping row, so the list itself gets the height */
#leaderboard .lb-opts { margin-top: 4px; padding: 6px 12px; font-size: 12.5px; }
#leaderboard .lb-opts input { width: 16px; height: 16px; }
#leaderboard .lb-forget { min-height: 32px; font-size: 12.5px; }
@media (max-height: 560px) { #leaderboard .lb-sub { display: none; } #leaderboard .lb-chase { margin-bottom: 6px; padding: 5px 12px; } }
/* one scroll for the whole board: the list shows at full height and the sharing options follow it (no box-in-a-box scroll) */
#leaderboard .lb-body { flex: none; overflow: visible; }

/* ---- Sign in (first launch and Profile): Apple's white button beside Google's own; the cloud-save choice */
.apple-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 240px; max-width: 100%; height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: #fff; color: #000; font: 600 16px/1 -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Nunito, sans-serif; cursor: pointer; }
.apple-btn svg { width: 16px; height: 19px; fill: currentColor; flex: none; }
.apple-btn:hover { background: #f2f2f2; }
.apple-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.wl-acct { display: grid; gap: 10px; justify-items: center; }
.wl-signin { display: grid; gap: 10px; justify-items: center; min-height: 44px; }
.wl-acct .name-msg:empty { display: none; }
.wl-or { display: flex; align-items: center; gap: 12px; width: 100%; margin: 2px 0 0; color: var(--dim, #a9a3cf); font-size: 13px; }
.wl-or::before, .wl-or::after { content: ''; flex: 1; height: 1px; background: rgba(200, 190, 255, 0.22); }
/* Two saves: a face-off between two save slots, VS in the middle */
.cloud-dlg { width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 22px 20px 18px; border: 0; border-radius: 28px; color: var(--text); overflow: auto;
  background: radial-gradient(120% 70% at 50% 0%, rgba(255, 190, 90, 0.22), transparent 60%), radial-gradient(80% 60% at 50% 110%, rgba(120, 90, 255, 0.3), transparent 70%), #17112f;
  box-shadow: 0 0 0 2px rgba(255, 216, 110, 0.5), 0 0 0 7px rgba(23, 17, 47, 0.9), 0 0 0 8px rgba(255, 216, 110, 0.25), 0 30px 80px rgba(0, 0, 0, 0.6); text-align: center; }
.cloud-dlg[open] { animation: cdIn 0.45s cubic-bezier(0.3, 1.5, 0.5, 1); }
.cloud-dlg::backdrop { background: radial-gradient(circle at 50% 40%, rgba(40, 20, 80, 0.6), rgba(4, 2, 12, 0.88)); backdrop-filter: blur(4px); }
.cd-kick { margin: 0; font: 800 13px Nunito, sans-serif; letter-spacing: 0.08em; color: #ffb86a; }
.cloud-dlg h2 { margin: 2px 0 16px; font: 400 clamp(28px, 6vw, 38px)/1 'Lilita One', Nunito, sans-serif; color: #ffd86e; text-shadow: 0 3px 0 #5a2a00, 0 0 24px rgba(255, 190, 90, 0.5); }
.cd-pick { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.cd-vs { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; font: 400 18px 'Lilita One', sans-serif; color: #3a1a00; background: radial-gradient(circle at 35% 30%, #fff1b0, #ffb347 70%); box-shadow: 0 0 0 3px #17112f, 0 0 0 5px rgba(255, 216, 110, 0.6), 0 0 22px rgba(255, 190, 90, 0.8); transform: rotate(-8deg); z-index: 1; }
.cd-slot { position: relative; display: grid; justify-items: center; gap: 6px; padding: 16px 12px 0; border-radius: 22px; border: 2px solid rgba(160, 140, 255, 0.35); overflow: hidden; cursor: pointer; font: inherit; color: inherit;
  background: linear-gradient(180deg, rgba(60, 44, 130, 0.55), rgba(20, 14, 46, 0.9)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 24px rgba(0, 0, 0, 0.4); transition: transform 0.18s cubic-bezier(0.3, 1.6, 0.5, 1), border-color 0.18s, box-shadow 0.18s; }
.cd-slot:hover, .cd-slot:focus-visible { transform: translateY(-4px) rotate(-1deg); border-color: #ffd86e; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 0 4px rgba(255, 216, 110, 0.25), 0 16px 32px rgba(0, 0, 0, 0.5); outline: none; }
#cdDevice:hover, #cdDevice:focus-visible { transform: translateY(-4px) rotate(1deg); }
.cs-where { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 800; color: #c9d4ff; }
.cs-where svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cs-ribbon { position: absolute; top: 12px; right: -30px; width: 120px; padding: 3px 0; transform: rotate(35deg); background: linear-gradient(90deg, #4be08e, #2fbf74); color: #04210f; font: 800 10.5px Nunito, sans-serif; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.cs-av { width: 54px; height: 54px; display: grid; place-items: center; margin-top: 4px; border-radius: 50%; font: 400 26px 'Lilita One', sans-serif; color: #3a1a00; background: radial-gradient(circle at 35% 30%, #fff6c8, #ffc65a 60%, #e08a1e); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15), 0 0 20px rgba(255, 190, 90, 0.6); }
.cs-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: 16px; }
.cs-best { display: grid; line-height: 1; } .cs-best small { font-size: 11px; font-weight: 800; color: #a9a3cf; } .cs-best b { font: 400 30px 'Lilita One', sans-serif; color: #ffd86e; text-shadow: 0 2px 0 #5a2a00; }
.cs-stats { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; gap: 2px; margin-top: 4px; }
.cs-stats span { display: grid; gap: 1px; padding: 6px 2px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); font-size: 10.5px; font-weight: 700; color: #a9a3cf; }
.cs-stats b { font-size: 14px; color: #fff1d6; font-variant-numeric: tabular-nums; }
.cs-go { width: calc(100% + 24px); margin-top: 8px; padding: 10px 0; background: linear-gradient(180deg, #ffd86e, #ffaa3c); color: #3a1a00; font: 400 17px 'Lilita One', sans-serif; letter-spacing: 0.02em; }
.cd-foot { margin: 14px 0 0; font-size: 13px; color: #a9a3cf; }
@keyframes cdIn { from { opacity: 0; transform: scale(0.85) translateY(20px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .cd-pick { grid-template-columns: 1fr; } .cd-vs { justify-self: center; margin: -6px 0; } }
@media (max-height: 500px) { .cloud-dlg { padding: 12px 14px 10px; } .cloud-dlg h2 { margin-bottom: 8px; font-size: 24px; } .cs-av { display: none; } .cd-foot { margin-top: 8px; } }
body.reduced .cloud-dlg[open] { animation: none; } @media (prefers-reduced-motion: reduce) { .cloud-dlg[open] { animation: none; } .cd-slot { transition: none; } }
@media (max-height: 560px) { .wl-acct { gap: 6px; } .wl-acct .wl-lead { font-size: 17px; } }
.mail-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 240px; max-width: 100%; height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid rgba(200, 190, 255, 0.4); background: rgba(255, 255, 255, 0.06); color: var(--text); font: 700 15.5px/1 Nunito, sans-serif; cursor: pointer; }
.mail-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.mail-btn:hover { background: rgba(255, 255, 255, 0.11); } .mail-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.mail-form { display: grid; gap: 8px; width: min(320px, 100%); text-align: left; }
.mf-step { display: grid; gap: 4px; font-size: 13px; color: #d8d3f5; }
.mf-step[hidden] { display: none; }
.mf-step input { font: inherit; font-size: 17px; font-weight: 700; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(9, 7, 22, 0.75); color: var(--text); outline: none; }
.mf-step input[name=code] { letter-spacing: 0.3em; text-align: center; font-size: 22px; }
.mf-step input:focus { border-color: rgba(255, 210, 140, 0.8); box-shadow: 0 0 0 3px rgba(255, 199, 90, 0.18); }
.mf-msg { margin: 0; font-size: 12.5px; color: #bdb6e6; } .mf-msg.bad { color: #ff9a9a; }
.mf-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Developer announcements: a ribbon that drops in at the top, over any screen or a run */
.announce { position: fixed; left: 50%; top: max(10px, env(safe-area-inset-top)); z-index: 60; display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 24px)); padding: 8px 18px 8px 8px; border-radius: 999px;
  background: linear-gradient(180deg, #ffe39a, #ffb347); color: #3a1a00; box-shadow: 0 6px 0 #a35a10, 0 14px 30px rgba(0, 0, 0, 0.45); transform: translate(-50%, -160%); pointer-events: none; }
.announce.show { animation: anDrop 6.5s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.an-mega { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #3a1a00; }
.an-mega svg { width: 20px; height: 20px; fill: #ffd86e; }
.announce p { margin: 0; display: grid; line-height: 1.15; } .announce b { font: 800 11px Nunito, sans-serif; opacity: 0.75; } .announce b[hidden] { display: none; }
.announce span { font: 400 18px 'Lilita One', Nunito, sans-serif; overflow-wrap: anywhere; }
@keyframes anDrop { 0% { transform: translate(-50%, -160%); } 7% { transform: translate(-50%, 0) rotate(-1.5deg); } 10% { transform: translate(-50%, 0) rotate(1deg); } 13%, 90% { transform: translate(-50%, 0); } 100% { transform: translate(-50%, -160%); } }
body.reduced .announce.show { animation-timing-function: steps(1); } @media (prefers-reduced-motion: reduce) { .announce.show { animation-timing-function: steps(1); } }

/* ---- The owner's dev panel: a control desk, loud on purpose (only the owner ever sees it) */
.dev-open { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 10px 0 4px; padding: 12px; border-radius: 14px; border: 0; cursor: pointer; font: 400 19px 'Lilita One', Nunito, sans-serif; color: #fff;
  background: repeating-linear-gradient(-45deg, #ff3a6e 0 14px, #ff5a86 14px 28px); box-shadow: 0 4px 0 #8a1035, 0 0 0 2px #ffd0dc inset; }
.dev-open:active { transform: translateY(3px); box-shadow: 0 1px 0 #8a1035, 0 0 0 2px #ffd0dc inset; }
.dev-dlg { width: min(860px, calc(100vw - 16px)); height: min(640px, calc(100dvh - 16px)); padding: 0; border: 0; border-radius: 18px; color: #e9f3ff; overflow: hidden; display: none; flex-direction: column;
  background: #0b1020; box-shadow: 0 0 0 2px #2be0ff, 0 0 0 6px #0b1020, 0 0 0 7px rgba(43, 224, 255, 0.4), 0 30px 80px rgba(0, 0, 0, 0.7); font: 500 14px/1.35 ui-monospace, 'SF Mono', Menlo, monospace; }
.dev-dlg[open] { display: flex; }
.dev-dlg::backdrop { background: rgba(0, 4, 12, 0.8); }
.dv-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: linear-gradient(90deg, #ff3a6e, #ff8a3a); color: #fff; }
.dv-head h2 { margin: 0; font: 400 24px 'Lilita One', Nunito, sans-serif; letter-spacing: 0.02em; }
.dv-live { flex: 1; font-size: 12.5px; font-weight: 700; } .dv-live::before { content: '● '; color: #4bff9a; }
.dv-x { width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(0, 0, 0, 0.25); color: #fff; font-size: 18px; cursor: pointer; }
.dv-tabs { display: flex; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid #1f2a44; }
.dv-tabs button { padding: 9px 14px; border: 0; border-radius: 10px 10px 0 0; background: transparent; color: #8aa0c8; font: inherit; font-weight: 800; cursor: pointer; }
.dv-tabs button[aria-selected="true"] { background: #16213d; color: #2be0ff; }
.dv-page { flex: 1; overflow: auto; padding: 14px 16px; } .dv-page[hidden] { display: none; }
.dv-page h3 { margin: 18px 0 8px; font-size: 13px; color: #8aa0c8; }
.dv-note { margin: 0 0 12px; font-size: 12.5px; color: #8aa0c8; }
.dv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.dv-ev { display: grid; justify-items: center; gap: 6px; padding: 14px 8px; border-radius: 14px; border: 2px solid #22365e; background: linear-gradient(180deg, #16213d, #0f1830); color: #e9f3ff; font: inherit; font-weight: 800; cursor: pointer; transition: transform 0.12s, border-color 0.12s; }
.dv-ev i { font-style: normal; font-size: 28px; } .dv-ev:hover, .dv-ev:focus-visible { border-color: #2be0ff; transform: translateY(-2px); outline: none; } .dv-ev:active { transform: scale(0.96); }
.dv-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.dv-row input, .dv-row select { font: inherit; font-size: 16px; padding: 9px 10px; border-radius: 10px; border: 1.5px solid #22365e; background: #0f1830; color: #e9f3ff; }
.dv-row input[name=text] { flex: 1; min-width: 200px; } .dv-row input[type=number] { width: 80px; } .dv-row label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #8aa0c8; }
.dv-btn { padding: 10px 16px; border-radius: 10px; border: 0; font: inherit; font-weight: 800; cursor: pointer; background: #22365e; color: #fff; } .dv-btn.hot { background: #ff3a6e; }
.dv-log { margin: 14px 0 0; padding: 10px 12px; list-style: none; border-radius: 10px; background: #070b16; color: #4bff9a; font-size: 12px; max-height: 140px; overflow: auto; }
.dv-log:empty::before { content: 'Nothing sent yet.'; color: #4a5a7a; }
.dv-board { display: grid; gap: 4px; }
.dv-r { display: grid; grid-template-columns: 40px 1fr auto auto auto auto auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: #0f1830; }
.dv-r b { color: #ffd86e; } .dv-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; } .dv-s { color: #2be0ff; font-variant-numeric: tabular-nums; } .dv-w { color: #8aa0c8; font-size: 12px; }
.dv-r button { padding: 6px 10px; border-radius: 8px; border: 0; background: #22365e; color: #e9f3ff; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; } .dv-r button.bad { background: #ff3a6e; }
#devBanned .dv-r { grid-template-columns: 1fr auto; }
.dv-room { padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; background: #0f1830; } .dv-room b { color: #ffd86e; }
.dv-room p { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; } .dv-room span { padding: 2px 8px; border-radius: 999px; background: #22365e; font-size: 12px; } .dv-room span.on { background: #1d6b45; }
@media (max-width: 600px) { .dv-r { grid-template-columns: 30px 1fr auto; } .dv-r .dv-w { display: none; } .dv-r button { grid-row: 2; } .dv-r button[data-a="set"] { grid-column: 1 / 2; } }
body.playing .announce { top: calc(max(10px, env(safe-area-inset-top)) + 64px); }

/* ---- Profile: the player card (skill rank, lifetime totals, region) */
.pf-card { display: grid; gap: 10px; margin: 6px 0 12px; }
.pc-rank { --rc: #ffd86e; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--rc) 28%, transparent), transparent 60%), rgba(18, 13, 40, 0.75); border: 1.5px solid color-mix(in srgb, var(--rc) 55%, transparent); }
.pc-emblem { position: relative; flex: none; width: 54px; height: 60px; display: grid; place-items: center; }
.pc-emblem svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: color-mix(in srgb, var(--rc) 85%, #000); stroke: var(--rc); stroke-width: 3; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.4)); }
.pc-emblem b { position: relative; font: 400 26px 'Lilita One', sans-serif; color: #1a1030; }
.pc-rk { flex: 1; display: grid; gap: 3px; text-align: left; } .pc-rk > span { font-size: 12px; font-weight: 800; color: #a9a3cf; }
.pc-rk > b { font: 400 24px/1 'Lilita One', sans-serif; color: var(--rc); }
.pc-bar { display: block; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; } .pc-bar b { display: block; height: 100%; border-radius: 4px; background: var(--rc); }
.pc-rk small { font-size: 12px; color: #c9c2f0; }
.pc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pc-t { display: grid; align-content: center; gap: 2px; min-height: 56px; padding: 8px 6px; border-radius: 12px; background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(160, 140, 255, 0.16); text-align: center; }
.pc-t b { font: 400 19px/1.1 'Lilita One', Nunito, sans-serif; color: #fff1d6; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pc-t span { font-size: 11px; font-weight: 700; color: #a9a3cf; }
.pc-t.gold b { color: #ffd86e; } .pc-t.reg b { font: 800 13px/1.2 Nunito, sans-serif; }
.pc-flag { display: block; font-size: 20px; line-height: 1.1; }
.pc-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-link { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid rgba(255, 216, 110, 0.4); background: transparent; color: #ffd86e; font: 800 13px Nunito, sans-serif; cursor: pointer; }
.pc-link:hover, .pc-link:focus-visible { background: rgba(255, 216, 110, 0.1); outline: none; }
@media (max-width: 520px) { .pc-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---- Leaderboard player card: you vs them */
.fo { margin: 10px 0 4px; padding: 10px 12px 12px; border-radius: 16px; background: linear-gradient(180deg, rgba(40, 28, 90, 0.6), rgba(16, 11, 36, 0.8)); border: 1px solid rgba(255, 216, 110, 0.25); }
.fo-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 800; }
.fo-me { color: #8fd4ff; } .fo-them { color: #ff9a8a; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-vs { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font: 400 13px 'Lilita One', sans-serif; color: #3a1a00; background: radial-gradient(circle at 35% 30%, #fff1b0, #ffb347 70%); transform: rotate(-8deg); }
.fo-row { --a: 50%; position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 6px 0 12px; }
.fo-a, .fo-z { font: 400 17px 'Lilita One', Nunito, sans-serif; font-variant-numeric: tabular-nums; color: #fff1d6; } .fo-z { text-align: right; }
.fo-k { font-size: 11.5px; font-weight: 800; color: #a9a3cf; }
.fo-bar { position: absolute; left: 0; right: 0; bottom: 3px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #4fb8ff 0 var(--a), #ff6a5a var(--a) 100%); opacity: 0.85; }
.fo-row.win .fo-a::after, .fo-row.lose .fo-z::before { content: ''; display: inline-block; width: 11px; height: 8px; margin: 0 4px; background: #ffd86e; clip-path: polygon(0 100%, 0 20%, 25% 55%, 50% 0, 75% 55%, 100% 20%, 100% 100%); }
.fo-verdict { margin: 4px 0 0; padding: 7px 10px; border-radius: 10px; background: rgba(255, 106, 90, 0.14); color: #ffc2b8; font-weight: 800; font-size: 13.5px; text-align: center; }
.fo-verdict.ahead { background: rgba(79, 184, 255, 0.14); color: #bfe6ff; }
.announce:not(.show) { visibility: hidden; }

/* Two saves: the face-off plays out. Cards fly in from each side, VS slams down with a shockwave, the save that is
   further along wears a gold border that runs around it, sparks drift up behind, and each choice bar has a shine. */
.cloud-dlg { isolation: isolate; }
.cloud-dlg::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.55;
  background: radial-gradient(2px 2px at 12% 80%, #ffd86e, transparent), radial-gradient(1.5px 1.5px at 30% 60%, #fff, transparent), radial-gradient(2px 2px at 55% 90%, #8fd4ff, transparent),
    radial-gradient(1.5px 1.5px at 72% 70%, #ffd86e, transparent), radial-gradient(2px 2px at 88% 85%, #fff, transparent), radial-gradient(1.5px 1.5px at 45% 75%, #ffb86a, transparent);
  background-size: 100% 100%; animation: cdDrift 7s linear infinite; }
.cloud-dlg[open] #cdCloud { animation: cdInL 0.6s cubic-bezier(0.25, 1.4, 0.5, 1) 0.1s backwards; }
.cloud-dlg[open] #cdDevice { animation: cdInR 0.6s cubic-bezier(0.25, 1.4, 0.5, 1) 0.18s backwards; }
.cloud-dlg[open] .cd-vs { animation: cdSlam 0.5s cubic-bezier(0.3, 1.8, 0.5, 1) 0.55s backwards; }
.cd-vs { position: relative; }
.cd-vs::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid #ffd86e; opacity: 0; pointer-events: none; }
.cloud-dlg[open] .cd-vs::after { animation: cdWave 0.7s ease-out 0.75s both; }
.cloud-dlg[open] .cd-kick { animation: btUp 0.4s ease both; } .cloud-dlg[open] h2 { animation: cdTitle 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) 0.05s both; }
.cd-slot:has(.cs-ribbon) { border-color: transparent; background-clip: padding-box; }
.cd-slot:has(.cs-ribbon)::before { content: ''; position: absolute; inset: -2px; z-index: -1; border-radius: 23px; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--cdA, 0deg), #ffd86e, #ff9a4a 20%, transparent 35% 65%, #ffd86e 80%, #fff1b0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: cdRun 2.6s linear infinite; }
@property --cdA { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.cd-slot { isolation: isolate; }
.cd-slot:has(.cs-ribbon) .cs-av { animation: cdBob 2.4s ease-in-out infinite; box-shadow: 0 0 0 3px rgba(255, 216, 110, 0.5), 0 0 26px rgba(255, 190, 90, 0.8); }
.cs-go { position: relative; overflow: hidden; }
.cs-go::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.6) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat; animation: playShine 2.8s ease-in-out 1.2s infinite; }
#cdDevice .cs-go::after { animation-delay: 2.6s; }
.cd-slot:active { transform: scale(0.97); }
.cs-ribbon { animation: cdRib 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 0.9s both; }
@keyframes cdInL { from { opacity: 0; transform: translateX(-120px) rotate(-12deg) scale(0.8); } to { opacity: 1; transform: none; } }
@keyframes cdInR { from { opacity: 0; transform: translateX(120px) rotate(12deg) scale(0.8); } to { opacity: 1; transform: none; } }
@keyframes cdSlam { 0% { opacity: 0; transform: scale(3) rotate(-30deg); } 60% { opacity: 1; transform: scale(0.85) rotate(-4deg); } 100% { opacity: 1; transform: scale(1) rotate(-8deg); } }
@keyframes cdWave { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(2.6); } }
@keyframes cdTitle { from { opacity: 0; transform: translateY(-14px) scale(1.15); } to { opacity: 1; transform: none; } }
@keyframes cdRun { to { --cdA: 360deg; } }
@keyframes cdBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes cdRib { from { opacity: 0; transform: rotate(35deg) scale(1.6); } to { opacity: 1; transform: rotate(35deg); } }
@keyframes cdDrift { from { background-position: 0 0; } to { background-position: 0 -120px; } }
@media (max-width: 560px) { @keyframes cdInL { from { opacity: 0; transform: translateY(-60px) scale(0.85); } } @keyframes cdInR { from { opacity: 0; transform: translateY(60px) scale(0.85); } } }
body.reduced .cloud-dlg *, body.reduced .cloud-dlg::before, body.reduced .cd-slot::before { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .cloud-dlg *, .cloud-dlg::before, .cd-slot::before { animation: none !important; } }
/* a painted rank emblem replaces the drawn shield once it has loaded */
.pc-emblem img { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); object-fit: contain; opacity: 0; transition: opacity 0.3s; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5)); }
.pc-emblem.art img { opacity: 1; animation: pcEmb 3.2s ease-in-out infinite; } .pc-emblem.art svg, .pc-emblem.art b { opacity: 0; }
@keyframes pcEmb { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-3px) rotate(2deg); } }
body.reduced .pc-emblem.art img { animation: none; } @media (prefers-reduced-motion: reduce) { .pc-emblem.art img { animation: none; } }
.pf-card { margin-top: 4px; } /* the name message line above already reserves room */ .pc-rank { padding: 14px 16px 14px 12px; }
.pc-emblem { width: 62px; height: 66px; } .pc-emblem img { inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); }

/* Profile and leaderboard come alive: tiles flow in one by one, the rank card sweeps in with a shine, podium places
   rise in order (1st last, the biggest), table rows slide in, and your own row glows. */
#profile:not([hidden]) .pc-rank { animation: pcIn 0.55s cubic-bezier(0.3, 1.4, 0.5, 1) both; position: relative; overflow: hidden; }
#profile:not([hidden]) .pc-rank::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat; animation: playShine 3.4s ease-in-out 0.6s infinite; }
#profile:not([hidden]) .pc-t { animation: pcTile 0.45s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
#profile .pc-t:nth-child(1) { animation-delay: 0.08s; } #profile .pc-t:nth-child(2) { animation-delay: 0.12s; } #profile .pc-t:nth-child(3) { animation-delay: 0.16s; } #profile .pc-t:nth-child(4) { animation-delay: 0.2s; }
#profile .pc-t:nth-child(5) { animation-delay: 0.24s; } #profile .pc-t:nth-child(6) { animation-delay: 0.28s; } #profile .pc-t:nth-child(7) { animation-delay: 0.32s; } #profile .pc-t:nth-child(8) { animation-delay: 0.36s; }
#profile .pc-t:nth-child(9) { animation-delay: 0.4s; } #profile .pc-t:nth-child(10) { animation-delay: 0.44s; } #profile .pc-t:nth-child(11) { animation-delay: 0.48s; } #profile .pc-t:nth-child(12) { animation-delay: 0.52s; }
.pc-t { transition: transform 0.15s, border-color 0.15s, background 0.15s; } .pc-t:hover { transform: translateY(-2px); border-color: rgba(255, 216, 110, 0.45); background: rgba(255, 216, 110, 0.07); }
.pc-bar b { animation: pcBar 1s cubic-bezier(0.3, 0, 0.2, 1) 0.3s both; transform-origin: 0 50%; }
@keyframes pcIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes pcTile { from { opacity: 0; transform: translateY(12px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes pcBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
#leaderboard .lb-podium .lb-pod { animation: lbRise 0.55s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
#leaderboard .lb-podium .lb-pod.m3 { animation-delay: 0.05s; } #leaderboard .lb-podium .lb-pod.m2 { animation-delay: 0.15s; } #leaderboard .lb-podium .lb-pod.m1 { animation: lbRise 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) 0.28s both, lbGlow 2.6s ease-in-out 1s infinite alternate; }
#leaderboard .lb-table tbody tr { animation: lbRow 0.4s ease-out both; }
#leaderboard .lb-table tbody tr:nth-child(1) { animation-delay: 0.35s; } #leaderboard .lb-table tbody tr:nth-child(2) { animation-delay: 0.39s; } #leaderboard .lb-table tbody tr:nth-child(3) { animation-delay: 0.43s; }
#leaderboard .lb-table tbody tr:nth-child(4) { animation-delay: 0.47s; } #leaderboard .lb-table tbody tr:nth-child(5) { animation-delay: 0.51s; } #leaderboard .lb-table tbody tr:nth-child(6) { animation-delay: 0.55s; }
#leaderboard .lb-table tbody tr:nth-child(n+7) { animation-delay: 0.59s; }
#leaderboard .lb-table tbody tr.me td { background: linear-gradient(90deg, rgba(255, 216, 110, 0.16), rgba(255, 216, 110, 0.04)); }
#leaderboard .lb-table tbody tr.me td:first-child { box-shadow: inset 3px 0 0 #ffd86e; }
#leaderboard .lb-chase { animation: lbChase 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 0.1s both; }
@keyframes lbRise { from { opacity: 0; transform: translateY(26px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes lbRow { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes lbGlow { from { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 18px rgba(255, 199, 90, 0.22), 0 6px 16px rgba(0, 0, 0, 0.3); } to { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 36px rgba(255, 199, 90, 0.5), 0 6px 16px rgba(0, 0, 0, 0.3); } }
@keyframes lbChase { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
/* the face-off card: bars grow in, the verdict pops */
.fo-row .fo-bar { animation: foBar 0.8s cubic-bezier(0.3, 0, 0.2, 1) both; transform-origin: 50% 50%; } .fo-row:nth-of-type(3) .fo-bar { animation-delay: 0.1s; } .fo-row:nth-of-type(4) .fo-bar { animation-delay: 0.2s; }
.fo-vs { animation: cdSlam 0.5s cubic-bezier(0.3, 1.8, 0.5, 1) 0.1s backwards; } .fo-verdict { animation: lbChase 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) 0.45s both; }
@keyframes foBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
body.reduced :is(.pc-rank, .pc-rank::after, .pc-t, .pc-bar b, .lb-pod, .lb-table tbody tr, .lb-chase, .fo-bar, .fo-vs, .fo-verdict) { animation: none !important; }
@media (prefers-reduced-motion: reduce) { :is(.pc-rank, .pc-rank::after, .pc-t, .pc-bar b, .lb-pod, .lb-table tbody tr, .lb-chase, .fo-bar, .fo-vs, .fo-verdict) { animation: none !important; } }

/* ---- Results play out: the score lands with a thump, the medal swings in, stat tiles pop one by one, the side panel
   (world art, goals, share) slides in, and Play again breathes so the next run is one tap away. */
#results:not([hidden]) .res-score { animation: resSlam 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) 0.05s backwards; }
#results:not([hidden]) #resMedal { animation: resSwing 0.9s cubic-bezier(0.3, 1.5, 0.5, 1) 0.25s backwards; transform-origin: 50% 0; }
#results:not([hidden]) #resStats > * { animation: resTile 0.45s cubic-bezier(0.3, 1.5, 0.5, 1) backwards; }
#results #resStats > :nth-child(1) { animation-delay: 0.35s; } #results #resStats > :nth-child(2) { animation-delay: 0.42s; } #results #resStats > :nth-child(3) { animation-delay: 0.49s; } #results #resStats > :nth-child(4) { animation-delay: 0.56s; }
#results #resStats > :nth-child(n+5) { animation-delay: 0.63s; }
#results:not([hidden]) .res-side { animation: resSide 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s backwards; }
#results:not([hidden]) #againBtn { animation: resBtn 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 0.8s backwards, resGlow 2.4s ease-in-out 1.6s infinite; } /* a glow, never a size change: the button stays still under a finger */
#results #resStats > * { transition: transform 0.15s, border-color 0.15s; } #results #resStats > *:hover { transform: translateY(-3px); }
@keyframes resSlam { 0% { opacity: 0; transform: scale(1.9); } 60% { opacity: 1; transform: scale(0.94); } 100% { transform: none; } }
@keyframes resSwing { 0% { opacity: 0; transform: rotate(-35deg) translateY(-20px); } 55% { opacity: 1; transform: rotate(12deg); } 80% { transform: rotate(-5deg); } 100% { transform: none; } }
@keyframes resTile { from { opacity: 0; transform: translateY(16px) scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes resSide { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes resBtn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes resGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 199, 90, 0); } 50% { box-shadow: 0 0 0 6px rgba(255, 199, 90, 0.18), 0 0 26px rgba(255, 199, 90, 0.45); } }
body.reduced #results *, body.reduced #results { animation: none !important; } @media (prefers-reduced-motion: reduce) { #results * { animation: none !important; } }

/* Every menu's contents flow in a beat after its panel, row by row (results, title and How to play have their own). */
:is(#modes, #shop, #style, #collection, #records, #settings, #profile, #friends, #mphub, #ranked, #gauntlet, #rift, #bossPractice, #lobby, #leaderboard, #plobby, #pjoin):not([hidden]) > .panel > * { animation: rowIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
:is(#modes, #shop, #style, #collection, #records, #settings, #profile, #friends, #mphub, #ranked, #gauntlet, #rift, #bossPractice, #lobby, #leaderboard, #plobby, #pjoin) > .panel > :nth-child(2) { animation-delay: 0.06s; }
:is(#modes, #shop, #style, #collection, #records, #settings, #profile, #friends, #mphub, #ranked, #gauntlet, #rift, #bossPractice, #lobby, #leaderboard, #plobby, #pjoin) > .panel > :nth-child(3) { animation-delay: 0.11s; }
:is(#modes, #shop, #style, #collection, #records, #settings, #profile, #friends, #mphub, #ranked, #gauntlet, #rift, #bossPractice, #lobby, #leaderboard, #plobby, #pjoin) > .panel > :nth-child(4) { animation-delay: 0.16s; }
:is(#modes, #shop, #style, #collection, #records, #settings, #profile, #friends, #mphub, #ranked, #gauntlet, #rift, #bossPractice, #lobby, #leaderboard, #plobby, #pjoin) > .panel > :nth-child(5) { animation-delay: 0.21s; }
:is(#modes, #shop, #style, #collection, #records, #settings, #profile, #friends, #mphub, #ranked, #gauntlet, #rift, #bossPractice, #lobby, #leaderboard, #plobby, #pjoin) > .panel > :nth-child(n+6) { animation-delay: 0.26s; }
@keyframes rowIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
body.reduced .screen > .panel > * { animation: none !important; } @media (prefers-reduced-motion: reduce) { .screen > .panel > * { animation: none !important; } }
/* menu cards everywhere lift a little under the pointer */
@media (hover: hover) { :is(.mode-card, .sh-card, .sty, .col-card, .rec-ach li, .pf-t):not(:disabled):hover { transform: translateY(-3px); transition: transform 0.18s cubic-bezier(0.3, 1.6, 0.5, 1); } }

/* Today's picks is a showcase: items show in full colour (the lock and price still say what's needed), bigger, floating */
#shopFeat .sty.locked :is(.cos-ico, .sw, .badge-img) { filter: drop-shadow(0 0 10px rgba(255, 210, 120, 0.35)) !important; }
#shopFeat .sty.locked .nm { opacity: 1; }
#shopFeat .sty :is(.cos-ico, .sw, .badge-img, .cos-cv) { transform: scale(1.3); animation: pickFloat 3.2s ease-in-out infinite; }
#shopFeat .sty:nth-child(2) :is(.cos-ico, .sw, .badge-img, .cos-cv) { animation-delay: -0.8s; } #shopFeat .sty:nth-child(3) :is(.cos-ico, .sw, .badge-img, .cos-cv) { animation-delay: -1.6s; } #shopFeat .sty:nth-child(4) :is(.cos-ico, .sw, .badge-img, .cos-cv) { animation-delay: -2.4s; }
#shopFeat .sty { background: radial-gradient(80% 60% at 50% 35%, rgba(255, 200, 110, 0.14), transparent 70%), rgba(20, 14, 40, 0.6); }
@keyframes pickFloat { 0%, 100% { transform: scale(1.3) translateY(0); } 50% { transform: scale(1.3) translateY(-4px); } }
body.reduced #shopFeat .sty * { animation: none !important; } @media (prefers-reduced-motion: reduce) { #shopFeat .sty * { animation: none !important; } }

/* ---- First launch: your player card. A Spark badge with your initial (it pops with each letter), a gold nameplate,
   the name field with a Surprise-me dice, all in the game's warm-gold-on-night look. */
.wl-me { display: flex; align-items: center; gap: 14px; justify-content: center; margin: 2px auto 4px; padding: 10px 18px 10px 10px; border-radius: 999px; width: fit-content; max-width: 100%;
  background: radial-gradient(120% 140% at 0% 50%, rgba(255, 199, 90, 0.18), transparent 60%), rgba(18, 13, 40, 0.75); border: 1.5px solid rgba(255, 216, 110, 0.45); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.wl-av { flex: none; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50% 50% 50% 14%; rotate: -45deg;
  background: radial-gradient(circle at 60% 40%, #fffbe8 0 18%, #ffe39a 40%, #ffb347 70%, #e0741e); box-shadow: 0 0 0 3px rgba(60, 24, 0, 0.5), 0 0 24px rgba(255, 170, 60, 0.7); animation: wlBob 2.8s ease-in-out infinite; }
.wl-av b { rotate: 45deg; font: 400 26px/1 'Lilita One', sans-serif; color: #3a1a00; }
.wl-av.wa-a { animation: wlPopA 0.35s cubic-bezier(0.3, 1.8, 0.5, 1), wlBob 2.8s ease-in-out 0.35s infinite; } .wl-av.wa-b { animation: wlPopB 0.35s cubic-bezier(0.3, 1.8, 0.5, 1), wlBob 2.8s ease-in-out 0.35s infinite; }
.wl-plate { display: grid; text-align: left; min-width: 0; }
.wl-plate small { font: 800 11px Nunito, sans-serif; color: #c9b88a; }
.wl-plate b { font: 400 24px/1.1 'Lilita One', Nunito, sans-serif; color: #ffd86e; text-shadow: 0 2px 0 #5a2a00; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 15ch; }
.wl-plate b.empty { color: rgba(255, 216, 110, 0.45); text-shadow: none; }
.wl-row { display: flex; gap: 8px; align-items: stretch; }
.wl-row .wl-input { flex: 1; min-width: 0; }
.wl-dice { flex: none; width: 54px; border-radius: var(--r-m); border: 1.5px solid rgba(255, 216, 110, 0.5); background: linear-gradient(180deg, #3a2f72, #241c4c); color: #ffd86e; cursor: pointer; display: grid; place-items: center; }
.wl-dice svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; } .wl-dice svg circle { fill: currentColor; stroke: none; }
.wl-dice:hover, .wl-dice:focus-visible { background: linear-gradient(180deg, #4a3c8c, #2e2460); outline: none; box-shadow: 0 0 0 3px rgba(255, 199, 90, 0.25); }
.wl-dice.wd-a svg { animation: wlRollA 0.5s cubic-bezier(0.3, 1.5, 0.5, 1); } .wl-dice.wd-b svg { animation: wlRollB 0.5s cubic-bezier(0.3, 1.5, 0.5, 1); }
.wl-input { background: linear-gradient(180deg, rgba(9, 7, 22, 0.85), rgba(20, 14, 44, 0.85)); border-color: rgba(255, 216, 110, 0.35); }
@keyframes wlBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
@keyframes wlPopA { 0% { scale: 1; } 40% { scale: 1.18; } 100% { scale: 1; } } @keyframes wlPopB { 0% { scale: 1; } 40% { scale: 1.18; } 100% { scale: 1; } }
@keyframes wlRollA { from { transform: rotate(0) scale(1); } 50% { transform: rotate(200deg) scale(1.25); } to { transform: rotate(360deg) scale(1); } }
@keyframes wlRollB { from { transform: rotate(0) scale(1); } 50% { transform: rotate(200deg) scale(1.25); } to { transform: rotate(360deg) scale(1); } }
@media (max-height: 560px) { .wl-me { padding: 6px 14px 6px 6px; margin: 0 auto; } .wl-av { width: 40px; height: 40px; } .wl-av b { font-size: 18px; } .wl-plate b { font-size: 18px; } .wl-plate small { display: none; } }
body.reduced .wl-av, body.reduced .wl-dice svg { animation: none !important; } @media (prefers-reduced-motion: reduce) { .wl-av, .wl-dice svg { animation: none !important; } }

/* Ranked, before your first match: the climb ahead, Bronze to Champion, rising one by one */
.rk-ladder { display: flex; align-items: flex-end; justify-content: center; gap: 2px; margin: 12px 0 2px; }
.rk-ladder > i { flex: 0 1 12px; height: 2px; margin-bottom: 18px; background: linear-gradient(90deg, rgba(255, 216, 110, 0.15), rgba(255, 216, 110, 0.5)); }
.rk-step { flex: none; display: grid; place-items: center; width: calc(26px + var(--i) * 3px); animation: rkStep 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) calc(0.1s + var(--i) * 0.07s) backwards; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.4)); }
.rk-step :is(svg, img) { width: 100%; height: auto; }
.rk-step:last-child { animation: rkStep 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 0.7s backwards, rkTop 2.4s ease-in-out 1.3s infinite alternate; }
@keyframes rkStep { from { opacity: 0; transform: translateY(14px) scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes rkTop { from { filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.4)); } to { filter: drop-shadow(0 0 10px rgba(255, 200, 90, 0.8)); } }
body.reduced .rk-step { animation: none !important; } @media (prefers-reduced-motion: reduce) { .rk-step { animation: none !important; } }
#rkCard:has(.rk-ladder) { flex-direction: column; align-items: stretch; }
.rk-ladder { width: 100%; } .rk-step { flex: 0 1 calc(26px + var(--i) * 3px); min-width: 0; width: auto; } .rk-ladder > i { flex: 0 1 10px; min-width: 2px; }
.dv-watch { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.dv-game { border-radius: 12px; overflow: hidden; background: #0f1830; border: 1px solid #22365e; }
.dv-game canvas { display: block; width: 100%; height: auto; }
.dv-game p { margin: 0; padding: 8px 10px; font-size: 12.5px; line-height: 1.4; } .dv-game p b { color: #ffd86e; } .dv-game p span { color: #8aa0c8; font-size: 11px; }

/* Today's picks centre their contents: the "how far off" bar takes the card's full width instead of collapsing to nothing */
#shopFeat .sty .sty-prog { align-self: stretch; width: 100%; box-sizing: border-box; padding: 0 4px; }
/* Today's picks mix kinds (a 56px badge beside 75px previews): centre each picture in the free space so every name and price sits on one line */
#shopFeat .sty > :is(.cos-ico, .sw, .badge-img, .cos-cv, .bgthumb) { margin-block: auto; }
