/* Sumi Anime. Black and white interface: the anime artwork brings the
   colour. Archivo throughout, its condensed widths for titles. */

/* Archivo served by the site itself (licence: fonts/OFL.txt): no request
   to a third party on each visit. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(/fonts/archivo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(/fonts/archivo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #0b0b0c;
  --bg-2: #111112;
  --card: #18181a;
  --card-2: #222224;
  --line: #29292b;
  --line-2: #3b3b3e;
  --text: #f2f0eb;
  --muted: #a3a09a;
  --ink: #0b0b0c;
  --scrim: rgb(8 8 9 / 0.78);
  --radius: 4px;
  --wrap: 1360px;
  --gutter: clamp(16px, 3vw, 36px);
  --header: 60px;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --kana: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-color: var(--line-2) transparent;
  accent-color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.5 var(--font); overflow-x: clip;
  -webkit-font-smoothing: antialiased; caret-color: var(--text);
}
::selection { background: var(--text); color: var(--ink); }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
[tabindex='-1']:focus { outline: none; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 60; padding: 10px 14px;
  background: var(--text); color: var(--ink); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: currentColor; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.num { font-variant-numeric: tabular-nums; }

/* Condensed titling voice */
.display, .section__title, .page-title, .hero__title, .anime-top h1, .logo__word, .widget__title {
  font-stretch: 72%; font-weight: 800; text-transform: uppercase; letter-spacing: 0.005em;
}

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 0 32px; min-height: var(--header); flex-wrap: wrap; }
.logo { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.logo__word { font-size: 1.6rem; line-height: 1; font-weight: 900; letter-spacing: 0.02em; }
.logo__kana {
  font-family: var(--kana); font-size: 0.72rem; font-weight: 600; color: var(--muted);
  letter-spacing: 0.12em; padding-left: 10px; border-left: 1px solid var(--line-2);
}
.menu { display: flex; gap: 26px; align-self: stretch; overflow-x: auto; scrollbar-width: none; }
.menu a {
  position: relative; display: flex; align-items: center; text-decoration: none; white-space: nowrap;
  color: var(--muted); font-weight: 600; font-size: 0.95rem;
}
.menu a:hover { color: var(--text); }
.menu a[aria-current='page'] { color: var(--text); }
.menu a[aria-current='page']::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--text);
}
.search {
  position: relative; margin-left: auto; display: flex; align-items: center; flex: 0 1 320px;
  height: 38px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.search:focus-within { border-color: var(--text); }
.search button {
  display: grid; place-items: center; width: 38px; height: 100%; padding: 0;
  border: 0; background: none; color: var(--muted); cursor: pointer;
}
.search button:hover { color: var(--text); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; padding-right: 10px; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search input::-webkit-search-cancel-button { filter: invert(1) grayscale(1); }
.search__key {
  margin-right: 8px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 3px;
  font: 600 0.75rem/18px var(--font); color: var(--muted);
}
.search:focus-within .search__key, .search input:not(:placeholder-shown) ~ .search__key { display: none; }
@media (max-width: 760px) {
  .site-header__inner { gap: 0 16px; padding-top: 10px; }
  .menu { order: 3; flex-basis: 100%; height: 44px; gap: 22px; }
  .search { flex: 1 1 140px; }
  .search__key, .logo__kana { display: none; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 40px 0 48px; color: var(--muted); font-size: 0.9rem; }
.site-footer__grid { display: grid; gap: 28px 48px; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__about { grid-column: 1 / -1; } }
.site-footer__about .logo__word { color: var(--text); margin-bottom: 10px; font-size: 1.3rem; }
.site-footer__about p { max-width: 46ch; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 14px; color: var(--text); }
.site-footer h2 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); margin-bottom: 12px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Generic ---------- */
main { outline: none; min-height: 60vh; }
.state { color: var(--muted); padding-block: 40px; }
.state a, .link { color: var(--text); text-decoration: underline; }
.page { padding-top: 28px; }
.section { margin-top: 48px; }
.section:first-child { margin-top: 0; }
.section__head { display: flex; align-items: center; gap: 12px 20px; margin-bottom: 16px; flex-wrap: wrap; }
.section__title { font-size: 1.55rem; line-height: 1; }
.section__count { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.more {
  margin-left: auto; display: inline-flex; align-items: center; gap: 2px;
  color: var(--muted); font-weight: 600; font-size: 0.875rem; text-decoration: none;
}
.more .icon { width: 18px; height: 18px; }
.more:hover { color: var(--text); }
.muted { color: var(--muted); }
.page-title { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 0.95; }
.page-lede { margin-top: 10px; color: var(--muted); max-width: 62ch; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 0.85rem; margin: 0 0 16px; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: '/'; margin-right: 6px; color: var(--line-2); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--radius); border: 1px solid var(--line-2); cursor: pointer;
  font-weight: 600; text-decoration: none; white-space: nowrap; background: transparent; color: var(--text);
  transition: background-color 150ms ease, border-color 150ms ease;
}
.btn:hover { background: var(--card-2); border-color: #55555a; }
.btn--primary { background: var(--text); border-color: var(--text); color: var(--ink); font-weight: 700; }
.btn--primary:hover { background: #ffffff; border-color: #ffffff; }
.btn--sm { height: 36px; padding: 0 12px; font-size: 0.875rem; }
.btn .icon { width: 20px; height: 20px; }
.btn--sm .icon { width: 18px; height: 18px; }
.btn[aria-disabled='true'], .btn:disabled { opacity: 0.4; pointer-events: none; }
.btn[aria-pressed='true'] { background: var(--card-2); border-color: var(--text); }
.btn--icon { width: 44px; padding: 0; }

/* Segmented control: language, filters */
.segmented:empty { display: none; }
.segmented { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.segmented > * {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: 0.85rem; text-decoration: none; white-space: nowrap;
}
.segmented > * + * { border-left: 1px solid var(--line-2); }
.segmented > *:hover { color: var(--text); background: var(--card); }
.segmented > [aria-pressed='true'], .segmented > [aria-current='true'] { background: var(--text); color: var(--ink); }
.segmented > :disabled, .segmented > [aria-disabled='true'] { opacity: 0.35; cursor: not-allowed; background: none; color: var(--muted); }

/* Chips (catalogue genres) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; height: 30px; padding: 0 10px; border-radius: 3px;
  border: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; font-weight: 600; text-decoration: none;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip[aria-current='true'] { background: var(--text); border-color: var(--text); color: var(--ink); }

/* Underlined tabs (seasons, my list) */
.tabs { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs > button {
  position: relative; flex: 0 0 auto; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-weight: 600; white-space: nowrap;
}
.tabs > button:hover { color: var(--text); }
.tabs > [aria-pressed='true'], .tabs > [aria-selected='true'] { color: var(--text); }
.tabs > [aria-pressed='true']::after, .tabs > [aria-selected='true']::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text);
}
.tabs .count { color: var(--muted); font-weight: 500; margin-left: 4px; }

/* Language badges: VF light, VOSTFR outlined */
.badge {
  display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border-radius: 2px;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.05em; line-height: 1;
}
.badge--vf { background: var(--text); color: var(--ink); }
.badge--vostfr { background: rgb(8 8 9 / 0.72); color: var(--text); box-shadow: inset 0 0 0 1px rgb(242 240 235 / 0.5); }

/* ---------- Cards ---------- */
.grid {
  display: grid; gap: 26px 16px; margin: 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
}
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 10px; } }
.card a { display: block; text-decoration: none; }
.card__media {
  position: relative; border-radius: var(--radius); overflow: hidden; background: var(--card);
  outline: 2px solid transparent; outline-offset: 3px; transition: outline-color 150ms ease;
}
.card__media img { aspect-ratio: 16 / 10; width: 100%; height: auto; object-fit: cover; }
.card__media::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgb(0 0 0 / 0.72), transparent 42%);
}
.card a:hover .card__media, .card a:focus-visible .card__media { outline-color: var(--text); }
.card a:focus-visible { outline: none; }
.card__badges { position: absolute; top: 8px; left: 8px; z-index: 2; display: flex; gap: 4px; }
.card__time {
  position: absolute; top: 8px; right: 8px; z-index: 2; padding: 2px 6px; border-radius: 2px;
  background: rgb(8 8 9 / 0.78); font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.card__ep { position: absolute; left: 10px; bottom: 9px; z-index: 2; font-size: 0.85rem; font-weight: 700; }
.card__progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 3px; background: rgb(255 255 255 / 0.2); }
.card__progress span { display: block; height: 100%; background: var(--text); }
.card__title {
  margin-top: 10px; font-size: 0.95rem; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card a:hover .card__title { text-decoration: underline; }
.card__sub { margin-top: 3px; color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.card--aired { opacity: 0.55; }

/* Horizontal rows */
.row-wrap { position: relative; --col: clamp(180px, 17vw, 236px); }
.row {
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--col); gap: 16px;
  margin: 0 -6px; padding: 6px 6px 4px; list-style: none;
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 6px; scrollbar-width: none;
}
.row > li { scroll-snap-align: start; }
.row-btn {
  position: absolute; z-index: 5; top: calc(6px + var(--col) * 0.3125); translate: 0 -50%;
  width: 36px; height: 56px; border-radius: var(--radius); border: 1px solid var(--line-2); cursor: pointer;
  display: grid; place-items: center; background: rgb(11 11 12 / 0.92); color: var(--text);
}
.row-btn:hover { background: var(--text); color: var(--ink); border-color: var(--text); }
.row-btn--prev { left: -10px; }
.row-btn--next { right: -10px; }
.row-btn[hidden] { display: none; }
@media (hover: none) { .row-btn { display: none; } }
.placeholder { aspect-ratio: 16 / 10; border-radius: var(--radius); background: var(--card); }

/* ---------- Hero slider ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  /* Leaves room on screen for the ad at the top of the column below. */
  min-height: clamp(400px, 58vh, 580px); display: flex; align-items: flex-end;
}
.hero__art { position: absolute; inset: 0; z-index: -2; background: var(--bg-2); }
.hero__art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%;
  opacity: 0; transition: opacity 900ms var(--ease);
}
.hero__art img.is-active { opacity: 1; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgb(11 11 12 / 0.94) 0%, rgb(11 11 12 / 0.66) 34%, rgb(11 11 12 / 0) 68%),
    linear-gradient(0deg, var(--bg) 0%, rgb(11 11 12 / 0) 38%);
}
.hero__inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px; padding-bottom: 36px; }
.hero__copy { max-width: 640px; }
.hero__title { font-size: clamp(2.6rem, 6vw, 5rem); line-height: 0.9; }
.hero__title a { text-decoration: none; }
.hero__meta { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: #d6d3cd; font-size: 0.9rem; font-weight: 500; }
.hero__meta .sep { color: var(--muted); }
.hero__synopsis {
  margin-top: 14px; color: #cfccc6; max-width: 58ch;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero__actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.hero__actions .btn:not(.btn--primary) { background: rgb(11 11 12 / 0.55); }
.hero__nav { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 8px; width: 300px; }
.hero__count { font-size: 0.95rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 8px; }
.hero__count span { color: var(--muted); font-weight: 500; }
.hero__next { grid-column: 1 / -1; grid-row: 2; font-size: 0.82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.hero__next b { color: var(--text); font-weight: 600; }
.hero__progress { grid-column: 1 / -1; grid-row: 3; height: 2px; background: rgb(255 255 255 / 0.18); overflow: hidden; }
.hero__progress span { display: block; height: 100%; width: 100%; background: var(--text); transform-origin: left; transform: scaleX(0); }
.hero__progress span.is-running { animation: hero-progress var(--hero-delay, 7000ms) linear forwards; }
@keyframes hero-progress { to { transform: scaleX(1); } }
.square-btn {
  width: 40px; height: 40px; border-radius: var(--radius); cursor: pointer; display: grid; place-items: center;
  border: 1px solid rgb(255 255 255 / 0.28); background: rgb(11 11 12 / 0.6); color: var(--text);
}
.square-btn:hover { background: var(--text); color: var(--ink); border-color: var(--text); }
@media (max-width: 760px) {
  /* Short enough for the ad under it to show on arrival on most phones. */
  .hero { min-height: 470px; }
  .hero::before { background: linear-gradient(0deg, var(--bg) 8%, rgb(11 11 12 / 0.78) 52%, rgb(11 11 12 / 0.12)); }
  .hero__nav { width: 100%; }
  .hero__next { display: none; }
  .hero__meta > :nth-child(n+6) { display: none; }
}

/* ---------- Two-column layout with sidebar ---------- */
/* minmax(0, 1fr): horizontal rows must not widen the column on phones. */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; padding-top: 32px; }
@media (min-width: 1100px) { .layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.layout--flush { padding-top: 0; }
.sidebar { display: grid; gap: 40px; }
@media (min-width: 1100px) {
  .sidebar { position: sticky; top: calc(var(--header) + 24px); }
  /* Always on the right, whatever the order in the page (phones show it first on some pages). */
  .layout > .sidebar { order: 1; }
  /* Scrolls with the page, as tall as the content: its last ad then stays
     in view beside the content once the rest of the column has gone by. */
  .sidebar--static { position: static; align-self: stretch; align-content: start; }
  .ad-sticky { position: sticky; top: calc(var(--header) + 24px); }
}
.widget__title {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: 1.35rem; line-height: 1; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line);
}
.widget__title a {
  font: 600 0.8rem/1 var(--font); text-transform: none; letter-spacing: 0;
  color: var(--muted); text-decoration: none;
}
.widget__title a:hover { color: var(--text); text-decoration: underline; }

/* Ad beside the content: fixed size, so nothing moves when it loads. */
.ad { display: grid; grid-template-columns: minmax(0, max-content); justify-content: center; gap: 6px; }
/* On phones, the ad in the page flow, right after the first block. */
.ad-block { margin: 0 0 32px; }
/* Computers: a 728 × 90 banner between two sections. */
.ad-banner { margin: 36px 0 44px; display: grid; justify-content: center; }
/* Across the catalogue grid, halfway down the page. */
.grid__ad { grid-column: 1 / -1; display: grid; justify-content: center; padding-block: 12px; }
.grid__ad > .ad-block, .grid__ad > .ad-banner { margin: 0; }
.watch-main .ad-banner { margin: 24px 0 0; }
.watch-main .ad-block { margin: 16px 0; }
.ad__label { color: var(--muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.ad iframe { display: block; max-width: 100%; border: 0; background: transparent; }

/* Day tabs (sidebar) */
.days { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 10px; }
.days button {
  position: relative; display: grid; gap: 1px; padding: 6px 0 8px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: 0.75rem; text-align: center;
}
.days button b { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.days button:hover { color: var(--text); }
.days button[aria-selected='true'] { color: var(--text); }
.days button[aria-selected='true']::after { content: ''; position: absolute; left: 6px; right: 6px; bottom: 0; height: 2px; background: var(--text); }

.schedule { display: grid; margin: 0; padding: 0; list-style: none; }
.schedule a {
  display: grid; grid-template-columns: 50px 76px 1fr; gap: 10px; align-items: center;
  padding: 8px 0; text-decoration: none; border-bottom: 1px solid var(--line);
}
.schedule a:hover .schedule__title { text-decoration: underline; }
.schedule__time { font-weight: 700; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.schedule__thumb { width: 76px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 3px; background: var(--card); }
.schedule__title { font-size: 0.88rem; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.schedule__meta { display: flex; gap: 6px; align-items: center; margin-top: 4px; color: var(--muted); font-size: 0.75rem; }
.schedule .is-aired { opacity: 0.5; }
.schedule__now {
  display: flex; align-items: center; gap: 8px; padding: 8px 0 6px;
  font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.schedule__now::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--text); }
.schedule__now::after { content: ''; flex: 1; height: 1px; background: var(--text); }

/* Genre index (sidebar) */
.genre-index { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; margin: 0; padding: 0; list-style: none; }
.genre-index a { display: block; padding: 5px 0; color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.genre-index a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Planning page ---------- */
.planning-days { display: grid; grid-template-columns: repeat(7, minmax(84px, 1fr)); overflow-x: auto; scrollbar-width: none; margin: 24px 0 8px; border-bottom: 1px solid var(--line); }
.planning-days button {
  position: relative; padding: 10px 8px 12px; border: 0; background: none; cursor: pointer; text-align: left;
  color: var(--muted); font-weight: 700;
}
.planning-days button span { display: block; font-size: 0.78rem; font-weight: 500; margin-top: 2px; font-variant-numeric: tabular-nums; }
.planning-days button:hover { color: var(--text); }
.planning-days button[aria-selected='true'] { color: var(--text); }
.planning-days button[aria-selected='true']::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); }
.schedule--page a { grid-template-columns: 76px 160px 1fr; gap: 20px; padding: 14px 0; }
.schedule--page .schedule__thumb { width: 160px; }
.schedule--page .schedule__time { font-size: 1.3rem; font-stretch: 80%; }
.schedule--page .schedule__title { font-size: 1.05rem; }
@media (max-width: 560px) {
  .schedule--page a { grid-template-columns: 52px 100px 1fr; gap: 12px; }
  .schedule--page .schedule__thumb { width: 100px; }
  .schedule--page .schedule__time { font-size: 1.05rem; }
}

/* ---------- Catalogue ---------- */
.filters { display: grid; gap: 22px; }
.filter-group__label { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field {
  width: 100%; height: 40px; padding: 0 10px; border-radius: var(--radius);
  border: 1px solid var(--line-2); background: var(--card); color: var(--text);
}
.field:focus { border-color: var(--text); outline: none; }
.pagination { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 40px; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--radius); display: inline-grid; place-items: center;
  border: 1px solid var(--line); text-decoration: none; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums;
}
.pagination a:hover { color: var(--text); border-color: var(--line-2); }
.pagination [aria-current='page'] { background: var(--text); border-color: var(--text); color: var(--ink); }
.pagination .gap { border: 0; }

/* ---------- Anime page ---------- */
.anime-top { position: relative; isolation: isolate; padding: 28px 0 40px; }
.anime-top__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.anime-top__bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(36px) brightness(0.32) saturate(0.9); transform: scale(1.15); }
.anime-top__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgb(11 11 12 / 0.3), var(--bg)); }
.anime-top__grid { display: grid; grid-template-columns: minmax(260px, 440px) 1fr; gap: 36px; align-items: start; }
@media (max-width: 860px) { .anime-top__grid { grid-template-columns: 1fr; gap: 24px; } }
/* Computers: the ad is a third column, beside the anime's details. */
@media (min-width: 1100px) { .anime-top__grid--ad { grid-template-columns: minmax(220px, 30%) minmax(0, 1fr) 320px; } }
.anime-top__media { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; }
.anime-top__media img { aspect-ratio: 16 / 10; width: 100%; height: auto; object-fit: cover; }
.anime-top__media iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.media-caption { margin-top: 10px; font-size: 0.85rem; color: var(--muted); }
.media-caption a { color: var(--muted); text-decoration: none; }
.media-caption a:hover { color: var(--text); text-decoration: underline; }
.anime-top h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 0.92; }
.alt-titles { margin-top: 10px; color: var(--muted); font-size: 0.9rem; }
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; margin: 16px 0 0; padding: 0; list-style: none; font-size: 0.92rem; }
.facts li:not(:last-child)::after { content: ''; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--muted); margin: 0 10px; vertical-align: middle; }
.facts .icon { width: 16px; height: 16px; vertical-align: -2px; margin-right: 3px; }
.facts .rating { font-weight: 700; }
.inline-links { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 0; padding: 0; list-style: none; font-size: 0.9rem; color: var(--muted); }
.inline-links li:not(:last-child):not(.label)::after { content: ','; margin-right: 6px; }
.inline-links a { color: var(--text); text-decoration: none; }
.inline-links a:hover { text-decoration: underline; }
.inline-links .label { color: var(--muted); margin-right: 8px; }
.external .icon { width: 14px; height: 14px; vertical-align: -1px; margin-left: 2px; }
.synopsis { margin-top: 18px; color: #d2cfc9; max-width: 72ch; }
.synopsis[data-collapsed='true'] p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.link-btn { margin-top: 6px; background: none; border: 0; padding: 0; color: var(--text); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }
.anime-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

.episodes-section { padding-top: 8px; }
.episodes-section .tabs { margin-bottom: 18px; }
/* Episode lists per language in the page sent before the app starts. */
.episodes-section > h3 { margin: 28px 0 12px; }

/* ---------- Questions and about page ---------- */
/* First child of #faq in the app, so .section:first-child would remove it. */
.section.faq { margin-top: 56px; }
.faq__list { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); column-gap: 40px; }
.faq__item { padding: 16px 0; border-top: 1px solid var(--line); }
.faq dt { font-weight: 700; }
.faq dd { margin: 6px 0 0; color: var(--muted); max-width: 62ch; }
.about { display: grid; gap: 36px; margin-top: 36px; max-width: 72ch; }
.about .section__title { margin-bottom: 10px; }
.about p, .about li { color: #d2cfc9; }
.about ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.report__note { color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line); padding-top: 16px; }
.episodes-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-left: auto; }
.goto { display: inline-flex; align-items: center; height: 34px; border: 1px solid var(--line-2); border-radius: var(--radius); }
.goto:focus-within { border-color: var(--text); }
.goto label { padding: 0 4px 0 10px; color: var(--muted); font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.goto input {
  width: 64px; height: 100%; border: 0; background: none; outline: none; padding: 0 6px;
  font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.goto input::-webkit-outer-spin-button, .goto input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.goto button { height: 100%; padding: 0 10px; border: 0; border-left: 1px solid var(--line-2); background: none; cursor: pointer; font-weight: 700; font-size: 0.82rem; }
.goto button:hover { background: var(--text); color: var(--ink); }
.goto-msg { flex-basis: 100%; color: var(--muted); font-size: 0.85rem; text-align: right; }
.goto-msg:empty { display: none; }

.episodes {
  display: grid; gap: 6px; margin: 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
}
.ep {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  min-height: 70px; padding: 10px 12px; border-radius: var(--radius); overflow: hidden; text-decoration: none;
  background: var(--card); outline: 1px solid transparent; outline-offset: -1px;
}
.ep:hover { background: var(--card-2); outline-color: var(--line-2); }
.ep__num { font-size: 1.5rem; line-height: 1; font-weight: 800; font-stretch: 75%; font-variant-numeric: tabular-nums; }
.ep__num small { font-size: 0.7rem; font-weight: 600; font-stretch: 100%; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-right: 4px; vertical-align: 0.35em; }
.ep__state { display: flex; align-items: center; gap: 4px; font-size: 0.74rem; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 1em; }
.ep__state .icon { width: 14px; height: 14px; }
.ep__bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--text); }
.ep.is-watched { background: var(--bg-2); }
.ep.is-watched .ep__num { color: var(--muted); }
.ep[aria-current='true'] { background: var(--text); color: var(--ink); }
.ep[aria-current='true'] .ep__state, .ep[aria-current='true'] .ep__num small { color: rgb(11 11 12 / 0.7); }
.ep[aria-current='true'] .ep__num { color: var(--ink); }
.episodes--compact { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 4px; }
.episodes--compact .ep { min-height: 46px; padding: 6px; align-items: center; justify-content: center; }
.episodes--compact .ep__num { font-size: 1.15rem; }

