:root {
  --bg: #070303;
  --bg-2: #100606;
  --panel: #170909;
  --panel-2: #21100c;
  --ink: #fff4e1;
  --muted: #bfae9a;
  --dim: #806f65;
  --red: #e53725;
  --red-2: #8f120d;
  --gold: #f4b95f;
  --gold-2: #a66a25;
  --line: rgba(255, 224, 177, .16);
  --line-red: rgba(229, 55, 37, .38);
  --shadow: 0 22px 70px rgba(0, 0, 0, .48);
  --sharp: 0px;
  --font-display: "Bahnschrift", "Arial Narrow", "Franklin Gothic Condensed", Impact, sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 0%, rgba(229, 55, 37, .24), transparent 32rem),
    radial-gradient(circle at 88% 20%, rgba(244, 185, 95, .12), transparent 28rem),
    linear-gradient(135deg, #050202 0%, #100404 48%, #070303 100%);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
img { max-width: 100%; display: block; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .13;
  z-index: 0;
  background-image:
    linear-gradient(115deg, transparent 0 38%, rgba(255,255,255,.07) 39%, transparent 40% 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 4px);
  mix-blend-mode: overlay;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 82px;
  padding: 0 clamp(16px, 4vw, 56px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  background: rgba(7, 3, 3, .86);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line-red);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), var(--gold), transparent);
  opacity: .55;
}

.brand {
  border: 0;
  background: transparent;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--red), #5b0705);
  border: 1px solid rgba(244,185,95,.48);
  box-shadow: 9px 9px 0 rgba(0,0,0,.35), inset 0 0 22px rgba(255,255,255,.08);
  font-size: 28px;
  font-weight: 900;
}

.brand-text strong,
.brand-text small {
  display: block;
  letter-spacing: .14em;
  line-height: 1;
  font-family: var(--font-display);
}
.brand-text strong { font-size: 23px; }
.brand-text small { color: var(--gold); margin-top: 4px; font-size: 10px; }

.nav-strip {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,.035);
  padding: 7px;
  border: 1px solid var(--line);
  max-width: 100%;
  overflow: auto;
  scrollbar-width: none;
}
.nav-strip::-webkit-scrollbar { display: none; }

.nav-link {
  position: relative;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
}
.nav-link.active,
.nav-link:hover {
  background: linear-gradient(135deg, var(--red-2), var(--red));
  color: white;
}

.top-actions { display: flex; gap: 10px; align-items: center; }

.solid-action,
.ghost-action,
.text-action,
.small-btn {
  border: 1px solid transparent;
  min-height: 42px;
  padding: 0 16px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 12px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.solid-action {
  background: linear-gradient(135deg, var(--red), #aa160e 70%, #5c0704);
  color: #fff8eb;
  border-color: rgba(244,185,95,.4);
  box-shadow: 7px 7px 0 rgba(0,0,0,.32);
}
.solid-action:hover { transform: translate(-2px, -2px); box-shadow: 9px 9px 0 rgba(0,0,0,.34); }
.ghost-action {
  background: rgba(255,255,255,.04);
  border-color: var(--line);
  color: var(--ink);
}
.ghost-action:hover { border-color: var(--gold); background: rgba(244,185,95,.08); }
.text-action {
  border: 0;
  background: transparent;
  color: var(--gold);
  padding: 0;
  min-height: auto;
}
.small-btn {
  min-height: 34px;
  padding: 0 11px;
  background: rgba(255,255,255,.05);
  border-color: var(--line);
}
.small-btn:disabled { opacity: .36; cursor: not-allowed; }
.large { min-height: 52px; padding-inline: 20px; }
.full { width: 100%; }

.shell {
  position: relative;
  z-index: 1;
  width: min(1540px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 110px;
}
.view { display: none; animation: viewIn .24s ease both; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
}
.hero-panel {
  min-height: 520px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(33, 8, 8, .98), rgba(14,4,4,.92));
  border: 1px solid var(--line-red);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(330px, .85fr) minmax(300px, 1fr);
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(112deg, rgba(229,55,37,.12) 0 20%, transparent 20% 100%),
    repeating-linear-gradient(90deg, transparent 0 68px, rgba(255,255,255,.025) 68px 69px);
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: clamp(28px, 5vw, 64px);
  align-self: end;
}
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  font-weight: 950;
}
.section-kicker::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--red);
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -.02em; text-transform: uppercase; }
.hero-copy h1 {
  font-size: clamp(48px, 7.3vw, 112px);
  line-height: .87;
  margin: 18px 0;
  max-width: 760px;
}
.hero-copy p,
.page-title-row p,
.watch-box p,
.auth-split p { color: var(--muted); line-height: 1.65; max-width: 720px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.hero-art {
  position: relative;
  min-height: 480px;
  isolation: isolate;
}
.hero-art .hero-poster {
  position: absolute;
  width: min(58%, 330px);
  aspect-ratio: 2/3;
  object-fit: cover;
  right: 11%;
  bottom: 40px;
  border: 1px solid rgba(244,185,95,.38);
  box-shadow: -18px 18px 0 rgba(0,0,0,.42), 0 26px 70px rgba(0,0,0,.5);
  transform: rotate(2deg);
}
.hero-art .hero-banner {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .36;
  filter: saturate(1.18) contrast(1.08);
  z-index: -2;
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--panel) 0%, transparent 52%), linear-gradient(0deg, #080303 0%, transparent 60%);
  z-index: -1;
}

.pulse-card, .watch-box, .content-band, .search-filter-card, .calendar-filters, .profile-card, .profile-form-card {
  background: linear-gradient(160deg, rgba(32,12,9,.92), rgba(12,5,5,.92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.pulse-card { padding: 26px; min-height: 520px; }
.pulse-card h2, .band-head h2, .watch-box h2 { font-size: 32px; margin-top: 8px; }
.release-stack { display: grid; gap: 12px; margin-top: 22px; }
.release-stack.compact { max-height: 405px; overflow: auto; padding-right: 4px; }

.release-item {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  padding: 11px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
}
.release-item::before { content: ""; position: absolute; inset-block: 0; left: 0; width: 3px; background: var(--red); }
.release-thumb { width: 58px; aspect-ratio: 2/3; object-fit: cover; background: #250e0d; }
.release-title { font-weight: 950; line-height: 1.2; }
.release-meta { color: var(--muted); font-size: 12px; margin-top: 5px; }
.countdown { color: var(--gold); font-size: 12px; font-weight: 950; margin-top: 8px; letter-spacing: .04em; }

.content-band { margin-top: 20px; padding: 24px; }
.band-head, .page-title-row, .results-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.band-head.flush { margin-bottom: 18px; }
.poster-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(178px, 220px);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
}
.poster-card {
  position: relative;
  min-height: 318px;
  overflow: hidden;
  background: #1a0907;
  border: 1px solid rgba(255,255,255,.08);
  scroll-snap-align: start;
}
.poster-card img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; transition: transform .25s ease; }
.poster-card:hover img { transform: scale(1.045); }
.poster-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.92) 0 28%, transparent 70%);
}
.poster-info { position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 12px; }
.poster-info strong { display: block; line-height: 1.15; }
.poster-info span { color: var(--gold); font-size: 12px; font-weight: 900; }

.split-band { display: grid; grid-template-columns: 1fr 380px; gap: 18px; background: transparent; box-shadow: none; border: 0; padding: 0; }
.watch-box { padding: 24px; }
.accent-box { background: linear-gradient(135deg, rgba(117,14,9,.86), rgba(33,10,7,.96)); border-color: var(--line-red); }
.mini-list { display: grid; gap: 10px; }
.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  color: var(--muted);
  background: rgba(255,255,255,.025);
  line-height: 1.55;
}

