/* The refresh's own pieces: heat in green, filled brand actions, Today's training, the Player Card, rewards and the queue.
   Colours come from the tokens (tokens.css, console.css); loaded last. */

a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* ---------- Today's training ---------- */
.today-focus { margin: 0 0 var(--space-sm); color: var(--color-muted); font-size: 0.9rem; }
.today-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-rule); }
.today-row { display: flex; align-items: center; gap: var(--space-sm); border-bottom: 1px solid var(--color-rule); padding: var(--space-xs) 0; }
.today-mark { flex: none; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; position: relative; }
.today-mark input { position: absolute; opacity: 0; width: 44px; height: 44px; margin: 0; cursor: pointer; }
.today-mark > span { width: 24px; height: 24px; border-radius: 5px; border: 2px solid var(--color-rule-2); display: grid; place-items: center; color: transparent; }
.today-mark input:checked + span { background: var(--brand-action); border-color: var(--brand-action); color: var(--brand-action-ink); }
.today-mark input:focus-visible + span { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.today-mark .icon { width: 16px; height: 16px; }
span.today-mark.is-done { cursor: default; color: var(--color-ok); }
span.today-mark.is-done .icon { width: 24px; height: 24px; }
.today-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-sm); color: var(--color-ink); text-decoration: none; }
.today-art { flex: none; width: 72px; aspect-ratio: 16 / 9; border-radius: 6px; background: var(--color-paper-3) center / cover; }
.today-text { display: flex; flex-direction: column; min-width: 0; }
.today-text strong { font-weight: 600; }
.today-text small, .today-side { color: var(--color-muted); font-size: 0.85rem; }
.today-side { flex: none; text-align: right; font-family: var(--font-outlier); }
.today-done { font-style: normal; font-weight: 700; color: var(--color-ok); }
.today-foot { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; justify-content: space-between; margin-top: var(--space-sm); }
.today-summary { margin: 0; font-family: var(--font-outlier); font-size: 0.9rem; }
.today-note { margin: var(--space-sm) 0 0; color: var(--color-muted); font-size: 0.9rem; }

/* filled actions: the one thing to do next */
.today-foot .btn-primary, .queue-next .btn-primary, body.wb .today-foot .btn-primary, html[data-theme="light"] :is(.today-foot, .queue-next) .btn-primary {
  background: var(--brand-action); color: var(--brand-action-ink); border-color: var(--brand-action); font-weight: 700; text-decoration: none; }
.today-foot .btn-primary:hover, .queue-next .btn-primary:hover, body.wb .today-foot .btn-primary:hover, html[data-theme="light"] :is(.today-foot, .queue-next) .btn-primary:hover {
  background: var(--brand-action-hover); color: var(--brand-action-ink); border-color: var(--brand-action-hover); }
.today-foot .btn[disabled], .wb-actions .btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.earned-banner { display: flex; align-items: center; gap: var(--space-xs); margin: 0 0 var(--space-sm); padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--brand-primary); border-radius: 8px; color: var(--color-ink); text-decoration: none; background: var(--color-accent-soft); }

/* ---------- the queue ---------- */
.queue-count, .queue-kicker { margin: 0; font-family: var(--font-outlier); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; opacity: 0.85; }
.queue-next { margin: var(--space-md) auto; text-align: center; }
.queue-title { margin: var(--space-2xs) 0 var(--space-sm); font-size: 1.4rem; font-weight: 700; }
.queue-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: center; }
.queue-sprint form { display: inline; }