/* ---------- Watch page ---------- */
.watch-layout { display: grid; gap: 28px; }
@media (min-width: 1100px) {
  .watch-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .watch-side { position: sticky; top: calc(var(--header) + 20px); max-height: calc(100vh - var(--header) - 40px); overflow: auto; scrollbar-width: thin; }
  .watch-layout.is-cinema { grid-template-columns: minmax(0, 1fr); }
  .watch-layout.is-cinema .watch-side { position: static; max-height: none; }
}
/* Beside the video (under it on phones), above the episode list: in view on arrival. */
.watch-side .ad { margin-bottom: 20px; }
.watch-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 16px; }
.watch-title h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 0.95; font-stretch: 72%; font-weight: 800; text-transform: uppercase; }
.watch-title h1 a { text-decoration: none; }
.watch-title h1 a:hover { text-decoration: underline; }
.watch-title__ep { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.player { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; max-height: 78vh; width: 100%; }
.is-cinema .player { max-height: calc(100vh - var(--header) - 24px); }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.player__overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; background: rgb(0 0 0 / 0.78); }
.player__overlay[hidden] { display: none; }
.player__overlay p { margin: 0 0 16px; font-size: 1.05rem; }
.player__overlay .btn { margin: 4px; }
.toast {
  position: absolute; left: 16px; bottom: 64px; display: flex; gap: 12px; align-items: center;
  padding: 10px 14px; border-radius: var(--radius); background: rgb(11 11 12 / 0.94); border: 1px solid var(--line-2);
}
.toast[hidden] { display: none; }
.toast button { background: none; border: 0; color: var(--text); font-weight: 700; cursor: pointer; text-decoration: underline; }
.watch-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.watch-bar__group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.servers { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.servers__label { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-right: 6px; }
.server {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--line-2); background: none; color: var(--text); font-weight: 600; font-size: 0.85rem;
}
.server .icon { width: 16px; height: 16px; }
.server:hover { background: var(--card-2); }
.server[aria-pressed='true'] { background: var(--text); border-color: var(--text); color: var(--ink); }
.server:disabled { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }
.hint { margin-top: 14px; color: var(--muted); font-size: 0.8rem; }
/* Keyboard shortcuts mean nothing on a touch screen. */
@media (hover: none) and (pointer: coarse) { .hint { display: none; } }
kbd { font: 600 0.78rem var(--font); padding: 1px 6px; border-radius: 3px; border: 1px solid var(--line-2); color: var(--text); }
.side-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.side-head h2 { font-size: 1.3rem; line-height: 1; font-stretch: 72%; font-weight: 800; text-transform: uppercase; }
.side-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.side-tools .goto-msg { text-align: left; }

/* ---------- My list ---------- */
.list-tabs { margin: 22px 0 26px; }
.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-grid { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .panel-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.panel h2 { font-size: 1.35rem; line-height: 1; font-stretch: 72%; font-weight: 800; text-transform: uppercase; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.panel p { color: #d2cfc9; max-width: 60ch; }
.panel > * + *, #phone-address > * + * { margin-top: 12px; }
.panel .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.steps { margin: 0; padding-left: 1.2em; color: #d2cfc9; display: grid; gap: 6px; }
.steps strong { color: var(--text); }
.address { display: inline-block; margin-top: 8px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--radius); font-weight: 700; font-variant-numeric: tabular-nums; user-select: all; }
.notice { margin-top: 14px; padding: 10px 12px; border-left: 1px solid var(--text); background: var(--bg-2); font-size: 0.9rem; }
.notice:empty { display: none; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 44px; height: 44px; border-radius: var(--radius);
  border: 1px solid var(--line-2); cursor: pointer; display: grid; place-items: center; background: var(--bg-2); color: var(--text);
}
.to-top:hover { background: var(--text); color: var(--ink); }
.to-top[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .hero__art img, .card__media, .btn { transition: none; }
  .hero__progress { display: none; }
}