.page-title-row { align-items: center; margin-bottom: 24px; }
.page-title-row h1 { font-size: clamp(42px, 6vw, 84px); line-height: .9; margin-top: 8px; }
.title-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.calendar-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas:
    "days days"
    "results filters";
  gap: 18px;
  align-items: start;
}
.weekday-dock {
  grid-area: days;
  display: grid;
  grid-template-columns: repeat(8, minmax(104px, 1fr));
  gap: 8px;
}
.day-chip {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  padding: 14px 8px;
  text-align: left;
  min-height: 72px;
}
.day-chip.active { border-color: var(--red); background: linear-gradient(135deg, rgba(229,55,37,.22), rgba(244,185,95,.08)); }
.day-chip strong { display: block; text-transform: uppercase; font-family: var(--font-display); font-size: 20px; }
.day-chip span { color: var(--muted); font-size: 12px; }

.calendar-filters, .search-filter-card { padding: 20px; position: sticky; top: 104px; }
.calendar-filters { grid-area: filters; }
.calendar-filters h3, .search-filter-card h3 { font-size: 26px; margin-bottom: 18px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 14px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.25);
  color: var(--ink);
  min-height: 44px;
  padding: 0 12px;
  outline: none;
}
textarea { min-height: 120px; padding: 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(244,185,95,.08); }

.calendar-results { grid-area: results; min-width: 0; }
.pager { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 900; }
.release-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.release-card {
  display: grid;
  grid-template-columns: 114px 1fr;
  min-height: 174px;
  background: linear-gradient(135deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
  border: 1px solid rgba(255,255,255,.09);
  overflow: hidden;
  position: relative;
}
.release-card:hover { border-color: rgba(244,185,95,.42); }
.release-card img { width: 114px; height: 100%; object-fit: cover; }
.release-card-body { padding: 14px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.release-card h3 { font-size: 22px; line-height: 1; text-transform: none; letter-spacing: -.01em; overflow-wrap: anywhere; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { color: var(--gold); border: 1px solid rgba(244,185,95,.22); background: rgba(244,185,95,.06); padding: 4px 7px; font-size: 11px; font-weight: 900; }
.card-actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }

.search-board { display: grid; grid-template-columns: 1fr 310px; gap: 18px; align-items: start; }
.search-main { min-width: 0; }
.search-input-label { margin-bottom: 16px; }
#searchInput { min-height: 62px; font-size: 20px; border-color: var(--line-red); background: rgba(0,0,0,.32); }
.search-results { display: grid; gap: 12px; }
.search-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 16px;
  padding: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.search-row img { width: 92px; aspect-ratio: 2/3; object-fit: cover; }
.search-row h3 { font-size: 26px; text-transform: none; line-height: 1.05; }
.search-row p { color: var(--muted); line-height: 1.45; margin: 8px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-row-actions { display: flex; flex-direction: column; gap: 8px; justify-content: center; min-width: 146px; }

.library-controls {
  display: grid;
  grid-template-columns: 210px 220px 220px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.list-tabs { display: flex; gap: 8px; overflow: auto; padding-bottom: 12px; margin-bottom: 8px; }
.list-tab {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}
.list-tab.active { color: white; border-color: var(--red); background: rgba(229,55,37,.2); }
.library-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.library-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
}
.library-card .poster-wrap { position: relative; aspect-ratio: 2/3; background: #140807; }
.library-card img { width: 100%; height: 100%; object-fit: cover; }
.library-card .lib-body { padding: 14px; }
.library-card h3 { font-size: 22px; line-height: 1; text-transform: none; }
.progress-track { height: 8px; background: rgba(255,255,255,.08); margin: 12px 0 8px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--red), var(--gold)); width: 0; }
.lib-meta { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 8px; }

.library-list { display: block; }
.library-list-shell {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  overflow: hidden;
}
.library-list-head,
.library-list-row {
  display: grid;
  grid-template-columns: minmax(320px, 2.1fr) 1fr 1.15fr .9fr 1.1fr .9fr;
  align-items: center;
}
.library-list-head {
  padding: 14px 18px;
  background: rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.library-list-body { display: grid; }
.library-list-row {
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.library-list-row:last-child { border-bottom: 0; }
.library-list-anime { display: flex; gap: 14px; align-items: center; min-width: 0; }
.library-list-thumb {
  width: 58px;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255,255,255,.1);
  background: #140807;
  overflow: hidden;
  flex: 0 0 auto;
}
.library-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.library-list-main { min-width: 0; display: grid; gap: 6px; }
.library-list-title {
  width: fit-content;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  line-height: .96;
  text-transform: none;
}
.library-list-title:hover { color: var(--gold); }
.library-list-sub { color: var(--muted); font-size: 12px; }
.library-list-cell { min-width: 0; color: var(--ink); }
.library-list-cell strong { font-size: 15px; }
.library-list-cell small { color: var(--muted); }
.status-pill, .list-name-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  font-size: 12px;
  font-weight: 800;
}
.list-name-badge { white-space: normal; line-height: 1.25; }
.progress-track.small { margin: 8px 0 4px; height: 6px; }
.tag-row.compact { margin-top: 2px; }
.tag-row.compact .tag { font-size: 10px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { padding: 24px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08); }
.stat-card strong { display: block; font-family: var(--font-display); font-size: 44px; line-height: 1; color: var(--gold); }
.stat-card span { color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.genre-bars { display: grid; gap: 12px; }
.genre-bar { display: grid; grid-template-columns: 170px 1fr 36px; gap: 12px; align-items: center; color: var(--muted); }
.genre-bar-fill { height: 12px; background: rgba(255,255,255,.08); overflow: hidden; }
.genre-bar-fill i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--gold)); }

