/* Let the scene reach the edge when a public page has no scrollbar. */
html { scrollbar-gutter:auto; overflow-x:clip; }
/* Center against the full viewport so scrollbars do not nudge the panels. */
main { margin-left:max(0px,calc((100vw - 1160px)/2)); margin-right:0; }
.product {
  /* Extra navy tint: raise this percentage to make either town less distracting. */
  --background-tint:15%;
  --background-map:none; --background-sky:none;
  /* Panel headers: warmer, more saturated wood than the shared --wood tokens, which buttons also use. */
  --header-top:#a8703a; --header-bottom:#87542a; --header-edge:#56331a;
  isolation:isolate; background:var(--bg);
}
.product[data-background=sleepywood] { --background-map:url(sleepywood.webp); --background-sky:url(sleepywood-forest.webp); }
/* The original sunset sky is much brighter than Sleepywood's forest. */
.product[data-background=kerning] { --background-tint:45%; --background-map:url(kerning.webp); --background-sky:url(kerning-sky.webp); }
/* Forgotten Hollow's cave backdrop is composed into its map image, so it has no separate sky; its green mist takes Kerning's tint. */
.product[data-background=forgotten-hollow] { --background-tint:45%; --background-map:url(forgotten-hollow.webp); }
.product .sky { display:none; }
/* The viewport-sized scene stays behind pages of any length; the original pixels are preserved in lossless WebP.
   Sized to the large viewport (lvh), not inset:0: a fixed box with bottom:0 follows a phone's address bar as it
   slides in and out, and cover then rescales the scene on every scroll. Desktop viewports have no such bar. */
.product::before {
  content:""; position:fixed; top:0; left:0; width:100vw; height:100vh; height:100lvh; z-index:-1; pointer-events:none;
  background:
    linear-gradient(rgb(16 27 50 / var(--background-tint)), rgb(16 27 50 / var(--background-tint))),
    linear-gradient(180deg, rgb(16 27 50 / 50%), rgb(16 27 50 / 25%) 40%, rgb(16 27 50 / 44%)),
    linear-gradient(90deg, rgb(16 27 50 / 12.5%), rgb(16 27 50 / 56.5%) 50%, rgb(16 27 50 / 12.5%)),
    var(--background-map) center bottom / cover no-repeat,
    var(--background-sky) center / cover no-repeat;
}
/* Overscan hides the town render's uneven transparent bottom edge. */
.product[data-background=kerning]::before { top:-3vh; top:-3lvh; left:-3vw; width:106vw; height:106vh; height:106lvh; }
.product[data-background-state]::before { opacity:0; }
.product[data-background-state=ready]::before { opacity:1; }
@media (prefers-reduced-motion:no-preference) {
  .product::before { transition:opacity .55s ease-out; }
  .product[data-intro] :is(.masthead,.reading-info) { animation:content-arrive .28s ease-out; }
  /* Shown only for EXP / hour; the fade replays each time [hidden] lifts, not on the 1 s refresh. */
  .product #streamer-windows { animation:content-arrive .28s ease-out; }
}
@keyframes content-arrive { from { opacity:0; } to { opacity:1; } }
.product .brand { padding:10px 16px; border:1px solid #56637d66; border-radius: var(--radius-lg); background:#232c3e90; text-decoration:none; color:inherit; }
@media (prefers-reduced-motion:no-preference) {
  .product .emblem { transition:rotate .18s ease-out; }
  .product .brand:focus-visible .emblem { rotate:15deg; }
}
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .product .brand:hover .emblem { rotate:15deg; }
}
/* A slow light sweep across the title, a quiet hint that the numbers are live.
   The text is painted by its clipped background, so the title's shadow moves to a drop-shadow filter
   (a text-shadow would paint over the clipped glyphs). */
