/* Shared with the game. Rank art stays visible behind outlined text. */
.pill[data-pill-style], .pass[data-pass-background] {
  --cosmetic-accent: #ff6a13;
  --cosmetic-art: none;
  --cosmetic-base: #120d2e;
}
.pill[data-pill-style="pill-bunny-slope"], .pass[data-pass-background="pass-bunny-slope"] { --cosmetic-base: #120d2e; }
.pill[data-pill-style="pill-grommet"], .pass[data-pass-background="pass-grommet"] {
  --cosmetic-accent: #b7eaff;
  --cosmetic-art: radial-gradient(ellipse at 80% 120%, #b7eaff 0 24%, transparent 24.5%), radial-gradient(circle at 20% 20%, #f4f8ff 0 1px, transparent 2px);
  --cosmetic-base: #16375b;
}
.pill[data-pill-style="pill-park-rat"], .pass[data-pass-background="pass-park-rat"] {
  --cosmetic-accent: #22d3ff;
  --cosmetic-art: linear-gradient(125deg, transparent 52%, #22d3ff 52% 54%, transparent 54% 61%, #ff6a13 61% 65%, transparent 65%), linear-gradient(25deg, #3a1f8f, #120d2e);
}
.pill[data-pill-style="pill-shredder"], .pass[data-pass-background="pass-shredder"] {
  --cosmetic-accent: #ff944d;
  --cosmetic-art: linear-gradient(145deg, transparent 30%, #ff6a13 30% 42%, transparent 42% 48%, #ff944d 48% 52%, transparent 52% 70%, #3a1f8f 70%);
}
.pill[data-pill-style="pill-powder-hound"], .pass[data-pass-background="pass-powder-hound"] {
  --cosmetic-accent: #b5f6ff;
  --cosmetic-art: radial-gradient(ellipse at 0 100%, #f4f8ff 0 28%, transparent 28.5%), radial-gradient(ellipse at 100% 110%, #9de9ff 0 38%, transparent 38.5%), linear-gradient(150deg, #154269, #306e8e);
}
.pill[data-pill-style="pill-rail-slayer"], .pass[data-pass-background="pass-rail-slayer"] {
  --cosmetic-accent: #c6ff1a;
  --cosmetic-art: linear-gradient(135deg, transparent 30%, #c6ff1a 30% 32%, transparent 32% 38%, #22d3ff 38% 39%, transparent 39%), linear-gradient(45deg, transparent 60%, #5742a3 60% 76%, transparent 76%);
}
.pill[data-pill-style="pill-big-air"], .pass[data-pass-background="pass-big-air"] {
  --cosmetic-accent: #ffbe88;
  --cosmetic-art: radial-gradient(circle at 80% 30%, #fff0b2 0 13%, #ff944d 13.5% 18%, transparent 18.5%), linear-gradient(165deg, #2e3198, #22a8d6 52%, #f6b5ac);
}
.pill[data-pill-style="pill-summit"], .pass[data-pass-background="pass-summit"] {
  --cosmetic-accent: #ffd166;
  --cosmetic-art: conic-gradient(from 140deg at 72% 5%, #120d2e, #80602a 28deg, #ffd166 30deg 35deg, #120d2e 37deg 70deg, #b3924c 72deg 75deg, #120d2e 78deg);
}
.pill[data-pill-style="pill-avalanche"], .pass[data-pass-background="pass-avalanche"] {
  --cosmetic-accent: #b2f6ff;
  --cosmetic-art: conic-gradient(from 205deg at 70% 35%, #102e54, #e0f8ff 20deg 55deg, #3c8aa3 55deg 85deg, #120d2e 85deg 135deg, #22d3ff 135deg 160deg, #203579 160deg 235deg, #b2f6ff 235deg 260deg, #102e54 260deg);
}
.pill[data-pill-style="pill-uber-legend"], .pass[data-pass-background="pass-uber-legend"] {
  --cosmetic-accent: #ffd166;
  --cosmetic-art: radial-gradient(ellipse at 100% 0, #ffd166 0 8%, transparent 40%), conic-gradient(from 35deg at 65% 60%, #3a1f8f, #22d3ff, #120d2e, #ff6a13, #ffd166, #3a1f8f);
}

/* Small metric surfaces stay separate from the transparent text column. */
.pills:has(> .pill[data-pill-style]) { opacity: 1; }
.pill[data-pill-style] {
  isolation: isolate;
  background: var(--cosmetic-art), var(--cosmetic-base);
  box-shadow: 2px 2px 0 var(--cosmetic-accent);
  color: #f4f8ff;
}
.pill[data-pill-style][data-slot="2"] { box-shadow: 2px 2px 0 #22d3ff; }
.pill[data-pill-style] .pill-text {
  align-self: stretch; align-content: center; padding: 3px 5px;
  border-radius: var(--pill-panel-radius, 6px);
  background: none; box-shadow: none;
}
.pill[data-pill-style] .pill-meta, .pill[data-pill-style] .pill-dev { color: #c4bde8; }
.pill[data-pill-style] .pill-metrics, .pill[data-pill-style] > .pill-score { background: rgb(8 6 26 / 78%); border-radius: var(--pill-panel-radius, 6px); color: #f4f8ff; padding: 2px 0; }
.pill[data-pill-style] .pill-letter { color: #c4bde8; background: #271c5e; }
.pill[data-pill-style] .pill-letter-lit { color: #120d2e; background: #ff944d; }
/* Preserve boost states while keeping even unearned letters readable. */
.pill[data-pill-style].pill-tricky-active .pill-letter:not(.pill-letter-lit) { color: #c6ff1a; }
.pill[data-pill-style].pill-tricky-full .pill-letter-lit { background: linear-gradient(180deg, #ffd166, #ff6a13); color: #120d2e; }
.pill[data-pill-style] .pill-place { color: #f4f8ff; background: #271c5e; }
.pill[data-pill-style] .pill-place small { color: #c4bde8; }
.pill[data-pill-style] .pill-place-first { color: #120d2e; background: #c6ff1a; }
.pill[data-pill-style] .pill-place-first small { color: #2b3a00; }
.pill[data-pill-style] .pill-face { color: #120d2e; }
.pill[data-pill-style="pill-uber-legend"]::after,
.pass[data-pass-background="pass-uber-legend"]::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 30%; z-index: -1; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, #ffffff80 48%, transparent 65%);
  opacity: 0; animation: cosmetic-sheen 7s ease-in-out infinite;
}
@keyframes cosmetic-sheen { 0%, 60% { transform: translateX(0); opacity: 0; } 70% { opacity: 1; } 100% { transform: translateX(230%); opacity: 0; } }

/* Keep the original snow face for the always-unlocked Bunny Slope pass. */
.pass[data-pass-background]:not([data-pass-background="pass-bunny-slope"]) {
  isolation: isolate; background: var(--cosmetic-art), var(--cosmetic-base);
}
.pass[data-pass-background]:not([data-pass-background="pass-bunny-slope"]) .pass-id {
  background: #f4f8ff; color: #120d2e; padding: 10px; border-radius: 8px;
}
.pass[data-pass-background]:not([data-pass-background="pass-bunny-slope"]) .pass-foot { background: #f4f8ff; margin-top: 14px; }
.pass .pass-stats { background: #120d2e; color: #f4f8ff; }
.pass .pass-stats dt { color: #c4bde8; }
.pass .pass-band { background: #ff6a13; color: #120d2e; padding-left: 68px; min-height: 56px; }
/* A box shadow stays outside the card; drop-shadow would fill part of the hole. */
.pass-wrap { filter: none; border-radius: 18px; box-shadow: 10px 10px 0 var(--orange); }
/* The offset border follows the wrapper, so the wrapper must hug the 380 px pass. */
.pass-demo { width: min(380px, 100%); }
/* The existing 13px mask is a real cut-out. The rim sits outside that hole. */
.pass::before {
  content: ""; position: absolute; left: 16px; top: 12px; width: 32px; height: 32px;
  border: 3px solid #f4f8ff; border-radius: 50%; box-shadow: 0 0 0 1px #120d2e, inset 0 0 0 1px #120d2e;
  pointer-events: none; z-index: 2;
}
.pass-lines dd { min-width: 0; overflow-wrap: anywhere; }
.account { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
.account .pass-wrap { width: 100%; min-width: 0; }

/* The site owns preview geometry; the game keeps its own pill layout. */
.style-section { padding: 56px var(--margin) 0; }
.style-section > p { margin-top: 12px; max-width: 65ch; color: var(--muted); }
.style-section a { text-underline-offset: 3px; }
.style-section fieldset { min-width: 0; border: 0; padding: 0; margin: 28px 0 0; }
.style-section legend { font: italic 900 1.5rem/1.2 "Exo 2", sans-serif; padding: 0; }
.style-section fieldset > p { margin: 8px 0 18px; color: var(--muted); }
.style-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.style-option { position: relative; min-width: 0; display: grid; grid-template-rows: 1fr auto; border: 2px solid #63588d; border-radius: 12px; background: #120d2e; cursor: pointer; overflow: hidden; }
.style-option:has(input:checked) { border-color: var(--cyan); }
.style-option:has(input:focus-visible) { outline: 3px solid var(--lime); outline-offset: 3px; }
.style-option:has(input:disabled) { cursor: default; }
.style-option input { position: absolute; bottom: 24px; left: 14px; width: 18px; height: 18px; margin: 0; accent-color: #22d3ff; }
.style-preview { min-width: 0; padding: 26px 12px; display: grid; place-items: center; background: #1c1447; overflow: hidden; }
.style-option[data-locked="true"] .style-preview > * { filter: grayscale(1) blur(2px); opacity: 0.5; }
.style-caption { padding: 12px 14px 14px 42px; display: grid; gap: 4px; }
.style-name { font-style: italic; font-size: 1.125rem; }
.style-state { color: #c4bde8; font-size: 0.875rem; }
.style-option:has(input:checked) .style-state { color: #22d3ff; }
.style-lock { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; margin-right: 5px; fill: none; stroke: currentColor; stroke-width: 2; }
.style-preview .pass { width: 100%; max-width: 380px; }
.style-preview .pass-band b { font-size: 1.25rem; }
.style-preview .pass-band span { font-size: 1rem; }
.style-preview .pass-body { grid-template-columns: 60px minmax(0, 1fr); gap: 10px; padding: 12px; }
.style-preview .pass-photo { width: 60px; }
.style-preview .pass-id { min-width: 0; }
.style-preview .pass-id .mark { width: 115px; }
.style-preview .pass-lines { font-size: 0.75rem; }
.style-preview .pass-stats { margin: 0 12px; padding: 10px; }
.style-preview .pass-stats dd { font-size: 1rem; }
.style-preview .pass-foot { padding: 10px 12px; }
.style-preview .pass-url { font-size: 0.6875rem; }
.style-preview .barcode { height: 24px; gap: 1px; }
.style-preview .pill { --pill-text: minmax(0, 1fr); position: relative; display: grid; grid-auto-flow: column; grid-template-columns: 2em var(--pill-text); align-items: center; gap: 5px; padding: 6px; border-radius: 12px; --pill-panel-radius: 6px; width: 100%; max-width: 380px; font: 700 12px/1.15 "Exo 2", sans-serif; }
.style-preview .pill-face { display: grid; place-items: center; width: 2em; height: 2.4em; border-radius: 5px; background: #c6ff1a; overflow: hidden; }
.style-preview .pill-face img { width: 100%; height: 100%; object-fit: cover; }
.style-preview .pill-text { display: grid; min-width: 0; }
.style-preview .pill-line { display: flex; min-width: 0; }
.style-preview .pill-name, .style-preview .pill-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.style-preview .pill-name { font-style: italic; }
.style-preview .pill-meta { font-size: 0.85em; font-weight: 600; }
.style-preview .pill-place { display: grid; place-items: center; width: 3.8em; height: 3.5em; border: 2px solid #ff6a13; border-radius: 6px; font-style: italic; white-space: nowrap; }
.style-preview .pill-place strong { font-size: 1.7em; }
.style-preview .pill-place sup { font-size: 0.75em; }
.style-preview .pill-place small { font-size: 0.8em; }
.style-preview .pill-metrics { display: grid; gap: 0.35em; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.style-preview .pill-speed { font-size: 0.9em; }
.style-preview .pill-gauge { display: flex; align-items: center; gap: 4px; margin-top: 3px; }
.style-preview .pill-gauge-bar { flex: 1; height: 7px; position: relative; background: #08061a; transform: skewX(-12deg); overflow: hidden; }
.style-preview .pill-gauge-fill { position: absolute; inset: 0 35% 0 0; background: #22d3ff; }
.style-preview .pill-letters { display: flex; gap: 1px; }
.style-preview .pill-letter { padding: 1px; border-radius: 2px; font-size: 0.8em; }
.style-status { min-height: 1.5em; margin-top: 12px; color: #c6ff1a; }
@media (max-width: 860px) { .account { grid-template-columns: 1fr; } .account .pass-wrap { width: min(380px, 100%); } }
@media (max-width: 560px) {
  .account .pass-wrap { rotate: 0deg; }
  .account .pass-wrap:hover { rotate: 0deg; translate: none; }
  .account .pass-band b { font-size: 1.25rem; }
  .account .pass-body { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .account .pass-photo { width: 72px; }
  .account .pass-id { min-width: 0; }
  .account .pass-stats { margin: 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .pill[data-pill-style]::after, .pass[data-pass-background]::after { animation: none; transform: none; opacity: 0.2; }
}

/* Achievement layers: IDs match the server and engine allowlists. */
.pill[data-pill-frame="ion-trail"] { outline: 3px solid #22d3ff; outline-offset: 1px; box-shadow: 5px 5px 0 #13455e, -4px -4px 0 #6b40bd; }
.pill[data-pill-frame="ion-trail"]::before { content: ""; position: absolute; inset: -4px; border: 2px solid #ffffff; border-radius: inherit; clip-path: polygon(0 0, 32% 0, 0 60%); pointer-events: none; opacity: .7; }
.pill[data-pill-frame="1000-club"] { outline: 3px solid #ff6a13; outline-offset: 1px; box-shadow: 5px 5px 0 #77341b; }
.pill[data-pill-frame="1000-club"]::before { content: "1K"; position: absolute; right: 12px; top: -12px; color: #120d2e; background: #ff6a13; padding: 1px 6px; font-size: 10px; font-weight: 900; border-radius: 2px; pointer-events: none; }
[data-name-effect="afterburn"] .pill-name,
[data-name-effect="afterburn"] [data-handle],
[data-name-effect="afterburn"] [data-username] { color: #f4f8ff; background: #120d2e; text-shadow: 2px 2px 0 #8e3213; text-decoration: underline; text-decoration-color: #ff944d; text-underline-offset: 4px; }
[data-avatar-ring="night-circuit"] .pill-face,
[data-avatar-ring="night-circuit"] .pass-photo,
[data-avatar-ring="night-circuit"] [data-rider-subtitle] img { outline: 2px solid #22d3ff; outline-offset: 3px; box-shadow: 0 0 0 5px #3c286a, 3px 3px 0 6px #ff6a13; }
.pass[data-pass-foil] { isolation: isolate; }
.pass[data-pass-foil]::after { content: ""; position: absolute; inset: 56px 0 0; width: auto; z-index: -1; pointer-events: none; opacity: .48; animation: none; transform: none; }
.pass[data-pass-foil="circuit-chrome"]::after { background: conic-gradient(from 35deg at 0 100%, #3a1f8f, #22d3ff, #8e65b4, #1c1447, #db9f62, #3a1f8f); }
.pass[data-pass-foil="black-diamond"]::after { background: conic-gradient(from 10deg, #08061a, #303052, #16404f, #08061a, #706588, #08061a); opacity: .75; }
.pass[data-pass-background][data-pass-foil] .pass-id { background: #100c29; color: #f4f8ff; border-radius: 8px; padding: 10px; }
.pass[data-pass-foil] .pass-id .leader { border-color: #c4bde880; }
.pass[data-pass-background][data-pass-foil] .pass-foot { background: #f4f8ff; color: #120d2e; }
.reward-title { display: block; width: fit-content; max-width: 100%; color: #ffae60; background: #08061a; border: 1px solid #ff6a13; padding: 4px 8px; margin-top: 5px; font: italic 900 11px/1.2 "Exo 2", sans-serif; overflow-wrap: anywhere; }
[data-title-badge="chapter-six"] .reward-title { color: #22d3ff; border-color: #22d3ff; box-shadow: 3px 3px 0 #20516e; }
.reward-preview { min-height: 170px; }
.reward-option[data-locked="true"] .reward-preview > * { filter: none; opacity: 1; }
.reward-rarity { color: #22d3ff; font-size: .8125rem; }
.reward-none { color: #c4bde8; }
.reward-preview .reward-pill { grid-template-columns: 2em minmax(0, 1fr); grid-auto-flow: initial; gap: 10px; padding: 12px; border-radius: 18px; --pill-panel-radius: 6px; }
.reward-pill small { color: #c4bde8; margin-top: 6px; }
.reward-pill .pill-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reward-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
/* Achievement materials stay static. Staff motion rules follow below. */
@media (prefers-reduced-motion: reduce) {
  .pill[data-pill-frame]::before, .pass[data-pass-foil]::after { animation: none; transition: none; }
}
.reward-preview .pass-band { flex-wrap: wrap; gap: 8px; }
.reward-preview .pass-band b, .reward-preview .pass-band span { min-width: 0; overflow-wrap: anywhere; }

/* The public profile keeps its established chrome heading. */
[data-name-effect="afterburn"] [data-rider-title] { text-decoration: underline; text-decoration-color: #ff944d; text-underline-offset: 6px; }
.reward-requirement { color: #c4bde8; font-size: .875rem; }
/* Staff role palettes and base patterns. Holographic layers follow below. */
[data-pill-frame="staff-owner-pill-frame"], [data-pass-foil="staff-owner-pass-foil"],
[data-name-effect="staff-owner-name-effect"], [data-avatar-ring="staff-owner-avatar-ring"],
[data-title-badge="staff-owner-title-badge"] { --staff-metal: #ffe0b5; --staff-accent: #ff944d; --staff-dark: #59311d; }
[data-pill-frame="staff-dev-pill-frame"], [data-pass-foil="staff-dev-pass-foil"],
[data-name-effect="staff-dev-name-effect"], [data-avatar-ring="staff-dev-avatar-ring"],
[data-title-badge="staff-dev-title-badge"] { --staff-metal: #c7faff; --staff-accent: #22d3ff; --staff-dark: #164650; }
.pill[data-pill-style="pill-staff-owner"], .pass[data-pass-background="pass-staff-owner"] {
  --cosmetic-accent: #ff944d;
  --cosmetic-base: #110d20;
  --cosmetic-art: linear-gradient(145deg, transparent 35%, #ffe0b5 35% 35.5%, #ff6a13 35.5% 38%, transparent 38% 65%, #ffe0b5 65% 65.5%, transparent 65.5%), repeating-linear-gradient(135deg, #ffffff05 0 1px, transparent 1px 8px), radial-gradient(ellipse at 100% 0, #75462f, transparent 65%);
}
.pill[data-pill-style="pill-staff-dev"], .pass[data-pass-background="pass-staff-dev"] {
  --cosmetic-accent: #22d3ff;
  --cosmetic-base: #0a1427;
  --cosmetic-art: linear-gradient(145deg, transparent 35%, #c7faff 35% 35.5%, #22d3ff 35.5% 38%, transparent 38% 65%, #c6ff1a 65% 65.5%, transparent 65.5%), repeating-linear-gradient(0deg, #22d3ff0a 0 1px, transparent 1px 7px), radial-gradient(ellipse at 100% 0, #184c60, transparent 65%);
}
.pill[data-pill-frame^="staff-"] {
  outline: 1px solid var(--staff-metal); outline-offset: 2px;
  box-shadow: 4px 4px 0 var(--staff-dark), 0 0 0 1px #08061a;
}
.pill[data-pill-frame^="staff-"]::before {
  content: ""; position: absolute; inset: 3px; border-radius: inherit;
  border-top: 2px solid var(--staff-metal); clip-path: polygon(0 0, 26% 0, 20% 20%, 0 20%);
  pointer-events: none;
}
[data-name-effect^="staff-"] :is(.pill-name, [data-handle], [data-username], [data-rider-title]) {
  color: var(--staff-metal); text-shadow: 1px 1px 0 #08061a;
  text-decoration: underline double var(--staff-accent); text-underline-offset: 4px;
}
[data-avatar-ring^="staff-"] > img,
[data-avatar-ring^="staff-"] :is(.pill-face, .pass-photo, [data-rider-subtitle] img) {
  outline: 2px solid var(--staff-metal); outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--staff-dark), 3px 3px 0 5px var(--staff-accent);
}
[data-title-badge^="staff-"] :is(.reward-title, .pill-title) {
  color: #100d20; background: linear-gradient(115deg, var(--staff-metal), #f4f8ff 45%, var(--staff-accent));
  border: 1px solid var(--staff-metal); border-radius: 3px;
  box-shadow: 2px 2px 0 var(--staff-dark); letter-spacing: .12em; text-transform: uppercase;
  font-weight: 900;
}
.pass[data-pass-foil^="staff-"] { border: 1px solid var(--staff-metal); }
.pass[data-pass-foil^="staff-"]::after {
  inset: 56px -100% 0; width: auto; opacity: .65;
  background: linear-gradient(115deg, transparent 25%, #ffffff08 35%, var(--staff-accent) 42%, var(--staff-metal) 44%, #ffffff10 47%, transparent 58%);
  animation: staff-pass-sheen 12s ease-in-out infinite;
}
.pass[data-pass-foil^="staff-"] .pass-band {
  background: #100d20; color: var(--staff-metal); border-bottom: 2px solid var(--staff-accent);
}
.pass[data-pass-foil^="staff-"] .pass-id { border: 1px solid var(--staff-dark); }
.pass[data-pass-foil^="staff-"] .pass-stats { border: 1px solid var(--staff-dark); }
.pass[data-pass-foil^="staff-"] .pass-foot { border-top: 2px solid var(--staff-accent); }
@keyframes staff-pass-sheen { 0%, 30% { transform: translateX(-25%); } 70%, 100% { transform: translateX(25%); } }
.rider[data-title-badge^="staff-"] .reward-title { display: inline-block; margin: 4px 0 4px 8px; font-size: 8px; vertical-align: middle; }
.rider[data-avatar-ring^="staff-"] > img { margin: 6px 8px 6px 4px; }
@media (prefers-reduced-motion: reduce) {
  .pass[data-pass-foil^="staff-"]::after { animation: none; transform: none; }
}
/* Staff signatures need a dark chip surface for readable metal text. */
.mini-pass[data-name-effect^="staff-"] { background: #100d20; color: #f4f8ff; border: 1px solid var(--staff-metal); }
.mini-pass[data-title-badge^="staff-"] .reward-title { grid-column: 2; }

/* Lewis requested full holographic materials, including gradient signatures. */
@property --staff-holo-angle { syntax: '<angle>'; inherits: true; initial-value: 125deg; }
[data-pill-frame^="staff-"], [data-pass-foil^="staff-"], [data-name-effect^="staff-"],
[data-avatar-ring^="staff-"], [data-title-badge^="staff-"] {
  --holo-colors: #ffb3ed, #bcb5ff, #8ff5ff, #ceff9a, #fff3aa, #ffc08f, #ffb3ed;
  --holo-glow: #ff9bd66b;
}
[data-pill-frame="staff-dev-pill-frame"], [data-pass-foil="staff-dev-pass-foil"],
[data-name-effect="staff-dev-name-effect"], [data-avatar-ring="staff-dev-avatar-ring"],
[data-title-badge="staff-dev-title-badge"] {
  --holo-colors: #93faff, #b3c8ff, #d7b8ff, #a4ffdf, #dcff92, #93faff;
  --holo-glow: #43e8ff70;
}
.pass[data-pass-foil^="staff-"] {
  --staff-holo-angle: 125deg;
  background: #16122e;
  box-shadow: 0 0 22px var(--holo-glow);
  animation: staff-holo-angle 9s linear infinite;
  transform: perspective(1000px) rotateX(var(--holo-tilt-x, 0deg)) rotateY(var(--holo-tilt-y, 0deg));
  transition: transform 160ms ease-out;
}
/* Tilt the offset shadow with its pass. Unwrapped gallery passes tilt themselves. */
.pass-wrap:has(> .pass[data-pass-foil^="staff-"]) {
  transform: perspective(1000px) rotateX(var(--holo-tilt-x, 0deg)) rotateY(var(--holo-tilt-y, 0deg));
  transition: rotate 300ms var(--ease-out), translate 300ms var(--ease-out), transform 160ms ease-out;
}
.pass-wrap > .pass[data-pass-foil^="staff-"] { transform: none; }
.pass[data-pass-foil^="staff-"]::after {
  inset: 0; width: auto; opacity: 1; z-index: -2;
  background:
    repeating-linear-gradient(118deg, #ffffff00 0 3px, #ffffff40 3px 4px, #08061a18 4px 5px),
    radial-gradient(circle, #fff 0 .65px, #fff0 1.3px) 3px 7px / 23px 29px,
    radial-gradient(circle, #fff9 0 .6px, #fff0 1.4px) 13px 19px / 41px 37px,
    conic-gradient(from calc(var(--staff-holo-angle) + var(--holo-pointer-angle, 0deg)) at 48% 42%, var(--holo-colors));
  animation: none; transform: none;
}
.staff-holo-sweep { display: none; }
.pass[data-pass-foil^="staff-"] > .staff-holo-sweep {
  display: block; position: absolute; inset: -30% -100%; z-index: -1; pointer-events: none;
  background: linear-gradient(112deg, transparent 35%, #ffffff20 43%, #ffffffe6 48%, #ffffff20 53%, transparent 61%);
  animation: staff-holo-sweep 3.2s ease-in-out infinite;
}
.pass[data-pass-foil^="staff-"] :is(.pass-id, .pass-stats, .pass-band) { background: #100c29; }
.pass[data-pass-foil^="staff-"] .pass-band { border-bottom-color: #e5dfff; }
.pass[data-pass-foil^="staff-"] .pass-id { border-color: #c8bfff7a; }
.pass[data-pass-foil^="staff-"] .pass-stats { border-color: #c8bfff7a; }
.pass[data-pass-foil^="staff-"] .pass-foot { border-top-color: #e5dfff; }
[data-name-effect^="staff-"] :is(.pill-name, [data-handle], [data-username], [data-rider-title]) {
  color: #d9faff; background: linear-gradient(110deg, var(--holo-colors)); background-size: 240% 100%;
  background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0; text-shadow: none; text-decoration: none;
  animation: staff-holo-signature 4s ease-in-out infinite alternate;
}
[data-avatar-ring^="staff-"] :is(.pass-photo, .pill-face),
[data-avatar-ring^="staff-"] > img, [data-avatar-ring^="staff-"] [data-rider-subtitle] img {
  --staff-holo-angle: 125deg;
  border: 3px solid transparent; outline: 1px solid #f4f8ff9e; outline-offset: 1px;
  background: conic-gradient(from var(--staff-holo-angle), var(--holo-colors)) border-box;
  box-shadow: 0 0 13px var(--holo-glow), 0 0 0 1px #120d2e;
  animation: staff-holo-angle 4s linear infinite;
}
[data-title-badge^="staff-"] :is(.reward-title, .pill-title) {
  color: #100c29; border-color: #f4f8ff; text-shadow: none;
  padding: 0 3px; font-size: 8px; line-height: 1.2; letter-spacing: .06em;
  background: linear-gradient(115deg, var(--holo-colors)); background-size: 250% 100%;
  box-shadow: 0 0 10px var(--holo-glow), 2px 2px 0 #100c29;
  animation: staff-holo-signature 4s ease-in-out infinite alternate;
}
.pill[data-pill-frame^="staff-"] {
  isolation: isolate; outline: 1px solid #f4f8ff99; outline-offset: 2px;
  box-shadow: 0 0 13px var(--holo-glow), 3px 3px 0 #08061a;
}
.pill[data-pill-frame^="staff-"]::before { content: none; }
.pill-holo {
  position: absolute; inset: -2px; z-index: -1; border-radius: inherit; overflow: hidden; pointer-events: none;
  /* Paint only the rim. Never add another art panel behind the pill content. */
  padding: 3px;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.pill-holo::before {
  content: ''; position: absolute; width: 125%; aspect-ratio: 1; left: 50%; top: 50%;
  background: conic-gradient(var(--holo-colors));
  animation: staff-holo-border 4s linear infinite;
}
.pill-holo::after {
  content: none;
}
/* Staff materials preserve all normal pill boxes, including avatar image bounds. */
.pill[data-pill-style="pill-staff-owner"], .pill[data-pill-style="pill-staff-dev"] {
  --cosmetic-art: none; --cosmetic-base: #120d2e;
}
.pill[data-avatar-ring^="staff-"] .pill-face { position: relative; border: 0; outline: 0; box-shadow: none; }
.pill[data-avatar-ring^="staff-"] .pill-face::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  padding: 2px; background: conic-gradient(var(--holo-colors));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude; pointer-events: none;
}
/* A gameplay pill has one animated gradient. Its text, ring and badge stay still. */
.pills .pill[data-name-effect^="staff-"] .pill-name,
.pills .pill[data-avatar-ring^="staff-"] .pill-face,
.pills .pill[data-title-badge^="staff-"] .pill-title {
  animation: none; background-position: 50% 50%;
}
@keyframes staff-holo-angle { to { --staff-holo-angle: 485deg; } }
@keyframes staff-holo-signature { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes staff-holo-sweep {
  0%, 12% { transform: translateX(-30%); opacity: 0; }
  20% { opacity: .85; }
  65% { opacity: .85; }
  85%, 100% { transform: translateX(30%); opacity: 0; }
}
@keyframes staff-holo-border { from { transform: translate(-50%, -50%) rotate(0turn); } to { transform: translate(-50%, -50%) rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  .pass[data-pass-foil^="staff-"],
  [data-name-effect^="staff-"] :is(.pill-name, [data-handle], [data-username], [data-rider-title]),
  [data-avatar-ring^="staff-"] :is(.pass-photo, .pill-face), [data-avatar-ring^="staff-"] > img,
  [data-avatar-ring^="staff-"] [data-rider-subtitle] img,
  [data-title-badge^="staff-"] :is(.reward-title, .pill-title),
  .pass[data-pass-foil^="staff-"] > .staff-holo-sweep, .pill-holo::before {
    animation: none; transition: none; --staff-holo-angle: 125deg; background-position: 50% 50%;
  }
  .pass[data-pass-foil^="staff-"], .pass-wrap:has(> .pass[data-pass-foil^="staff-"]) { transform: none; transition: none; }
  .pass[data-pass-foil^="staff-"] > .staff-holo-sweep { transform: none; opacity: .25; }
  .pill-holo::before { transform: translate(-50%, -50%) rotate(.15turn); }
}

/* Permanent accessible rewards. The engine uses matching material families with separate geometry rules.
   Frames use outside paint only; names, metrics and avatar boxes keep their geometry. */
[data-pill-frame="fresh-line"] { --reward-rim: #22d3ff; --reward-tab: #f4f8ff; }
[data-pill-frame="link-rail"] { --reward-rim: #22d3ff; --reward-tab: #c6ff1a; }
[data-pill-frame="ten-track"] { --reward-rim: #c6ff1a; --reward-tab: #22d3ff; }
[data-pill-frame="four-corners"] { --reward-rim: #9675e6; --reward-tab: #22d3ff; }
[data-pill-frame="endurance"] { --reward-rim: #f4f8ff; --reward-tab: #ff6a13; }
.pill:is([data-pill-frame="fresh-line"], [data-pill-frame="link-rail"], [data-pill-frame="ten-track"], [data-pill-frame="four-corners"], [data-pill-frame="endurance"], [data-pill-frame="belline-frost"]) {
  outline: 2px solid var(--reward-rim); outline-offset: 1px; box-shadow: none;
}

.pill:is([data-pill-frame="fresh-line"], [data-pill-frame="link-rail"], [data-pill-frame="ten-track"], [data-pill-frame="belline-frost"])::before {
  content: ''; position: absolute; inset: -3px; padding: 2px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, var(--reward-tab) 0 24%, var(--reward-rim) 24% 70%, var(--reward-tab) 70% 84%, var(--reward-rim) 84%);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}
.pill[data-pill-frame="ten-track"] { outline: 1px solid #c6ff1a; outline-offset: 4px; }
.pill[data-pill-frame="four-corners"]::before {
  content: ''; position: absolute; border-radius: inherit; pointer-events: none;
  inset: -4px; border: 2px solid #22d3ff; background: none;
  mask: linear-gradient(#000 0 0) left top / 18px 8px no-repeat,
    linear-gradient(#000 0 0) right top / 18px 8px no-repeat,
    linear-gradient(#000 0 0) left bottom / 18px 8px no-repeat,
    linear-gradient(#000 0 0) right bottom / 18px 8px no-repeat;
}
.pill[data-pill-frame="endurance"] { outline: 3px double #f4f8ff; outline-offset: 2px; box-shadow: 0 4px 0 1px #ff6a13; }

[data-name-effect="snow-ink"] { --reward-ink: #f4f8ff; --reward-rule: #22d3ff; --reward-line: solid; }
[data-name-effect="uber-mark"] { --reward-ink: #f4f8ff; --reward-rule: #ff944d; --reward-line: solid; }
[data-name-effect="medal-line"] { --reward-ink: #f4f8ff; --reward-rule: #ffb784; --reward-line: double; }
[data-name-effect="spark-type"] { --reward-ink: #22d3ff; --reward-rule: #22d3ff; --reward-line: double; }
[data-name-effect="engine-type"] { --reward-ink: #f4f8ff; --reward-rule: #ff944d; --reward-line: solid; }
:is([data-name-effect="snow-ink"], [data-name-effect="uber-mark"], [data-name-effect="medal-line"], [data-name-effect="spark-type"], [data-name-effect="engine-type"], [data-name-effect="kahuna-glow"]) :is(.pill-name, [data-handle], [data-username], [data-rider-title]) {
  color: var(--reward-ink); text-decoration-line: underline; text-decoration-style: var(--reward-line);
  text-decoration-color: var(--reward-rule); text-decoration-thickness: 1px; text-underline-offset: 3px;
}
[data-name-effect="snow-ink"] :is(.pill-name, [data-handle], [data-username], [data-rider-title]) {
  background: linear-gradient(90deg, #22d3ff 0 72%, #c6ff1a 72%) left bottom / 100% 3px no-repeat, #132943;
  text-decoration: none; text-shadow: 1px 1px 0 #08061a;
}
[data-name-effect="uber-mark"] :is(.pill-name, [data-handle], [data-username], [data-rider-title]) {
  background: linear-gradient(90deg, #ff944d 0 68%, #22d3ff 68% 82%, #ff944d 82%) left bottom / 100% 3px no-repeat, #321a38;
  text-decoration: none; text-shadow: 1px 1px 0 #08061a;
}
[data-name-effect="medal-line"] :is(.pill-name, [data-handle], [data-username], [data-rider-title]) {
  background: linear-gradient(90deg, #ffb784 0 74%, #22d3ff 74%) left bottom / 100% 3px no-repeat, #30203e;
  text-decoration-color: #ffb784; text-shadow: 1px 1px 0 #08061a;
}
[data-name-effect="spark-type"] :is(.pill-name, [data-handle], [data-username], [data-rider-title]) { text-shadow: 1px 1px 0 #20516e; }
[data-name-effect="engine-type"] :is(.pill-name, [data-handle], [data-username], [data-rider-title]) { text-shadow: 1px 1px 0 #b44411, 2px 2px 0 #803211; text-decoration-thickness: 2px; }
/* Identity text needs a dark panel on light default passes and lobby chips too. */
.pass[data-pass-background]:is([data-name-effect="snow-ink"], [data-name-effect="uber-mark"], [data-name-effect="medal-line"], [data-name-effect="spark-type"], [data-name-effect="engine-type"], [data-name-effect="kahuna-glow"]) .pass-id,
.mini-pass:is([data-name-effect="snow-ink"], [data-name-effect="uber-mark"], [data-name-effect="medal-line"], [data-name-effect="spark-type"], [data-name-effect="engine-type"], [data-name-effect="kahuna-glow"]) { background: #100c29; color: #f4f8ff; }

/* Ring paint never changes image width, height, padding or border. */
[data-avatar-ring="chalk-ring"] { --reward-ring: #22d3ff; --reward-outer: #f4f8ff; }
[data-avatar-ring="twin-loop"] { --reward-ring: #22d3ff; --reward-outer: #c6ff1a; }
[data-avatar-ring="copper-edge"] { --reward-ring: #ffb784; --reward-outer: #f4f8ff; }
[data-avatar-ring="spark-ring"] { --reward-ring: #22d3ff; --reward-outer: #c6ff1a; }
[data-avatar-ring="club-orbit"] { --reward-ring: #9675e6; --reward-outer: #22d3ff; }
:is([data-avatar-ring="chalk-ring"], [data-avatar-ring="twin-loop"], [data-avatar-ring="copper-edge"], [data-avatar-ring="spark-ring"], [data-avatar-ring="club-orbit"], [data-avatar-ring="belline-crown"]) :is(.pill-face, .pass-photo, [data-rider-subtitle] img),
:is([data-avatar-ring="chalk-ring"], [data-avatar-ring="twin-loop"], [data-avatar-ring="copper-edge"], [data-avatar-ring="spark-ring"], [data-avatar-ring="club-orbit"], [data-avatar-ring="belline-crown"]) > img {
  outline: 2px solid var(--reward-ring); outline-offset: 1px;
  box-shadow: 0 0 0 1px #08061a, 0 0 0 4px var(--reward-outer);
}
[data-avatar-ring="chalk-ring"] :is(.pill-face, .pass-photo, [data-rider-subtitle] img), [data-avatar-ring="chalk-ring"] > img { outline: 2px solid #22d3ff; box-shadow: 0 0 0 1px #08061a, -2px 0 0 4px #f4f8ff, 2px 0 0 4px #9675e6; }
[data-avatar-ring="copper-edge"] :is(.pill-face, .pass-photo, [data-rider-subtitle] img), [data-avatar-ring="copper-edge"] > img { outline-style: double; outline-width: 3px; box-shadow: 0 0 0 1px #08061a, 0 -3px 0 1px #f4f8ff, 0 3px 0 1px #f4f8ff; }
[data-avatar-ring="spark-ring"] :is(.pill-face, .pass-photo, [data-rider-subtitle] img), [data-avatar-ring="spark-ring"] > img { outline: 3px dashed #c6ff1a; outline-offset: 2px; box-shadow: 0 0 0 2px #22d3ff; }
[data-avatar-ring="club-orbit"] :is(.pill-face, .pass-photo, [data-rider-subtitle] img), [data-avatar-ring="club-orbit"] > img { outline: 2px dashed #22d3ff; outline-offset: 3px; box-shadow: 0 0 0 2px #9675e6; }

/* Foils overlay rank art. Their pseudo-element never replaces --cosmetic-art. */
.pass[data-pass-foil="lift-ticket"]::after {
  background: repeating-linear-gradient(125deg, transparent 0 12px, #b7eaffbb 12px 13px, transparent 13px 17px, #22d3ffbb 17px 20px, transparent 20px 30px),
    linear-gradient(125deg, #20516e99 0 30%, transparent 30% 64%, #9675e699 64% 84%, transparent 84%); opacity: .85;
}
.pass[data-pass-foil="bronze-press"]::after {
  background: linear-gradient(125deg, transparent 20%, #ffb784aa 20% 27%, #ff6a1366 27% 30%, transparent 30% 70%, #ffb78488 70% 72%, transparent 72%); opacity: .8;
}
.pass[data-pass-foil="course-map"]::after {
  background: linear-gradient(90deg, #22d3ff70 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(#22d3ff70 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(circle at 75% 40%, #c6ff1a 0 3px, transparent 4px); opacity: .7;
}
.pass[data-pass-foil="gold-stamp"] { outline: 1px solid #ffe09a; outline-offset: -1px; }
.pass[data-pass-foil="gold-stamp"]::after {
  background: linear-gradient(125deg, transparent 15%, #ffe09a88 15% 27%, #ffe09acc 27% 29%, transparent 29% 68%, #ffe09a99 68% 73%, transparent 73%); opacity: .9;
}
.pass[data-pass-foil="showoff-satin"]::after {
  background: linear-gradient(125deg, transparent 8%, #9675e6aa 19%, #22d3ffcc 24%, #9675e6aa 30%, transparent 39% 58%, #22d3ff99 67%, #9675e6cc 73%, transparent 86%); opacity: .95;
}
.pass:is([data-pass-foil="lift-ticket"], [data-pass-foil="bronze-press"], [data-pass-foil="course-map"], [data-pass-foil="gold-stamp"], [data-pass-foil="showoff-satin"], [data-pass-foil="pahee-tide"]) .pass-band { background: #100c29; color: #f4f8ff; }

[data-title-badge="finisher"] { --reward-label: #f4f8ff; --reward-label-edge: #22d3ff; }
[data-title-badge="first-uber"] { --reward-label: #ffb784; --reward-label-edge: #ff944d; }
[data-title-badge="connected"] { --reward-label: #22d3ff; --reward-label-edge: #c6ff1a; }
[data-title-badge="ten-down"] { --reward-label: #c6ff1a; --reward-label-edge: #c6ff1a; }
[data-title-badge="hundred-rider"] { --reward-label: #f4f8ff; --reward-label-edge: #22d3ff; }
:is([data-title-badge="finisher"], [data-title-badge="first-uber"], [data-title-badge="connected"], [data-title-badge="ten-down"], [data-title-badge="hundred-rider"], [data-title-badge="off-the-map"]) :is(.reward-title, .pill-title) {
  color: var(--reward-label); background: #1c1447; border: 1px solid var(--reward-label-edge);
  border-radius: 3px; padding: 2px 5px; font-weight: 900; line-height: 1.25;
}
[data-title-badge="finisher"] :is(.reward-title, .pill-title) { background: linear-gradient(115deg, #20516e, #1c294d); box-shadow: inset 0 0 4px #22d3ff40; }
[data-title-badge="first-uber"] :is(.reward-title, .pill-title) { background: linear-gradient(115deg, #382040, #743725); }
[data-title-badge="connected"] :is(.reward-title, .pill-title) { background: linear-gradient(115deg, #194451 0 12%, #142d43 12% 85%, #194451 85%); }
[data-title-badge="connected"] :is(.reward-title, .pill-title)::after { content: ''; display: inline-block; width: 3px; height: 3px; margin: 0 5px 2px 6px; border-radius: 50%; background: #c6ff1a; box-shadow: 5px 0 0 #c6ff1a; pointer-events: none; }
[data-title-badge="ten-down"] :is(.reward-title, .pill-title) { background: linear-gradient(115deg, #36462b 0 10%, #202c3c 10% 88%, #36462b 88%); box-shadow: inset 0 0 0 1px #202c3c, inset 0 0 0 2px #c6ff1a; }
[data-title-badge="hundred-rider"] :is(.reward-title, .pill-title) { background: linear-gradient(115deg, #20516e, #291752 40% 70%, #20516e); box-shadow: 0 0 0 2px #ff6a13; }

/* Course pack trophies P01-P05: Snow Belline frost and Moloka'i Pa'hee surf. Static paint only. */
[data-pill-frame="belline-frost"] { --reward-rim: #b7eaff; --reward-tab: #9675e6; }
.pill[data-pill-frame="belline-frost"] { box-shadow: 0 0 0 5px #b7eaff33; }
.pass[data-pass-foil="pahee-tide"]::after {
  background: repeating-linear-gradient(165deg, transparent 0 13px, #22d3ff88 13px 15px, transparent 15px 24px, #ff944d77 24px 26px, transparent 26px 36px),
    linear-gradient(125deg, #13455e99 0 28%, transparent 28% 66%, #ff6a1355 66% 82%, transparent 82%); opacity: .85;
}
[data-avatar-ring="belline-crown"] { --reward-ring: #f4f8ff; --reward-outer: #b7eaff; }
[data-avatar-ring="belline-crown"] :is(.pill-face, .pass-photo, [data-rider-subtitle] img), [data-avatar-ring="belline-crown"] > img { box-shadow: 0 0 0 1px #08061a, 0 -4px 0 2px #ffe09a, 0 0 0 4px #b7eaff; }
[data-name-effect="kahuna-glow"] { --reward-ink: #f4f8ff; --reward-rule: #ff944d; --reward-line: solid; }
[data-name-effect="kahuna-glow"] :is(.pill-name, [data-handle], [data-username], [data-rider-title]) {
  background: linear-gradient(115deg, #13455e, #3a1f3d 65%); text-decoration-thickness: 2px; text-shadow: 0 0 6px #ff6a13aa, 1px 1px 0 #08061a;
}
[data-title-badge="off-the-map"] { --reward-label: #c6ff1a; --reward-label-edge: #22d3ff; }
[data-title-badge="off-the-map"] :is(.reward-title, .pill-title) {
  border-style: dashed; background: repeating-linear-gradient(115deg, #142d43 0 7px, #18384d 7px 8px);
}
.rider .reward-title { display: inline-block; margin: 4px 0; }
.mini-pass .reward-title { grid-column: 2 / -1; }

/* Compact summary anatomy is independent of full gallery geometry. */
.compact-sample { display: inline-flex; align-items: center; justify-content: center; position: relative; max-width: 100%; color: #f4f8ff; font: 700 14px/1.2 "Exo 2", sans-serif; }
.compact-sample .pill-face { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 5px; color: #120d2e; background: #22d3ff; flex: none; }
.compact-pill { width: 96px; height: 30px; box-sizing: border-box; gap: 6px; padding: 3px; border-radius: 5px; }
.compact-pill .pill-face { width: 20px; height: 24px; }
.compact-pass.pass { width: 64px; height: 36px; border-radius: 5px; mask: none; display: block; overflow: hidden; }
.compact-pass.pass::before { content: none; }
.compact-pass.pass::after { inset: 0; }
.compact-pass.pass .pass-band { display: block; min-height: 0; height: 5px; padding: 0; margin: 4px 5px 0; border: 0; background: #100c29; }
.compact-pass.pass[data-pass-background] .pass-id { display: block; position: absolute; inset: 14px 8px 6px; padding: 0; margin: 0; border-radius: 2px; background: #100c29; }
.compact-sample .reward-title { max-width: 100px; margin: 0; font-size: 11px; white-space: normal; text-align: center; }
/* Staff summary samples are still. Full staff galleries retain their prestige effects. */
.choice-preview .compact-sample, .choice-preview .compact-sample *, .choice-preview .compact-sample::before, .choice-preview .compact-sample::after, .choice-preview .compact-sample *::before, .choice-preview .compact-sample *::after { animation: none; transition: none; }
.choice-preview .pill-holo::before { transform: translate(-50%, -50%) rotate(.15turn); }
.choice-preview .compact-pass { transform: none; }
.choice-preview .compact-sample { background-position: 50% 50%; }

.reward-preview .pill-name { overflow: visible; }
/* Public headings use the solid name treatment, including the existing chrome heading. */
:is([data-name-effect="snow-ink"], [data-name-effect="uber-mark"], [data-name-effect="medal-line"], [data-name-effect="spark-type"], [data-name-effect="engine-type"], [data-name-effect="kahuna-glow"]) [data-rider-title] { background-clip: border-box; -webkit-background-clip: border-box; filter: none; }
[data-name-effect="spark-type"] :is(.pill-name, [data-handle], [data-username], [data-rider-title]) { background: linear-gradient(115deg, #194451, #291752 65%); text-decoration-thickness: 2px; text-shadow: 1px 1px 0 #08061a, 2px 2px 0 #20516e; }
[data-name-effect="engine-type"] :is(.pill-name, [data-handle], [data-username], [data-rider-title]) { background: linear-gradient(115deg, #321a38, #422243 65%); }

/* Keep glyph edges consistent with web/shell/style.css. A static dark glyph edge works over both snow and vivid rank art. Paint
   stroke before fill to preserve small glyphs; no layout or motion changes. */
.pill .pill-text :is(.pill-meta, .pill-dev, .pill-title, .reward-title, .pill-letter) {
  -webkit-text-stroke: 2px #08061a; paint-order: stroke fill;
  text-shadow: 0 1px 0 #08061a;
}
.pill .pill-text .pill-name, .mini-pass[data-name-effect] .mini-pass-text > [data-handle] {
  -webkit-text-stroke: 2px #08061a; paint-order: stroke fill; background: none;
}
/* Chromium paints a clipped gradient below its text stroke. Keep the staff
   gradient as a fine signature underline, with readable solid glyphs. */
.pill[data-name-effect^="staff-"] .pill-text .pill-name,
.mini-pass[data-name-effect^="staff-"] .mini-pass-text > [data-handle] {
  color: #d9faff; -webkit-text-fill-color: currentColor;
  background: linear-gradient(110deg, var(--holo-colors)) left bottom / 100% 1px no-repeat;
  background-clip: border-box; -webkit-background-clip: border-box;
  text-shadow: 0 1px 0 #08061a; animation: none;
}
.pill .pill-text :is(.pill-meta, .pill-dev) { color: #f4f8ff; }
.pill[data-title-badge] .pill-text > :is(.pill-title, .reward-title) {
  color: #ffe0b5; background: none; border-color: transparent; box-shadow: none;
  animation: none;
}
.pill[data-pill-style] .pill-text .pill-letter { color: #c4bde8; background: none; box-shadow: none; }
.pill[data-pill-style] .pill-text .pill-letter-lit { color: #ffd166; box-shadow: inset 0 -2px 0 #ffd166, inset 0 -3px 0 #08061a; }
.pill.pill-tricky-active .pill-text .pill-letter:not(.pill-letter-lit) { color: #c6ff1a; }

/* Lobby titles use the same text-only treatment without changing chip boxes. */
.mini-pass[data-title-badge] .mini-pass-text > .reward-title {
  color: #ffe0b5; background: none; border-color: transparent; box-shadow: none;
  -webkit-text-stroke: 2px #08061a; paint-order: stroke fill;
  text-shadow: 0 1px 0 #08061a; animation: none;
}
.pill.pill-tricky-full .pill-text .pill-letter-lit { box-shadow: inset 0 -2px 0 #ffd166, inset 0 -3px 0 #08061a, inset 0 -5px 0 #ffd166; }

:is(.style-preview, .reward-preview, .choice-preview) .pill[data-name-effect]:not([data-name-effect^="staff-"]) .pill-text .pill-name,
.mini-pass[data-name-effect]:not([data-name-effect^="staff-"]) .mini-pass-text > [data-handle] {
  text-decoration-line: underline; text-decoration-color: var(--reward-rule, #ff9b52);
}



/* Transparent race layout. Keep this block identical in both renderers.
   The three rows share fixed columns across every rank and reward material. */
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] {
  grid-template-columns: 2.5em 8.8em 11.8em 4.4em;
  grid-template-rows: 1.3em 1.2em 1.5em;
  grid-auto-flow: row; gap: 0 0.4em; padding: 4px 4px 4px 0.6em;
}
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-text { display: contents; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-face { grid-column: 1; grid-row: 1 / 4; justify-self: start; width: 2em; height: 2.8em; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-line { grid-column: 2; grid-row: 1; min-width: 0; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-meta { grid-column: 2; grid-row: 2; max-width: none; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] :is(.pill-title, .reward-title) {
  grid-column: 2; grid-row: 3; align-self: center; width: 100%; min-width: 0;
  margin: 0; padding: 0; border: 0; border-radius: 0; font-size: 10px; line-height: 1.3;
  font-weight: 800; letter-spacing: normal; text-transform: none;
  color: #ffe0b5; background: none; box-shadow: none; animation: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] :is(.pill-title, .reward-title)::after { content: none; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-gauge {
  grid-column: 3; grid-row: 1 / 3; display: flex; flex-direction: column-reverse;
  justify-content: center; align-items: stretch; gap: 0.1em; height: auto; margin: 0;
}
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-letters { display: flex; justify-content: space-between; gap: 2px; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-letter {
  display: grid; place-items: center; box-sizing: border-box; flex: 1; width: auto;
  height: 1.25em; padding: 0; border: 1px solid #c4bde8; border-radius: 2px;
  font-size: 1.15em; font-style: italic; font-weight: 900; line-height: 1;
  color: #c4bde8; background: none; box-shadow: none; transform: skewX(-12deg);
}
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-letter-lit {
  color: #ffd166; border-color: #ffd166; box-shadow: inset 0 -2px 0 #ffd166;
}
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style].pill-tricky-active .pill-letter:not(.pill-letter-lit) { color: #c6ff1a; border-color: #c6ff1a; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style].pill-tricky-full .pill-letter-lit { box-shadow: inset 0 -3px 0 #ffd166; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-gauge-bar {
  flex: none; height: 0.85em; border-radius: 2px; background: none;
  box-shadow: inset 0 0 0 1px #f4f8ff, 0 0 0 1px #08061a;
}
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-gauge-bar::after { content: none; }
/* Confine the existing sweep to the fill. The empty track stays transparent. */
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-gauge-bar::before {
  right: calc((1 - var(--boost, 0)) * 100%);
}
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-metrics {
  grid-column: 3; grid-row: 3; display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.4em; width: auto; margin: 0; padding: 0; border: 0;
  background: none; box-shadow: none; font-size: 1.25em; line-height: 1.15;
}
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] :is(.pill-score, .pill-speed) { width: auto; margin: 0; font-size: 1em; font-weight: 800; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-place {
  grid-column: 4; grid-row: 1 / 4; width: auto; height: auto; margin: 0; padding: 0;
  border: 0; background: none; box-shadow: none; color: #f4f8ff;
}
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-place strong { font-size: 2em; font-weight: 900; line-height: 1; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-place sup { margin-left: 0; font-size: 0.8em; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-place small { margin-left: 1px; font-size: 0.95em; color: #f4f8ff; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-place-first { color: #c6ff1a; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] :is(.pill-place, .pill-score, .pill-speed, .pill-badge) {
  -webkit-text-stroke: 2px #08061a; paint-order: stroke fill; text-shadow: 0 1px 0 #08061a;
}
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-badge { background: none; box-shadow: none; color: #b5f6ff; }
/* Without race telemetry, keep the compact identity layout. */
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style]:not(:has(.pill-place)) { grid-template-columns: 2em var(--pill-text, 11.5em); grid-template-rows: auto; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style]:not(:has(.pill-place)) .pill-text { display: grid; grid-template-columns: minmax(0, 1fr); padding: 3px 5px; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style]:not(:has(.pill-place)) :is(.pill-line, .pill-meta, .pill-title, .reward-title) { grid-column: 1; grid-row: auto; }
/* Small site samples fit their own containers, independent of viewport size. */
.style-preview { container-type: inline-size; }
.style-preview .pill[data-pill-style][data-pill-style] { grid-template-columns: 2.5em minmax(0, 1fr) 11.8em 4.4em; }
@container (max-width: 350px) {
  .style-preview .pill[data-pill-style][data-pill-style] { font-size: 10px; }
}
@container (max-width: 290px) {
  .style-preview .pill[data-pill-style][data-pill-style] { font-size: 9px; }
}

/* Lewis 2026-10-20: TRICKY letters glow purple; the race place glows orange. Same geometry. */
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-letter { position: relative; color: #a8a6b6; border-color: #7f63c4; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-letter-lit {
  color: #c46bff; border: 2px solid #c77dff;
  text-shadow: 0 0 4px #b04dff, 0 0 9px #8a2be2;
  box-shadow: 0 0 6px #b04dffa6, inset 0 0 4px #b04dff73, inset 0 -2px 0 #c77dff;
}
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style].pill-tricky-full .pill-letter-lit {
  box-shadow: 0 0 9px #c77dffcc, inset 0 0 6px #b04dff99, inset 0 -3px 0 #e2b8ff;
}
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] :is(.pill-place, .pill-place-first) { color: #ffa24d; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] :is(.pill-place, .pill-place-first) :is(small) { color: #ffc28a; }
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-place {
  text-shadow: 0 1px 0 #08061a, 0 0 6px #ff6a13, 0 0 14px #ff6a13b3;
}
:is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-letter-lit::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 10px #c77dff, 0 0 4px #b04dff; opacity: 0.35;
  animation: pill-letter-glow 1.8s ease-in-out infinite alternate;
}
@keyframes pill-letter-glow { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { :is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-letter-lit { transition: none; } :is(.pills, .style-preview) .pill[data-pill-style][data-pill-style] .pill-letter-lit::after { animation: none; opacity: 0.7; } }