.profile-shell { display: grid; grid-template-columns: 390px 1fr; gap: 18px; align-items: start; }
.profile-card, .profile-form-card { padding: 28px; }
.avatar-frame {
  width: 132px; height: 132px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red), #3b0706);
  border: 2px solid var(--gold);
  font-family: var(--font-display);
  font-size: 72px;
  overflow: hidden;
}
.avatar-frame img { width: 100%; height: 100%; object-fit: cover; }
.profile-card h1 { margin-top: 20px; font-size: 52px; }
.profile-card p { color: var(--muted); line-height: 1.55; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.detail-dialog, .auth-dialog {
  width: min(1060px, calc(100vw - 28px));
  max-height: min(920px, calc(100vh - 28px));
  border: 1px solid var(--line-red);
  padding: 0;
  background: #090303;
  color: var(--ink);
  box-shadow: 0 36px 100px rgba(0,0,0,.78);
}
dialog::backdrop { background: rgba(0,0,0,.74); backdrop-filter: blur(7px); }
.modal-close {
  position: absolute;
  right: 12px; top: 12px;
  z-index: 6;
  width: 42px; height: 42px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(0,0,0,.58);
  font-size: 26px;
}
.detail-hero {
  min-height: 390px;
  position: relative;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  padding: 62px 34px 26px;
  overflow: hidden;
}
.detail-hero::before { content:""; position:absolute; inset:0; background: linear-gradient(0deg,#090303 0%,rgba(9,3,3,.74) 42%,rgba(9,3,3,.45)); z-index:0; }
.detail-hero .backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; filter: saturate(1.2); }
.detail-hero > *:not(.backdrop) { position: relative; z-index: 1; }
.detail-poster { width: 240px; aspect-ratio: 2/3; object-fit: cover; border: 1px solid rgba(244,185,95,.4); box-shadow: -13px 13px 0 rgba(0,0,0,.45); }
.detail-title h2 { font-size: clamp(42px, 6vw, 88px); line-height: .9; margin-bottom: 16px; }
.detail-meta-grid { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.detail-body { padding: 26px 34px 34px; display: grid; grid-template-columns: 1fr 330px; gap: 24px; }
.detail-copy p { color: var(--muted); line-height: 1.7; }
.episode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; margin-top: 14px; }
.episode-btn { min-height: 42px; border: 1px solid var(--line); background: rgba(255,255,255,.04); font-weight: 900; }
.episode-btn.watched { background: linear-gradient(135deg, var(--red), var(--gold)); color: #170504; border-color: transparent; }
.side-editor { display: grid; gap: 12px; align-content: start; }
.auth-split { display: grid; grid-template-columns: .75fr 1fr; gap: 28px; padding: 34px; }
.auth-split h2 { font-size: 54px; line-height: .9; margin: 12px 0; }
.auth-form { display: grid; gap: 4px; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.auth-tab {
  min-height: 42px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  color: var(--muted);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.auth-tab.active {
  color: #170504;
  border-color: transparent;
  background: linear-gradient(135deg, var(--red), var(--gold));
  box-shadow: 6px 6px 0 rgba(0,0,0,.36);
}
.auth-status {
  margin-top: 20px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.24);
  color: var(--muted);
  padding: 12px 14px;
  line-height: 1.55;
  font-size: 13px;
}
.auth-status.ok { border-color: rgba(244,185,95,.45); color: var(--gold); }
.auth-status.err { border-color: rgba(225,35,35,.55); color: #ffb7a9; }
.is-hidden { display: none !important; }


.mobile-tabs { display: none; }
.toast-host { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 10px; }
.toast { background: #130707; border: 1px solid var(--line-red); color: var(--ink); padding: 13px 15px; box-shadow: var(--shadow); max-width: 360px; }

@media (max-width: 1180px) {
  .topbar { grid-template-columns: auto 1fr; height: auto; padding-block: 12px; }
  .top-actions { grid-column: 2; justify-self: end; }
  .nav-strip { grid-column: 1 / -1; justify-self: stretch; }
  .hero-grid, .split-band, .search-board, .profile-shell, .detail-body { grid-template-columns: 1fr; }
  .calendar-stage { grid-template-columns: 1fr; grid-template-areas: "days" "filters" "results"; }
  .calendar-filters, .search-filter-card { position: static; }
  .library-grid { grid-template-columns: repeat(3, 1fr); }
  .release-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 720px); padding-top: 18px; padding-bottom: 92px; }
  .topbar { position: relative; grid-template-columns: 1fr auto; padding: 12px; }
  .brand-text strong { font-size: 18px; }
  .brand-mark { width: 42px; height: 42px; }
  .nav-strip { display: none; }
  .top-actions .ghost-action { display: none; }
  .solid-action, .ghost-action { min-height: 40px; padding-inline: 12px; }
  .hero-panel { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding: 30px 20px; }
  .hero-copy h1 { font-size: 52px; }
  .hero-art { min-height: 360px; order: -1; }
  .hero-art .hero-poster { width: 48%; right: 8%; bottom: 22px; }
  .pulse-card { min-height: 0; padding: 20px; }
  .weekday-dock { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .day-chip { min-width: 128px; }
  .library-controls { grid-template-columns: 1fr; }
  .library-grid, .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .search-row { grid-template-columns: 74px 1fr; }
  .search-row img { width: 74px; }
  .search-row-actions { grid-column: 1 / -1; flex-direction: row; justify-content: stretch; }
  .search-row-actions button { flex: 1; }
  .detail-hero { grid-template-columns: 120px 1fr; padding: 58px 16px 20px; gap: 14px; min-height: 300px; }
  .detail-poster { width: 120px; }
  .detail-title h2 { font-size: 38px; }
  .detail-body { padding: 18px; }
  .auth-split { grid-template-columns: 1fr; padding: 24px; }
  .mobile-tabs {
    position: fixed;
    left: 10px; right: 10px; bottom: 10px;
    z-index: 40;
    display: flex;
    align-items: stretch;
    background: rgba(7,3,3,.92);
    border: 1px solid var(--line-red);
    backdrop-filter: blur(16px);
    padding: 6px;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-tabs::-webkit-scrollbar { display: none; }
  .mobile-tab { flex: 0 0 auto; min-width: 86px; border: 0; background: transparent; color: var(--muted); min-height: 46px; padding-inline: 10px; font-size: 11px; font-weight: 900; text-transform: uppercase; }
  .mobile-tab.active { background: rgba(229,55,37,.22); color: white; }
}

@media (max-width: 460px) {
  .library-grid, .stats-grid { grid-template-columns: 1fr; }
  .poster-rail { grid-auto-columns: minmax(152px, 190px); }
  .release-card { grid-template-columns: 88px 1fr; }
  .release-card img { width: 88px; }
  .release-card h3 { font-size: 19px; }
  .hero-copy h1 { font-size: 42px; }
}

/* --- UI repair pass: cleaner hero, release cards, detail modal, scrollbars --- */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(244,185,95,.72) rgba(255,255,255,.06);
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: rgba(255,255,255,.055); border-left: 1px solid rgba(244,185,95,.08); }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--red), var(--gold));
  border: 2px solid #130605;
  min-height: 44px;
}
*::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #ff4935, #ffd083); }

.hero-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, 430px); align-items: stretch; }
.hero-panel { min-height: 420px; grid-template-columns: minmax(310px, .9fr) minmax(280px, .85fr); }
.hero-copy { padding: clamp(28px, 4vw, 48px); align-self: center; }
.hero-copy h1 { font-size: clamp(46px, 6vw, 82px); line-height: .9; max-width: 620px; }
.hero-actions { margin-top: 22px; }
.hero-art { min-height: 390px; }
.hero-art .hero-poster { width: min(52%, 250px); right: 12%; bottom: 34px; }
.pulse-card { min-height: 420px; padding: 26px 24px; }
.pulse-card h2 { font-size: clamp(28px, 3vw, 40px); line-height: .96; }
.release-stack.compact { max-height: 360px; padding-right: 10px; }

.release-item {
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 12px 12px 14px;
  align-items: center;
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.release-item:hover {
  transform: translateX(3px);
  border-color: rgba(244,185,95,.34);
  background: linear-gradient(135deg, rgba(229,55,37,.12), rgba(255,255,255,.035));
}
.release-thumb { width: 76px; min-width: 76px; height: 96px; aspect-ratio: auto; border: 1px solid rgba(244,185,95,.16); }
.release-item > span { min-width: 0; display: grid; gap: 6px; align-content: center; }
.release-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.14;
  letter-spacing: -.015em;
}
.release-meta { display: block; margin-top: 0; font-size: 12px; line-height: 1.35; }
.countdown {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 5px 8px;
  margin-top: 0;
  background: rgba(244,185,95,.085);
  border: 1px solid rgba(244,185,95,.22);
  line-height: 1;
  white-space: nowrap;
}
.release-card h3,
.search-row h3,
.library-card h3 { overflow-wrap: anywhere; hyphens: auto; }

.detail-dialog { overflow: auto; }
.detail-dialog[open] { display: grid; }
.detail-hero { min-height: 420px; }
.detail-body .content-band { margin-top: 22px; }
.detail-copy #detailDescription { max-width: 75ch; }

@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-panel { min-height: 0; grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .pulse-card { min-height: 0; }
}
@media (max-width: 640px) {
  .release-stack.compact { max-height: none; overflow: visible; padding-right: 0; }
  .release-item { grid-template-columns: 68px minmax(0, 1fr); }
  .release-thumb { width: 68px; min-width: 68px; height: 90px; }
  .release-title { font-size: 16px; }
  .countdown { white-space: normal; line-height: 1.2; }
  .detail-hero { grid-template-columns: 118px 1fr; padding: 54px 16px 18px; min-height: 0; }
  .detail-poster { width: 118px; }
  .detail-title h2 { font-size: clamp(30px, 9vw, 46px); line-height: .95; }
}

/* --- Global scrollbar system: unified AnimeRadar rail everywhere --- */
:root {
  --scrollbar-size: 12px;
  --scrollbar-track: rgba(9, 3, 3, .82);
  --scrollbar-track-strong: rgba(33, 12, 8, .95);
  --scrollbar-thumb: linear-gradient(180deg, #e53725 0%, #f4b95f 100%);
  --scrollbar-thumb-hover: linear-gradient(180deg, #ff523f 0%, #ffd38a 100%);
}

html,
body,
* {
  scrollbar-width: thin;
  scrollbar-color: #d99444 rgba(20, 6, 5, .92);
}

*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

*::-webkit-scrollbar-track {
  background:
    linear-gradient(90deg, transparent 0 2px, rgba(244, 185, 95, .12) 2px 3px, transparent 3px 100%),
    linear-gradient(180deg, var(--scrollbar-track-strong), var(--scrollbar-track));
  border: 1px solid rgba(244, 185, 95, .12);
}

*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: 3px solid rgba(12, 4, 4, .96);
  min-height: 48px;
  min-width: 48px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 244, 225, .22),
    0 0 16px rgba(229, 55, 37, .18);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  box-shadow:
    inset 0 0 0 1px rgba(255, 244, 225, .38),
    0 0 18px rgba(244, 185, 95, .28);
}