@media (prefers-reduced-motion:no-preference) {
  /* --shimmer-spread is half the band's width; --shimmer-edge tints it so the cream text still shows it. The 300% layer
     puts the band wholly past either end of the text at rest (it needs (50% - spread) × 3 > 100%); at 250% the band's
     edge stayed on the last letter between sweeps. */
  .product .brand strong {
    --shimmer-base:var(--text); --shimmer-edge:#ffd98a; --shimmer-light:#fff; --shimmer-spread:11.5%;
    background:linear-gradient(105deg, var(--shimmer-base) calc(50% - var(--shimmer-spread)), var(--shimmer-edge) calc(50% - var(--shimmer-spread) / 2),
      var(--shimmer-light) 50%, var(--shimmer-edge) calc(50% + var(--shimmer-spread) / 2), var(--shimmer-base) calc(50% + var(--shimmer-spread))) 0 0 / 300% 100%;
    -webkit-background-clip:text; background-clip:text; color:transparent; animation:text-shimmer 4.5s ease-in-out infinite;
    text-shadow:none; filter:drop-shadow(0 3px 0 #5a3e27);
    /* The clipped background only covers the box, and the tight line height leaves the descenders of "p" and "g"
       below it; extra padding paints them and the matching negative margin keeps the layout. */
    padding-bottom:.15em; margin-bottom:-.15em;
  }
  /* The profile's EXP / hour card: a glint runs along its 3px top edge instead of across the number.
     The layer covers the card's border box (so it follows the rounded corners) and is masked to the top 3px. */
  .companion-cards .early-pace { position:relative; }
  .companion-cards .early-pace::before {
    content:""; position:absolute; inset:-3px -1px -1px; border-radius:inherit; pointer-events:none;
    background:linear-gradient(90deg, transparent 40%, #ffd98a 46%, #fff 50%, #ffd98a 54%, transparent 60%) 0 0 / 300% 100% no-repeat;
    -webkit-mask:linear-gradient(#000 0 0) top / 100% 3px no-repeat; mask:linear-gradient(#000 0 0) top / 100% 3px no-repeat;
    animation:text-shimmer 4s ease-in-out infinite;
  }
}
/* Sweeps left to right in the first half, then rests out of sight. */
@keyframes text-shimmer { 0% { background-position:100% 0; } 50%, 100% { background-position:0 0; } }
/* A fixed line height and an SVG arrow (not a fallback-font glyph) keep the masthead identical on every page. */
.product .brand span { line-height:18px; }
.back-arrow { margin-right:5px; vertical-align:-1px; }
.product a { color:var(--gold); }
.advanced { color:var(--gold); font-size:13px; font-weight:700; white-space:nowrap; }
[data-site=public] .dev-link { display:none; }
/* /local exists only in the Pages export (which sets data-api); the Python server does not serve it. */
/* Wide screens: muted honey draws attention beside the quieter About tab. Phones hide the tabs, so the link
   becomes a small gold pill beside the intro, which wraps on its left. Only on the deployed site, like the link. */
@media(min-width:651px) { .reading-info .local-link { display:none; } }
@media(max-width:650px) {
  .reading-info { display:flex; align-items:center; gap:12px; }
  .reading-info .local-link { flex:none; margin-left:auto; padding:4px 10px; border:1px solid #c9a24a80; border-radius:999px;
    background:#2b2a2c90; color:#ffd68c; font:500 12px/16px var(--font-display); text-decoration:none; }
  .reading-info .local-link::after { content:"→"; margin-left:5px; }
}
/* A link to the other tracker, styled as the About tab (a gold tab read as "you are here"); the gold arrow says
   it goes somewhere. */
.local-tab { display:block; padding:5px 14px 7px; border:1px solid var(--line); border-bottom:0; border-radius:var(--radius) var(--radius) 0 0;
  background:linear-gradient(#303b50,#273145); box-shadow:inset 0 1px #46526a; color:#fff3dc; font:500 14px/18px var(--font-display); text-decoration:none; }
.reading-info .local-tab { color:#fff3dc; }  /* Over the intro line's muted link colour. */
.local-tab::after { content:"→"; display:inline-block; margin-left:6px; color:#ffd68c; transition:transform .15s ease-out; }
.reading-info .local-tab:hover { background:linear-gradient(#3a475f,#303b50); color:#fff; }
.local-tab:hover::after { transform:translateX(2px); }
html:not([data-api]) :is(.local-link, .local-tab) { display:none; }
.welcome { padding:18px 4px 30px; }
.eyebrow { color:var(--gold); letter-spacing:2px; font-size:12px; font-weight:800; margin:0; }
.welcome h1 { font-size:clamp(34px,5vw,54px); font-weight:600; line-height:1.05; text-transform:none; letter-spacing:-.5px; margin:10px 0 14px; color:var(--text); text-shadow:0 3px 0 #0a1124; }
.welcome > p:last-child { font-size:16px; line-height:1.6; color:var(--text-soft); margin:0; }
.product .board-header { min-height:66px; align-items:center; background:linear-gradient(var(--header-top),var(--header-bottom)); border-bottom-color:var(--header-edge); }
.product .board-header h2 { margin:0; font-family:var(--font-display); font-size:18px; font-weight:600; letter-spacing:.2px; }
.product .entry { grid-template-columns:36px 64px minmax(135px,190px) minmax(160px,1fr) 120px; }
.product .character { text-decoration:none; color:var(--text); }
.product .character:hover { color:var(--gold); }
.product a.channel { color:var(--text-muted); text-decoration:none; display:inline-block; position:relative; max-width:100%; padding-right:18px; vertical-align:top; }
.product a.channel:hover { color:var(--gold); }
.product a.channel:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
.channel-glyph { position:absolute; right:0; top:50%; transform:translateY(-50%); fill:#bf94ff; visibility:hidden; pointer-events:none; }
@media(min-width:651px) and (hover:hover) { .product a.channel:hover .channel-glyph { visibility:visible; } }
@media(hover:none), (pointer:coarse) { .product { -webkit-tap-highlight-color:transparent; } }
.product .score strong { font-size:26px; }
.product .exp-bar[data-missing="true"] { opacity:.65; }
.product .entry[data-stale="true"] progress { opacity:.6; }
.product progress::-webkit-progress-value { background:linear-gradient(#d4f584,var(--green) 45%,var(--green-deep)); }
.product progress::-moz-progress-bar { background:var(--green); }
.poll-note { color:var(--text-muted); font-size:12px; font-weight:600; }
.poll-note:empty { display:none; }  /* Otherwise it wraps onto its own empty toolbar line on phones. */
.poll-note:not(:empty)::after { content:"..."; }
@media (prefers-reduced-motion:no-preference) {
  /* The dots keep a fixed-width slot and are revealed one per step by a clip, so the text never moves.
     The letter spacing makes each dot about a third of the slot. */
  .poll-note:not(:empty)::after { display:inline-block; width:1.1em; vertical-align:bottom; letter-spacing:.1em; animation:reconnect-dots 1.4s steps(4,jump-none) infinite; }
}
@keyframes reconnect-dots { from { clip-path:inset(0 100% 0 0); } to { clip-path:inset(0 0 0 0); } }
/* Streamers/Characters toggle sits in the board header beside the title. */
/* The count and the online filter stay together at the right, also when the header wraps on a phone. */
.board-tools { display:flex; align-items:center; gap:10px; margin-left:auto; }
.board-tools #board-count { font-size:12px; font-weight:600; color:#f0dcc0; }
.board-tools #board-count[data-loading="true"]::before { content:""; display:inline-block; width:10px; height:10px; margin-right:6px; vertical-align:-1px; border:2px solid #f0dcc044; border-top-color:currentColor; border-radius:50%; }
@keyframes board-count-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:no-preference) { #board-count[data-loading="true"]::before { animation:board-count-spin .8s linear infinite; } }
.product .board-header:has(.board-modes) { flex-wrap:wrap; justify-content:flex-start; }
.character-controls { display:flex; flex-wrap:wrap; gap:12px; color:var(--text-soft); font-size:13px; font-weight:700; min-width:0; }
.character-controls label { display:flex; align-items:center; gap:7px; min-width:0; }
.character-controls input { min-width:0; max-width:100%; box-sizing:border-box; padding:8px 11px; color:var(--text); background:var(--surface-sunken); border:1px solid var(--line-strong); border-radius:var(--radius-sm); font:inherit; font-weight:600; }
.character-controls input:focus-visible { outline:2px solid var(--gold); outline-offset:1px; }
.character-controls input { width:180px; }
.toolbar:has(.sort-controls) { align-items:flex-end; }
.sort-controls { display:grid; gap:5px; }
.sort-caption { color:var(--text-muted); font-size:9px; font-weight:700; letter-spacing:1px; margin-left:2px; }
/* The job filter follows the sort pills after a small dot, with its own JOB caption: pill-shaped, a chevron to say it opens,
   gold while filtering, and the picked class badge or job icon on its right. */
.sort-row { display:flex; align-items:flex-end; gap:14px; flex-wrap:wrap; }
.sort-dot { width:4px; height:4px; margin-bottom:18px; border-radius:50%; background:var(--text-muted); }
.job-controls { display:grid; gap:5px; }
.job-filter { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
/* Picked icons follow the dropdown; when they no longer fit beside it the whole set moves to the next line and wraps there. */
.job-filter-icons { display:flex; flex-wrap:wrap; gap:6px; max-width:100%; }
.job-filter-icons:empty { display:none; }
.job-chip, .job-chip:hover:not(:disabled) { position:relative; flex:none; width:26px; height:26px; min-height:0; padding:0; border:0; border-radius:4px; background:none; line-height:0; }
.job-chip img { width:26px; height:26px; }  /* The class badges' native size. */
.job-chip:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
/* Pointer screens: hovering a picked icon dims it and shows a small × (touch screens just tap it, or untick it in the menu). */
@media(hover:hover) {
  .job-chip:hover img { opacity:.7; }
  .job-chip::after { content:'×'; position:absolute; top:-6px; right:-6px; width:14px; height:14px; border-radius:50%; background:#c94b3c; color:#fff;
    font-size:12px; font-weight:800; line-height:14px; text-align:center; opacity:0; transition:opacity .15s; }
  .job-chip:is(:hover,:focus-visible)::after { opacity:1; }
}
/* The menu: a pill like the sort buttons (gold while filtering) that opens a panel of checkboxes. */
.job-menu { position:relative; }
.job-summary { display:flex; align-items:center; list-style:none; font-size:14px; font-weight:800; min-height:40px; box-sizing:border-box; padding:9px 36px 9px 17px; cursor:pointer;
  color:var(--text-soft); background:var(--surface-raised); border:1px solid var(--line-strong); border-radius:100px; white-space:nowrap; user-select:none; }
.job-summary::-webkit-details-marker { display:none; }
.job-summary::after { content:''; position:absolute; right:16px; top:20px; width:7px; height:7px; margin-top:-6px; border:solid currentColor; border-width:0 2px 2px 0;
  transform:rotate(45deg); transition:transform .15s; }
.job-menu[open] .job-summary::after { transform:translateY(3px) rotate(-135deg); }
.job-summary:hover { border-color:var(--gold-deep); color:var(--text); background:#34405a; }
.job-summary:focus-visible { outline:none; border-color:var(--gold); }
.job-filter[data-active="true"] .job-summary { background:linear-gradient(#ffd68c, var(--gold-deep)); border-color:#ffdf9f; color:var(--on-gold); box-shadow:inset 0 -3px #b06d1d40, 0 2px 0 #00000040; }
.job-filter[data-active="true"] .job-summary:focus-visible { border-color:#fff3d6; }
/* Wide screens: two class columns so every option fits without scrolling; phones get one scrolling column. */
.job-panel { position:absolute; z-index:20; top:calc(100% + 6px); left:0; width:520px; max-height:min(70vh,520px); overflow:auto; box-sizing:border-box; padding:6px;
  display:grid; grid-template-columns:1fr 1fr; column-gap:6px; align-items:start;
  background:var(--surface-sunken); border:1px solid var(--line-strong); border-radius:12px; box-shadow:0 10px 28px #0009; }
.job-panel > .job-option { grid-column:1 / -1; }
.job-group { margin-top:4px; padding-top:4px; border-top:1px solid var(--line); }
.job-group-name { display:block; padding:4px 8px 2px; color:var(--text-muted); font-size:9px; font-weight:700; letter-spacing:1px; text-transform:uppercase; }
.job-option { display:flex; align-items:center; gap:8px; padding:4px 8px; border-radius:7px; color:var(--text-soft); font-size:13px; font-weight:700; cursor:pointer; }
.job-option:hover { background:#ffffff0d; color:var(--text); }
.job-option:has(input:checked) { color:var(--text); }
.job-group .job-option:not(:nth-child(2)) { padding-left:22px; }  /* Exact jobs sit under their class's "All ..." line. */
.job-option input { margin:0; accent-color:var(--gold-deep); width:15px; height:15px; }
.job-option img { width:22px; height:22px; }
.job-option.job-all, .job-option.job-all:has(input:checked) { color:var(--gold); font-weight:800; }
.job-all-spacer { flex:none; width:22px; }  /* No icon; keeps "All jobs" in line with the names below. */
/* The list's rounded box normally clips its contents; while the menu is open it must not cut the panel off. */
.board:has(.job-menu[open]) { overflow:visible; }
.board > .board-header { border-radius:var(--radius-lg) var(--radius-lg) 0 0; }
@media(max-width:650px) {
  .product .board-header:has(.board-modes) { flex-wrap:wrap; align-items:center; row-gap:10px; }
  .board-tools #board-count { font-size:11px; }
  /* Search shares a row with the count and the filter; its placeholder says what it searches. */
  .character-controls { flex:1 1 150px; }
  .character-controls label { flex:1; }
  .character-controls input { width:100%; }
  .search-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  /* Sort and window pills share the width evenly instead of wrapping one button onto its own line. */
  .sort-row, .sort-controls, .job-controls { width:100%; }
  .sort-row { row-gap:0; }
  .sort-dot { display:none; }
  .job-controls { margin-top:10px; justify-items:start; }  /* Its own row, caption on top, clear of the sort pills. */
  .job-summary { font-size:13px; min-height:36px; padding:7px 32px 7px 13px; }
  .job-summary::after { top:18px; }
  .job-panel { width:min(280px,calc(100vw - 48px)); grid-template-columns:minmax(0,1fr); max-height:min(62vh,460px); }
  .product :is(#streamer-metrics,#character-sort-control) { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .product :is(#streamer-metrics,#character-sort-control) button { width:auto; padding:8px 6px; }
  .product #streamer-windows { display:grid; grid-template-columns:auto repeat(4,minmax(0,1fr)); width:100%; }
  .product #streamer-windows button { padding:6px 4px; min-height:36px; }
  /* Profile "Last" and "Interval" rows: one line each, pills sharing the width, never a lone pill on a second line.
     Matched by their leading label; the overlay builder's groups have their labels outside. */
  .product[data-view="player"] .windows:has(> span:first-child) { display:grid; grid-auto-flow:column; grid-template-columns:auto; grid-auto-columns:minmax(0,1fr); width:100%; }
  .product[data-view="player"] .windows:has(> span:first-child) button { min-width:52px; padding:5px 2px; white-space:nowrap; }
  /* "5m … 60m" like the 12h / 24h pills beside them, so five pills fit with room to breathe. */
  .product[data-view="player"] .windows .unit { display:none; }
  .product[data-view="player"] .windows button:has(.unit)::after { content:"m"; }
}
.product .entry .exp-label { color:#fff; }
.product .entry .exp-number { min-width:0; white-space:nowrap; }
.player-reading { display:flex; align-items:center; gap:18px; padding:24px 25px 10px; }
.player-reading .level { min-width:78px; padding:12px 8px; font-size:20px; }
.player-reading .exp-section { flex:1; min-width:0; }
.player-reading .exp-bar { height:34px; border-radius:9px; }
.player-reading .exp-label { font-size:16px; gap:8px; }
.player-reading .status-line { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 4px; margin:9px 0 0; }
.player-reading .status { font-size:13px; }
.player-reading .status-line .exp-detail { margin:0; }
.player-reading .status-line .exp-detail:not(:empty)::before { content:"· "; }
.player-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:20px 25px; gap:12px; }
.player-stats > div { border-left:1px solid var(--line); padding-left:14px; min-width:0; }
.player-stats > div:first-child { border-left:0; padding-left:0; }
.player-stats span { display:block; color:var(--text-muted); font-size:12px; }
.player-stats strong { display:block; margin-top:7px; font-size:26px; overflow-wrap:anywhere; }
.segment-note { padding:0 25px 14px; color:var(--text-muted); font-size:12px; font-weight:600; line-height:1.7; font-variant-numeric:tabular-nums; }
.overlay-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; padding:4px 25px 24px; font-size:13px; }
.button-link { display:inline-flex; align-items:center; min-height:40px; border:1px solid var(--wood-line); background:var(--wood); color:#fff3dc !important; border-radius:30px; padding:9px 17px; font-weight:800; text-decoration:none; }
.button-link:hover { background:#7f5c3d; border-color:var(--gold); }
.button-link:focus-visible { outline:3px solid #bedbff; outline-offset:3px; }
#copy-status { color:var(--green); font-weight:700; }
.history-board { margin-top:22px; }
.history-chart { padding:8px 12px 0; overflow-x:auto; }
.history-chart svg { display:block; width:100%; height:230px; }
.history-chart text { fill:#bcc4d3; font-family:var(--font-ui); font-size:12px; font-weight:600; font-variant-numeric:tabular-nums; }
.history-chart .boundary { stroke:#8d98ad; stroke-dasharray:3 4; }
.history-chart .sample { fill:var(--green); }
.history-chart .missing { stroke:#8d98ad; stroke-width:2; }
@media(max-width:850px) { .product .entry { grid-template-columns:30px 58px minmax(110px,150px) minmax(125px,1fr) 90px; gap:9px; } .product .score strong { font-size:22px; } }
@media(max-width:650px) { .product .entry { grid-template-columns:36px minmax(0,1fr) 87px; } .welcome { padding:10px 0 22px; } .welcome > p:last-child { font-size:15px; } .product .toolbar { align-items:flex-start; } .poll-note { width:100%; } .player-reading { padding:20px 14px 8px; gap:12px; } .player-reading .level { min-width:64px; font-size:17px; } .player-reading .exp-label { font-size:14px; } .player-stats { grid-template-columns:repeat(2,minmax(0,1fr)); padding:18px 14px; gap:20px; } .player-stats strong { font-size:24px; } .segment-note { padding-left:14px; padding-right:14px; } .overlay-actions { padding-left:14px; padding-right:14px; } }

.early-pace { margin:0 25px 18px; padding:12px 15px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface-raised); }
.early-pace > span { color:var(--gold); font-size:12px; display:block; }
.early-pace strong { display:block; margin:5px 0; font-size:17px; color:var(--green); overflow-wrap:anywhere; }
.early-pace #rate { font-size:30px; }
.early-pace #eta { display:inline; font-size:inherit; }
.early-pace #eta-stat { margin-top:6px; }
.early-pace [hidden] { display:none; }
.early-pace small { color:var(--text-muted); font-size:12px; }
.reading-info { position:relative; z-index:1; color:var(--text-muted); font-size:12px; font-weight:600; margin:0 0 14px; }
.reading-info a { color:var(--text-muted); }
/* "About" opens a popover card; click outside or Esc closes it. Wide screens: a bookmark tab standing on the first panel's
   top edge (absolute, so the panel never moves). Phones: the intro line is full, so an icon chip in the masthead instead. */
.about-tab { position:absolute; right:20px; bottom:-15px; min-height:0; padding:5px 16px 7px; border:1px solid var(--line); border-bottom:0; border-radius:var(--radius) var(--radius) 0 0;
  background:linear-gradient(#303b50,#273145); box-shadow:inset 0 1px #46526a; color:#fff3dc; font:500 14px/18px var(--font-display); }
.reading-info .about-tab:hover:not(:disabled) { border-color:var(--line); background:linear-gradient(#3a475f,#303b50); color:#fff; }
.masthead .about-icon { display:none; place-items:center; margin-left:auto; width:40px; height:40px; min-height:0; padding:0; border-color:#56637d66; border-radius:var(--radius); background:#232c3e90; color:var(--text-soft); }
@media(max-width:650px) { .about-tab { display:none; } .masthead .about-icon { display:grid; } }
/* Bookmark tabs on the first panel's top edge, as the live pages' About. The scenery toggle is a small,
   plain icon tab beside it (a switch, not a second menu): gold picture when on, dim when off. Phones hide
   both for the masthead chip. */
.reading-tabs { position:absolute; right:20px; bottom:-15px; display:flex; align-items:flex-end; gap:6px; }
.reading-tabs .about-tab { position:static; }
.scenery-tab { display:grid; place-items:center; width:34px; height:26px; min-height:0; padding:0 0 2px; border:1px solid var(--line); border-bottom:0;
  border-radius:var(--radius) var(--radius) 0 0; background:#2a3346; color:#f6e3c466; cursor:pointer; }
.scenery-tab:hover { color:#f6e3c4; }
.scenery-tab[aria-pressed="true"] { color:#ffd68c; }
@media(max-width:650px) { .reading-tabs { display:none; } }
.about { width:min(560px,calc(100vw - 32px)); box-sizing:border-box; padding:16px 22px 18px; color:var(--text-soft); font-size:14px; line-height:1.6;
  background:var(--surface); border:1px solid var(--line-strong); border-radius:var(--radius-lg); box-shadow:var(--shadow); }
.about::backdrop { background:#050b1c99; }
.about header { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.about h2 { margin:0; color:var(--text); font-family:var(--font-display); font-size:20px; font-weight:600; }
.about .about-close { min-height:0; width:32px; height:32px; padding:0; font-size:20px; line-height:1; }
.about p { margin:0; }
.about ul { margin:10px 0; padding-left:20px; }
.about li + li { margin-top:6px; }
.about strong { color:var(--text); }
.about .about-contact { margin:14px 0; padding-left:12px; border-left:2px solid var(--gold-deep); }
.about .about-credit { margin-top:12px; padding-top:10px; border-top:1px solid var(--line); color:var(--text-muted); font-size:12px; font-weight:600; }
.about b { color:var(--gold); }
.about h2 b { font-weight:500; }
.level-event { margin:16px 25px 0; color:var(--green); font-family:var(--font-display); font-size:18px; font-weight:600; }
.history-chart .trend { stroke:var(--green); stroke-width:2; opacity:.7; }
.player-stats { grid-template-columns:repeat(2,minmax(0,1fr)); padding-top:8px; padding-bottom:10px; }
.player-stats strong { font-size:20px; }
.player-stats [data-paused="true"] { opacity:.7; }
.product .level .level-note { display:block; margin:2px 0 0; font-size:9px; letter-spacing:0; }
@media(max-width:650px) { .early-pace { margin-left:14px; margin-right:14px; } }
.companion-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:8px 25px 16px; }
.companion-cards > div { min-height:150px; }
@media(max-width:900px) { .companion-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:650px) { .companion-cards > div { min-height:140px; } }
.companion-cards > div { flex:1 1 200px; min-width:0; margin:0; padding:15px 16px; border:1px solid var(--line); border-top:3px solid var(--wood-line); border-radius:var(--radius); background:var(--surface-raised); }
.companion-cards > div > span:first-child { display:block; color:var(--gold); font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.6px; }
.companion-cards strong { display:block; color:var(--text); font-family:var(--font-display); font-size:30px; font-weight:600; line-height:1.15; margin:10px 0 8px; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.companion-cards #rate { color:var(--green); }
/* A pace from a while ago (offline over 5 minutes, or a saved ETA's rate): no live green, dimmed like other paused stats. */
.companion-cards #rate[data-paused="true"] { color:var(--text); opacity:.7; }
.companion-cards #eta { font-size:30px; }
.companion-cards small { color:var(--text-muted); font-size:12px; font-weight:600; line-height:1.45; }
.companion-cards #early-value { color:var(--text-muted); font-size:12px; }
/* % / hour on the pace note's line, as on /local: "As of 6d ago · 1.23% / hour". */
.companion-cards :is(#early-value, #pp-stat) { display:inline; }
.companion-cards #pp-stat { color:var(--text-muted); font-size:12px; }
.companion-cards #early-value:not(:empty) + #pp-stat::before { content:" · "; }
.companion-cards [hidden] { display:none; }
.comparison-details { margin:0 25px 12px; color:var(--text-muted); font-size:12px; font-weight:600; }
.comparison-details summary { cursor:pointer; margin-bottom:8px; color:var(--text-soft); }
.comparison-details strong { color:var(--text); font-variant-numeric:tabular-nums; }
.chart-modes { display:flex; gap:6px; }
.chart-modes button { padding:5px 14px; min-height:34px; font:inherit; font-size:13px; font-weight:800; color:#f6e3c4; background:#00000026; border:1px solid #c2986a; border-radius:20px; cursor:pointer; }
.chart-modes button[aria-pressed="true"] { background:linear-gradient(#ffd68c,var(--gold-deep)); border-color:#ffdf9f; color:var(--on-gold); }
.chart-legend { color:var(--text-muted); font-size:12px; font-weight:600; }
.history-chart .chart-grid { stroke:#56637d; opacity:.45; }
.history-chart :is(.line-grid,.chart-tick) { stroke:#56637d; opacity:.32; }
.history-chart .exp-column { fill:var(--orange); }
.history-chart .exp-column.missing { fill:#8d98ad; opacity:.45; stroke:none; }
.history-chart .exp-column:focus { outline:2px solid #fff0ba; opacity:1; }
.product[data-view="player"] :is(#exp,#rate,#movement,#tracked-exp,#window-rate) { white-space:nowrap; overflow-wrap:normal; }
.player-reading #exp { min-width:0; }
.chart-tooltip { position:fixed; z-index:20; width:max-content; max-width:min(280px,calc(100vw - 16px)); box-sizing:border-box; padding:10px 13px; background:#1c2435; border:1px solid var(--gold-deep); border-radius:var(--radius-sm); color:var(--text); font:600 13px/1.55 var(--font-ui); font-variant-numeric:tabular-nums; white-space:pre-line; overflow-wrap:anywhere; pointer-events:none; box-shadow:0 8px 22px #000a; }
.history-chart [data-tip-key] { cursor:crosshair; }
.history-chart [data-tip-key]:focus-visible { outline:2px solid var(--gold); }
.history-chart .point-guide { stroke:#c0cad8; stroke-width:1; vector-effect:non-scaling-stroke; opacity:0; pointer-events:none; }
.history-chart .point-hit:hover + .point-guide { opacity:.65; }
.history-chart :is(.trend,.chart-grid,.line-grid,.chart-axis,.chart-tick) { pointer-events:none; }
.history-chart .chart-axis { stroke:var(--line-strong); stroke-width:1; }
.history-chart circle.sample { stroke:transparent; stroke-width:12px; }
.recent-card [data-paused="true"] { opacity:.65; }
@media(max-width:650px) { .companion-cards { margin:0 14px 12px; gap:8px; } .companion-cards > div { flex-basis:120px; padding:13px 12px; } .companion-cards > div > span:first-child { font-size:11px; letter-spacing:.3px; } .companion-cards .early-pace { flex-basis:100%; } .companion-cards strong,.companion-cards #eta { font-size:24px; } .comparison-details { margin-left:14px; margin-right:14px; } .chart-modes button { font-size:12px; padding:5px 11px; } }

.level-filter { display:flex; align-items:center; gap:.45rem; color:var(--text-soft); font-size:13px; font-weight:700; cursor:pointer; }
.level-filter input { width:16px; height:16px; margin:0; accent-color:var(--gold); }
.level-transition { stroke:var(--gold); stroke-dasharray:3 4; opacity:.7; }
.level-transition-label { fill:var(--gold); font-size:11px; }

/* Saved-character roster: one scrollable row; only shown for two or more characters. */
.roster { display:flex; align-items:center; gap:8px; padding:14px 25px 0; }
.roster-track { display:flex; gap:6px; flex:1; min-width:0; overflow-x:auto; scrollbar-width:thin; scrollbar-color:var(--line-strong) transparent; padding-bottom:8px; }
@media(hover:hover) and (pointer:fine) {
  .roster-track:where([data-more]:not([data-more=""])),.roster-track:where([data-more]:not([data-more=""])) a { cursor:grab; }
}
.roster-track[data-dragging="true"],.roster-track[data-dragging="true"] * { cursor:grabbing; user-select:none; }
.roster-track[data-more="end"] { mask-image:linear-gradient(to right,#000 88%,transparent); }
.roster-track[data-more="start"] { mask-image:linear-gradient(to left,#000 88%,transparent); }
.roster-track[data-more="both"] { mask-image:linear-gradient(to right,transparent,#000 10%,#000 90%,transparent); }
.roster-chip, .roster-option { display:flex; flex-direction:column; gap:1px; text-decoration:none; color:var(--text) !important; border:1px solid var(--line); border-radius:10px; background:var(--surface-raised); font-size:13px; line-height:1.3; }
/* Every chip is as wide as its longest possible second line; longer names end in an ellipsis. */
.roster-chip { flex:none; padding:6px 12px; }
.roster-chip::after { content:"Lv. 200 · 59m ago"; height:0; margin-top:-1px; overflow:hidden; visibility:hidden; font-size:11px; font-weight:600; white-space:nowrap; font-variant-numeric:tabular-nums; }
.roster-chip :is(.roster-name,.roster-meta) { contain:inline-size; overflow:hidden; text-overflow:ellipsis; }
.roster-chip:hover, .roster-option:hover { border-color:var(--line-strong); background:#34405a; }
.roster-chip:focus-visible, .roster-option:focus-visible, .roster-all summary:focus-visible { outline:2px solid var(--gold); outline-offset:1px; }
.roster [aria-current="page"] { background:var(--wood); border-color:var(--gold); color:#fff3dc !important; }
.roster [aria-current="page"]:hover { background:#7f5c3d; }
.roster-name { font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.roster-meta { color:var(--text-muted); font-size:11px; font-weight:600; white-space:nowrap; font-variant-numeric:tabular-nums; }
.roster-all { position:relative; flex:none; }
.roster-all summary { list-style:none; cursor:pointer; padding:8px 13px; border:1px solid var(--line-strong); border-radius:20px; background:var(--surface-raised); color:var(--text-soft); font-size:12px; font-weight:800; white-space:nowrap; }
.roster-all summary::-webkit-details-marker { display:none; }
.roster-all[open] summary { background:var(--wood); border-color:var(--gold); color:#fff3dc; }
.roster-menu { position:absolute; right:0; top:calc(100% + 6px); z-index:15; width:min(260px,calc(100vw - 40px)); box-sizing:border-box; padding:8px; background:var(--surface); border:1px solid var(--gold-deep); border-radius:var(--radius); box-shadow:0 8px 22px #000a; }
.roster-menu input { width:100%; box-sizing:border-box; margin-bottom:6px; padding:7px 10px; font:inherit; font-size:13px; color:var(--text); background:var(--surface-sunken); border:1px solid var(--line-strong); border-radius:var(--radius-sm); }
.roster-menu ul { list-style:none; margin:0; padding:0; max-height:min(260px,50vh); overflow-y:auto; display:grid; gap:4px; }
.roster-option { padding:6px 10px; }
@media(max-width:650px) { .roster { padding:12px 14px 0; } }

/* Twitch channel link in the character header: a quiet pill like the header toggles. */
.twitch-link { display:inline-flex; align-items:center; gap:7px; min-width:0; max-width:55%; padding:5px 13px 5px 10px; border:1px solid #c2986a; border-radius:20px; background:#00000026; color:#f6e3c4 !important; font-size:13px; font-weight:800; text-decoration:none; transition:background-color .15s,border-color .15s; }
.twitch-link span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.twitch-link:hover { background:#0000004a; border-color:#bf94ff; }
.twitch-link:focus-visible { outline:3px solid #bedbff; outline-offset:2px; }
.twitch-glyph { flex:none; fill:#bf94ff; }
.player-board > .board-header { flex-wrap:wrap; justify-content:flex-start; gap:8px 14px; }
.player-board .stream-uptime { display:inline-flex; align-items:center; gap:7px; max-width:none; color:var(--text-soft);
  font-family:var(--font-display); font-size:17px; font-weight:600; line-height:1.3; white-space:nowrap; text-shadow:0 1px 0 #4b3423; font-variant-numeric:tabular-nums; }
.stream-uptime[hidden] { display:none; }
.live-led { flex:none; width:7px; height:7px; border-radius:50%; background:#df3733; box-shadow:0 0 5px 1px #df37338d; border: 1px solid #333333bd}
@media(max-width:650px) { .player-board .stream-uptime { flex-basis:100%; font-size:15px; } }

/* Attribution and time zone, on every public page. */
.site-footer { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px 16px; margin:18px 6px 0; color:var(--text-muted); font-size:12px; font-weight:600; }
.site-footer a, .about a { color:var(--text-soft); text-decoration:none; border-bottom:1px solid var(--line-strong); }
.site-footer a:hover, .about a:hover { color:var(--gold); border-color:var(--gold-deep); }
.site-footer label { display:flex; align-items:center; gap:6px; }
.site-footer select { max-width:15em; padding:3px 6px; color:var(--text-soft); background:var(--surface-sunken); border:1px solid var(--line); border-radius:6px; font:inherit; cursor:pointer; }
.site-footer select:hover { border-color:var(--line-strong); }
.site-footer select:focus-visible { outline:2px solid var(--gold); outline-offset:1px; }

/* Live content fades in once the first update arrives instead of jumping as it fills; shown anyway after 2s. */
.product :is(.board,.about-tab,.scenery-tab,.local-tab,.site-footer,.history-overlay-link,.exp-page-foot) { transition:opacity .2s ease-out; }
.product[data-loading] :is(.board,.about-tab,.scenery-tab,.local-tab,.site-footer,.history-overlay-link,.exp-page-foot) { opacity:0; animation:reveal 0s 2s forwards; }
/* Switching lists keeps the current one (dimmed only if the other takes a moment) until the other can swap in whole. */
.product #entries[aria-busy="true"] { opacity:.6; transition:opacity .2s .15s; }
@keyframes reveal { to { opacity:1; } }
/* Until then an orange mushroom walks in place mid-screen; it leaves with the 2s fallback reveal. */
@media (prefers-reduced-motion:no-preference) {
  .product[data-loading]::after { content:""; position:fixed; left:50%; top:50%; z-index:5; width:64px; height:67px; margin:-34px 0 0 -32px;
    background:url(mobs/orange-mushroom-move.gif) center/contain no-repeat; pointer-events:none; animation:loader-out 0s 2s forwards; }
}
@keyframes loader-out { to { visibility:hidden; } }

/* Native dropdown lists take the select's colours; keep them dark and readable. */
.site-footer select option { color:var(--text); background:var(--surface); }
button:disabled { opacity:.4; cursor:not-allowed; }

/* EXP history: each chart has its own interval and time window controls. */
.chart-controls { display:flex; flex-wrap:wrap; align-items:center; gap:10px 18px; flex:1; }
.chart-controls .chart-legend { margin-left:auto; }

/* Stream overlay builder. */
.overlay-board { margin-top:22px; }
.history-overlay-wrap { position:relative; }
.history-overlay-link { position:absolute; left:calc(100% - 4px); bottom:-22px; display:flex; align-items:center; gap:4px; width:118px; margin:0; color:var(--text-muted); font-size:12px; text-shadow: #000 0 0 6px; line-height:1.3; text-align:center; transform:rotate(-12deg); }
.history-overlay-link, .history-overlay-link:hover:not(:disabled) { padding:0; min-height:32px; border:0; border-radius:0; background:none; color:var(--text-muted); font-weight:400; touch-action:manipulation; }
.history-overlay-link:focus-visible { outline:2px solid var(--gold); outline-offset:4px; border-radius:4px; }
.history-overlay-link span { position:relative; white-space:nowrap; }
.history-overlay-link span::before, .history-overlay-link span::after { content:""; position:absolute; left:-5%; top:50%; width:110%; height:2px; background:var(--gold); border-radius:2px; pointer-events:none; transform:rotate(-18deg) scaleX(0); }
.history-overlay-link span::after { transform:rotate(18deg) scaleX(0); }
.history-overlay-link[data-strikes] span::before { transform:rotate(-18deg) scaleX(1); }
.history-overlay-link:is([data-strikes="2"],[data-strikes="3"]) span::after { transform:rotate(18deg) scaleX(1); }
@media (prefers-reduced-motion:no-preference) {
  .history-overlay-link span::before, .history-overlay-link span::after { transition:transform .08s ease; }
}
.history-overlay-link svg { flex:none; color:var(--gold); opacity:.65; }
@media(max-width:1399px) { .history-overlay-link { display:none; } }
.overlay-builder { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,524px); gap:18px 24px; padding:20px 25px 24px; }
.overlay-options { display:grid; gap:12px; align-content:start; padding-right:12px; }
.option-row { display:grid; grid-template-columns:88px minmax(0,1fr); align-items:center; gap:16px; }
.option-row > span, .option-row > label { color:var(--gold); font-size:12px; font-weight:800; letter-spacing:.6px; text-transform:uppercase; text-align:right; }
.option-row .windows, .option-row .overlay-colors { justify-content:flex-start; }
#overlay-character { min-width:0; width:100%; max-width:330px; justify-self:start; padding:8px 12px; border:1px solid var(--line-strong); border-radius:var(--radius-sm); color:var(--text); background:var(--surface-sunken); font:700 13px var(--font-ui); }
#overlay-character:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
.overlay-colors { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:12px 16px; color:var(--text-soft); font-size:13px; font-weight:700; }
.overlay-colors label { display:flex; align-items:center; gap:6px; cursor:pointer; }
.option-row:has(.overlay-colors) { align-items:start; }
.overlay-colors small { display:block; margin-top:2px; color:var(--text-muted); font-size:11px; font-weight:600; line-height:1.4; }
.overlay-colors input { flex:none; width:30px; height:30px; padding:0; border:1px solid var(--line-strong); border-radius:8px; background:none; cursor:pointer; }
.overlay-color-actions { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:8px; }
.overlay-colors button { justify-self:start; min-height:32px; padding:5px 13px; font-size:13px; }
.overlay-stage { position:relative; overflow:hidden; padding:12px; border:1px solid var(--line); border-radius:var(--radius); background:repeating-conic-gradient(#1a2233 0 25%,#151c2b 0 50%) 0 0/20px 20px; }
/* Matching the overlay page's light scheme keeps the frame transparent instead of painting it white. */
.overlay-stage iframe { display:block; border:0; transform-origin:0 0; background:transparent; color-scheme:light; }
.overlay-builder .overlay-actions { grid-column:1 / -1; padding:0; }
.obs-help { grid-column:1 / -1; color:var(--text-soft); font-size:13px; line-height:1.6; }
.obs-help summary { cursor:pointer; width:fit-content; color:var(--gold); font-weight:700; }
.obs-help ol { margin:10px 0 8px; padding-left:22px; }
.obs-help strong { color:var(--text); }
.obs-help p { margin:0; color:var(--text-muted); }
#overlay-url { flex:1 1 280px; min-width:0; padding:9px 12px; color:var(--text-soft); background:var(--surface-sunken); border:1px solid var(--line-strong); border-radius:var(--radius-sm); font:600 13px var(--font-ui); }
#overlay-url:focus-visible { outline:2px solid var(--gold); outline-offset:1px; }
/* The overlay's chart pills, under the preview: copies of the chart panel's (same data attributes, so either set
   moves both), for the layouts with a chart. The options column spans both rows so they sit right below it. */
.overlay-builder:has(.overlay-layout-controls) { grid-template-rows:auto 1fr; }
.overlay-builder:has(.overlay-layout-controls) .overlay-options { grid-row:span 2; }
.overlay-chart-controls { align-self:start; justify-self:stretch; width:100%; max-width:100%; grid-template-columns:minmax(0,1fr); gap:8px; }
:is(.overlay-chart-controls, .overlay-stat-controls) > span { display:flex; align-items:center; gap:10px; text-align:left; }  /* CHART on its own line above the pills, */
:is(.overlay-chart-controls, .overlay-stat-controls) > span::after { content:""; flex:1; height:1px; background:var(--line); }  /* with a rule ending where the widest pill row ends. */
.chart-pill-rows { display:grid; gap:8px; }
/* The panel's grey labels, right-aligned to one width so both rows of pills start together. */
.chart-pill-rows .windows > span { min-width:46px; text-align:right; }
.overlay-chart-controls[hidden] { display:none; }
@media(max-width:1100px) { .overlay-builder { grid-template-columns:minmax(0,1fr); grid-template-rows:none; } .overlay-builder:has(.overlay-layout-controls) .overlay-options { grid-row:auto; } }
@media(max-width:650px) { .overlay-builder { padding:16px 14px 18px; } .option-row { grid-template-columns:minmax(0,1fr); gap:6px; } .option-row > span, .option-row > label { text-align:left; } }
/* Decorative wandering mobs (product.js). The lane has no height, so feet rest on the card's top border. */
/* Clip on html too, so body clips falling mobs itself rather than handing a scrollable "hidden" to the viewport. */
html, body.product { overflow-x:clip; }
.mob-lane { position:relative; z-index:1; height:0; pointer-events:none; }
.mob-lane, .mob-lane * { -webkit-tap-highlight-color:transparent; -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; }
.mob { position:absolute; left:0; bottom:-1px; }
.mob img { position:absolute; left:0; bottom:0; translate:-50% 0; pointer-events:auto; cursor:pointer; touch-action:manipulation; }
.mob-hit { position:absolute; translate:-50% 0; color:#ffb340; font:700 22px var(--font-display); text-shadow:0 2px 0 #7a2e00, 0 0 3px #000; animation:mob-hit 1s ease-out forwards; }
@keyframes mob-hit { to { transform:translateY(-34px); opacity:0; } }
.boss { position:fixed; top:0; left:0; opacity:.18; pointer-events:none; }
/* Both lists share rank, level, identity, EXP history and a right-hand score. */
.product :is(.streamer-entry,.character-entry) { grid-template-columns:36px 70px minmax(135px,190px) minmax(0,1fr) 70px; grid-template-areas:"rank level identity exp score"; }
:is(.streamer-entry,.character-entry) .rank { grid-area:rank; }
:is(.streamer-entry,.character-entry) .level { grid-area:level; }
.product .entry .level { position:relative; padding:8px 7px 6px 11px; }
:is(.streamer-entry,.character-entry) .identity { grid-area:identity; }
:is(.streamer-entry,.character-entry) .exp-section { grid-area:exp; }
:is(.streamer-entry,.character-entry) .score { grid-area:score; }
/* Names in the same face as the score, close to its size, so a player reads as prominently as their number. */
/* The job icon follows the name, shown only on hover, keyboard focus, or a finger on the row (phones: data-touched). */
:is(.streamer-entry,.character-entry) .name-line { display:flex; align-items:center; gap:6px; min-width:0; }
:is(.streamer-entry,.character-entry) .name-line .character { flex:0 1 auto; min-width:0; }
/* A long name shrinks to fit (fitName in product.js sets --fit = 22 / its width at 22px), down to 13px; below that the
   ellipsis stays. The job icon and its gap take 30px; 3px spare covers the hook padding. The line keeps its height. */
.product :is(.streamer-entry,.character-entry) .name-line { container-type:inline-size; --icon:0px; }
.product :is(.streamer-entry,.character-entry) .name-line:has(> .job-icon) { --icon:30px; }
.product :is(.streamer-entry,.character-entry) .character[style*="--fit"] { font-size:clamp(13px,calc((100cqw - var(--icon) - 3px) * var(--fit)),22px); line-height:25.3px; }
:is(.streamer-entry,.character-entry) .job-icon { flex:none; width:24px; height:24px; opacity:0; transition:opacity .15s; }
:is(.streamer-entry,.character-entry) button.job-icon, :is(.streamer-entry,.character-entry) button.job-icon:hover:not(:disabled) {
  min-height:0; padding:0; border:0; border-radius:3px; background:none; line-height:0; cursor:pointer; }
:is(.streamer-entry,.character-entry) .job-icon img { width:24px; height:24px; }
/* The icon itself is a button (it adds its job to the filter), so pointing at it brings it to full strength. */
:is(.streamer-entry,.character-entry) button.job-icon:is(:hover,:focus-visible) { opacity:1; }
@media(hover:hover) { :is(.streamer-entry,.character-entry):hover .job-icon { opacity:.85; } }
:is(.streamer-entry,.character-entry):is([data-touched],:has(:focus-visible)) .job-icon { opacity:.85; }
@media(max-width:650px) { :is(.streamer-entry,.character-entry) .job-icon { width:20px; height:20px; } }
/* Wide screens: the whole name column opens the profile (phones link the whole row); the Twitch link and the job icon's tooltip stay on top. */
@media(min-width:651px) {
  :is(.streamer-entry,.character-entry) .identity { position:relative; }
  :is(.streamer-entry,.character-entry) .identity a.character::after { content:''; position:absolute; inset:0; }
  :is(.streamer-entry,.character-entry) .identity :is(a.channel,.job-icon) { position:relative; z-index:1; }
}
.product :is(.streamer-entry,.character-entry) .character { font-family:var(--font-display); font-size:22px; font-weight:600; line-height:1.15; letter-spacing:-.2px;
  padding-left:.15em; margin-left:-.15em; }  /* Room for the hook of a leading j, which hangs left of the box that clips long names. */
/* Wide screens: the EXP block and the score both sit at the row's bottom and the label matches the age's size and line height,
   so "EXP / hour" shares a baseline with "Updated 3m ago", even when the footer wraps to a second line. */
@media(min-width:651px) {
  .product :is(.streamer-entry,.character-entry) :is(.exp-section,.score) { align-self:end; }
  .product :is(.streamer-entry,.character-entry) .score small { font-size:12px; line-height:1.5; margin-top:0; }
}
/* Phone-only twins: the short ETA and the age beside the score. */
.exp-meta .eta-short, .product .entry .score-age { display:none; }
.level .led { position:absolute; top:4px; left:4px; width:6px; height:6px; border-radius:50%; background:#262d3d; box-shadow:inset 0 1px 1px #000c, 0 0 0 1px #4f5a70; }
.level .led[data-on="true"] { background:radial-gradient(circle at 35% 35%, #f1ffc8, var(--green) 55%, var(--green-deep)); box-shadow:0 0 5px 1px #b6e65b8c; }
/* The player page's status dot lights the same way. */
.status-line .status[data-online="true"]::before { background:var(--green); box-shadow:0 0 6px #b6e65b99; }
/* Online/offline filter beside the header count: a filter icon while showing everyone, then the online or offline light. */
.presence { display:inline-flex; align-items:center; gap:6px; min-height:30px; padding:4px 11px; color:#f6e3c4; background:#00000026; border:1px solid #c2986a; border-radius:20px; font-size:12px; font-weight:800; transition:background-color .15s, border-color .15s, transform .08s; }
.presence:hover:not(:disabled) { color:#fff3dc; background:#0000004a; border-color:#ffd68c; }
.presence:active { transform:scale(.95); }
.presence::before { content:""; width:10px; height:8px; background:linear-gradient(currentColor,currentColor) 0 0/10px 2px, linear-gradient(currentColor,currentColor) 2px 3px/6px 2px, linear-gradient(currentColor,currentColor) 4px 6px/2px 2px; background-repeat:no-repeat; }
.presence:not([data-presence="all"])::before { width:7px; height:7px; border-radius:50%; background:#262d3d; box-shadow:0 0 0 1px #4f5a70; }
.presence[data-presence="online"]::before { background:var(--green); box-shadow:0 0 5px 1px #b6e65b8c; }
/* A new reading grows the bar instead of jumping, e.g. after returning to the tab. */
@media (prefers-reduced-motion:no-preference) {
  .product progress::-webkit-progress-value { transition:width .6s ease; }
  .product progress::-moz-progress-bar { transition:width .6s ease; }
}
.exp-meta { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; margin-top:7px; color:var(--text-muted); font-size:12px; font-weight:600; line-height:1.5; font-variant-numeric:tabular-nums; }
.exp-meta .fact { white-space:nowrap; }
.exp-meta .fact + .fact::before { content:"•"; margin-right:10px; color:var(--line-strong); }
.exp-meta .updated { margin-left:auto; white-space:nowrap; color:#7f889a; }
.day-chart { flex:0 0 96px; height:16px; }
.day-chart rect { fill:var(--orange); }
.day-chart rect.missing { fill:#8d98ad; opacity:.45; }
/* The sort and list notes were removed; an empty strip would only add space. */
.ranking-context:has(> p:empty):has(> span:empty) { min-height:0; padding-bottom:6px; }
@media(max-width:850px) {
  .product :is(.streamer-entry,.character-entry) { grid-template-columns:30px 66px minmax(105px,145px) minmax(0,1fr) 70px; }
}
@media(max-width:650px) {
  .product :is(.streamer-entry,.character-entry) { grid-template-columns:40px minmax(0,1fr) auto auto; grid-template-areas:"rank identity identity score" "rank channel age label" "level exp exp exp"; padding:10px 11px; row-gap:0; }
  .row-profile { display:grid; grid-area:1 / 1 / -1 / -1; grid-template-columns:inherit; grid-template-areas:inherit; gap:inherit; align-items:center; align-self:stretch; min-width:0; margin:-10px -11px; padding:10px 11px; border-radius:inherit; color:inherit; text-decoration:none; }
  .row-profile:active { background:#ffffff08; }
  .row-profile:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
  /* A renamed channel's row can't sit inside the profile link (its history button can't nest in a link, see rowContent),
     so the name's link stretches over the whole row instead; the history and job buttons stay on top. */
  :is(.streamer-entry,.character-entry):not(:has(> .row-profile)) { position:relative; }
  :is(.streamer-entry,.character-entry):not(:has(> .row-profile)) a.character::after { content:''; position:absolute; inset:0; z-index:1; border-radius:inherit; }
  :is(.streamer-entry,.character-entry):not(:has(> .row-profile)) a.character:active::after { background:#ffffff08; }
  :is(.streamer-entry,.character-entry):not(:has(> .row-profile)) :is(.history-target,.rename-history,button.job-icon) { position:relative; z-index:2; }
  /* Names use the space beside the value; age and label share the line beside the channel. */
  .product :is(.streamer-entry,.character-entry) :is(.identity,.score) { display:contents; }
  :is(.streamer-entry,.character-entry) .name-line { grid-area:identity; }
  :is(.streamer-entry,.character-entry) .channel { grid-area:channel; min-width:0; margin:2px 0 0; font-size:11px; font-weight:700; }
  :is(.streamer-entry,.character-entry) :is(.level,.exp-section) { margin-top:7px; }
  .product .streamer-entry[data-metric="day"] .score strong { font-size:22px; }
  .product .entry .level { padding:10px 1px 5px; }
  .level .led { top:3px; left:3px; }
  .exp-meta .fact + .fact::before { content:none; }  /* Items wrap onto their own lines here. */
  /* Phones: the short ETA replaces the long one, and the age moves beside the score label (see scoreAge). */
  .exp-meta :is(.eta,.updated) { display:none; }
  .exp-meta .eta-short { display:inline; margin-left:auto; }
  /* The ↑ glyph is a pixel shorter than the capitals and sits on the baseline, so it is lifted 1px to line up with their tops. */
  .exp-meta .fact.eta-short::before { content:"↑"; position:relative; top:-1px; margin-right:.25em; color:inherit; }  /* Outranks the separator rule. */
  .product :is(.streamer-entry,.character-entry) .score strong { grid-area:score; justify-self:end; }
  .product .entry .score-age { display:inline; grid-area:age; white-space:nowrap; color:#7f889a; }  /* As muted as the desktop age. */
  /* A drawn ◎ (ring and dot): the site fonts lack the glyph, and fallback fonts blot it at this size. */
  .product .entry .score-age::before { content:""; display:inline-block; width:8px; height:8px; margin-right:4px; vertical-align:0; box-sizing:border-box; border:1.5px solid currentColor; border-radius:50%; background:radial-gradient(currentColor 0 1.2px, transparent 1.7px); }
  .product .entry .score-label { grid-area:label; white-space:nowrap; }
}
/* The character's name is the player page's headline. */
.player-board #player-name { min-width:0; font-size:28px; font-weight:700; line-height:1.15; overflow-wrap:anywhere; text-shadow:0 2px 0 #4b3423; }
@media(max-width:650px) { .player-board #player-name { font-size:23px; } }
/* The job sits beside it: its skill icon plus the name, quieter but plainly readable. Narrow screens keep only the icon. */
.player-board #player-job { display:inline-flex; align-items:center; gap:6px; flex:0 1 auto; min-width:0;
  font-family:var(--font-display); font-size:17px; font-weight:600; color:var(--text-soft); text-shadow:0 1px 0 #4b3423; }
.player-board #player-job[hidden] { display:none; }
.player-board #player-job-icon { flex:none; width:32px; height:32px; }  /* 64 px source: full detail on 2x screens. */
.player-board #player-job-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media(max-width:650px) { .player-board #player-job-name { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); } }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .1s; }
/* Switching characters: a gentler fade from the old numbers to the new ones. */
:root[data-fade=slow]::view-transition-old(root), :root[data-fade=slow]::view-transition-new(root) { animation-duration: .25s; }
/* At 360px and under, five 52px pills no longer fit beside the label: three per line, the rest lined up below them. */
@media(max-width:360px) {
  .product[data-view="player"] .windows:has(> span:first-child) { grid-auto-flow:row; grid-template-columns:auto repeat(3,minmax(52px,1fr)); }
  .product[data-view="player"] .windows:has(> span:first-child) > button:nth-of-type(3n+1) { grid-column:2; }
}
/* Level planner: the "Plan" pill on the "Next level" card opens it (static/local/level-plan.js); the whole card is
   clickable. The pill is labelled and faintly gold at rest, so the feature is visible without a hover, and fills
   gold when the card is hovered. */
.companion-cards .next-card { position:relative; }
.companion-cards .next-card:has(.eta-plan) { cursor:pointer; transition:border-color .15s, background-color .15s, transform .15s; }
.companion-cards .next-card:has(.eta-plan):hover { border-color:var(--gold-deep); background:color-mix(in srgb, var(--surface-raised) 85%, var(--gold) 6%); transform:translateY(-1px); }
.companion-cards .eta-plan { position:absolute; top:10px; right:10px; display:inline-flex; align-items:center; gap:5px; height:24px; min-height:0; padding:0 9px 0 8px;
  border:1px solid color-mix(in srgb, var(--gold-deep) 55%, transparent); border-radius:999px; background:color-mix(in srgb, var(--gold) 9%, transparent);
  color:var(--gold); font-family:inherit; font-size:11px; font-weight:800; line-height:1; letter-spacing:.3px; cursor:pointer; transition:background-color .15s, color .15s, border-color .15s; }
.companion-cards .next-card:has(.eta-plan):hover .eta-plan, .companion-cards .eta-plan:focus-visible { border-color:var(--gold-deep);
  background:linear-gradient(#ffd68c,var(--gold-deep)); color:var(--on-gold); }
.planner { width:min(420px,calc(100vw - 32px)); }
.planner-from { display:grid; grid-template-columns:92px 92px auto; justify-content:start; align-items:end; gap:10px; }
/* Icon only, quiet until hovered: back to the reading's level and EXP. */
.planner-reset { display:grid; place-items:center; width:24px; height:24px; min-height:0; margin:0 0 6px 1px; padding:0; border:0;
  border-radius:50%; background:transparent; color:var(--text-muted); font:inherit; font-size:16px; line-height:1; opacity:.7; cursor:pointer; }
.planner-reset:hover:not(:disabled), .planner-reset:focus-visible { border-radius:50%; background:color-mix(in srgb, var(--gold) 14%, transparent); color:var(--gold); opacity:1; }
.planner-reset[hidden] { display:none; }
.planner-inputs { display:grid; grid-template-columns:minmax(0,1fr) 92px 92px; gap:10px; margin:10px 0 12px; }
.planner-inputs input { width:100%; }
.planner label { position:relative; }
.planner label > span { white-space:nowrap; }
/* "24 max": a small bubble under the box, over the list, so nothing moves. */
.planner-cap { position:absolute; top:100%; left:0; z-index:3; margin-top:4px; padding:2px 8px; border:1px solid var(--line-strong); border-radius:999px;
  background:var(--surface-raised); color:var(--text-soft); font-size:11px; font-weight:700; text-transform:none; letter-spacing:0; }
.planner-cap[hidden] { display:none; }
.planner label { display:grid; gap:4px; }
.planner label > span { color:var(--gold); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.5px; }
.planner input, .planner select { min-height:36px; box-sizing:border-box; padding:0 10px; border:1px solid var(--line-strong); border-radius:var(--radius-sm);
  background:var(--surface-sunken); color:var(--text); font-family:inherit; font-size:15px; font-weight:600; font-variant-numeric:tabular-nums; color-scheme:dark; }
.planner input:focus-visible, .planner select:focus-visible { outline:2px solid var(--gold); outline-offset:1px; }
.planner-table { height:240px; overflow-y:auto; border-top:1px solid var(--line); }
.planner-head, .planner-steps li { display:grid; grid-template-columns:64px 1fr auto; gap:10px; padding:6px 10px 6px 2px; }
.planner-head { position:sticky; top:0; z-index:1; padding-block:5px; border-bottom:2px solid var(--line-strong); background:var(--surface);
  color:var(--text-muted); font-size:11px; font-weight:700; letter-spacing:.3px; }
.planner-head span:last-child { text-align:right; }
.planner-steps { margin:0; padding:0; list-style:none; }
.planner-steps li { border-bottom:1px solid color-mix(in srgb, var(--line) 45%, transparent); font-variant-numeric:tabular-nums; cursor:pointer; }
.planner-steps li:hover { background:color-mix(in srgb, var(--surface-raised) 60%, transparent); }
.planner-steps li:focus-visible { outline:2px solid var(--gold); outline-offset:-2px; }
/* A tapped row shows its EXP on a line of its own. */
.planner-exp { display:none; grid-column:1 / -1; margin-top:-2px; color:var(--text-muted); font-size:12px; font-weight:600; }
.planner-steps li.open .planner-exp { display:block; }
/* The goal's row stays in view at the bottom while levels before it scroll. */
.planner-steps li.goal { position:sticky; bottom:0; border-top:2px solid var(--line-strong); border-bottom:0; background:var(--surface); color:var(--text); }
.planner-steps li.goal:hover { background:var(--surface); }
.planner-head, .planner-steps li.goal { transition:box-shadow .15s; }
.planner-table[data-up="true"] .planner-head { box-shadow:0 8px 10px -6px #000a; }
.planner-table[data-down="true"] li.goal { box-shadow:0 -8px 10px -6px #000a; }
.planner-steps li.goal { font-weight:700; }
.planner-steps li.goal b { color:var(--gold); font-weight:900; }
.planner-steps li.goal time { color:var(--text-soft); font-weight:700; }
.planner-steps li.beyond { opacity:.4; }
/* EXP table popup (static/local/exp-table.js), from the planner's header; About links to the /exp-table page. */
.planner-source { margin:0 8px 0 auto; min-height:0; height:24px; padding:0 9px; border:1px solid var(--line-strong); border-radius:999px; background:transparent;
  color:var(--text-muted); font-family:inherit; font-size:11px; font-weight:800; letter-spacing:.3px; cursor:pointer; }
.planner-source:hover, .planner-source:focus-visible { border-color:var(--gold-deep); color:var(--gold); }
.exp-table { width:min(420px,calc(100vw - 32px)); }
.exp-table-source { color:var(--text-muted); font-size:12px; font-weight:600; }
.exp-table-list { max-height:min(60vh,520px); overflow-y:auto; margin-top:8px; border-top:1px solid var(--line); }
.exp-table-row { display:grid; grid-template-columns:52px 1fr 1fr; gap:10px; padding:5px 10px 5px 2px; border-bottom:1px solid color-mix(in srgb, var(--line) 45%, transparent);
  font-variant-numeric:tabular-nums; }
.exp-table-row > :not(:first-child) { text-align:right; }
.exp-table-row b { color:var(--gold); }
.exp-table-source a { color:var(--text-soft); }
.exp-table-head { position:sticky; top:0; padding-block:5px; border-bottom:2px solid var(--line-strong); background:var(--surface); color:var(--text-muted); font-size:11px; font-weight:700; letter-spacing:.3px; }
.planner-steps b { color:var(--text); font-weight:800; }
.planner-steps time { color:var(--text-muted); font-size:13px; }
.planner-by { margin-top:12px; grid-template-columns:auto 1fr; align-items:center; }
.planner-empty { color:var(--text-muted); }
/* Daily history: days that reached a new level. */
.history-chart circle.sample.level-up { fill:var(--gold); }
.history-chart .level-mark { fill:var(--gold); font-size:11px; font-weight:800; }
@media(max-width:480px) { .planner-inputs { grid-template-columns:1fr 1fr; } .planner-inputs label:first-child { grid-column:1 / -1; } }

.overlay-stat-controls { align-items:start; }
.stat-edit-rows { display:grid; grid-template-columns:max-content minmax(0,1fr) 68px; gap:8px 0; }
.stat-edit-row { display:grid; grid-column:1 / -1; grid-template-columns:subgrid; align-items:center; border:1px solid var(--line); border-radius:8px; background:var(--surface-sunken); }
.stat-edit-row label { padding:0 10px; font-size:12px; color:var(--text-muted); white-space:nowrap; text-align:right; }
.stat-edit-row select { min-width:0; width:100%; padding:9px 24px 9px 8px; border:0; border-left:1px solid var(--line); border-radius:0; background:var(--surface-sunken); color:var(--text); font:inherit; font-size:13px; }
.stat-edit-row select:disabled { opacity:.4; }
.stat-overlap { grid-column:1 / -1; display:flex; gap:6px; margin:0; color:var(--text-muted); font-size:12px; line-height:1.4; }
.stat-overlap:empty { display:none; }
.stat-overlap::before { content:"ⓘ" / ""; color:var(--gold); }

.overlay-layout-controls { display:grid; gap:12px; align-content:start; min-width:0; }
.overlay-stat-controls { grid-template-columns:minmax(0,1fr); gap:8px; }
.overlay-stat-controls > span { text-align:left; }
.overlay-layout-controls [hidden] { display:none; }
.stat-edit-row select:focus-visible { position:relative; z-index:1; outline:2px solid var(--gold); outline-offset:-2px; }

.overlay-layout-controls > .option-row[data-for-layout]:not(.overlay-chart-controls) { grid-template-columns:max-content minmax(0,1fr); }
.overlay-layout-controls > .option-row[data-for-layout]:not(.overlay-chart-controls) > span { white-space:nowrap; }

.overlay-stat-controls > span::after { order:1; }
.overlay-stat-controls .stat-reset { order:2; padding:2px 6px; min-height:24px; border:0; border-radius:4px; background:none; color:var(--text-muted); font:600 11px var(--font-ui); text-transform:none; letter-spacing:0; }
.overlay-stat-controls .stat-reset:hover:not(:disabled) { color:var(--gold); background:var(--surface-sunken); }

.stat-edit-row option { background:var(--surface-sunken); color:var(--text); }


.stat-edit-row select { appearance:none; background-image:linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position:calc(100% - 13px) center, calc(100% - 9px) center; background-size:4px 4px; background-repeat:no-repeat; }
.stat-edit-row select:nth-of-type(2) { font-size:12px; padding-left:6px; padding-right:18px; }

.stat-edit-rows:has([data-metric="eta"]) { grid-template-columns:max-content minmax(0,1fr) 84px; }

/* Previous Twitch usernames: compact, selectable disclosure; search never expands rows. */
.rename-history[hidden] {display:none}
.rename-source {display:contents}
.rename-source:has(.rename-history:not([hidden])) {display:inline-flex;align-items:center;gap:3px;min-width:0;max-width:100%;position:relative}
.rename-source:has(.rename-history:not([hidden])) + .stream-uptime {margin-left:-8px}
.rename-source:has(.rename-history:not([hidden])) .twitch-link {max-width:100%;box-sizing:border-box}
.rename-history {flex:none;display:inline-flex;align-items:center;justify-content:center;min-height:0;width:25px;height:25px;padding:5px;border:0;border-radius:50%;background:none;color:var(--text-soft);opacity:.65;cursor:pointer}
.rename-history:hover,.rename-history:focus-visible,.rename-history[aria-expanded="true"] {opacity:1;color:var(--gold)}
.rename-history:focus-visible {outline:2px solid var(--gold);outline-offset:1px}
.product .channel.history-target {text-decoration:underline;text-decoration-style:dotted;text-decoration-color:#aab3c480;text-underline-offset:3px}
.product button.channel.history-target {position:relative;z-index:2;text-align:left;min-height:0;min-width:0;max-width:100%;width:fit-content;padding:0;border:0;border-radius:0;background:none;font:700 11px var(--font-ui);color:var(--text-muted)}
.username-history {position:fixed;z-index:100;padding:10px 13px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface);box-shadow:0 4px 15px #0006;color:var(--text-soft);font:12px/1.6 var(--font-ui);white-space:nowrap;user-select:text;cursor:text}
.username-history strong {display:block;color:var(--text);font-weight:700}
.username-history[hidden] {display:none}
.product .channel.alias-query-match {text-decoration-color:var(--gold);color:var(--text-soft)}
.username-history mark {padding:0 1px;border-radius:2px;background:#ffc56b;color:#232c3e}
@media(max-width:650px) {.rename-source:has(.rename-history:not([hidden])) + .stream-uptime {margin-left:0}}

/* The /exp-table page (exp-table.html): the table (rows written in at build time, tools/export_pages.py) beside the
   level planner (static/local/level-plan.js, the popup's own module and styles). Stacked on narrow screens. */
.exp-layout { position:relative; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,440px); gap:20px; align-items:start; }
/* scenery.js puts the mobs' lane before the first board; it shares the boards' row (0 tall), so nothing moves as it comes and goes. */
.exp-layout > .mob-lane { grid-area:1 / 1 / 2 / -1; align-self:start; }
.exp-board { grid-area:1 / 1; }
/* The table's board ends inside the window (about 170px of header above, the footer and padding below), so scrolling the
   list never hides that the page itself goes on; the list takes whatever height is left. */
.exp-board { display:flex; flex-direction:column; max-height:max(420px, calc(100dvh - 240px)); }
.exp-page main { padding-bottom:16px; }
.exp-planner { grid-area:1 / 2; }
/* A wooden plank over the gap, level with the boards' tops and over their rounded corners, for the mobs to walk across. */
.exp-layout::before { content:""; position:absolute; z-index:1; top:-1px; right:426px; width:48px; height:7px; box-sizing:border-box;
  border:1px solid #4b3423; border-radius:3px; box-shadow:0 2px 3px #0007, inset 0 1px #ffffff26; pointer-events:none;
  background:repeating-linear-gradient(90deg, transparent 0 11px, #4b342399 11px 12px), linear-gradient(var(--wood-line), var(--wood));
  transition:opacity .2s ease-out; }
.product[data-loading] .exp-layout::before { opacity:0; animation:reveal 0s 2s forwards; }  /* Fades in with the boards. */
.exp-page .board-header h1 { margin:0; font-family:var(--font-display); font-size:18px; font-weight:600; letter-spacing:.2px; }
.exp-page-intro { margin:0; padding:12px 18px 10px; color:var(--text-soft); font-size:13px; line-height:1.5; }
.exp-page-scroll { flex:1; min-height:0; overflow-y:auto; border-top:1px solid var(--line); }
.exp-page-table { width:100%; border-collapse:collapse; font-size:14px; font-variant-numeric:tabular-nums; }
.exp-page-table th, .exp-page-table td { padding:5px 18px; border-bottom:1px solid color-mix(in srgb, var(--line) 45%, transparent); text-align:right; }
.exp-page-table th:first-child { width:56px; text-align:left; }
.exp-page-table thead th { position:sticky; top:0; z-index:1; background:var(--surface); border-bottom:2px solid var(--line-strong); color:var(--text-muted); font-size:11px; font-weight:700; letter-spacing:.3px; }
.exp-page-table tbody th { color:var(--gold); }
.exp-page-table tbody tr:hover, .exp-page-table tbody tr:target { background:color-mix(in srgb, var(--surface-raised) 60%, transparent); }
.exp-planner { position:sticky; top:16px; }
.exp-planner .planner { width:auto; padding:14px 18px 16px; color:var(--text-soft); font-size:14px; }
.exp-planner .planner-table { height:clamp(150px, calc(100dvh - 510px), 240px); }  /* Shorter windows: the planner's list gives way too. */
.exp-page-foot { margin:14px 4px 0; color:var(--text-muted); font-size:12px; font-weight:600; }
.exp-page-foot a { color:var(--text-soft); }
@media(max-width:860px) { .exp-planner .planner-table { height:240px; } .exp-layout { grid-template-columns:minmax(0,1fr); } .exp-layout::before { display:none; } .exp-planner { grid-area:2 / 1; position:static; } .exp-board { max-height:none; } .exp-page-scroll { flex:none; max-height:60vh; } }
@media(max-width:650px) { .exp-page-table th, .exp-page-table td { padding:5px 12px; } .exp-page-intro { padding:10px 14px 8px; } .exp-planner .planner { padding:12px 14px 14px; } }
/* Long lists: each group's label above its first row, in the toolbar captions' style (SORT BY, JOB) and left edge,
   with a rule to the right: 12px under the pills and 5px above its row, as SORT BY sits under the header and above the pills. */
.product .entry[data-divider] { position:relative; margin-top:16px; }
.product .entry[data-divider]:not(:first-child) { margin-top:32px; }  /* Sibling margins collapse: 12px above the label here too. */
.product .entry[data-divider]::before { content:attr(data-divider); position:absolute; left:2px; bottom:calc(100% + 5px); padding-right:10px;
  z-index:1; background:var(--surface); color:var(--text-muted); font-size:10px; font-weight:800; line-height:15px; letter-spacing:1px; text-transform:uppercase; pointer-events:none; }
.product .entry[data-divider]::after { content:''; position:absolute; left:2px; right:0; bottom:calc(100% + 12px); border-top:1px solid var(--line); pointer-events:none; }
/* The alt a search found takes the channel's line (product.js altsNote), so the row keeps its height. */
.product .entry[data-divider=""]::before { content:none; }
.product .entry[data-divider=""]::after { opacity:.6; }
.product .entry .alts { display:block; min-width:0; color:var(--gold); font-size:11px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-decoration:none; }
.product .entry a.alts { position:relative; z-index:1; }
.product .entry a.alts:hover { text-decoration:underline; }
/* The list's end mirrors its start: "50 OF 85" in the group labels' caption style and left edge, then a full-width bar of
   how much is shown where the rule would run, then Show more, centred. As much space under it as above it. */
.product .more-row { display:flex; flex-direction:column; align-items:center; gap:14px; margin:0 20px 18px; }
.product .more-row[hidden] { display:none; }
.product .more-line { display:flex; align-items:center; gap:10px; align-self:stretch; padding-left:2px; }
.product .more-count { color:var(--text-muted); font-size:10px; font-weight:800; line-height:15px; letter-spacing:1px; text-transform:uppercase; font-variant-numeric:tabular-nums; white-space:nowrap; }
.product .more-bar { flex:1; height:2px; border-radius:1px; background:var(--line); overflow:hidden; }
.product .more-bar > span { display:block; height:100%; background:var(--gold); opacity:.8; }
@media(max-width:650px) { .product .more-row { margin:0 12px 14px; } }
/* A faint "/" in the search box says the key focuses it; hidden while typing, once filled, and on touch screens. */
.character-controls label { position:relative; }
.search-key { position:absolute; right:8px; top:50%; transform:translateY(-50%); min-width:9px; padding:0 4px; border:1px solid var(--line-strong); border-radius:4px; color:var(--text-muted); font:700 11px/16px var(--font-ui); text-align:center; opacity:.7; pointer-events:none; }
#character-filter:is(:focus,:not(:placeholder-shown)) + .search-key { display:none; }
@media(hover:hover) { #character-filter { padding-right:30px; } }  /* Room for the hint, so the placeholder never runs under it. */
@media(hover:none) { .search-key { display:none; } }
/* "Online sort" shares the presence filter's pill; its dot is lit while on, like a level badge's light. */
#online-first[aria-pressed="true"]::before { background:var(--green); box-shadow:0 0 5px 1px #b6e65b8c; }
#online-first[hidden] { display:none; }
/* The count and the filter's label change as it cycles; fixed widths keep the header from re-wrapping and moving the search. */
.board-tools #board-count { min-width:18ch; text-align:right; font-variant-numeric:tabular-nums; }
#presence { min-width:76px; justify-content:center; box-sizing:border-box; }
/* Phones: product.js moves the count and the online controls to the right of the job filter, styled like the toolbar. */
@media(max-width:650px) {
  .job-controls .job-filter { justify-self:stretch; }
  .job-filter .board-tools { margin-left:auto; gap:8px; }
  /* The count becomes a caption above the pills, beside JOB, so the row fits 360px and its changing length moves nothing. */
  .job-filter .board-tools { position:relative; }
  .job-filter .board-tools #board-count { position:absolute; right:2px; bottom:calc(100% + 8px);  /* 5px, plus the pills sitting 3px lower than the 36px job button. */
    min-width:0; color:var(--text-muted);
    font-size:9px; font-weight:700; letter-spacing:1px; line-height:normal; text-transform:uppercase; white-space:nowrap; }
  .job-filter .presence { color:var(--text-soft); background:var(--surface-raised); border-color:var(--line-strong); }
  .job-filter .presence:hover:not(:disabled) { color:var(--text); background:var(--surface-raised); border-color:var(--gold); }
}
/* Phones: identity is display:contents there, so the alt a search found takes the channel's grid area. */
@media(max-width:650px) { .product .entry .alts { grid-area:channel; margin:2px 0 0; } }
