/* Yoka's own styles. Shared tokens and components come from djcns.css, which this
   file never edits: anything here wins over it because djcns.css sits in cascade
   layers. Tokens only (var(--accent), var(--data-1)...), never colour literals, so
   every palette keeps working. */

/* Each type has its own colour, from the palette's data series, so a cover with no
   picture, a count by type and a tile all read apart in every palette. */
[data-type] { --type: var(--accent); }
[data-type="film"] { --type: var(--data-1); }
[data-type="tv"] { --type: var(--data-2); }
[data-type="book"] { --type: var(--data-3); }
[data-type="game"] { --type: var(--data-4); }
[data-type="album"] { --type: var(--data-5); }

/* Home's summary under the date: Shinpo's tiles, for what you finished. */
.app-header__summary:empty { display: none; }
.ytiles { margin-top: 4px; }
.ytiles__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ytile { --tile: var(--accent); display: grid; min-width: 0; min-height: 44px; padding: 6px 8px; grid-template-columns: auto minmax(0, 1fr); gap: 7px; align-items: center; border: 1px solid color-mix(in srgb, var(--tile) 30%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--tile) 7%, transparent); color: var(--muted-bright); }
.ytile[data-tile="run"] { --tile: var(--data-2); }
.ytile[data-tile="next"] { --tile: var(--data-3); }
.ytile strong { color: var(--ink); font-size: clamp(1rem, 4.6vw, 1.22rem); font-weight: 900; line-height: 1; letter-spacing: -.04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ytile > span { display: grid; min-width: 0; gap: 3px; line-height: 1; }
.ytile b,
.ytile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ytile b { font-size: .56rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ytile small { color: var(--muted); font-size: .62rem; font-weight: 600; }
.ytile.is-lit { border-color: color-mix(in srgb, var(--tile) 62%, transparent); background: color-mix(in srgb, var(--tile) 20%, transparent); box-shadow: 0 0 16px color-mix(in srgb, var(--tile) 22%, transparent); }
.ytile.is-lit strong { color: color-mix(in srgb, var(--white) 18%, var(--tile)); }
.ytile.is-lit b { color: color-mix(in srgb, var(--white) 30%, var(--tile)); }
.ytile.is-lit small { color: color-mix(in srgb, var(--white) 50%, var(--tile)); }
/* On a narrow phone the number sits over its label, so nothing is cut. */
@media (max-width: 379px) {
  .ytile { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 6px 8px 7px; }
}

/* Search: one field over everything, your library first. */
.search { position: relative; display: grid; }
.search__icon { position: absolute; top: 50%; left: 14px; width: 20px; height: 20px; fill: none; stroke: var(--muted-bright); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; transform: translateY(-50%); }
.search__input { width: 100%; min-width: 0; min-height: 52px; padding: 12px 52px 12px 44px; border: 1px solid var(--glass-edge); border-radius: var(--radius-md); background: color-mix(in srgb, var(--void) 70%, transparent); color: var(--ink); font-size: var(--text-input); -webkit-appearance: none; appearance: none; }
.search__input::placeholder { color: var(--placeholder); }
.search__input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search__clear { position: absolute; top: 4px; right: 4px; display: grid; width: var(--target); height: var(--target); padding: 0; place-items: center; border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted-bright); font-size: 1.5rem; line-height: 1; }
.search__clear[hidden] { display: none; }
.search-results { display: grid; min-width: 0; gap: var(--stack); align-content: start; }
.search-note { margin: 0; }
.result-group { display: grid; min-width: 0; gap: var(--space-2); }
.result-group h2,
.shelf__head h2 { margin: 0; color: var(--muted-bright); font-size: var(--text-label); font-weight: var(--weight-bold); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.add-own { border-style: dashed; background: none; }
.add-own .row__side { color: var(--accent); font-size: 1.5rem; }

/* Covers: the source's picture over a tile with the type and title, so a missing
   picture still reads. Films, shows, books and games are 2:3; albums are square. */
.cover { position: relative; display: block; flex: 0 0 auto; aspect-ratio: 2 / 3; overflow: hidden; border: 1px solid color-mix(in srgb, var(--type) 30%, var(--line)); border-radius: 10px; background: linear-gradient(160deg, color-mix(in srgb, var(--type) 34%, var(--panel)), color-mix(in srgb, var(--type) 10%, var(--void))); }
/* The plain palettes, Light and Dark (DJ, 2026-11-30: no colour gradient): a cover without a picture is one flat tint. */
:root:is([data-palette="athletic-light"], [data-palette="athletic-dark"]) .cover { background: color-mix(in srgb, var(--type) 18%, var(--panel)); }
:root:is([data-palette="athletic-light"], [data-palette="athletic-dark"]) .ytile.is-lit { box-shadow: none; }
/* On a light page (Light), the type and tile colours as text go toward the ink, not toward white. */
:root[data-scheme="light"] .cover__fallback b { color: color-mix(in srgb, var(--type) 70%, var(--ink)); }
:root[data-scheme="light"] .ytile.is-lit strong,
:root[data-scheme="light"] .ytile.is-lit b { color: color-mix(in srgb, var(--tile) 70%, var(--ink)); }
:root[data-scheme="light"] .ytile.is-lit small { color: color-mix(in srgb, var(--tile) 55%, var(--ink)); }
.cover[data-type="album"] { aspect-ratio: 1; }
.cover--s { width: 46px; border-radius: 7px; }
.cover--m { width: 100%; }
.cover--l { width: clamp(108px, 34vw, 156px); border-radius: 14px; box-shadow: var(--shadow-card); }
.cover--person { aspect-ratio: 1; border-radius: 50%; }
.cover__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover__fallback { position: absolute; inset: 0; display: grid; padding: 8px; gap: 4px; align-content: end; color: var(--ink); overflow: hidden; }
.cover__fallback b { color: color-mix(in srgb, var(--white) 35%, var(--type)); font-size: .58rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.cover__fallback span { display: -webkit-box; overflow: hidden; font-size: .78rem; font-weight: var(--weight-bold); line-height: 1.15; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow-wrap: anywhere; }
.cover--s .cover__fallback { padding: 4px; align-content: center; }
.cover--s .cover__fallback span { display: none; }
.cover--s .cover__fallback b { font-size: .5rem; letter-spacing: .04em; text-align: center; }
.cover--l .cover__fallback span { font-size: .95rem; }
.cover__ring { position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--void) 72%, transparent); }
.cover__ring-track { fill: none; stroke: var(--track); stroke-width: 4; }
.cover__ring-fill { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.cover__count { position: absolute; top: 5px; left: 5px; display: grid; min-width: 38px; padding: 4px 6px 3px; justify-items: center; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 9px; background: color-mix(in srgb, var(--void) 78%, transparent); line-height: 1; }
.cover__count strong { color: var(--ink); font-size: 1.05rem; font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.cover__count small { color: var(--accent); font-size: .52rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.cover__count--today strong { color: var(--accent); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.cover--s .cover__count,
.cover--s .cover__ring { display: none; }

/* Home's shelves: sideways rows of covers, one per kind of thing. Each row scrolls
   on its own; the page never scrolls sideways. */
.shelf { display: grid; min-width: 0; gap: var(--space-2); }
.shelf__head { display: flex; gap: var(--space-2); align-items: baseline; justify-content: space-between; }
.shelf__head > span { color: var(--muted); font-size: var(--text-label); font-weight: var(--weight-bold); }
.shelf__row { display: grid; min-width: 0; margin: 0; padding: 2px 2px 8px; grid-auto-columns: 112px; grid-auto-flow: column; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; list-style: none; scroll-snap-type: x proximity; scrollbar-width: none; }
.shelf__row::-webkit-scrollbar { display: none; }
.shelf__row > li { min-width: 0; scroll-snap-align: start; }
.shelf__card { display: grid; min-width: 0; gap: 6px; color: inherit; text-decoration: none; }
.shelf__card:active .cover { transform: scale(var(--press-scale)); }
.shelf__title { display: -webkit-box; overflow: hidden; font-size: var(--text-small); font-weight: var(--weight-semibold); line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.shelf__note { display: block; overflow: hidden; color: var(--muted-bright); font-size: var(--text-label); text-overflow: ellipsis; white-space: nowrap; }

/* Rows of things: a small cover, the title and its facts, where you are with it. */
.item-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; width: 100%; min-height: 64px; padding: 9px 12px 9px 9px; gap: var(--space-3); align-items: center; border: 1px solid var(--glass-edge-soft); border-radius: 16px; background-color: var(--glass-card); background-image: var(--glass-sheen-soft); color: inherit; text-decoration: none; }
.item-row__main { display: grid; min-width: 0; gap: 3px; }
.item-row__main strong { font-size: var(--text-item); font-weight: var(--weight-semibold); line-height: 1.25; overflow-wrap: anywhere; }
.item-row__main small { color: var(--muted-bright); font-size: var(--text-small); line-height: 1.35; overflow-wrap: anywhere; }
.item-row__main .item-row__soon { color: var(--accent); font-weight: var(--weight-semibold); }
.item-row__side { display: grid; justify-items: end; gap: var(--space-1); }
.item-row__add { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 50%; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.rating-mini { color: var(--muted-bright); font-size: var(--text-label); font-weight: var(--weight-bold); white-space: nowrap; }
/* A row with its own button beside it, such as a list's ×: siblings, never one inside the other. */
.with-after { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); align-items: center; }
/* A row too narrow for its title and its badge side by side puts the badge under the title. At 320 px a
   list's row, beside its ×, left the title 7 px and "Want to watch" covered it (2026-11-30). The row needs
   about 290 px for both; the list's li holds the × as well. */
li:has(> .item-row) { container: item-row / inline-size; }
@container item-row (max-width: 289.98px) {
  .item-row { grid-template-columns: auto minmax(0, 1fr); }
  .item-row__side { grid-column: 2; justify-items: start; }
}
@container item-row (max-width: 341.98px) {
  .with-after > .item-row { grid-template-columns: auto minmax(0, 1fr); }
  .with-after > .item-row .item-row__side { grid-column: 2; justify-items: start; }
}

/* A work's own page: the cover beside its title, the ways to add it under. */
.work-hero { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-4); align-items: end; }
.work-hero__text { display: grid; min-width: 0; gap: var(--space-2); }
.work-title { margin: 0; font-size: clamp(1.35rem, 6vw, 1.9rem); font-weight: var(--weight-bold); line-height: 1.12; letter-spacing: -.03em; overflow-wrap: anywhere; }
.work-facts,
.work-finished { margin: 0; color: var(--muted-bright); font-size: var(--text-small); line-height: 1.4; }
.work-soon { margin: 0; color: var(--accent); font-size: var(--text-small); font-weight: var(--weight-semibold); line-height: 1.4; }
.add-actions { display: grid; gap: var(--space-2); }
.facts { display: grid; margin: 0; gap: var(--space-2); }
.facts > div { display: grid; grid-template-columns: minmax(84px, 30%) minmax(0, 1fr); gap: var(--space-3); }
.facts dt { color: var(--muted); font-size: var(--text-small); }
.facts dd { margin: 0; font-size: var(--text-small); overflow-wrap: anywhere; }
/* The source's credit under a work: a link big enough for a thumb, in a line of text. */
.credit a,
.watch__credit a { display: inline-flex; min-width: var(--target); min-height: var(--target); padding-inline: 4px; align-items: center; color: var(--muted-bright); }

/* Cast and crew. */
.people { gap: 6px; }
.person-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; min-height: 56px; padding: 6px 10px 6px 6px; gap: var(--space-3); align-items: center; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--glass-deep); color: inherit; text-decoration: none; }
.person-row > span[aria-hidden="true"] { color: var(--muted); font-size: 1.2rem; }
.person-row__main { display: grid; min-width: 0; gap: 2px; }
.person-row__main strong { font-size: var(--text-body); font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.person-row__main small { color: var(--muted-bright); font-size: var(--text-small); }
.avatar { position: relative; display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, var(--panel)); color: var(--ink); font-weight: var(--weight-bold); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.people .btn { width: 100%; }

/* Where to watch: each way in the person's country as logos and names, then the
   services that stream it elsewhere. The country in the head opens Settings. */
.panel__link { display: inline-flex; min-height: var(--target); align-items: center; color: var(--accent); font-size: var(--text-small); font-weight: var(--weight-semibold); text-decoration: none; }
.watch { gap: var(--space-3); }
.watch__way { display: grid; gap: var(--space-2); }
.watch__way h3 { margin: 0; color: var(--muted); font-size: var(--text-label); font-weight: var(--weight-bold); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.providers { display: flex; margin: 0; padding: 0; flex-wrap: wrap; gap: var(--space-2); list-style: none; }
.provider { display: inline-flex; min-height: var(--target); max-width: 100%; padding: 5px 12px 5px 5px; gap: var(--space-2); align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--glass-deep); font-size: var(--text-body); font-weight: var(--weight-semibold); }
.provider > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.provider__logo { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: var(--radius-xs); background: color-mix(in srgb, var(--accent) 16%, var(--panel)); color: var(--ink); font-size: var(--text-small); font-weight: var(--weight-bold); }
.provider__logo img { width: 100%; height: 100%; object-fit: cover; }
.elsewhere { display: grid; gap: var(--space-2); }
.elsewhere > summary { display: flex; min-height: var(--target); align-items: center; gap: var(--space-2); color: var(--ink); font-size: var(--text-body); font-weight: var(--weight-semibold); cursor: pointer; list-style: none; }
.elsewhere > summary::-webkit-details-marker { display: none; }
.elsewhere > summary::before { content: "›"; display: inline-block; color: var(--muted); font-size: 1.2rem; transition: transform .2s ease; }
.elsewhere[open] > summary::before { transform: rotate(90deg); }
.elsewhere .list { gap: 6px; }
.provider-row { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.provider-row .row__main small { overflow-wrap: anywhere; }

/* One thing in the library: where you are, progress, rating, note. */
.status-picker button { flex-basis: 40%; }
.progress-grid { grid-template-columns: minmax(0, 1fr); }
.rating { width: 100%; height: var(--target); margin: 0; accent-color: var(--accent); }
.rating-stars { display: flex; gap: 6px; margin-top: -6px; color: var(--track); font-size: 1.5rem; line-height: 1; }
.rating-stars .is-full { color: var(--accent); }
.rating-stars .is-half { background: linear-gradient(90deg, var(--accent) 50%, var(--track) 50%); background-clip: text; -webkit-background-clip: text; color: transparent; }
.finish-row { grid-template-columns: minmax(0, 1fr) auto; }
.list-chips .chip:last-child { border-style: dashed; }

/* Library and lists. */
.library-filters { align-items: end; }

/* Record. */
.record-hero { justify-items: center; padding-block: 26px; text-align: center; }
.record-hero__label { color: var(--muted-bright); font-size: var(--text-small); font-weight: var(--weight-semibold); }
.type-counts { display: grid; margin: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.type-counts > div { display: grid; min-width: 0; padding: 10px 11px; gap: 4px; border: 1px solid var(--line); border-top: 3px solid var(--type); border-radius: var(--radius-md); background: var(--glass-deep); }
.type-counts dt { overflow: hidden; color: var(--muted-bright); font-size: var(--text-label); font-weight: var(--weight-bold); letter-spacing: .06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.type-counts dd { margin: 0; font-size: var(--text-stat); font-weight: var(--weight-semibold); line-height: 1.1; font-variant-numeric: tabular-nums; }

/* More's pages. */
.file-btn { position: relative; cursor: pointer; }
.file-btn:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.credits { gap: var(--space-2); }
.principles { display: grid; margin: 0; padding: 0; gap: 10px; list-style: none; }
.principles li { color: var(--muted-bright); font-size: .92rem; line-height: 1.5; }
.principles strong { color: var(--ink); font-weight: var(--weight-semibold); }

@media (min-width: 901px) {
  .app-header__summary { grid-column: 1 / -1; }
  .ytiles__row { max-width: 640px; }
  .shelf__row { grid-auto-columns: 132px; gap: 16px; }
}

/* index.html's plain "open it again" link, for a page that loaded without this stylesheet. */
.load-rescue { display: none; }