*::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, #ffd38a 0%, #e53725 100%);
}

*::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

/* Make every internal scroll area use the same gutter and avoid Windows-like overlap. */
.release-stack,
.release-stack.compact,
.poster-rail,
.weekday-dock,
.nav-strip,
.mobile-tabs,
.list-tabs,
.detail-dialog,
textarea,
select,
.modal-body,
.content-band,
.search-results,
.library-grid,
.stats-grid {
  scrollbar-gutter: stable;
}

/* The top nav should still scroll on narrow desktop, but with no ugly default bar. */
.nav-strip {
  scrollbar-width: thin;
  padding-bottom: 8px;
}
.nav-strip::-webkit-scrollbar {
  height: 8px;
}

/* Horizontal rails get a flatter, premium bar. */
.poster-rail::-webkit-scrollbar,
.weekday-dock::-webkit-scrollbar,
.list-tabs::-webkit-scrollbar,
.nav-strip::-webkit-scrollbar {
  height: 8px;
}

.poster-rail::-webkit-scrollbar-thumb,
.weekday-dock::-webkit-scrollbar-thumb,
.list-tabs::-webkit-scrollbar-thumb,
.nav-strip::-webkit-scrollbar-thumb {
  border-width: 2px;
  min-width: 72px;
}

/* Compact release panel: slightly slimmer so it does not steal visual space. */
.release-stack.compact::-webkit-scrollbar,
.release-stack::-webkit-scrollbar {
  width: 9px;
}
.release-stack.compact::-webkit-scrollbar-thumb,
.release-stack::-webkit-scrollbar-thumb {
  border-width: 2px;
}

/* Form controls that open native dropdowns cannot be fully restyled by CSS in every browser,
   but their visible closed state and any scrollable textarea now match the page. */
textarea::-webkit-scrollbar {
  width: 9px;
}

/* Episode release lock state */
.episode-hint {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.45;
}
.episode-btn.future,
.episode-btn:disabled {
  cursor: not-allowed;
  opacity: .42;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.035), rgba(255,255,255,.035) 6px, rgba(255,255,255,.015) 6px, rgba(255,255,255,.015) 12px);
  color: rgba(255,244,222,.55);
  border-color: rgba(255,255,255,.08);
}
.episode-btn.future:hover,
.episode-btn:disabled:hover {
  transform: none;
  border-color: rgba(255,255,255,.08);
}

/* --- v8 form chrome: remove native Windows-like arrows and unify dropdowns --- */
:root {
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7 9.5L12 14.5L17 9.5' stroke='%23f4b95f' stroke-width='2.4' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E");
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 44px;
  background-image:
    linear-gradient(135deg, rgba(229,55,37,.13), rgba(244,185,95,.055)),
    linear-gradient(90deg, transparent calc(100% - 42px), rgba(244,185,95,.13) calc(100% - 42px), rgba(244,185,95,.13) calc(100% - 41px), transparent calc(100% - 41px)),
    var(--select-arrow);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: 0 0, 0 0, right 13px center;
  background-size: 100% 100%, 100% 100%, 18px 18px;
  border-color: rgba(244,185,95,.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}

select:hover {
  border-color: rgba(244,185,95,.48);
  background-image:
    linear-gradient(135deg, rgba(229,55,37,.2), rgba(244,185,95,.085)),
    linear-gradient(90deg, transparent calc(100% - 42px), rgba(244,185,95,.2) calc(100% - 42px), rgba(244,185,95,.2) calc(100% - 41px), transparent calc(100% - 41px)),
    var(--select-arrow);
}

select:focus {
  background-image:
    linear-gradient(135deg, rgba(229,55,37,.24), rgba(244,185,95,.12)),
    linear-gradient(90deg, transparent calc(100% - 42px), rgba(244,185,95,.26) calc(100% - 42px), rgba(244,185,95,.26) calc(100% - 41px), transparent calc(100% - 41px)),
    var(--select-arrow);
}

select::-ms-expand { display: none; }

select option {
  background: #160706;
  color: #f6efe2;
}

.rating-select {
  min-height: 50px;
  color: var(--gold);
  font-weight: 950;
  letter-spacing: .03em;
  border-color: rgba(244,185,95,.36);
}

.side-editor select,
.search-filter-card select,
.calendar-filters select,
.panel select,
.auth-card select {
  min-height: 46px;
}

/* Remove native number steppers in detail fields so no system arrows appear. */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Slightly premium form surface for detail editor controls. */
.side-editor input,
.side-editor select,
.side-editor textarea {
  background-color: rgba(12, 3, 3, .72);
  border-color: rgba(244,185,95,.24);
}


/* AnimeRadar live polish */
.brand-mark {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 14px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  background: linear-gradient(145deg, #2b0808 0%, #6d100a 42%, #120404 100%);
  box-shadow: 10px 10px 0 rgba(0,0,0,.35), inset 0 0 26px rgba(255,255,255,.06), inset 0 0 0 1px rgba(255,255,255,.04);
}
.brand-radar {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255,248,235,.12) 0 10%, transparent 10% 100%),
    repeating-radial-gradient(circle at center, rgba(244,185,95,.23) 0 2px, transparent 2px 11px),
    linear-gradient(180deg, rgba(255,255,255,.05), transparent);
  opacity: .92;
}
.brand-radar::before {
  content: '';
  position: absolute;
  inset: -28%;
  border-radius: 50%;
  background: conic-gradient(from 230deg, transparent 0 56%, rgba(244,185,95,0) 56% 61%, rgba(244,185,95,.98) 66%, rgba(214,39,24,.72) 72%, transparent 78%);
  opacity: .95;
}
.brand-radar::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  right: 7px;
  top: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(244,185,95,.14), 0 0 16px rgba(244,185,95,.48);
}
.brand-initials {
  position: relative;
  z-index: 2;
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .08em;
  color: #fff8eb;
  text-shadow: 0 2px 10px rgba(0,0,0,.42);
}
.brand-text strong {
  font-size: clamp(20px, 2.2vw, 27px);
  letter-spacing: .035em;
  text-transform: none;
}
.brand-text small {
  letter-spacing: .11em;
  font-size: 9px;
  white-space: nowrap;
}
.brand-mark {
  font-size: 16px;
  letter-spacing: -.04em;
  font-family: var(--font-display);
}
.brand-text strong {
  font-size: clamp(20px, 2.2vw, 27px);
  letter-spacing: .035em;
  text-transform: none;
}
.brand-text small {
  letter-spacing: .11em;
  font-size: 9px;
  white-space: nowrap;
}
.hero-panel {
  min-height: clamp(360px, 36vw, 450px);
}
.hero-copy {
  align-self: center;
}
.hero-copy h1 {
  font-size: clamp(40px, 5vw, 72px) !important;
  line-height: 1.04 !important;
  max-width: 780px;
  margin: 14px 0 16px;
  text-wrap: balance;
  word-break: normal;
  overflow-wrap: normal;
}
.hero-copy p {
  max-width: 620px;
}
.watch-box.accent-box h2 {
  max-width: 680px;
  line-height: 1.05;
}
@media (max-width: 720px) {
  .brand-text small { display: none; }
  .hero-copy h1 { font-size: clamp(34px, 12vw, 48px) !important; line-height: 1.08 !important; }
}

/* --- v15 detail hero readability pass --- */
.detail-title {
  min-width: 0;
  max-width: min(100%, 860px);
  display: grid;
  align-content: start;
  gap: 16px;
}

.detail-title h2 {
  margin-bottom: 0;
  max-width: 12ch;
  text-wrap: balance;
  text-shadow: 0 10px 24px rgba(0,0,0,.38);
}

