/* AniSeason — 端末幅を問わず「今期の全体像 → 1作品の公式導線」へ最短で届くことを優先した設計 */
:root {
  --bg: #f6f6f8; --surface: #fff; --ink: #1c1c22; --muted: #6b6b76; --line: #e4e4ea; --line-strong: #cfcfd8;
  --accent: #ff4d6d; --accent-ink: #fff; --x: #111; --link: #2557d6;
  --radius: 0; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px -8px rgba(0,0,0,.12);
  --font: "Inter", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #131318; --surface: #1c1c24; --ink: #f0f0f4; --muted: #9a9aa8; --line: #2b2b36; --line-strong: #4a4a5a; --link: #8ab4ff; --x: #fff; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -8px rgba(0,0,0,.6); }
  .btn-x { color: #111 !important; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.6; font-size: 15px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .4em; font-weight: 700; }
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 16px; }
.sr, .skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; z-index: 99; border-radius: 8px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: .02em; font-size: 18px; }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 0; background: var(--accent); color: #fff; font-size: 12px; }
.header-right { display: flex; align-items: center; gap: 4px; }
.hsearch { flex: 1; max-width: 520px; margin: 0 8px; }
.hsearch input { width: 100%; padding: 8px 12px; border: 1.2px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 14px; font-family: inherit; }
.hsearch input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-btn { display: none; width: 44px; height: 44px; border: 0; background: none; color: var(--ink); cursor: pointer; place-items: center; }
@media (max-width: 719px) {
  .hsearch { display: none; order: 9; flex-basis: 100%; max-width: none; margin: 0 0 10px; }
  .header-inner { flex-wrap: wrap; height: auto; min-height: 56px; }
  .search-btn { display: grid; }
  body.search-open .hsearch { display: block; }
  .drawer { top: 100%; }
}
.nav-watch { display: inline-flex; align-items: center; gap: 3px; color: var(--ink); text-decoration: none; padding: 8px 10px; font-size: 16px; }
.watch-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.menu-btn { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; gap: 0; cursor: pointer; padding: 10px; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-btn:hover { background: var(--line); }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.drawer { position: absolute; left: 0; right: 0; top: 56px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 16px 40px -16px rgba(0,0,0,.35); opacity: 0; transform: translateY(-10px); visibility: hidden; pointer-events: none; transition: opacity .22s ease, transform .26s cubic-bezier(.2,.8,.2,1), visibility 0s linear .26s; }
.drawer.is-open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity .2s ease, transform .26s cubic-bezier(.2,.8,.2,1), visibility 0s; }
.drawer-nav > a, .drawer-label, .drawer-seasons { opacity: 0; transform: translateY(-6px); transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.2,1); }
.drawer.is-open .drawer-nav > *:nth-child(1) { transition-delay: .04s } .drawer.is-open .drawer-nav > *:nth-child(2) { transition-delay: .07s } .drawer.is-open .drawer-nav > *:nth-child(3) { transition-delay: .10s } .drawer.is-open .drawer-nav > *:nth-child(4) { transition-delay: .13s } .drawer.is-open .drawer-nav > *:nth-child(5) { transition-delay: .16s } .drawer.is-open .drawer-nav > *:nth-child(6) { transition-delay: .19s } .drawer.is-open .drawer-nav > *:nth-child(7) { transition-delay: .22s }
.drawer.is-open .drawer-nav > * { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-nav > *, .menu-btn span { transition: none !important; } }
.drawer-nav { display: flex; flex-direction: column; padding: 8px 16px 16px; }
.drawer-nav > a { color: var(--ink); text-decoration: none; padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
.drawer-nav > a[aria-current] { font-weight: 700; color: var(--accent); }
.drawer-nav > a.lang { border: 0; color: var(--muted); font-size: 14px; }
.drawer-label { margin: 14px 0 6px; font-size: 12px; color: var(--muted); }
.drawer-seasons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
@media (min-width: 720px) { .drawer { left: auto; right: max(16px, calc((100% - 1400px) / 2 + 16px)); width: 400px; border: 1px solid var(--line); border-top: 0; } .drawer-nav { padding: 8px 20px 18px; } }

/* hero */
.hero h1 { font-size: clamp(24px, 4.5vw, 36px); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.hero-sub { font-size: 14px; color: var(--accent); font-weight: 700; }
.hero-lead { color: var(--muted); margin: 0 0 12px; max-width: 70ch; }
.notice { background: #fff7e0; color: #6b4d00; padding: 10px 14px; font-size: 14px; }
@media (prefers-color-scheme: dark) { .notice { background: #3a2f10; color: #ffd98a; } }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.hero { padding: 20px 0 4px; }
.season-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.season-tabs .tab { scroll-snap-align: start; }
.season-tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 13px; }
.tab.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }
/* 今期のタブは、どのページにいても常に暖色グラデーションの縁取り */
.tab.is-now { font-weight: 700; color: var(--ink); border: 3px solid transparent; padding: 5px 11px;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(45deg, #c8102e, #ff4d6d, #ff7a1a, #ffb300, #ff2e88, #b5179e, #c8102e) border-box; }
.tab small { opacity: .75; font-weight: 400; }

/* toolbar */
.toolbar { position: sticky; top: 56px; z-index: 10; background: var(--bg); padding: 10px 0 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 8px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.selects { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--muted); align-items: center; }
.selects select { font: inherit; padding: 5px 8px; border-radius: 0; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.check { display: inline-flex; align-items: center; gap: 4px; }
.result-count { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

/* grid & card */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 12px 0 24px; }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; } .card { grid-template-columns: 150px 1fr; } }
@media (min-width: 1400px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.grid-sm { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { display: grid; grid-template-columns: 120px 1fr; background: var(--surface); border: 1.2px solid var(--line-strong); overflow: hidden; transition: background-color .15s ease; }
.card:hover { background: #fff7f9; }
@media (prefers-color-scheme: dark) { .card:hover { background: color-mix(in srgb, var(--surface) 88%, #fff 12%); } }
.card.is-hidden { display: none; }
.card-cover { position: relative; background: var(--line); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 230/326; }
.badge { position: absolute; left: 0; top: 0; padding: 2px 7px; border-radius: 0; background: rgba(0,0,0,.72); color: #fff; font-size: 11px; font-weight: 700; }
.card-body { padding: 10px 12px 10px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.card-title { font-size: 15px; margin: 0; }
.card-title a { color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a:hover { color: var(--accent); }
.card-meta { margin: 0; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 8px; }
.score { color: #d98a00; font-weight: 700; }
.card-genres { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.card-genres span { font-size: 11px; padding: 1px 7px; border-radius: 0; background: var(--bg); color: var(--muted); }
.card-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 0; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer; line-height: 1.4; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn-lg { padding: 10px 16px; font-size: 14px; }
.btn-off { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-off:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-x { background: var(--x); border-color: var(--x); color: #fff; font-weight: 800; }
.btn-st { color: var(--muted); }
.btn-watch .w-on, .btn-watch[aria-pressed="true"] .w-off { display: none; }
.btn-watch[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-watch[aria-pressed="true"] .w-on { display: inline; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.season-pager { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 24px; font-size: 14px; }
.updated { font-size: 12px; color: var(--muted); text-align: right; }

/* ads */
.ad { margin: 16px 0; }
.ad--placeholder { display: grid; place-items: center; min-height: 90px; border: 1px dashed var(--line); color: var(--muted); font-size: 12px; }
.ad--inline { grid-column: 1 / -1; }

/* detail */
.detail { padding-top: 20px; }
.detail-head { display: grid; grid-template-columns: 230px 1fr; gap: 28px; align-items: start; margin-bottom: 24px; }
.detail-cover img { border: 1px solid var(--line); }
.detail-season { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.detail-title h1 { font-size: clamp(22px, 4vw, 34px); }
.detail-sub { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
.sec { background: var(--surface); border: 1px solid var(--line); padding: 18px 20px; margin-bottom: 16px; }
.sec h2 { font-size: 17px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.sec h3 { font-size: 15px; margin-top: 14px; }
.lead { font-size: 16px; font-weight: 600; }
.pending { font-size: 13px; color: var(--muted); }
.syn summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.syn p { font-size: 14px; color: var(--muted); }
.link-list, .stream-list, .review-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.link-list a, .review-links a { display: flex; flex-direction: column; padding: 10px 12px; background: var(--bg); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; }
.link-list a small, .review-links a span { font-weight: 400; color: var(--muted); font-size: 12px; word-break: break-all; }
.link-list a:hover, .review-links a:hover { outline: 2px solid var(--accent); }
.review-links { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.stream-list { display: flex; flex-wrap: wrap; }
.stream-list a { display: inline-block; padding: 7px 12px; background: var(--bg); text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 600; }
.info { margin: 0; display: grid; gap: 6px; font-size: 14px; }
.info div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; }
.related .grid { margin-top: 8px; }
.more { text-align: center; }
@media (max-width: 800px) { .detail-grid { grid-template-columns: 1fr; } .detail-head { grid-template-columns: 130px 1fr; gap: 14px; } }

/* archive */
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.archive-card { display: block; background: var(--bg); padding: 12px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); }
.archive-card:hover { border-color: var(--accent); }
.archive-card.is-now { border-color: var(--accent); }
.archive-card h3 { font-size: 16px; margin: 8px 0 2px; }
.archive-card h3 small { color: var(--accent); font-size: 12px; }
.archive-card p { margin: 0; font-size: 12px; color: var(--muted); }
.archive-covers { display: flex; gap: 4px; }
.archive-covers img { width: 25%; object-fit: cover; aspect-ratio: 230/326; }
.archive-top { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* prose */
.prose { max-width: 760px; padding: 24px 0 40px; }
.prose h1 { font-size: 28px; }
.prose h2 { font-size: 18px; margin-top: 28px; }
.prose .small { color: var(--muted); font-size: 12px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 24px 0 40px; font-size: 13px; color: var(--muted); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0; }
.foot-nav a { color: var(--muted); }
.copy { margin: 0; }
.next-cta { margin: 6px 0 0; font-size: 14px; }
.next-cta a { font-weight: 700; }
