/* Hoshimi — anime database & tracker
   Type: IBM Plex Sans (self-hosted). Palette: cool paper, ink header, one blue accent. */

@font-face{font-family:"Plex";src:url(/assets/fonts/plex-sans-latin-400.woff2) format("woff2");font-weight:400;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Plex";src:url(/assets/fonts/plex-sans-latin-ext-400.woff2) format("woff2");font-weight:400;font-display:swap;unicode-range:U+0100-02AF,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Plex";src:url(/assets/fonts/plex-sans-latin-400-italic.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"Plex";src:url(/assets/fonts/plex-sans-latin-500.woff2) format("woff2");font-weight:500;font-display:swap;unicode-range:U+0000-00FF,U+2000-206F,U+2212}
@font-face{font-family:"Plex";src:url(/assets/fonts/plex-sans-latin-ext-500.woff2) format("woff2");font-weight:500;font-display:swap;unicode-range:U+0100-02AF,U+1E00-1EFF}
@font-face{font-family:"Plex";src:url(/assets/fonts/plex-sans-latin-600.woff2) format("woff2");font-weight:600;font-display:swap;unicode-range:U+0000-00FF,U+2000-206F,U+2212}
@font-face{font-family:"Plex";src:url(/assets/fonts/plex-sans-latin-ext-600.woff2) format("woff2");font-weight:600;font-display:swap;unicode-range:U+0100-02AF,U+1E00-1EFF}
@font-face{font-family:"Plex";src:url(/assets/fonts/plex-sans-latin-700.woff2) format("woff2");font-weight:700;font-display:swap;unicode-range:U+0000-00FF,U+2000-206F,U+2212}
@font-face{font-family:"Plex";src:url(/assets/fonts/plex-sans-latin-ext-700.woff2) format("woff2");font-weight:700;font-display:swap;unicode-range:U+0100-02AF,U+1E00-1EFF}
@font-face{font-family:"Plex Mono";src:url(/assets/fonts/plex-mono-latin-500.woff2) format("woff2");font-weight:500;font-display:swap}

:root{
  --bg:#edf0f4; --surface:#fff; --surface-2:#f6f7f9; --surface-3:#e7eaef;
  --line:#dde1e8; --line-strong:#c5ccd7;
  --text:#151922; --text-2:#465063; --muted:#768093; --faint:#a3abb9;
  --ink:#11141c; --ink-2:#1b202c; --ink-3:#262c3a; --ink-text:#e9ecf2; --ink-muted:#98a1b3;
  --accent:#2b59e0; --accent-hover:#1f47c2; --accent-soft:#e7edfc; --accent-text:#2149bd;
  --good:#1d8049; --good-soft:#e2f3e8; --mid:#a86a0c; --mid-soft:#fbf0dc; --low:#bf3b35; --low-soft:#fbe6e4;
  --airing:#1d8049; --upcoming:#8a5d0a;
  --r:4px; --r-lg:6px;
  --shadow:0 1px 2px rgba(17,20,28,.06),0 2px 8px rgba(17,20,28,.05);
  --shadow-lg:0 8px 28px rgba(17,20,28,.16),0 2px 6px rgba(17,20,28,.08);
  --wrap:1240px; --gutter:24px;
  --font:"Plex",-apple-system,"Segoe UI",Roboto,"Hiragino Sans","Yu Gothic UI","Noto Sans JP",sans-serif;
  --jp:"Hiragino Sans","Yu Gothic UI","Meiryo","Noto Sans JP",sans-serif;
  --mono:"Plex Mono",ui-monospace,"Cascadia Mono",Consolas,monospace;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-padding-top:72px}
body{margin:0;background:var(--bg);color:var(--text);font:400 15px/1.5 var(--font);min-height:100vh;display:flex;flex-direction:column;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
main{flex:1 0 auto}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
h1,h2,h3,h4{margin:0;font-weight:600;line-height:1.2;letter-spacing:-.005em}
p{margin:0}
ul,ol{margin:0;padding:0;list-style:none}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:2px}
::selection{background:#c9d6fa}
.wrap{width:100%;max-width:var(--wrap);margin:0 auto;padding:0 var(--gutter)}
.sr-only{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:absolute;left:-9999px;top:8px;z-index:100;background:var(--surface);color:var(--text);padding:8px 12px;border-radius:var(--r);box-shadow:var(--shadow-lg)}
.skip:focus{left:8px}
.jp{font-family:var(--jp)}
.num{font-variant-numeric:tabular-nums}
.muted{color:var(--muted)}
.nowrap{white-space:nowrap}
[hidden]{display:none!important}

/* ---------- header */
.hdr{position:sticky;top:0;z-index:40;background:var(--ink);color:var(--ink-text);border-bottom:1px solid #000}
.hdr-in{display:flex;align-items:center;gap:8px;height:56px}
.logo{display:flex;align-items:baseline;gap:1px;font-weight:700;font-size:20px;letter-spacing:-.03em;color:#fff;margin-right:18px;flex:none}
.logo i{font-style:normal;color:#7f9cff}
.logo small{font-size:10px;font-weight:600;letter-spacing:.08em;color:var(--ink-muted);margin-left:8px;text-transform:uppercase;border:1px solid var(--ink-3);padding:1px 5px;border-radius:3px;align-self:center}
.nav{display:flex;gap:2px;height:100%}
.nav a{display:flex;align-items:center;padding:0 12px;font-size:14px;font-weight:500;color:var(--ink-muted);position:relative}
.nav a:hover{color:#fff}
.nav a[aria-current="page"]{color:#fff}
.nav a[aria-current="page"]::after{content:"";position:absolute;left:12px;right:12px;bottom:0;height:2px;background:#7f9cff}
.hdr-tools{margin-left:auto;display:flex;align-items:center;gap:8px}
.qsearch{position:relative;width:300px}
.qsearch input{width:100%;height:34px;border-radius:var(--r);border:1px solid var(--ink-3);background:var(--ink-2);color:#fff;padding:0 34px 0 34px;font-size:14px;transition:border-color .12s,background .12s}
.qsearch input::placeholder{color:var(--ink-muted)}
.qsearch input:focus{outline:none;border-color:#7f9cff;background:#0c0f15}
.qsearch .ico{position:absolute;left:10px;top:9px;width:16px;height:16px;color:var(--ink-muted);pointer-events:none}
.qsearch kbd{position:absolute;right:8px;top:8px;font:500 11px/16px var(--mono);color:var(--ink-muted);border:1px solid var(--ink-3);border-radius:3px;padding:0 5px}
.qsearch input:focus ~ kbd{display:none}
.qs-pop{position:absolute;top:40px;right:0;left:0;min-width:360px;background:var(--surface);color:var(--text);border-radius:var(--r-lg);box-shadow:var(--shadow-lg);border:1px solid var(--line);overflow:hidden;z-index:50}
.qs-sec{padding:6px 0;border-bottom:1px solid var(--line)}
.qs-sec:last-child{border-bottom:0}
.qs-h{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding:4px 12px}
.qs-item{display:grid;grid-template-columns:32px 1fr auto;gap:10px;align-items:center;padding:6px 12px;cursor:pointer}
.qs-item img{width:32px;height:48px;object-fit:cover;border-radius:2px;background:var(--surface-3)}
.qs-item b{display:block;font-weight:500;font-size:14px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.qs-item span{font-size:12px;color:var(--muted)}
.qs-item.studio{grid-template-columns:1fr auto}
.qs-item[aria-selected="true"],.qs-item:hover{background:var(--accent-soft)}
.qs-all{display:block;padding:9px 12px;font-size:13px;font-weight:500;color:var(--accent-text);background:var(--surface-2)}
.qs-all[aria-selected="true"],.qs-all:hover{background:var(--accent-soft)}
.qs-empty{padding:16px 12px;font-size:14px;color:var(--muted)}
.qs-empty b{color:var(--text);font-weight:500}
.hdr-btn{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 12px;border-radius:var(--r);border:1px solid var(--ink-3);background:transparent;color:var(--ink-text);font-size:14px;font-weight:500;white-space:nowrap}
.hdr-btn:hover{background:var(--ink-2);border-color:#3a4254}
.hdr-btn svg{width:16px;height:16px}
.hdr-btn .count{font:500 11px/18px var(--mono);background:#7f9cff;color:#0b0e16;border-radius:9px;padding:0 6px;min-width:18px;text-align:center}
.hdr-btn[aria-current="page"]{background:var(--ink-2);border-color:#3a4254}
.icon-btn{display:none;width:36px;height:36px;border-radius:var(--r);border:1px solid var(--ink-3);background:transparent;color:#fff;align-items:center;justify-content:center}
.icon-btn svg{width:18px;height:18px}
.icon-btn:hover{background:var(--ink-2)}
.drawer{display:none}

/* ---------- footer */
.ftr{margin-top:56px;background:var(--surface);border-top:1px solid var(--line);font-size:14px;color:var(--text-2)}
.ftr-in{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:32px;padding:36px 0 28px}
.ftr .logo{color:var(--text);margin-bottom:8px}
.ftr .logo i{color:var(--accent)}
.ftr p{max-width:38ch;color:var(--muted);font-size:13px}
.ftr h4{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:10px}
.ftr li{margin:6px 0}
.ftr a:hover{color:var(--accent)}
.ftr-bot{border-top:1px solid var(--line);padding:14px 0;font-size:12px;color:var(--muted);display:flex;gap:16px;justify-content:space-between;flex-wrap:wrap}

/* ---------- common UI */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;padding:0 14px;border-radius:var(--r);border:1px solid transparent;font-size:14px;font-weight:500;white-space:nowrap;transition:background .12s,border-color .12s,color .12s;user-select:none}
.btn svg{width:16px;height:16px;flex:none}
.btn-primary{background:var(--accent);color:#fff}
.btn-primary:hover{background:var(--accent-hover)}
.btn-primary:active{background:#1a3da6}
.btn-default{background:var(--surface);border-color:var(--line-strong);color:var(--text)}
.btn-default:hover{background:var(--surface-2);border-color:#aeb6c3}
.btn-default:active{background:var(--surface-3)}
.btn-ghost{background:transparent;color:var(--text-2)}
.btn-ghost:hover{background:var(--surface-3);color:var(--text)}
.btn-sm{height:30px;padding:0 10px;font-size:13px}
.btn-xs{height:26px;padding:0 8px;font-size:12px}
.btn[disabled],.btn[aria-disabled="true"]{opacity:.5;pointer-events:none}
.btn-danger{background:var(--surface);border-color:#e7b9b6;color:var(--low)}
.btn-danger:hover{background:var(--low-soft)}
.btn.is-on{background:var(--accent-soft);border-color:#b8c8f6;color:var(--accent-text)}
.btn-fav[aria-pressed="true"]{color:#c42d52;border-color:#efc0cc;background:#fdf0f3}
.btn-fav[aria-pressed="true"] svg{fill:currentColor}
.link{color:var(--accent-text)}
.link:hover{text-decoration:underline}

.field{display:flex;flex-direction:column;gap:6px}
.label{font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.input,.select,.textarea{width:100%;height:36px;border:1px solid var(--line-strong);border-radius:var(--r);background:var(--surface);padding:0 10px;font-size:14px;transition:border-color .12s,box-shadow .12s}
.select{appearance:none;padding-right:30px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23768093' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center;background-size:12px}
.textarea{height:auto;min-height:96px;padding:9px 10px;resize:vertical;line-height:1.5}
.input:hover,.select:hover,.textarea:hover{border-color:#aeb6c3}
.input:focus,.select:focus,.textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(43,89,224,.14)}
.check{display:flex;align-items:center;gap:8px;font-size:14px;cursor:pointer;padding:3px 0;color:var(--text-2)}
.check input{width:16px;height:16px;margin:0;accent-color:var(--accent);flex:none}
.check:hover{color:var(--text)}
.check .n{margin-left:auto;font:500 11px var(--mono);color:var(--faint)}

.pill{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 8px;border-radius:11px;font-size:12px;font-weight:500;background:var(--surface-3);color:var(--text-2);white-space:nowrap}
.pill.airing{background:var(--good-soft);color:var(--airing)}
.pill.airing::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.pill.upcoming{background:var(--mid-soft);color:var(--upcoming)}
.pill.finished{background:var(--surface-3);color:var(--text-2)}
.tag{display:inline-flex;align-items:center;height:26px;padding:0 10px;border:1px solid var(--line);border-radius:var(--r);font-size:13px;background:var(--surface);color:var(--text-2)}
a.tag:hover{border-color:var(--accent);color:var(--accent-text)}
.tags{display:flex;flex-wrap:wrap;gap:6px}
.score{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:22px;padding:0 6px;border-radius:3px;font:600 12px/1 var(--font);font-variant-numeric:tabular-nums}
.score.hi{background:var(--good-soft);color:var(--good)}
.score.md{background:var(--mid-soft);color:var(--mid)}
.score.lo{background:var(--low-soft);color:var(--low)}
.score.na{background:var(--surface-3);color:var(--muted)}

.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg)}
.panel-h{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line)}
.panel-h h2,.panel-h h3{font-size:14px;font-weight:600}
.panel-h a{font-size:13px;color:var(--accent-text)}
.panel-h a:hover{text-decoration:underline}
.panel-b{padding:14px 16px}

.sec{margin-top:32px}
.sec:first-child{margin-top:0}
.sec-h{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:12px}
.sec-h h2{font-size:18px;font-weight:600}
.sec-h .sub{font-size:13px;color:var(--muted);margin-left:8px;font-weight:400}
.sec-h a{font-size:13px;font-weight:500;color:var(--accent-text);white-space:nowrap}
.sec-h a:hover{text-decoration:underline}

.page-head{padding:28px 0 18px}
.page-head h1{font-size:28px;font-weight:600;letter-spacing:-.015em}
.page-head p{margin-top:6px;color:var(--text-2);max-width:70ch}
.crumbs{display:flex;flex-wrap:wrap;gap:6px;font-size:13px;color:var(--muted);margin-bottom:10px}
.crumbs a{color:var(--text-2)}
.crumbs a:hover{color:var(--accent-text);text-decoration:underline}
.crumbs li+li::before{content:"/";margin-right:6px;color:var(--faint)}

.tabs{position:relative;display:flex;gap:4px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tab{position:relative;display:inline-flex;align-items:center;gap:6px;height:42px;padding:0 12px;font-size:14px;font-weight:500;color:var(--text-2);background:none;border:0;white-space:nowrap}
.tab:hover{color:var(--text)}
.tab[aria-selected="true"],.tab[aria-current="page"]{color:var(--text)}
.tab[aria-selected="true"]::after,.tab[aria-current="page"]::after{content:"";position:absolute;left:8px;right:8px;bottom:-1px;height:2px;background:var(--accent)}
.tab .n{font:500 11px var(--mono);color:var(--muted);background:var(--surface-3);border-radius:8px;padding:1px 6px}

.seg{display:inline-flex;border:1px solid var(--line-strong);border-radius:var(--r);overflow:hidden;background:var(--surface)}
.seg button{height:32px;padding:0 10px;border:0;background:none;font-size:13px;font-weight:500;color:var(--text-2);display:inline-flex;align-items:center;gap:6px}
.seg button+button{border-left:1px solid var(--line-strong)}
.seg button:hover{background:var(--surface-2);color:var(--text)}
.seg button[aria-pressed="true"]{background:var(--accent-soft);color:var(--accent-text)}
.seg svg{width:16px;height:16px}

/* ---------- poster cards */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:22px 18px}
.grid.cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}
.grid.cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}
.card{position:relative;min-width:0}
.card-cover{position:relative;display:block;aspect-ratio:2/3;border-radius:var(--r);overflow:hidden;background:var(--surface-3);box-shadow:var(--shadow)}
.card-cover img{width:100%;height:100%;object-fit:cover;transition:transform .25s ease}
.card:hover .card-cover img{transform:scale(1.025)}
.card-cover:focus-visible{outline-offset:3px}
.card-badge{position:absolute;left:6px;top:6px;display:flex;gap:4px;flex-wrap:wrap}
.card-badge span{font-size:11px;font-weight:600;height:20px;line-height:20px;padding:0 6px;border-radius:3px;background:rgba(12,14,20,.82);color:#fff;letter-spacing:.01em}
.card-badge .b-air{background:var(--airing)}
.card-badge .b-new{background:var(--accent)}
.card-badge .b-soon{background:#6b4a0c}
.card-list{position:absolute;right:6px;top:6px;width:28px;height:28px;border-radius:var(--r);border:0;background:rgba(12,14,20,.78);color:#fff;display:grid;place-items:center;opacity:0;transition:opacity .12s,background .12s}
.card-list svg{width:16px;height:16px}
.card:hover .card-list,.card-list:focus-visible,.card-list.on{opacity:1}
.card-list:hover{background:var(--accent)}
.card-list.on{background:var(--accent)}
.card-next{position:absolute;left:0;right:0;bottom:0;padding:18px 8px 6px;background:linear-gradient(transparent,rgba(8,10,15,.86));color:#fff;font-size:12px;font-weight:500}
.card-next b{font-weight:600}
.card-title{display:block;margin-top:8px;font-size:14px;font-weight:500;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.card-title:hover{color:var(--accent-text)}
.card-meta{display:flex;align-items:center;gap:6px;margin-top:3px;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden}
.card-meta .score{height:18px;min-width:28px;font-size:11px}
.card-progress{height:3px;background:var(--surface-3);border-radius:2px;margin-top:6px;overflow:hidden}
.card-progress i{display:block;height:100%;background:var(--accent)}

.rail{display:grid;grid-auto-flow:column;grid-auto-columns:150px;gap:16px;overflow-x:auto;padding-bottom:10px;scroll-snap-type:x mandatory;scrollbar-width:thin}
.rail>*{scroll-snap-align:start}

/* ---------- row list items */
.rows{display:flex;flex-direction:column}
.row{display:grid;grid-template-columns:46px 1fr auto;gap:12px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}
.row:last-child{border-bottom:0}
.row img{width:46px;height:69px;object-fit:cover;border-radius:3px;background:var(--surface-3)}
.row .t{font-size:14px;font-weight:500;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.row .t:hover{color:var(--accent-text)}
.row .m{font-size:12px;color:var(--muted);margin-top:2px}
.rank{font:600 13px var(--mono);color:var(--muted);width:22px;text-align:right}
.ranked .row{grid-template-columns:22px 40px 1fr auto}
.ranked .row img{width:40px;height:60px}

.ep-row{display:grid;grid-template-columns:128px 1fr auto;gap:14px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}
.ep-row:last-child{border-bottom:0}
.ep-thumb{position:relative;aspect-ratio:16/9;border-radius:3px;overflow:hidden;background:var(--surface-3)}
.ep-thumb img{width:100%;height:100%;object-fit:cover}
.ep-thumb .ep-n{position:absolute;left:4px;bottom:4px;font:600 11px/18px var(--font);padding:0 5px;border-radius:3px;background:rgba(10,12,18,.8);color:#fff}
.ep-row .t{font-size:14px;font-weight:500}
.ep-row .t a:hover{color:var(--accent-text)}
.ep-row .m{font-size:12px;color:var(--muted);margin-top:2px}
.ep-row time{font-size:12px;color:var(--muted);white-space:nowrap}

/* ---------- layout: home */
.home{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:32px;padding-top:28px}
.home-side{display:flex;flex-direction:column;gap:20px}
.statgrid{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line)}
.statgrid div{background:var(--surface);padding:12px 16px}
.statgrid b{display:block;font-size:20px;font-weight:600;font-variant-numeric:tabular-nums}
.statgrid span{font-size:12px;color:var(--muted)}
.today-row{display:grid;grid-template-columns:52px 1fr;gap:10px;padding:8px 0;border-bottom:1px solid var(--line);font-size:13px}
.today-row:last-child{border-bottom:0}
.today-row time{font:500 12px var(--mono);color:var(--text-2);padding-top:1px}
.today-row a{font-weight:500;line-height:1.3}
.today-row a:hover{color:var(--accent-text)}
.today-row .m{color:var(--muted);font-size:12px}
.today-row.past time,.today-row.past a{color:var(--muted)}
.genre-links{display:flex;flex-wrap:wrap;gap:6px}
.genre-links a{font-size:13px;padding:4px 8px;border-radius:var(--r);background:var(--surface-2);border:1px solid var(--line);color:var(--text-2)}
.genre-links a:hover{border-color:var(--accent);color:var(--accent-text)}
.genre-links a span{font:500 11px var(--mono);color:var(--faint);margin-left:4px}
.continue{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.cont{display:grid;grid-template-columns:54px 1fr;gap:12px;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg)}
.cont img{width:54px;height:81px;object-fit:cover;border-radius:3px}
.cont .t{font-size:14px;font-weight:500;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cont .t:hover{color:var(--accent-text)}
.cont .m{font-size:12px;color:var(--muted);margin-top:4px}
.cont-foot{display:flex;align-items:center;gap:8px;margin-top:8px}
.bar{flex:1;height:4px;background:var(--surface-3);border-radius:2px;overflow:hidden}
.bar i{display:block;height:100%;background:var(--accent)}

/* ---------- browse */
.browse{display:grid;grid-template-columns:240px minmax(0,1fr);gap:28px;align-items:start}
.filters{position:sticky;top:72px;max-height:calc(100vh - 88px);overflow:auto;padding-right:6px;scrollbar-width:thin}
.fgroup{padding:14px 0;border-bottom:1px solid var(--line)}
.fgroup:first-child{padding-top:0}
.fgroup .label{display:flex;justify-content:space-between;margin-bottom:8px}
.fgroup .label button{border:0;background:none;padding:0;font:500 12px var(--font);text-transform:none;letter-spacing:0;color:var(--accent-text)}
.fgroup .label button:hover{text-decoration:underline}
.fgrid2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.genre-more{display:none}
.genres-open .genre-more{display:flex}
.range{width:100%;accent-color:var(--accent)}
.range-val{font:500 12px var(--mono);color:var(--text-2)}
.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.toolbar .count{font-size:14px;color:var(--text-2);margin-right:auto}
.toolbar .count b{color:var(--text);font-weight:600}
.toolbar .select{width:auto;height:32px;font-size:13px}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin:-4px 0 16px}
.chip{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 6px 0 10px;border-radius:14px;background:var(--accent-soft);color:var(--accent-text);font-size:13px;font-weight:500;border:1px solid #cdd9f8}
.chip button{border:0;background:none;width:18px;height:18px;border-radius:50%;display:grid;place-items:center;color:inherit;padding:0}
.chip button:hover{background:#cbd8fb}
.chip button svg{width:12px;height:12px}
.chip-clear{border:0;background:none;font-size:13px;color:var(--muted);padding:0 6px}
.chip-clear:hover{color:var(--text);text-decoration:underline}
.filters-btn{display:none}

.table{width:100%;border-collapse:collapse;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden;font-size:14px}
.table th{font-size:12px;font-weight:600;color:var(--muted);text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);background:var(--surface-2);white-space:nowrap}
.table td{padding:8px 12px;border-bottom:1px solid var(--line);vertical-align:middle}
.table tr:last-child td{border-bottom:0}
.table tbody tr:hover{background:#fafbfc}
.table .c-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.table .c-title{display:grid;grid-template-columns:40px 1fr;gap:12px;align-items:center;min-width:220px}
.table .c-title img{width:40px;height:60px;object-fit:cover;border-radius:3px;background:var(--surface-3)}
.table .c-title a{font-weight:500;line-height:1.3}
.table .c-title a:hover{color:var(--accent-text)}
.table .c-title small{display:block;font-size:12px;color:var(--muted);margin-top:2px}
.table .rankcell{font:600 16px var(--mono);color:var(--text-2);width:48px;text-align:center}
.table-wrap{position:relative;overflow-x:auto;border-radius:var(--r-lg)}

.pager{display:flex;align-items:center;justify-content:center;gap:4px;margin-top:28px;flex-wrap:wrap}
.pager a,.pager span{min-width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;padding:0 8px;border-radius:var(--r);font-size:14px;font-weight:500;color:var(--text-2);font-variant-numeric:tabular-nums}
.pager a{border:1px solid var(--line-strong);background:var(--surface)}
.pager a:hover{border-color:var(--accent);color:var(--accent-text)}
.pager a[aria-current="page"]{background:var(--accent);border-color:var(--accent);color:#fff}
.pager a[aria-disabled="true"]{opacity:.45;pointer-events:none}
.pager svg{width:16px;height:16px}

/* ---------- states */
.empty{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:32px;background:var(--surface);border:1px dashed var(--line-strong);border-radius:var(--r-lg)}
.empty h3{font-size:16px}
.empty p{color:var(--text-2);max-width:56ch;font-size:14px}
.empty.center{align-items:center;text-align:center}
.empty.compact{padding:18px}
.error-box{border-style:solid;border-color:#efc9c6;background:#fffafa}
.error-box h3{color:var(--low)}
.skel{background:linear-gradient(90deg,var(--surface-3) 0,#f1f3f6 40%,var(--surface-3) 80%);background-size:300% 100%;animation:sk 1.3s ease-in-out infinite;border-radius:var(--r)}
@keyframes sk{0%{background-position:100% 0}100%{background-position:-100% 0}}
.skel-cover{aspect-ratio:2/3}
.skel-line{height:12px;margin-top:8px}
.skel-line.w60{width:60%}.skel-line.w40{width:40%}.skel-line.w80{width:80%}
@media (prefers-reduced-motion:reduce){.skel{animation:none}.card-cover img{transition:none}}

.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);opacity:0;background:var(--ink);color:#fff;font-size:14px;padding:10px 14px;border-radius:var(--r-lg);box-shadow:var(--shadow-lg);z-index:90;transition:opacity .16s,transform .16s;display:flex;gap:12px;align-items:center;max-width:calc(100vw - 32px)}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.toast button{border:0;background:none;color:#9fb4ff;font-weight:600;padding:0}

/* ---------- popover / list editor */
.pop{position:absolute;z-index:60;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow-lg);padding:6px;min-width:200px}
.pop button.opt{display:flex;align-items:center;gap:10px;width:100%;height:34px;padding:0 10px;border:0;background:none;border-radius:var(--r);font-size:14px;text-align:left;color:var(--text)}
.pop button.opt:hover,.pop button.opt:focus-visible{background:var(--surface-2);outline:none}
.pop button.opt[aria-checked="true"]{color:var(--accent-text);font-weight:500}
.pop button.opt[aria-checked="true"]::after{content:"";margin-left:auto;width:8px;height:8px;border-radius:50%;background:var(--accent)}
.pop hr{border:0;border-top:1px solid var(--line);margin:6px 0}
.pop .opt.danger{color:var(--low)}
.dot{width:8px;height:8px;border-radius:50%;flex:none}
.st-CURRENT{background:#2b59e0}.st-PLANNING{background:#8a93a5}.st-COMPLETED{background:#1d8049}.st-PAUSED{background:#c98a14}.st-DROPPED{background:#bf3b35}

.modal-back{position:fixed;inset:0;background:rgba(10,12,18,.5);z-index:80;display:flex;align-items:center;justify-content:center;padding:16px}
.modal{background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--shadow-lg);width:100%;max-width:480px;max-height:calc(100vh - 32px);overflow:auto}
.modal-h{display:grid;grid-template-columns:48px 1fr auto;gap:12px;align-items:center;padding:14px 16px;border-bottom:1px solid var(--line)}
.modal-h img{width:48px;height:72px;object-fit:cover;border-radius:3px}
.modal-h h2{font-size:16px;line-height:1.3}
.modal-h .m{font-size:12px;color:var(--muted);margin-top:2px}
.modal-b{padding:16px;display:grid;gap:14px}
.modal-f{display:flex;gap:8px;justify-content:flex-end;padding:12px 16px;border-top:1px solid var(--line);background:var(--surface-2)}
.modal-f .spacer{margin-right:auto}
.x-btn{width:32px;height:32px;border:0;background:none;border-radius:var(--r);display:grid;place-items:center;color:var(--muted)}
.x-btn:hover{background:var(--surface-3);color:var(--text)}
.x-btn svg{width:18px;height:18px}
.stepper{display:flex;align-items:stretch}
.stepper .input{border-radius:0;text-align:center;width:80px;font-variant-numeric:tabular-nums}
.stepper button{width:36px;border:1px solid var(--line-strong);background:var(--surface-2);font-size:16px;color:var(--text-2)}
.stepper button:first-child{border-radius:var(--r) 0 0 var(--r);border-right:0}
.stepper button:last-child{border-radius:0 var(--r) var(--r) 0;border-left:0}
.stepper button:hover{background:var(--surface-3)}
.stepper .of{align-self:center;margin-left:10px;font-size:13px;color:var(--muted)}

/* ---------- anime page */
.hero{position:relative;height:300px;background:var(--ink);overflow:hidden}
.hero img{width:100%;height:100%;object-fit:cover;opacity:.92}
.hero::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(10,12,18,0) 40%,rgba(10,12,18,.55))}
.head{background:var(--surface);border-bottom:1px solid var(--line)}
.head-in{display:grid;grid-template-columns:220px minmax(0,1fr);gap:28px}
.head-cover{margin-top:-150px;position:relative;z-index:2}
.head-cover img{width:220px;height:auto;aspect-ratio:2/3;object-fit:cover;border-radius:var(--r-lg);box-shadow:var(--shadow-lg);background:var(--surface-3)}
.head-actions{display:grid;grid-template-columns:1fr auto;gap:8px;margin:14px 0 18px}
.head-actions .btn{height:38px}
.head-main{padding:22px 0 0;min-width:0}
.head-main h1{font-size:30px;font-weight:600;letter-spacing:-.02em;line-height:1.15}
.alt-titles{margin-top:6px;color:var(--text-2);font-size:14px;display:flex;flex-wrap:wrap;gap:4px 14px}
.alt-titles .jp{color:var(--muted)}
.facts{display:flex;flex-wrap:wrap;gap:8px 18px;align-items:center;margin-top:14px;font-size:14px;color:var(--text-2)}
.facts .sep{width:3px;height:3px;border-radius:50%;background:var(--faint)}
.bigscore{display:inline-flex;align-items:baseline;gap:6px;font-weight:600;color:var(--text)}
.bigscore b{font-size:22px;font-variant-numeric:tabular-nums}
.bigscore small{font-size:12px;color:var(--muted);font-weight:400}
.head-syn{margin-top:14px;color:var(--text-2);font-size:14px;max-width:78ch;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.head .tabs{border-bottom:0;margin-top:14px}
.anime-body{display:grid;grid-template-columns:220px minmax(0,1fr);gap:28px;padding-top:24px}
.details{font-size:13px}
.details dl{margin:0}
.details dt{font-size:12px;font-weight:600;color:var(--muted)}
.details .d+.d{margin-top:12px}
.details dd{margin:2px 0 0;color:var(--text);line-height:1.4}
.details dd a{color:var(--accent-text)}
.details dd a:hover{text-decoration:underline}
.details .jp{font-size:13px}
.content{min-width:0;display:flex;flex-direction:column;gap:24px}
.synopsis p+p{margin-top:12px}
.synopsis{font-size:15px;line-height:1.65;color:var(--text-2);max-width:74ch}
.next-ep{display:flex;align-items:center;gap:16px;padding:14px 16px;border:1px solid #cfe5d8;background:#f4fbf6;border-radius:var(--r-lg)}
.next-ep .k{font-size:12px;font-weight:600;color:var(--airing);text-transform:uppercase;letter-spacing:.05em}
.next-ep .v{font-size:15px;font-weight:500}
.next-ep .cd{margin-left:auto;font:500 20px var(--mono);font-variant-numeric:tabular-nums;color:var(--text)}
.next-ep.soon{border-color:#ecdcb8;background:#fffaf0}
.next-ep.soon .k{color:var(--upcoming)}
.rel-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px}
.rel{display:grid;grid-template-columns:60px 1fr;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden;min-height:90px;transition:border-color .12s}
.rel:hover{border-color:var(--line-strong)}
.rel img{width:60px;height:100%;object-fit:cover}
.rel div{padding:9px 12px;min-width:0}
.rel .k{font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:var(--accent-text)}
.rel .t{font-size:14px;font-weight:500;line-height:1.3;margin-top:3px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.rel .m{font-size:12px;color:var(--muted);margin-top:3px}
.scores{display:grid;grid-template-columns:200px minmax(0,1fr);gap:24px}
.score-sum .big{font-size:40px;font-weight:600;line-height:1;font-variant-numeric:tabular-nums}
.score-sum .big small{font-size:16px;color:var(--muted);font-weight:400}
.score-sum .m{font-size:13px;color:var(--muted);margin-top:6px}
.score-sum ul{margin-top:14px;font-size:13px;display:grid;gap:6px}
.score-sum li{display:flex;justify-content:space-between;gap:8px}
.score-sum li span{color:var(--muted)}
.score-sum li b{font-weight:600;font-variant-numeric:tabular-nums}
.dist{display:grid;grid-template-columns:repeat(10,1fr);gap:6px;align-items:end;height:150px}
.dist .col{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:4px}
.dist .col i{display:block;width:100%;border-radius:2px 2px 0 0;background:#b9c7ee;min-height:2px;transition:background .12s}
.dist .col.hi i{background:var(--accent)}
.dist .col.mine i{background:#e0a72b}
.dist .col span{font:500 11px var(--mono);color:var(--muted)}
.dist .col:hover i{background:var(--accent-hover)}
.dist-legend{display:flex;gap:14px;font-size:12px;color:var(--muted);margin-top:8px}
.dist-legend i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:5px;vertical-align:-1px}
.stack{display:flex;height:10px;border-radius:5px;overflow:hidden;background:var(--surface-3)}
.stack i{display:block;height:100%}
.stack-legend{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px 16px;margin-top:12px;font-size:13px}
.stack-legend div{display:flex;align-items:center;gap:8px}
.stack-legend b{margin-left:auto;font-weight:500;font-variant-numeric:tabular-nums}
.my-score{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:14px;padding-top:14px;border-top:1px solid var(--line);font-size:13px}
.rate{display:inline-flex;gap:2px}
.rate button{width:28px;height:28px;border:1px solid var(--line-strong);background:var(--surface);border-radius:3px;font:500 12px var(--font);color:var(--text-2);padding:0}
.rate button:hover{border-color:var(--accent);color:var(--accent-text)}
.rate button[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:#fff}
.studio-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:start}
.studio-card h3{font-size:16px}
.studio-card .jp{font-size:13px;color:var(--muted)}
.studio-card p{margin-top:8px;font-size:14px;color:var(--text-2)}
.studio-card .m{font-size:13px;color:var(--muted);margin-top:8px}
.mini-posters{display:flex;gap:6px}
.mini-posters img{width:46px;height:69px;object-fit:cover;border-radius:3px}
.kv{width:100%;border-collapse:collapse;font-size:14px}
.kv td{padding:9px 0;border-bottom:1px solid var(--line);vertical-align:top}
.kv tr:last-child td{border-bottom:0}
.kv td:first-child{color:var(--muted);width:40%;padding-right:16px}
.cast-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:10px}
.cast{display:grid;grid-template-columns:40px 1fr auto 40px;gap:10px;align-items:center;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg)}
.cast .who{font-size:14px;font-weight:500;line-height:1.3}
.cast .role{font-size:12px;color:var(--muted)}
.cast .va{text-align:right;font-size:13px;line-height:1.3}
.cast .va small{display:block;font-size:11px;color:var(--muted)}
.ava{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font-size:14px;font-weight:600;color:#fff;flex:none;text-transform:uppercase;letter-spacing:.02em}
.ava.sm{width:32px;height:32px;font-size:12px}
.ep-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:6px}
.ep-tools .prog{font-size:14px;color:var(--text-2)}
.ep-tools .prog b{color:var(--text)}
.ep-list{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:0 16px}
.ep-check{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border-radius:var(--r);border:1px solid var(--line-strong);background:var(--surface);font-size:12px;font-weight:500;color:var(--text-2);white-space:nowrap}
.ep-check:hover{border-color:var(--accent);color:var(--accent-text)}
.ep-check[aria-pressed="true"]{background:var(--good-soft);border-color:#b9dcc6;color:var(--good)}
.ep-check svg{width:14px;height:14px}
.ep-row.future .t{color:var(--muted)}
.ep-row.watched .ep-thumb img{opacity:.55}
.filler{font-size:11px;font-weight:600;color:var(--mid);background:var(--mid-soft);padding:1px 5px;border-radius:3px;margin-left:6px}
.ep-ranges{display:flex;gap:4px;flex-wrap:wrap}

/* discussion */
.c-form{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:14px 16px}
.c-form .who{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--text-2);margin-bottom:10px}
.c-form .who b{color:var(--text);font-weight:600}
.c-form .who button{border:0;background:none;padding:0;color:var(--accent-text);font-size:13px}
.c-form .who button:hover{text-decoration:underline}
.c-form-foot{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px}
.c-form-foot .select{width:auto;height:32px;font-size:13px}
.c-form-foot .cnt{margin-left:auto;font:500 12px var(--mono);color:var(--muted)}
.c-form-foot .cnt.over{color:var(--low)}
.c-form .err{font-size:13px;color:var(--low);margin-top:6px}
.c-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:18px 0 6px}
.c-head h3{font-size:15px;margin-right:auto}
.seed-note{display:flex;gap:10px;align-items:flex-start;font-size:13px;color:var(--text-2);background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-lg);padding:10px 12px;margin-bottom:6px}
.seed-note svg{width:16px;height:16px;flex:none;margin-top:2px;color:var(--muted)}
.comments{display:flex;flex-direction:column}
.cmt{display:grid;grid-template-columns:40px minmax(0,1fr);gap:12px;padding:16px 0;border-bottom:1px solid var(--line)}
.cmt:last-child{border-bottom:0}
.cmt .ava{width:40px;height:40px}
.cmt-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px}
.cmt-h b{font-weight:600;font-size:14px}
.cmt-h time{color:var(--muted)}
.cmt-h .badge{font-size:11px;font-weight:600;padding:1px 6px;border-radius:3px;background:var(--surface-3);color:var(--text-2)}
.cmt-h .badge.you{background:var(--accent-soft);color:var(--accent-text)}
.cmt-h .badge.ep{background:transparent;border:1px solid var(--line-strong)}
.cmt-t{margin-top:6px;font-size:14px;line-height:1.6;color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere}
.spoiler{position:relative;border-radius:var(--r);background:var(--surface-3);color:transparent;user-select:none;cursor:pointer;padding:6px 10px}
.spoiler::after{content:"Spoiler — click to reveal";position:absolute;left:10px;top:6px;font-size:13px;color:var(--text-2);font-weight:500}
.cmt-a{display:flex;gap:4px;margin-top:8px;margin-left:-8px}
.cmt-a button{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 8px;border:0;background:none;border-radius:var(--r);font-size:12px;font-weight:500;color:var(--muted)}
.cmt-a button:hover{background:var(--surface-3);color:var(--text)}
.cmt-a button svg{width:14px;height:14px}
.cmt-a button[aria-pressed="true"]{color:var(--accent-text)}
.cmt-a button[aria-pressed="true"] svg{fill:currentColor}
.replies{margin-top:4px;border-left:2px solid var(--line);padding-left:14px}
.replies .cmt{grid-template-columns:32px minmax(0,1fr);padding:12px 0}
.replies .cmt .ava{width:32px;height:32px;font-size:12px}
.reply-form{margin-top:10px}
.reply-form .textarea{min-height:72px}
.reply-form .row-btns{display:flex;gap:8px;justify-content:flex-end;margin-top:8px}

/* ---------- season chart */
.season-nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.season-nav h1{font-size:28px;min-width:0}
.season-nav .arrows{display:flex;gap:4px}
.season-nav .arrows a{width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--line-strong);border-radius:var(--r);background:var(--surface);color:var(--text-2)}
.season-nav .arrows a:hover{border-color:var(--accent);color:var(--accent-text)}
.season-nav .arrows svg{width:16px;height:16px}
.season-pick{margin-left:auto;display:flex;gap:8px}
.season-pick .select{width:auto;height:34px}
.chart{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.ccard{display:grid;grid-template-columns:150px minmax(0,1fr);background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden;height:240px}
.ccard .cv{position:relative;display:block;height:100%;background:var(--surface-3)}
.ccard .cv img{width:100%;height:100%;object-fit:cover}
.ccard .cv .cap{position:absolute;left:0;right:0;bottom:0;padding:22px 10px 8px;background:linear-gradient(transparent,rgba(8,10,15,.9));color:#fff}
.ccard .cv .cap b{display:block;font-size:13px;font-weight:600;line-height:1.3}
.ccard .cv .cap span{font-size:11px;color:#c9cfdb}
.ccard .bd{display:flex;flex-direction:column;min-width:0}
.ccard .top{padding:12px 14px 0}
.ccard .ttl{font-size:15px;font-weight:600;line-height:1.3;margin-bottom:4px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ccard .ttl a:hover{color:var(--accent-text)}
.ccard .air{font-size:12px;color:var(--muted)}
.ccard .air b{color:var(--text);font-weight:600}
.ccard .air.live b{color:var(--airing)}
.ccard .st{font-size:13px;font-weight:500;color:var(--accent-text);margin-top:2px}
.ccard .st a:hover{text-decoration:underline}
.ccard .ms{font-size:12px;color:var(--muted);margin-top:2px}
.ccard .syn{padding:8px 14px 0;font-size:13px;line-height:1.55;color:var(--text-2);overflow:auto;flex:1;scrollbar-width:thin}
.ccard .ft{display:flex;align-items:center;gap:6px;padding:8px 14px;background:var(--surface-2);border-top:1px solid var(--line);margin-top:8px}
.ccard .ft .tags{flex:1;min-width:0;flex-wrap:nowrap;overflow:hidden}
.ccard .ft .tag{height:22px;font-size:11px;padding:0 7px;background:var(--surface);flex:none}
.group-h{display:flex;align-items:baseline;gap:10px;margin:28px 0 12px;font-size:16px}
.group-h:first-child{margin-top:0}
.group-h span{font-size:13px;color:var(--muted);font-weight:400}

/* schedule */
.week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}
.day{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);min-height:200px;display:flex;flex-direction:column}
.day-h{padding:10px 12px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap}
.day-h b{font-size:14px;font-weight:600}
.day-h span{font-size:12px;color:var(--muted)}
.day.today{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset}
.day.today .day-h b{color:var(--accent-text)}
.slot{display:grid;grid-template-columns:1fr;gap:6px;padding:10px 12px;border-bottom:1px solid var(--line)}
.slot:last-child{border-bottom:0}
.slot time{font:500 12px var(--mono);color:var(--text-2)}
.slot .sl{display:grid;grid-template-columns:36px 1fr;gap:8px;align-items:start}
.slot img{width:36px;height:54px;object-fit:cover;border-radius:3px}
.slot a.t{font-size:13px;font-weight:500;line-height:1.3;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.slot a.t:hover{color:var(--accent-text)}
.slot .m{font-size:11px;color:var(--muted);margin-top:2px}
.slot.aired{opacity:.6}
.slot.mine a.t::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--accent);margin-right:5px;vertical-align:2px}
.day-empty{padding:14px 12px;font-size:13px;color:var(--faint)}
.day-tabs{display:none}

/* updates timeline */
.tl-day{margin-top:24px}
.tl-day:first-child{margin-top:0}
.tl-day h3{font-size:13px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;margin-bottom:6px}
.tl-list{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:0 16px}

/* genres / studios index */
.gtable td:first-child{width:200px}
.gname{font-size:15px;font-weight:600}
.gname:hover{color:var(--accent-text)}
.gdesc{font-size:13px;color:var(--text-2);max-width:60ch}
.gtable .mini-posters img{width:34px;height:51px}

.studio-head{padding:28px 0 22px;background:var(--surface);border-bottom:1px solid var(--line)}
.studio-head h1{font-size:30px;letter-spacing:-.02em}
.studio-head .jp{color:var(--muted);font-size:15px;margin-top:4px}
.studio-head p{margin-top:12px;max-width:78ch;color:var(--text-2)}
.studio-stats{display:flex;gap:28px;flex-wrap:wrap;margin-top:18px}
.studio-stats div b{display:block;font-size:20px;font-weight:600;font-variant-numeric:tabular-nums}
.studio-stats div span{font-size:12px;color:var(--muted)}
.year-h{font-size:15px;font-weight:600;margin:26px 0 12px;display:flex;align-items:center;gap:12px}
.year-h::after{content:"";flex:1;height:1px;background:var(--line)}

/* lists */
.lists-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;flex-wrap:wrap}
.lstats{display:flex;gap:1px;background:var(--line);border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden}
.lstats div{background:var(--surface);padding:10px 16px;min-width:110px}
.lstats b{display:block;font-size:18px;font-weight:600;font-variant-numeric:tabular-nums}
.lstats span{font-size:12px;color:var(--muted)}
.lists-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:28px;margin-top:20px;align-items:start}
.ltable td{padding:8px 10px}
.ltable .prog{display:inline-flex;align-items:center;gap:6px;font-variant-numeric:tabular-nums;white-space:nowrap}
.ltable .prog button{width:24px;height:24px;border:1px solid var(--line-strong);background:var(--surface);border-radius:3px;font-size:14px;line-height:1;color:var(--text-2);padding:0}
.ltable .prog button:hover{border-color:var(--accent);color:var(--accent-text)}
.ltable .select{height:30px;font-size:13px;width:auto;padding-left:8px}
.status-cell{display:flex;align-items:center;gap:6px;white-space:nowrap;font-size:13px}
.settings .field+.field{margin-top:14px}
.settings .hint{font-size:12px;color:var(--muted)}
.settings .btns{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}

/* prose pages */
.prose{max-width:760px;padding-bottom:12px}
.prose h2{font-size:18px;margin:28px 0 8px}
.prose p,.prose li{color:var(--text-2);font-size:15px;line-height:1.7}
.prose p+p{margin-top:12px}
.prose ul{list-style:disc;padding-left:20px;margin:8px 0}
.prose a{color:var(--accent-text);text-decoration:underline}
.faq details{border-bottom:1px solid var(--line)}
.faq summary{cursor:pointer;padding:14px 28px 14px 0;font-weight:500;position:relative;list-style:none}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"";position:absolute;right:6px;top:20px;width:8px;height:8px;border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);transform:rotate(45deg);transition:transform .15s}
.faq details[open] summary::after{transform:rotate(-135deg);top:24px}
.faq details p{padding:0 0 14px;color:var(--text-2)}
.credits-table td{font-size:13px}
.credits-table img{width:64px;height:40px;object-fit:cover;border-radius:3px}

/* ---------- responsive */
@media (max-width:1180px){
  .grid.cols-6{grid-template-columns:repeat(5,minmax(0,1fr))}
  .qsearch{width:240px}
  .week{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (max-width:1024px){
  .home{grid-template-columns:minmax(0,1fr)}
  .home-side{display:grid;grid-template-columns:1fr 1fr;gap:20px}
  .grid.cols-5{grid-template-columns:repeat(4,minmax(0,1fr))}
  .grid.cols-6{grid-template-columns:repeat(4,minmax(0,1fr))}
  .chart{grid-template-columns:minmax(0,1fr)}
  .nav a{padding:0 9px}
  .lists-layout{grid-template-columns:minmax(0,1fr)}
  .ftr-in{grid-template-columns:1fr 1fr}
}
@media (max-width:900px){
  .nav,.qsearch.desk{display:none}
  .icon-btn{display:inline-flex}
  .hdr .hdr-btn .lbl{display:none}
  .drawer{display:block;position:fixed;inset:56px 0 0 0;background:var(--ink);z-index:39;padding:12px var(--gutter) 24px;overflow:auto;transform:translateY(-8px);opacity:0;visibility:hidden;transition:opacity .14s,transform .14s,visibility .14s}
  .drawer.open{transform:none;opacity:1;visibility:visible}
  .drawer .qsearch{width:100%;margin-bottom:12px}
  .drawer .qs-pop{min-width:0}
  .drawer nav a{display:flex;justify-content:space-between;align-items:center;padding:13px 2px;border-bottom:1px solid var(--ink-3);color:var(--ink-text);font-size:16px;font-weight:500}
  .drawer nav a[aria-current="page"]{color:#9fb4ff}
  .browse{grid-template-columns:minmax(0,1fr)}
  .filters{position:fixed;inset:0;z-index:70;background:var(--surface);max-height:none;padding:0;display:none;flex-direction:column}
  .filters.open{display:flex}
  .filters-in{flex:1;overflow:auto;padding:16px var(--gutter)}
  .filters-h{display:flex!important;align-items:center;justify-content:space-between;padding:10px var(--gutter);border-bottom:1px solid var(--line)}
  .filters-f{display:flex!important;gap:8px;padding:12px var(--gutter);border-top:1px solid var(--line);background:var(--surface-2)}
  .filters-f .btn{flex:1}
  .filters-btn{display:inline-flex}
  .head-in{grid-template-columns:150px minmax(0,1fr);gap:18px}
  .head-cover{margin-top:-90px}
  .head-cover img{width:150px}
  .anime-body{grid-template-columns:minmax(0,1fr)}
  .details{order:2}
  .details dl{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:0 16px}
  .details .d{margin-top:12px}
  .details .d{display:flex;flex-direction:column}
  .scores{grid-template-columns:minmax(0,1fr)}
  .week{display:block}
  .week .day{display:none}
  .week .day.sel{display:flex}
  .day-tabs{display:flex}
}
@media (max-width:640px){
  :root{--gutter:16px}
  body{font-size:14px}
  .page-head{padding:20px 0 14px}
  .page-head h1,.season-nav h1{font-size:22px}
  .grid,.grid.cols-5,.grid.cols-6{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 10px}
  .card-title{font-size:13px}
  .card-list{opacity:1;width:26px;height:26px}
  .home-side{grid-template-columns:minmax(0,1fr)}
  .hero{height:170px}
  .head-in{grid-template-columns:104px minmax(0,1fr);gap:14px}
  .head-cover{margin-top:-60px}
  .head-cover img{width:104px}
  .head-main{padding-top:12px}
  .head-main h1{font-size:20px}
  .alt-titles{font-size:12px}
  .facts{font-size:12px;gap:6px 12px}
  .head-syn{display:none}
  .head-actions{grid-column:1/-1;margin:0 0 4px}
  .head-in .tabs{grid-column:1/-1}
  .table th,.table td{padding:8px}
  .table .c-title{min-width:0;grid-template-columns:34px 1fr;gap:8px}
  .table .c-title img{width:34px;height:51px}
  .table .rankcell{width:28px;font-size:14px}
  .ltable .select{padding-right:22px;background-position:right 5px center}
  .ccard{grid-template-columns:110px minmax(0,1fr);height:220px}
  .ep-row{grid-template-columns:96px 1fr;gap:10px}
  .ep-row .ep-act{grid-column:2;justify-self:start}
  .rel-grid{grid-template-columns:minmax(0,1fr)}
  .ftr-in{grid-template-columns:minmax(0,1fr);gap:20px}
  .toolbar .count{flex-basis:100%}
  .lstats{width:100%}
  .lstats div{flex:1;min-width:0;padding:8px 10px}
  .table .hide-sm{display:none}
  .season-pick{margin-left:0;width:100%}
  .season-pick .select{flex:1}
  .qs-pop{min-width:0}
  .cast{grid-template-columns:32px 1fr;}
  .cast .va{grid-column:2;text-align:left}
  .cast .ava.va-ava{display:none}
  .dist{height:120px;gap:3px}
}
@media (max-width:380px){
  .grid,.grid.cols-5,.grid.cols-6{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.filters-h,.filters-f{display:none}