.detail-facts-panel {
  display: grid;
  gap: 14px;
  width: min(100%, 760px);
  padding: 16px 18px;
  border: 1px solid rgba(229,55,37,.38);
  background: linear-gradient(180deg, rgba(10,4,4,.84), rgba(18,6,5,.92));
  box-shadow: 0 18px 38px rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
}

.detail-meta-grid--hero {
  margin: 0;
  gap: 10px;
}

.detail-meta-grid--hero .tag {
  background: rgba(244,185,95,.08);
  border-color: rgba(244,185,95,.18);
}

.detail-release-box {
  border-top: 1px solid rgba(244,185,95,.12);
  padding-top: 12px;
}

.detail-countdown {
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  width: 100%;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  color: var(--ink);
}

.detail-countdown .countdown-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  background: rgba(244,185,95,.1);
  border: 1px solid rgba(244,185,95,.22);
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.detail-countdown strong {
  font-size: clamp(22px, 2.3vw, 32px);
  line-height: 1.05;
  letter-spacing: -.02em;
  color: #fff4e2;
  text-shadow: 0 4px 14px rgba(0,0,0,.3);
}

@media (max-width: 760px) {
  .detail-title {
    gap: 12px;
  }

  .detail-title h2 {
    max-width: none;
  }

  .detail-facts-panel {
    padding: 14px;
    gap: 12px;
  }

  .detail-countdown {
    gap: 10px;
  }

  .detail-countdown strong {
    font-size: 22px;
  }
}

/* --- v18 detail countdown layout: calmer release block --- */
.detail-release-box {
  border-top: 1px solid rgba(244,185,95,.12);
  padding-top: 14px;
}

.detail-countdown {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 7px;
  align-items: start;
  width: 100%;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.detail-countdown .countdown-label {
  display: block !important;
  min-height: 0 !important;
  padding: 0 0 0 14px !important;
  background: transparent !important;
  border: 0 !important;
  color: var(--gold);
  font-size: 12px !important;
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: .105em;
  text-transform: uppercase;
  position: relative;
}

.detail-countdown .countdown-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 2px;
  transform: translateY(-50%);
  background: var(--red);
}

.detail-countdown strong {
  display: block;
  width: fit-content;
  max-width: 100%;
  font-size: clamp(20px, 2vw, 27px) !important;
  line-height: 1.12 !important;
  letter-spacing: -.025em;
  color: #fff4e2;
  text-shadow: 0 4px 18px rgba(0,0,0,.3);
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .detail-countdown strong {
    font-size: 21px !important;
  }
}

/* --- v19 mobile overflow hardening: no horizontal page drag --- */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

body,
.topbar,
.shell,
.view,
.detail-dialog,
.auth-dialog,
.detail-dialog *,
.auth-dialog * {
  min-width: 0;
}

img,
iframe,
video,
canvas,
svg {
  max-width: 100%;
}

.detail-dialog,
.auth-dialog {
  box-sizing: border-box;
  max-width: calc(100vw - 16px) !important;
  width: min(1060px, calc(100vw - 16px)) !important;
  overflow-x: hidden !important;
}

.detail-hero,
.detail-body,
.detail-title,
.detail-facts-panel,
.detail-copy,
.side-editor,
.content-band,
.hero-actions {
  max-width: 100%;
  min-width: 0;
}

.detail-title h2,
.detail-copy p,
.detail-facts-panel,
.detail-countdown strong,
.tag,
.release-meta {
  overflow-wrap: anywhere;
  word-break: normal;
}

.detail-meta-grid,
.detail-meta-grid--hero,
.hero-actions {
  min-width: 0;
  max-width: 100%;
}

.detail-meta-grid .tag,
.detail-meta-grid--hero .tag {
  max-width: 100%;
}

@media (max-width: 760px) {
  .topbar {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .shell {
    width: min(100% - 18px, 720px) !important;
    max-width: calc(100vw - 18px);
  }

  .detail-dialog,
  .auth-dialog {
    width: calc(100vw - 10px) !important;
    max-width: calc(100vw - 10px) !important;
    max-height: calc(100vh - 10px);
  }

  .detail-hero {
    grid-template-columns: 96px minmax(0, 1fr) !important;
    gap: 12px !important;
    padding: 48px 12px 18px !important;
    overflow: hidden;
  }

  .detail-poster {
    width: 96px !important;
    max-width: 96px;
    box-shadow: -6px 6px 0 rgba(0,0,0,.38);
  }

  .detail-title h2 {
    font-size: clamp(28px, 11vw, 44px) !important;
    line-height: .94 !important;
    max-width: 100% !important;
    letter-spacing: -.035em;
  }

  .detail-facts-panel {
    width: 100% !important;
    padding: 12px !important;
  }

  .detail-meta-grid--hero {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  .detail-meta-grid--hero .tag {
    font-size: 10px;
    padding: 5px 7px;
  }

  .detail-countdown .countdown-label {
    font-size: 10px !important;
    letter-spacing: .08em;
  }

  .detail-countdown strong {
    font-size: clamp(18px, 6vw, 22px) !important;
  }

  .hero-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 9px;
    width: 100%;
  }

  .hero-actions .solid-action,
  .hero-actions .ghost-action {
    width: 100%;
    min-width: 0;
    padding-inline: 10px;
    white-space: normal;
  }

  .detail-body {
    padding: 16px 12px 24px !important;
    gap: 18px;
  }

  .side-editor input,
  .side-editor select,
  .side-editor textarea,
  #watchedUntilInput {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .detail-hero {
    display: block !important;
    padding: 50px 12px 18px !important;
  }

  .detail-poster {
    width: min(42vw, 142px) !important;
    max-width: 142px;
    margin: 0 0 16px 0;
  }

  .detail-title {
    display: grid;
    gap: 12px;
    width: 100%;
  }

  .detail-title h2 {
    font-size: clamp(34px, 13vw, 52px) !important;
    line-height: .92 !important;
  }

  .detail-facts-panel {
    margin-top: 2px;
  }

  .detail-countdown strong {
    width: 100%;
  }

  .episode-grid {
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  }
}

@media (max-width: 380px) {
  .detail-dialog,
  .auth-dialog {
    width: calc(100vw - 6px) !important;
    max-width: calc(100vw - 6px) !important;
  }

  .detail-hero {
    padding-inline: 10px !important;
  }

  .detail-body {
    padding-inline: 10px !important;
  }

  .detail-title h2 {
    font-size: clamp(31px, 12.5vw, 45px) !important;
  }

  .modal-close {
    right: 8px;
    top: 8px;
    width: 38px;
    height: 38px;
  }
}

/* --- v20 mobile hard fix: eliminate real horizontal overflow --- */
*,
*::before,
*::after {
  max-inline-size: 100%;
}

html,
body {
  inline-size: 100%;
  max-inline-size: 100%;
  overflow-x: clip !important;
  overscroll-behavior-x: none;
}

body {
  position: relative;
}

#detailContent,
#authContent,
.view,
.shell,
.topbar,
.mobile-tabs {
  max-inline-size: 100%;
  overflow-x: clip;
}