/* ---------- the Player Card, as a social post: who, a square picture, the numbers, a caption ---------- */
.post { display: block; max-width: 440px; margin: var(--space-sm) auto; overflow: hidden; border: 1px solid var(--color-rule); border-radius: 14px; background: var(--color-paper-2); color: var(--color-ink); text-align: left; text-decoration: none; }
.post-head { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); }
.post-avatar { flex: none; width: 44px; height: 44px; padding: 2px; border-radius: 50%; background: linear-gradient(45deg, var(--gold-champion), var(--bronze)); }
.post-avatar > span { display: block; width: 100%; height: 100%; overflow: hidden; border: 2px solid var(--color-paper-2); border-radius: 50%; background: var(--slate); box-sizing: border-box; }
.post-avatar :is(.spirit-portrait, img, svg, .avatar) { display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; }
.post-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.post .post-name { margin: 0; font-family: var(--font-body); font-size: 0.95rem; font-weight: 700; line-height: 1.3; letter-spacing: 0; text-transform: none; overflow-wrap: anywhere; }
.post-who > span { font-size: 0.78rem; color: var(--color-muted); }
.post-stars { margin-left: auto; color: var(--warning); letter-spacing: 0.1em; white-space: nowrap; }
.post-media { position: relative; aspect-ratio: 1; overflow: hidden; isolation: isolate; background: var(--charcoal); }
.post-bg { position: absolute; inset: 0; z-index: -2; background: center / cover; }
.post-media::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(16,30,53,0.15), rgba(16,30,53,0.7)); }
.post-art { position: absolute; inset: 6% 6% 0; display: flex; align-items: flex-end; justify-content: center; }
.post-art :is(.spirit-portrait, .avatar) { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 100%; }
.post-art :is(img, svg) { width: 100%; height: 100%; max-width: none; margin: 0; object-fit: contain; object-position: bottom; }
.post-badge { position: absolute; left: var(--space-sm); bottom: var(--space-sm); max-width: calc(100% - 2 * var(--space-sm)); padding: 6px 12px; border-radius: 999px; background: rgba(16,30,53,0.82); color: var(--cream); font-size: 0.82rem; font-weight: 600; }
.post-stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: var(--space-sm) var(--space-xs); text-align: center; }
.post-stats > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.post-stats b { font-size: 1.25rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.post-stats > span > span { font-size: 0.72rem; color: var(--color-muted); }
.post-caption { padding: var(--space-sm) var(--space-md) var(--space-md); border-top: 1px solid var(--color-rule); font-size: 0.9rem; line-height: 1.5; }
.post-caption p { margin: 0 0 var(--space-2xs); }
.post-sprint { color: var(--color-muted); }
.post-tag { color: var(--color-accent); font-weight: 600; }
.post-share { width: 100%; margin-top: var(--space-xs); padding: 10px; border: 0; border-radius: 8px; background: var(--brand-action); color: var(--brand-action-ink); font: inherit; font-weight: 600; cursor: pointer; }
.post-share:hover, .post-share:focus-visible { background: var(--brand-action-hover); }
/* the small one (Home): who and two numbers, with the Home Ice behind the name */
.post.is-compact { max-width: none; margin: 0; }
.post.is-compact .post-head { position: relative; isolation: isolate; padding-block: var(--space-md); color: var(--cream); }
.post.is-compact .post-head::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(16,30,53,0.9), rgba(16,30,53,0.6)); }
.post.is-compact .post-who > span { color: #C9D1E0; }
a.post:hover { border-color: var(--color-rule-2); text-decoration: none; }

.card-page { display: grid; place-items: center; min-height: 100vh; margin: 0; padding: var(--space-md); background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); }
.card-wrap { width: 100%; max-width: 440px; text-align: center; }
.card-logo { display: inline-block; margin-bottom: var(--space-md); text-decoration: none; }
/* ---------- progress, rewards, looks, venues ---------- */
.next-reward { max-width: 520px; margin: var(--space-sm) auto; text-align: center; }
.next-reward-kicker { margin: 0; font-family: var(--font-outlier); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.08em; color: var(--color-muted); }
.next-reward-line { margin: var(--space-2xs) 0; }
/* Behind the player card on a player's page and on My Animal: their Home Ice, shaded so words on it stay readable in both themes */
.wb-main .panel.my-animal, .wb-main .arena-stage { background: linear-gradient(rgba(5,7,15,0.4), rgba(5,7,15,0.55) 55%, rgba(5,7,15,0.9)), var(--arena) center / cover no-repeat, #05070f; border: 0; border-radius: 16px; padding: var(--space-md); color: var(--cream); }
.wb-main .arena-stage { padding: var(--space-lg) var(--space-md); }
.wb-main .arena-stage .post { margin-block: 0; }
.wb-main .panel.my-animal .panel-head h2, .wb-main .panel.my-animal .next-reward-line, .wb-main .panel.my-animal .next-reward-line strong { color: var(--cream); }
.wb-main .panel.my-animal .panel-link { color: var(--gold-champion); }
.wb-main .panel.my-animal .next-reward-line { text-align: center; text-shadow: 0 1px 4px rgba(5,7,15,0.9); }
.wb-main .panel.my-animal > p:last-child { margin-bottom: 0; text-align: center; }
.wb-main .panel.my-animal .btn-secondary { background: rgba(16,30,53,0.85); border-color: rgba(245,247,250,0.4); color: var(--cream); }
.wb-main .panel.my-animal .btn-secondary:hover { background: var(--charcoal); border-color: var(--gold-champion); }
.roadmap summary { cursor: pointer; color: var(--color-accent); }
.roadmap ol { list-style: none; padding: 0; text-align: left; }
.roadmap li { display: flex; gap: var(--space-sm); padding: 4px 0; border-bottom: 1px solid var(--color-rule); }
.roadmap li b { width: 3ch; font-family: var(--font-outlier); }
.roadmap li em { margin-left: auto; font-style: normal; color: var(--color-muted); }
.roadmap li.is-earned em { color: var(--color-ok); font-weight: 700; }
.reward-ready { text-align: center; }
.reward-box { display: inline-flex; flex-direction: column; align-items: center; gap: var(--space-xs); background: none; border: 1px solid var(--brand-primary); border-radius: 12px; padding: var(--space-md) var(--space-lg); color: var(--color-ink); cursor: pointer; }
.reward-box svg { width: 72px; height: 72px; }
.lay-link { background: none; border: 0; color: var(--color-accent); cursor: pointer; text-decoration: underline; font: inherit; }

.look-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--space-sm); }
.look-pick { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: var(--space-2xs); padding: var(--space-sm); border-radius: 8px;
  border: 1px solid var(--color-rule); background: var(--color-paper-2); color: var(--color-ink); cursor: pointer; font: inherit; font-size: 0.82rem; }