/* Some browsers keep dialog sizing outside the normal page flow. On phones we force it into a real viewport box. */
@media (max-width: 820px) {
  .detail-dialog,
  .auth-dialog {
    position: fixed !important;
    inset: 0 !important;
    inline-size: 100dvw !important;
    block-size: 100dvh !important;
    max-inline-size: 100dvw !important;
    max-block-size: 100dvh !important;
    margin: 0 !important;
    border-inline: 0 !important;
    overflow-y: auto !important;
    overflow-x: clip !important;
  }

  #detailContent,
  #detailContent > *,
  .detail-hero,
  .detail-body,
  .detail-copy,
  .side-editor,
  .content-band,
  .episode-grid,
  .detail-title,
  .detail-facts-panel,
  .detail-release-box {
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    min-inline-size: 0 !important;
    overflow-x: clip;
  }

  /* The previous 2-column mobile hero was still too wide on real phones. Stack it earlier. */
  .detail-hero {
    display: block !important;
    padding: 50px 14px 20px !important;
    min-block-size: 0 !important;
  }

  .detail-poster {
    inline-size: min(42vw, 148px) !important;
    max-inline-size: 148px !important;
    margin: 0 0 16px 0 !important;
    box-shadow: -6px 6px 0 rgba(0,0,0,.38) !important;
  }

  .detail-title {
    display: grid !important;
    gap: 12px !important;
  }

  .detail-title h2 {
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    font-size: clamp(30px, 12.4vw, 50px) !important;
    line-height: .92 !important;
    letter-spacing: -.04em !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto;
  }

  .detail-facts-panel {
    padding: 12px !important;
    margin: 0 !important;
  }

  .detail-meta-grid--hero,
  .detail-meta-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
  }

  .detail-meta-grid--hero .tag,
  .detail-meta-grid .tag {
    flex: 0 1 auto;
    min-inline-size: 0;
    max-inline-size: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .detail-countdown,
  .detail-countdown strong,
  .detail-countdown .countdown-label {
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    min-inline-size: 0 !important;
  }

  .detail-countdown strong {
    width: 100% !important;
    font-size: clamp(18px, 6vw, 23px) !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .hero-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    inline-size: 100% !important;
    gap: 9px !important;
  }

  .hero-actions .solid-action,
  .hero-actions .ghost-action,
  .side-editor .solid-action,
  .side-editor .ghost-action {
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    min-inline-size: 0 !important;
    white-space: normal !important;
  }

  .detail-body {
    display: grid !important;
    grid-template-columns: 1fr !important;
    padding: 16px 14px 26px !important;
  }

  .side-editor input,
  .side-editor select,
  .side-editor textarea,
  #watchedUntilInput,
  input,
  select,
  textarea {
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    min-inline-size: 0 !important;
  }

  .section-kicker {
    min-inline-size: 0;
    max-inline-size: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    padding-inline: 10px !important;
  }

  .brand {
    min-inline-size: 0;
    overflow: hidden;
  }

  .brand-text strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-actions {
    min-inline-size: 0;
  }

  .top-actions .solid-action {
    padding-inline: 10px !important;
    min-inline-size: 0 !important;
  }
}

@media (max-width: 420px) {
  .detail-hero {
    padding-inline: 10px !important;
  }

  .detail-body {
    padding-inline: 10px !important;
  }

  .detail-title h2 {
    font-size: clamp(28px, 11.6vw, 43px) !important;
  }

  .detail-poster {
    inline-size: min(46vw, 136px) !important;
  }

  .episode-grid {
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)) !important;
  }
}

/* --- v21 live polish: mobile, detail, calendar, forms --- */
html, body { width: 100%; max-width: 100%; overflow-x: clip; }
body { touch-action: pan-y; }
body, .shell, .view, .content-band, .calendar-stage, .search-board, .profile-shell, .detail-dialog, .auth-dialog { min-width: 0; }

.loading-panel,
.empty-state {
  border: 1px solid rgba(244,185,95,.16);
  background: linear-gradient(135deg, rgba(255,255,255,.035), rgba(229,55,37,.055));
  padding: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.auth-mini-action {
  justify-self: start;
  margin: 4px 0 10px;
  font-size: 12px;
  text-transform: none;
  letter-spacing: .02em;
}
.danger-action {
  margin-top: 8px;
  border-color: rgba(255, 97, 70, .36);
  color: #ffc7b9;
}
.danger-action:hover { background: rgba(229,55,37,.12); border-color: rgba(255,97,70,.7); }

.plot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.description-source {
  color: var(--gold);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .88;
}
.detail-copy #detailDescription {
  padding: 16px 18px;
  border-left: 3px solid rgba(244,185,95,.5);
  background: rgba(255,255,255,.035);
}
.side-editor {
  padding: 16px;
  border: 1px solid rgba(244,185,95,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(229,55,37,.04));
  height: fit-content;
}
.side-editor label { display: grid; gap: 8px; color: var(--muted); font-weight: 800; }
.side-editor textarea { min-height: 138px; resize: vertical; }
.episode-grid { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
.episode-btn { transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.episode-btn:not(:disabled):hover { transform: translateY(-2px); border-color: rgba(244,185,95,.45); }

.calendar-results,
.search-main,
.profile-form-card,
.profile-card,
.watch-box {
  min-width: 0;
}
.release-card,
.search-row,
.library-card {
  min-width: 0;
  overflow: hidden;
}
.release-card h3,
.search-row h3,
.library-card h3,
.detail-title h2,
.page-title-row h1 {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 760px) {
  .shell { width: 100%; padding-left: 12px; padding-right: 12px; }
  .topbar { width: 100%; max-width: 100%; overflow: hidden; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .brand { min-width: 0; }
  .brand-text { min-width: 0; }
  .brand-text strong, .brand-text small { overflow: hidden; text-overflow: ellipsis; }
  .top-actions { min-width: 0; }
  .top-actions .solid-action { max-width: 132px; padding-inline: 10px; overflow: hidden; text-overflow: ellipsis; }

  .hero-grid,
  .calendar-stage,
  .search-board,
  .profile-shell,
  .split-band,
  .detail-body,
  .auth-split { grid-template-columns: minmax(0, 1fr) !important; }
  .hero-panel,
  .pulse-card,
  .content-band,
  .watch-box,
  .calendar-filters,
  .calendar-results,
  .search-filter-card,
  .profile-card,
  .profile-form-card { width: 100%; max-width: 100%; }
  .page-title-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .title-actions { justify-content: stretch; display: grid; grid-template-columns: 1fr 1fr; }
  .title-actions button { width: 100%; }

  .detail-dialog,
  .auth-dialog {
    width: 100dvw !important;
    max-width: 100dvw !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border-left: 0;
    border-right: 0;
  }
  .detail-hero {
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 58px 14px 18px !important;
    gap: 16px !important;
  }
  .detail-poster { width: min(44vw, 150px) !important; }
  .detail-title { width: 100%; max-width: 100%; }
  .detail-facts-panel { width: 100%; max-width: 100%; }
  .detail-meta-grid--hero { display: flex; flex-wrap: wrap; min-width: 0; }
  .detail-meta-grid--hero .tag { max-width: 100%; white-space: normal; }
  .detail-release-line { width: 100%; min-width: 0; }
  .detail-release-value { width: 100%; min-width: 0; display: block; }
  .hero-actions { display: grid; grid-template-columns: minmax(0,1fr); width: 100%; gap: 10px; }
  .hero-actions button { width: 100%; }
  .detail-body { padding: 16px 12px 22px !important; width: 100%; max-width: 100%; overflow-x: hidden; }
  .detail-copy, .side-editor { width: 100%; max-width: 100%; min-width: 0; }
  .detail-copy #detailDescription { max-width: 100%; }
  .episode-grid { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); }

  .release-card { grid-template-columns: 92px minmax(0, 1fr); }
  .release-card img { width: 92px; height: 128px; object-fit: cover; }
  .card-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .search-row { grid-template-columns: 82px minmax(0, 1fr); }
  .search-row-actions { grid-column: 1 / -1; }
  .library-controls { grid-template-columns: minmax(0, 1fr); }
  input, select, textarea, button { max-width: 100%; }
  .mobile-tabs { max-width: calc(100dvw - 20px); overflow-x: auto; overflow-y: hidden; }
}

@media (max-width: 420px) {
  .release-card { grid-template-columns: 78px minmax(0, 1fr); gap: 10px; }
  .release-card img { width: 78px; height: 112px; }
  .search-row { grid-template-columns: 70px minmax(0, 1fr); }
  .search-row img { width: 70px; }
  .hero-copy h1 { font-size: clamp(36px, 13vw, 48px) !important; }
  .pulse-card h2, .page-title-row h1 { font-size: clamp(32px, 11vw, 46px); }
  .detail-countdown strong, .detail-release-value { font-size: 21px; }
}

/* --- v22 legal, credits and source attribution --- */
.site-footer {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 96px;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 28px;
  align-items: center;
  border: 1px solid rgba(244,185,95,.14);
  background: linear-gradient(135deg, rgba(255,255,255,.035), rgba(229,55,37,.045));
  box-shadow: 0 18px 60px rgba(0,0,0,.22);
}

.footer-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  font-size: 14px;
}

.footer-brand strong,
.footer-brand small {
  display: block;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: .04em;
}

.footer-brand small,
.footer-note {
  color: var(--muted);
  line-height: 1.55;
}

.footer-links {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links .text-action {
  white-space: nowrap;
}

.footer-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  border-top: 1px solid rgba(244,185,95,.1);
  padding-top: 14px;
}

.legal-title-row p {
  max-width: 760px;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.legal-card,
.legal-doc {
  border: 1px solid rgba(244,185,95,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(229,55,37,.04));
  box-shadow: 0 18px 60px rgba(0,0,0,.22);
}

.legal-card {
  min-width: 0;
  padding: 22px;
}

.legal-card-accent {
  border-color: rgba(244,185,95,.34);
  background: linear-gradient(135deg, rgba(229,55,37,.12), rgba(244,185,95,.06));
}

.legal-card h2,
.legal-doc h2 {
  margin: 8px 0 12px;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1;
}

.legal-card p,
.legal-doc p {
  color: var(--muted);
  line-height: 1.7;
}

.legal-doc {
  display: grid;
  gap: 0;
  margin-top: 22px;
  overflow: hidden;
}

.legal-doc section {
  padding: 22px 24px;
  border-bottom: 1px solid rgba(244,185,95,.1);
}

.legal-doc section:last-child {
  border-bottom: 0;
}

.compact-doc {
  max-width: 900px;
}

.placeholder-box {
  margin-top: 12px;
  padding: 16px 18px;
  border: 1px dashed rgba(244,185,95,.38);
  background: rgba(244,185,95,.055);
  color: #fff4e2;
  line-height: 1.7;
}

.legal-warning {
  border-left: 3px solid rgba(229,55,37,.72);
  padding: 12px 14px;
  background: rgba(229,55,37,.08);
  color: #ffd0c7 !important;
}

@media (max-width: 900px) {
  .legal-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .site-footer {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 92px;
  }
  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .site-footer {
    width: calc(100% - 24px);
    padding: 18px;
  }
  .footer-links {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .footer-links .text-action {
    justify-self: start;
    white-space: normal;
  }
  .legal-card,
  .legal-doc section {
    padding: 18px;
  }
}

/* --- v36 list management: menu actions + list view --- */
.list-tabs {
  align-items: stretch;
}

.list-tab-item {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  flex: 0 0 auto;
  max-width: 100%;
}

.list-tab-item.active {
  border-color: rgba(229,55,37,.72);
  background: rgba(229,55,37,.16);
}

.list-tab-item .list-tab {
  border: 0;
  background: transparent;
  min-width: 0;
  max-width: min(280px, 58vw);
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-actions-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.list-menu-toggle {
  width: 44px;
  border: 0;
  border-left: 1px solid rgba(244,185,95,.13);
  background: rgba(0,0,0,.16);
  display: grid;
  place-items: center;
}

.list-menu-toggle span {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg) translateY(-1px);
  transition: transform .18s ease;
}

.list-tab-item.menu-open .list-menu-toggle span {
  transform: rotate(-135deg) translateY(-1px);
}

.list-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  padding: 6px;
  border: 1px solid rgba(244,185,95,.16);
  background: #120706;
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
  display: none;
  z-index: 8;
}

.list-menu.is-open { display: grid; gap: 4px; }

.list-menu-action {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  background: rgba(255,255,255,.03);
  color: var(--ink);
  text-align: left;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.list-menu-action:hover {
  border-color: rgba(244,185,95,.18);
  background: rgba(244,185,95,.08);
  color: var(--gold);
}

.list-menu-action.danger:hover {
  border-color: rgba(229,55,37,.24);
  background: rgba(229,55,37,.16);
  color: #ffd9d3;
}

@media (max-width: 980px) {
  .library-list-head,
  .library-list-row {
    grid-template-columns: minmax(260px, 2fr) 1fr 1fr .9fr 1fr;
  }

  .library-list-head span:last-child,
  .library-list-row .library-list-cell:last-child {
    display: none;
  }
}

@media (max-width: 640px) {
  .list-tabs {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
    padding-bottom: 0;
  }

  .list-tab-item {
    width: 100%;
  }

  .list-tab-item .list-tab {
    max-width: none;
    text-align: left;
    flex: 1 1 auto;
  }

  .library-list-shell {
    border: 0;
    background: transparent;
  }

  .library-list-head {
    display: none;
  }

  .library-list-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    margin-bottom: 10px;
  }

  .library-list-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .library-list-cell::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
  }
}

/* --- v24 calendar filters: open on desktop, collapsed on mobile --- */
.filter-toggle {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  margin-bottom: 18px;
  cursor: default;
}

.filter-toggle-state {
  display: none;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold);
}

.filter-body {
  display: block;
}

@media (max-width: 760px) {
  .calendar-filters {
    padding: 0 !important;
    overflow: hidden;
  }

  .calendar-filters .filter-toggle {
    min-height: 52px;
    padding: 0 16px;
    margin: 0;
    border: 1px solid rgba(244,185,95,.18);
    background: linear-gradient(135deg, rgba(229,55,37,.14), rgba(244,185,95,.055));
    cursor: pointer;
  }

  .calendar-filters .filter-toggle-state {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid rgba(244,185,95,.24);
    background: rgba(0,0,0,.24);
  }

  .calendar-filters .filter-body {
    display: none;
    padding: 16px;
    border: 1px solid rgba(244,185,95,.16);
    border-top: 0;
    background: rgba(8,3,3,.58);
  }

  .calendar-filters.is-open .filter-body {
    display: block;
  }
}

/* --- v25 auth modal: signed-in state should not show login/register fields --- */
.auth-signed-panel {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(244,185,95,.22);
  background: linear-gradient(135deg, rgba(244,185,95,.09), rgba(229,55,37,.08));
  box-shadow: 8px 8px 0 rgba(0,0,0,.22);
}

.auth-signed-panel strong {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  line-height: .95;
  overflow-wrap: anywhere;
}

.auth-signed-panel small {
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.auth-form.signed-in {
  align-content: start;
}

.auth-form.signed-in #logoutBtn {
  margin-top: 4px;
}