.look-pick.is-current { border: 2px solid var(--brand-primary); }
.look-pick :is(svg, .avatar) { width: 80px; height: 80px; }
.venue-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: var(--space-sm); }
.venue { display: flex; flex-direction: column; gap: var(--space-2xs); border: 1px solid var(--color-rule); border-radius: 8px; padding: var(--space-xs); }
.venue.is-current { border: 2px solid var(--brand-primary); }
.venue-art { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--color-paper-3); }
.venue-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.venue.is-locked .venue-art { background: repeating-linear-gradient(45deg, var(--color-paper-3) 0 8px, var(--color-paper-2) 8px 16px); }
.venue em { font-style: normal; font-size: 0.85rem; color: var(--color-muted); }
.legacy-wall { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-sm); }
.legacy-card { display: flex; flex-direction: column; align-items: center; text-align: center; border: 1px solid var(--color-rule); border-radius: 8px; padding: var(--space-sm); }
.legacy-card.is-star { border-color: var(--warning); }
.legacy-art svg { width: 80px; height: auto; }
.form-row { list-style: none; padding: 0; display: flex; gap: var(--space-md); justify-content: center; }
.form-row li { display: flex; flex-direction: column; align-items: center; text-align: center; }
.form-row :is(svg, .avatar) { width: 84px; height: 84px; }
.identity-pair { display: flex; flex-wrap: wrap; gap: var(--space-lg); justify-content: center; }
.identity-pair figure { margin: 0; width: 150px; text-align: center; }
.identity-pair figure svg { width: 100%; height: auto; overflow: visible; }
.identity-pair figcaption small { display: block; color: var(--color-muted); }
.identity-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: center; align-items: center; }
.art-gallery { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.art-row { display: flex; gap: var(--space-xs); }
.art-row figure { margin: 0; width: 68px; text-align: center; font-size: 0.7rem; }
.art-row :is(svg, .avatar) { width: 64px; height: 64px; }

@media (max-width: 599px) {
  .today-art { display: none; }
  .today-foot .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- the logo (pieces/logo.php) ---------- */
/* public pages: the full wordmark; signed in: the star in a circle is the home button, the player's animal sits opposite */
.iyh-logo { display: inline-block; line-height: 0; }
.iyh-logo img { display: block; width: auto; max-width: 100%; height: 44px; margin: 0; object-fit: contain; }
.iyh-logo img.on-light, html[data-theme="light"] .iyh-logo img.on-dark { display: none; }
html[data-theme="light"] .iyh-logo img.on-light { display: block; }
.fb-logo .iyh-logo img { height: clamp(78px, 8.4vw, 108px); }
.login-wordmark .iyh-logo img { height: 80px; margin-inline: auto; }
.card-logo .iyh-logo img { height: 60px; }
.wb-logo .iyh-logo img { height: 40px; }
.iyh-badge { display: block; width: 40px; height: 40px; flex: none; }
.wb-logo.is-badge { border-radius: 50%; }
.mnav-logo { border-radius: 8px; }
/* between the phone layout and a wide window the search box gives way, so the avatar stays on screen */
@media (min-width: 900px) and (max-width: 1099px) {
  body.wb .wb-top .wb-search { min-width: 0; }
  body.wb .wb-top .wb-search input { min-width: 0; width: 100%; padding-right: var(--space-xs); }
}
/* phones: logo on the left, controls on the right (signed in there is no top bar at all: mobile.css) */
@media (max-width: 899px) {
  .wb-top .wb-logo { display: inline-flex; flex: none; margin-right: var(--space-sm); }
  .wb-top .wb-logo:not(.is-badge) + .wb-crumb { display: none; }
  .wb-top .wb-top-right { margin-left: auto; }
}

/* ---------- sign-in pages ---------- */
/* the strip under the sign-in headline: sample workouts and graphs drifting past (pieces/auth-showcase.php) */
.showcase { margin-top: var(--space-lg); overflow: hidden; contain: content; -webkit-mask-image: linear-gradient(90deg, transparent 0, var(--k-000000) 8%, var(--k-000000) 88%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, var(--k-000000) 8%, var(--k-000000) 88%, transparent 100%); }
.showcase-track { display: flex; width: max-content; animation: showcase-drift 52s linear infinite; }
.showcase:hover .showcase-track { animation-play-state: paused; }
@keyframes showcase-drift { to { transform: translateX(-50%); } }
.show-card { position: relative; flex: none; box-sizing: border-box; width: 188px; height: 236px; margin-right: 14px; padding: 16px; overflow: hidden; display: flex; flex-direction: column; text-align: left; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); }
.show-photo { padding: 0; justify-content: flex-end; }
.show-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.show-cap { position: relative; display: grid; gap: 2px; padding: 40px 14px 14px; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--charcoal) 92%, transparent) 60%); color: var(--cream); }
.show-cap strong { font-size: 1rem; line-height: 1.2; }
.show-cap span, .show-label, .show-up { font-size: 0.8rem; }
.show-label { color: var(--ink-muted); }
.show-big { margin-top: 4px; font-size: 2.2rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.show-big small { font-size: 0.45em; font-weight: 700; color: var(--ink-muted); }
.show-up { margin-top: 4px; font-weight: 700; color: var(--progress-high); }
.show-chart { display: block; width: 100%; height: 80px; margin-top: auto; overflow: visible; }
.show-area { fill: var(--brand-primary); opacity: 0.16; }
.show-line, .show-dot { fill: none; stroke: var(--brand-primary); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.show-line { stroke-width: 3; }
.show-dot { stroke-width: 10; }
.show-bars { display: flex; align-items: flex-end; gap: 5px; height: 80px; margin-top: auto; }
.show-bars i { flex: 1; border-radius: 4px 4px 2px 2px; background: var(--brand-primary); opacity: 0.55; }
.show-bars i:last-child, .show-bars i:nth-last-child(2) { opacity: 1; }
.show-heat { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: auto; }
.show-heat i { aspect-ratio: 1; border-radius: 4px; background: var(--line); }
.show-heat i.l1 { background: var(--progress-low); }
.show-heat i.l2 { background: var(--progress-medium); }
.show-heat i.l3, .show-heat i.l4 { background: var(--progress-high); }
.show-note { margin: var(--space-xs) 0 0; font-size: 0.78rem; color: var(--ink-muted); }
@media (prefers-reduced-motion: reduce) { .showcase-track { animation: none; } }
/* on a phone: smaller cards, so the form stays on the first screen */
@media (max-width: 900px) {
  .showcase { margin-top: var(--space-md); }
  .show-card { width: 142px; height: 168px; margin-right: 10px; padding: 12px; border-radius: 14px; }
  .show-photo { padding: 0; }
  .show-cap { padding: 28px 10px 10px; }
  .show-cap strong { font-size: 0.85rem; }
  .show-cap span, .show-label, .show-up { font-size: 0.72rem; }
  .show-big { font-size: 1.6rem; }
  .show-chart, .show-bars { height: 54px; }
  .show-heat { gap: 3px; }
  .show-heat i { border-radius: 2px; }
}

.fb-headline { margin: var(--space-md) 0 var(--space-xs); font-family: var(--font-campaign); font-weight: 700; line-height: 1.12; font-size: clamp(2.1rem, 4vw, 3.25rem); letter-spacing: -0.015em; text-wrap: balance; }
.login-fb .fb-btn-red, html[data-theme="light"] .login-fb .fb-btn-red { background: var(--brand-action); color: var(--brand-action-ink); border-color: var(--brand-action); }
.login-fb .fb-btn-red:hover { background: var(--brand-action-hover); color: var(--brand-action-ink); }

/* ---------- animal portraits (assets/avatars) ---------- */
.spirit-badge { overflow: hidden; }
.spirit-badge img.spirit { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.spirit-badge svg.spirit { padding: 18%; box-sizing: border-box; }
.spirit-badge.tier-silhouette img.spirit { filter: brightness(0) opacity(0.85); }
.spirit-portrait { display: block; }
.spirit-portrait img { display: block; width: 100%; height: auto; max-width: 100%; }
.look-pick .spirit-portrait, .identity-pair .spirit-portrait { width: 100%; max-width: 150px; }
.legacy-art .spirit-portrait { width: 80px; }
/* the quiz and the reveal wait on a question mark, never on pictures of the animals */
.tf-mystery { display: grid; place-items: center; border-radius: 50%; border: 6px solid var(--brand-primary); background: var(--surface); color: var(--brand-primary); font-size: 5rem; font-weight: 700; line-height: 1; animation: mystery-pulse 0.9s ease-in-out infinite; }
@keyframes mystery-pulse { 50% { transform: scale(1.07); } }
.sr-q { font-size: clamp(4rem, 18vmin, 8rem); font-weight: 700; line-height: 1; color: hsl(var(--sr-hue, 40) 100% 72%); text-shadow: 0 0 18px hsl(var(--sr-hue, 40) 100% 60%); }
@media (prefers-reduced-motion: reduce) { .tf-mystery { animation: none; } }

/* ---------- arena artwork: square pictures, always cropped from the centre, never stretched ---------- */
/* behind the progress page: fill the window; the scrim keeps what sits on it readable */
.ach-bg { background-size: cover; background-position: center; image-rendering: auto; }
.ach-bg::after { background: linear-gradient(rgba(5,7,15,0.35), rgba(5,7,15,0.7) 45%, rgba(5,7,15,0.92)); }
/* a friend's view */
.home-ice { position: relative; margin: 0 0 var(--space-lg); overflow: hidden; border-radius: 12px; background: var(--charcoal); }
.home-ice img { display: block; width: 100%; height: clamp(150px, 30vw, 280px); object-fit: cover; object-position: center; }
.home-ice figcaption { position: absolute; inset: auto 0 0; display: flex; flex-direction: column; padding: var(--space-xl) var(--space-md) var(--space-sm); background: linear-gradient(transparent, rgba(16,30,53,0.92)); color: var(--cream); }
.home-ice figcaption { text-shadow: 0 1px 6px rgba(5,7,15,0.95); }
.home-ice figcaption small { color: var(--cream); }
/* leaderboard */
.lb-venue { flex: none; width: 32px; height: 32px; border-radius: 6px; object-fit: cover; object-position: center; }
/* admin gallery: the same crops the site uses */
.arena-gallery { list-style: none; padding: 0; display: grid; gap: var(--space-md); }
.arena-gallery li { border: 1px solid var(--color-rule); border-radius: 8px; padding: var(--space-sm); }
.arena-gallery p { margin: 0 0 var(--space-2xs); }
.arena-source { font-size: 0.8rem; overflow-wrap: anywhere; }
.arena-source .is-fallback { color: var(--warning); }
.arena-crops { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-sm); }
.arena-crops figure { margin: 0; font-size: 0.72rem; color: var(--color-muted); }
.arena-crops img { display: block; max-width: 100%; border-radius: 6px; object-fit: cover; object-position: center; }
.arena-crops .is-square img { width: 220px; height: 220px; }
.arena-crops .is-wide img { width: 300px; height: 169px; }
.arena-crops .is-tall img { width: 104px; height: 220px; }
.arena-crops .is-banner img { width: 300px; height: 100px; }
.arena-crops .is-thumb img { width: 32px; height: 32px; }

/* ---------- the arena reveal: the same box, burst and confetti, then the venue itself, big ---------- */
.ach-ov.has-venue { background: linear-gradient(rgba(5,7,15,0.72), rgba(5,7,15,0.94)), var(--ach-bg, none) center / cover #05070f; color: var(--cream); }
.ach-ov.has-venue .ach-art { width: min(420px, 88vw, 40vh); } /* big, and the story and button still fit under it */
.ach-venue { position: relative; width: 100%; height: 100%; margin: 0; overflow: hidden; border: 3px solid var(--gold-champion); border-radius: 16px; box-shadow: 0 0 0 6px rgba(5,7,15,0.6), 0 0 70px rgba(255,236,122,0.55); }
.ach-venue > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.ach-venue .spirit-badge { position: absolute; right: 10px; bottom: 10px; width: 30%; height: auto; aspect-ratio: 1; border-width: 4px; }
.ach-ov.has-venue.is-burst .ach-venue > img { animation: venue-arrive 4s cubic-bezier(0.16, 1, 0.3, 1) both; }
.ach-ov.has-venue :is(.ach-name, .ach-story, .ach-slot, .ach-perks li) { color: var(--cream); }
.ach-ov.has-venue .ach-kick { color: var(--gold-champion); }
.ach-ov.has-venue .ach-story { background: rgba(16,30,53,0.75); border-color: rgba(255,236,122,0.5); }
.ach-ov.has-venue .x-close { color: var(--cream); }
@keyframes venue-arrive { from { transform: scale(1.35); filter: brightness(2.2); } to { transform: scale(1); filter: brightness(1); } }
@media (prefers-reduced-motion: reduce) { .ach-ov.has-venue.is-burst .ach-venue > img { animation: none; } }

/* Venue names sit over the current arena's artwork, so the list gets its own panel. */
/* (The phone sheet clears section panels, hence the extra class.) */
.ach-page section.power-how.tab-arena { background: color-mix(in srgb, var(--color-paper) 92%, transparent); border-radius: 12px; padding: var(--space-sm); }

/* ---------- what each brand colour is for ---------- */
/* streaks and intensity: signal red */
.streak-flame, .streak-card .streak-flame { background: var(--signal); color: var(--cream); }
.streak-card.is-new .streak-flame { background: var(--color-paper-3); color: var(--color-muted); }
.stat-flame, .streak .icon { color: var(--signal); }
/* the animal's ring says its form: awakened steel, evolved signal red, unleashed championship gold */
.spirit-badge.tier-1, .spirit-badge.tier-2 { --tier: var(--steel); }
.spirit-badge.tier-3, .spirit-badge.tier-4 { --tier: var(--signal); }
.spirit-badge.tier-5 { --tier: var(--gold-champion); border-color: var(--gold-champion); outline-color: var(--bronze); background: radial-gradient(circle at 50% 30%, #33392F, var(--charcoal) 80%); }
.spirit-badge.tier-1, .spirit-badge.tier-2, .spirit-badge.tier-3, .spirit-badge.tier-4 { background: radial-gradient(circle at 50% 30%, var(--slate), var(--charcoal) 75%); }
/* unlocked arenas and rewards: championship gold, trimmed in bronze */
.venue.is-owned { border-color: var(--bronze); }
.venue.is-current { border: 2px solid var(--gold-champion); }
.reward-box, .earned-banner { border-color: var(--bronze); }
/* ---------- fitting the avatar art (512px busts that stop 8% short of the bottom edge) ---------- */
/* painted art, not pixel art: smooth it when it is shrunk */
img.spirit, .spirit-badge img.spirit, .post-art img { image-rendering: auto; }
/* round badges show the head and shoulders */
.spirit-badge img.spirit, .post-avatar img.spirit { scale: 1.45; transform-origin: 60% 0; }
/* on the Player Card the bust sits on the bottom edge */
.post-art .spirit-portrait img { translate: 0 8.2%; }
/* the photo banners stay dark in the light theme, so their yellow words stay yellow */
html[data-theme="light"] :is(.tv-hero, .wb-next) :is(.btn-primary, .btn-primary:link) { color: var(--gold-champion); }
.ach-page .ach-about, html[data-theme="light"] .ach-page .ach-about { color: var(--gold); }

/* ---------- words on gold: dark ink, never white ---------- */
.share-cta, .nf-avatar:not(.spirit-badge), .medal em { color: var(--on-accent); }

/* ---------- the long sales page follows the theme (it was written as white paper) ---------- */
body.page-home { --sl-ink: var(--color-ink); --sl-mute: var(--color-muted); --sl-paper: var(--color-paper); --sl-line: var(--color-rule); }
.sl-sub { color: var(--color-ink-2); }
.sl-callout, .sl-price, .sl-sticky { background: var(--color-paper-2); border-color: var(--color-rule-2); color: var(--color-ink); }
.sl-footer { background: var(--color-paper-3); }
.sl-btn, .sl-btn:hover, .sl-day-n, .sl-x li::before { color: var(--on-accent); }
.sl-num { color: var(--color-paper); }
.sl-check li::before { color: var(--charcoal); }
.sl-letter mark, .sl-day-s span { color: var(--charcoal); }

/* yellow takes navy ink: filled pieces that used to carry white */
.share-cta, .nf-avatar, .medal em, .media-error-note, .streak-flame { color: var(--on-accent); }
/* light theme: yellow and navy-blue words get their readable partner */
html[data-theme="light"] .eq-kicker { color: var(--gold-champion); }
html[data-theme="light"] :is(.check-list .is-todo .check-mark, .pill-pending, .notice-warning, .auth-dev) { color: var(--warning); }

/* The profile dropdown (pieces/profile-switch.php): the active player's animal, bold name and "Switch profile"; the family drops down over the page */
.who-drop { position: relative; min-width: 240px; max-width: 100%; }
.who-drop > summary { list-style: none; }
.who-drop > summary::-webkit-details-marker { display: none; }
.who-current { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs) var(--space-sm) var(--space-xs) var(--space-xs); border: 1px solid var(--color-rule); border-radius: 999px; background: var(--color-paper-2); color: var(--color-ink); cursor: pointer; user-select: none; -webkit-user-select: none; transition: border-color var(--dur-short) ease; }
.who-current:hover, .who-drop[open] > .who-current { border-color: var(--color-accent); }
.who-current:focus-visible, .who-option:focus-visible, .who-more:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.who-icon { flex: none; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; line-height: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--color-ink) 8%, transparent); }
.who-icon .nf-avatar { width: 48px; height: 48px; }
.who-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.who-text strong { font-size: 1.1rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.who-text small { font-size: 0.85rem; font-weight: 400; color: var(--color-muted); }
.who-dot { flex: none; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--brand-action); color: var(--brand-action-ink); font-size: 0.75rem; font-style: normal; font-weight: 700; }
.who-caret { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--color-ink) 8%, transparent); transition: transform var(--dur-short) var(--ease-out), background var(--dur-short) ease, color var(--dur-short) ease; }
.who-caret .icon { width: 18px; height: 18px; }
.who-drop[open] .who-caret { transform: rotate(180deg); background: var(--brand-action); color: var(--brand-action-ink); }
.who-menu { position: absolute; z-index: 90; top: calc(100% + var(--space-xs)); left: 0; width: max(100%, 280px); max-width: calc(100vw - 2 * var(--space-md)); padding: var(--space-xs); border: 1px solid var(--color-rule); border-radius: 22px; background: var(--color-paper-2); color: var(--color-ink); box-shadow: 0 24px 48px color-mix(in srgb, var(--k-000000) 45%, transparent); transform-origin: top center; animation: who-open var(--dur-short) var(--ease-out); }
.who-list { display: flex; flex-direction: column; gap: var(--space-2xs); max-height: min(50svh, 400px); overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: var(--space-3xs); }
.who-option { flex: none; display: flex; align-items: center; gap: var(--space-sm); width: 100%; padding: var(--space-xs); border: 0; border-radius: 16px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.who-option:hover { background: color-mix(in srgb, var(--color-ink) 7%, transparent); }
.who-option.is-on { background: color-mix(in srgb, var(--color-accent) 14%, transparent); }
.who-option.is-on .who-icon { box-shadow: 0 0 0 2px var(--color-accent); }
.who-option.is-on small { color: var(--color-accent); }
.who-tick { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-action); color: var(--brand-action-ink); }
.who-tick .icon { width: 16px; height: 16px; stroke-width: 3; }
.who-menu .who-more { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-height: 48px; margin-top: var(--space-xs); padding: 0 var(--space-sm); border-top: 1px solid var(--color-rule); color: var(--color-ink); font-weight: 600; text-decoration: none; }
.who-more .icon { width: 18px; height: 18px; color: var(--color-muted); }
@keyframes who-open { from { opacity: 0; transform: translateY(-6px) scale(0.97); } }
@media (prefers-reduced-motion: reduce) { .who-menu { animation: none; } .who-caret { transition: none; } }
@media (max-width: 899px) { .wb-page-actions .who-drop { flex: 1 1 100%; } }
@media (min-width: 900px) { .wb-page-actions .who-menu { left: auto; right: 0; } }
/* Home: the dropdown names the player, so the heading under it is only for screen readers (wide screens; phones don't show the dropdown there) */
@media (min-width: 900px) { .wb-home.has-switch .lay-hello h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
/* the same rows in the top bar's avatar menu, a size down so the account links still fit */
.lay-me .lay-drop-panel { min-width: 270px; max-height: calc(100svh - var(--wb-top-h) - var(--space-lg)); overflow-y: auto; }
.lay-me .lay-drop-panel > * { flex: none; }
.lay-me .who-list { max-height: 250px; }
.lay-me .lay-drop-panel .who-option { gap: var(--space-sm); padding: var(--space-2xs) var(--space-xs); border-radius: 12px; font-size: 1rem; }
.lay-me .lay-drop-panel .who-option.is-on { background: color-mix(in srgb, var(--color-accent) 14%, transparent); }
.lay-me .who-icon, .lay-me .who-icon .nf-avatar { width: 40px; height: 40px; }
.lay-me .who-text strong { font-size: 1rem; }
.lay-me .who-text small { font-size: 0.8rem; }
.lay-me .lay-drop-panel .who-tick .icon { width: 14px; height: 14px; color: inherit; }
/* in the menu it takes the place of the profile line, the same size */
.mnav-me .who-drop { width: 100%; }
.mnav-me .who-icon, .mnav-me .who-icon .nf-avatar { width: 56px; height: 56px; }
.mnav-me .who-text strong { font-size: 1.35rem; }
.mnav-me .who-menu { width: 100%; }
/* My players: the top of each card is the switch */
.player-card-main.is-switch { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.player-card-switch { font-size: 0.85rem; color: var(--color-muted); }
.player-card.is-on { border-color: var(--color-accent); }
.player-card.is-on .player-card-switch { color: var(--color-accent); }

/* the sitemap page */
.site-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-lg) var(--space-xl); }
.site-map h2 { margin: 0 0 var(--space-xs); font-size: 1.1rem; font-weight: 700; }
.site-map ul { list-style: none; margin: 0; padding: 0; }
.site-map a { display: flex; align-items: center; min-height: 44px; border-bottom: 1px solid var(--color-rule); }