/* --- v30 anime comments --- */
.comment-band {
  overflow: hidden;
}
.comment-composer {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}
.comment-composer textarea {
  min-height: 96px;
  resize: vertical;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.comment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.comments-list {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}
.comment-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(244,185,95,.14);
  background: linear-gradient(135deg, rgba(255,255,255,.045), rgba(229,55,37,.05));
}
.comment-avatar {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 1px solid rgba(244,185,95,.28);
  background: rgba(0,0,0,.35);
}
.comment-avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 20px;
}
.comment-main {
  min-width: 0;
}
.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}
.comment-head strong {
  color: #fff4e2;
  overflow-wrap: anywhere;
}
.comment-head span {
  color: var(--muted);
  font-size: 12px;
}
.comment-main p {
  margin: 8px 0 0;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.comment-foot {
  margin-top: 8px;
}
.comment-foot .text-action {
  font-size: 12px;
  padding: 0;
}
@media (max-width: 640px) {
  .comment-card {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 12px;
  }
  .comment-avatar {
    width: 36px;
    height: 36px;
  }
  .comment-actions .solid-action {
    width: 100%;
  }
}

/* --- v31 rating separation + locked username --- */
.detail-rating-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}
.rating-stat {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid rgba(244,185,95,.16);
  background: linear-gradient(180deg, rgba(244,185,95,.075), rgba(255,255,255,.025));
}
.rating-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.rating-stat strong {
  display: block;
  margin-top: 5px;
  color: #fff4e2;
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1;
  overflow-wrap: anywhere;
}
.rating-stat small {
  display: block;
  margin-top: 7px;
  color: rgba(255,244,226,.62);
  line-height: 1.35;
}
.field-hint {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
input:disabled,
select:disabled,
textarea:disabled {
  opacity: .68;
  cursor: not-allowed;
}
@media (max-width: 760px) {
  .detail-rating-board { grid-template-columns: 1fr; }
  .rating-stat strong { font-size: 24px; }
}

/* --- v32: Kalenderkarten vollständig anklickbar + Detail-Backdrop schließen --- */
.release-card-clickable {
  cursor: pointer;
}
.release-card-clickable img,
.release-card-clickable h3,
.release-card-clickable .release-card-body {
  cursor: pointer;
}
.release-card-clickable .card-actions,
.release-card-clickable .card-actions * {
  cursor: auto;
}
.release-card-clickable .card-actions button {
  cursor: pointer;
}
.detail-dialog::backdrop {
  cursor: pointer;
}
.detail-dialog {
  cursor: default;
}

/* --- v33 UX polish and community additions --- */
.daily-anime-card,
.profile-public-card,
.rank-row {
  border: 1px solid rgba(244,185,95,.16);
  background: linear-gradient(135deg, rgba(229,55,37,.08), rgba(255,255,255,.035));
}
.daily-anime-inner {
  display: grid;
  grid-template-columns: 128px minmax(0,1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  cursor: pointer;
}
.daily-anime-inner img { width: 128px; aspect-ratio: 2/3; object-fit: cover; border: 1px solid rgba(244,185,95,.22); }
.daily-anime-inner h3 { font-size: clamp(28px, 4vw, 54px); line-height: .95; margin: 8px 0; }
.daily-anime-inner p { color: var(--muted); line-height: 1.6; max-width: 74ch; }
.season-controls { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.season-controls select,
.season-controls input { min-height: 44px; max-width: 160px; }
.toplists-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.rank-row { width: 100%; display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; align-items: center; text-align: left; padding: 13px; color: var(--ink); }
.rank-row strong { display: grid; place-items: center; width: 34px; height: 34px; background: rgba(244,185,95,.12); color: var(--gold); }
.rank-row span { min-width: 0; font-weight: 900; }
.rank-row small { display: block; color: var(--muted); font-weight: 700; margin-top: 4px; }

.rated-row {
  width: 100%;
  display: grid;
  grid-template-columns: 42px 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 12px;
  border: 1px solid rgba(244,185,95,.16);
  background: linear-gradient(135deg, rgba(229,55,37,.08), rgba(255,255,255,.035));
  color: var(--ink);
}
.rated-row strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: rgba(244,185,95,.12);
  color: var(--gold);
}
.rated-row img {
  width: 54px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(244,185,95,.18);
  background: #140807;
}
.rated-row span { min-width: 0; font-weight: 900; }
.rated-row small { display: block; color: var(--muted); font-weight: 700; margin-top: 4px; }
.profile-rated-band { margin-top: 18px; }
.compact-pager {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-weight: 900;
}
.compact-pager .small-btn { min-height: 34px; padding: 0 10px; }
.compact-pager .small-btn:disabled { opacity: .35; cursor: not-allowed; }
.comment-head-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.comments-body.is-collapsed { display: none; }
.comment-foot { display: flex; gap: 10px; flex-wrap: wrap; }
.tag-live { color: #fff4e2; border-color: rgba(229,55,37,.42); background: linear-gradient(135deg, rgba(229,55,37,.25), rgba(244,185,95,.12)); }
.empty-action { display: grid; gap: 14px; justify-items: start; }
.empty-action p { margin: 0; color: var(--muted); }
.profile-public-card { display: flex; gap: 16px; align-items: center; padding: 18px; margin-bottom: 20px; }
.detail-skeleton { display: grid; grid-template-columns: 220px 1fr; gap: 22px; padding: 62px 34px 34px; min-height: 420px; }
.detail-skeleton > div:first-child,
.detail-skeleton span,
.detail-skeleton strong,
.detail-skeleton p { background: linear-gradient(90deg,#170707,#2b100c,#170707); border: 1px solid rgba(244,185,95,.08); }
.detail-skeleton > div:first-child { aspect-ratio: 2/3; }
.detail-skeleton > div:last-child { display: grid; align-content: center; gap: 14px; }
.detail-skeleton span { width: 110px; height: 24px; }
.detail-skeleton strong { width: min(520px, 80%); height: 74px; }
.detail-skeleton p { width: min(620px, 100%); height: 120px; }
.mobile-tab.active { box-shadow: inset 0 0 0 1px rgba(244,185,95,.28), 0 0 18px rgba(229,55,37,.2); }
@media (max-width: 1180px) {
  .toplists-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .daily-anime-inner { grid-template-columns: 84px minmax(0,1fr); padding: 12px; gap: 12px; }
  .daily-anime-inner img { width: 84px; }
  .daily-anime-inner h3 { font-size: 24px; }
  .season-controls { justify-content: stretch; width: 100%; }
  .season-controls select,
  .season-controls input,
  .season-controls button { max-width: none; width: 100%; }
  .rank-row { grid-template-columns: 34px minmax(0,1fr); }
  .rated-row { grid-template-columns: 34px 46px minmax(0,1fr); padding: 10px; }
  .rated-row img { width: 46px; }
  .compact-pager { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .profile-public-card { align-items: flex-start; }
  .detail-skeleton { grid-template-columns: 100px 1fr; padding: 58px 16px 20px; min-height: 300px; }
}


/* --- v38: Listen-Ansicht als Standard + Aktionsmenü über Karten --- */
.list-tabs {
  position: relative;
  z-index: 60;
  overflow: visible;
  flex-wrap: wrap;
}

.list-tab-item {
  position: relative;
  z-index: 1;
}

.list-tab-item.menu-open {
  z-index: 120;
}

.list-menu {
  z-index: 9999;
}

.library-grid,
.library-list {
  position: relative;
  z-index: 1;
}

.footer-mark .brand-radar { inset: 5px; }
.footer-mark .brand-initials { font-size: 14px; }

/* AnimeRadar selected image logo */
.brand-mark {
  padding: 0;
  border: 1px solid rgba(244,185,95,.34);
  background: #09090b;
  overflow: hidden;
  border-radius: 14px;
  clip-path: none;
  box-shadow: 8px 8px 0 rgba(0,0,0,.32), 0 0 18px rgba(214,39,24,.16);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.footer-mark {
  border-radius: 12px;
}


/* Consent banner */
.consent-banner {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  width: min(1060px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(244,185,95,.34);
  background: linear-gradient(135deg, rgba(19,5,5,.96), rgba(7,3,3,.98));
  box-shadow: 0 18px 60px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(14px);
}
.consent-banner.is-hidden { display: none; }
.consent-copy strong {
  display: block;
  font-family: var(--font-display);
  letter-spacing: .06em;
  font-size: 18px;
  margin-bottom: 7px;
}
.consent-copy p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 760px;
}
.consent-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  .consent-banner {
    grid-template-columns: 1fr;
    bottom: 78px;
    padding: 16px;
  }
  .consent-actions { justify-content: stretch; }
  .consent-actions button { flex: 1 1 190px; }
}

/* --- v48 mobile navigation: 2 rows, no horizontal scroll --- */
@media (max-width: 760px) {
  .shell {
    padding-bottom: 136px;
  }

  .site-footer {
    margin-bottom: 112px;
  }

  .mobile-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: minmax(34px, auto);
    align-items: stretch;
    gap: 4px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 6px;
    overflow: visible;
    max-width: none;
  }

  .mobile-tab {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 34px;
    padding: 0 4px;
    font-size: 9px;
    line-height: 1.05;
    letter-spacing: .035em;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    border-radius: 10px;
  }
}

@media (max-width: 380px) {
  .mobile-tabs {
    left: 6px;
    right: 6px;
    bottom: 6px;
    gap: 3px;
    padding: 5px;
  }

  .mobile-tab {
    min-height: 32px;
    padding: 0 3px;
    font-size: 8px;
    letter-spacing: .02em;
  }
}
