/*
Theme Name: 爽短劇 Shuang
Theme URI: https://shuangduanju.com/
Author: SD Network
Description: 深色影院風格短劇主題：首屏大標題、橫向海報軌道、四列更新網格、追劇榜單。適用於爽短劇（shuangduanju.com）。
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: sd-shuang
*/

/* ==========================================================================
   爽短劇 · 深色影院
   tokens → base → header → hero → rail → cards → detail → watch → footer → pages
   ========================================================================== */

:root {
  --ink: #07080c;
  --ink-2: #0d0f15;
  --surface: #12151d;
  --surface-2: #1a1e29;
  --line: #262b3a;
  --text: #f3f4f8;
  --muted: #a6adbf;
  --accent: #ef4444;
  --accent-2: #f59e0b;
  --accent-soft: rgba(239, 68, 68, .14);
  --on-accent: #16090a;
  --radius: 12px;
  --wrap: 1280px;
  --head-h: 64px;
  --font: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 12px); }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font: 400 16px/1.7 var(--font); overflow-x: clip; -webkit-font-smoothing: antialiased;
}
body.sd-no-scroll { overflow: hidden; }
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only, .screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 999; padding: 10px 18px;
  background: var(--accent); color: var(--on-accent); font-weight: 800; border-radius: 8px;
}
.skip:focus { top: 12px; color: var(--on-accent); }

/* ---------- header ---------- */
.sh-head {
  position: sticky; top: 0; z-index: 60;
  background: rgba(7, 8, 12, .82); backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent; transition: border-color .2s, background .2s;
}
.sh-head.is-stuck { border-color: var(--line); background: rgba(7, 8, 12, .95); }
.sh-head__in { display: flex; align-items: center; gap: 28px; height: var(--head-h); }
.sh-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 20px; letter-spacing: .04em; white-space: nowrap; }
.sh-logo:hover { color: var(--text); }
.sh-logo__mark {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent);
  font-size: 18px; font-weight: 900; box-shadow: 0 6px 20px var(--accent-soft);
}
.sh-logo__img { max-height: 40px; width: auto; }
.sh-nav { flex: 1; min-width: 0; }
.sh-nav__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.sh-nav__list a {
  position: relative; display: block; padding: 8px 14px; color: var(--muted);
  font-size: 15px; font-weight: 700; letter-spacing: .04em;
}
.sh-nav__list a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.sh-nav__list a:hover, .sh-nav__list a[aria-current="page"], .sh-nav__list .current-menu-item > a { color: var(--text); }
.sh-nav__list a:hover::after, .sh-nav__list a[aria-current="page"]::after, .sh-nav__list .current-menu-item > a::after { transform: scaleX(1); }

.sh-head__tools { display: flex; gap: 8px; margin-left: auto; }
.sh-search-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer;
  color: var(--muted); font-size: 14px;
}
.sh-search-btn:hover { border-color: var(--accent); color: var(--text); }
.sh-icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; cursor: pointer;
}
.sh-icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.sh-menu-btn { display: none; }

/* ---------- search panel / drawer ---------- */
.sh-search {
  position: fixed; inset: 0; z-index: 90; display: none;
  background: rgba(4, 5, 8, .86); backdrop-filter: blur(10px); padding: 90px 20px 20px; overflow-y: auto;
}
.sh-search.is-open { display: block; }
.sh-search__box { max-width: 680px; margin: 0 auto; }
.sh-search__form { display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.sh-search__form input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font-size: 17px; padding: 6px 8px; }
.sh-search__form input:focus { outline: none; }
.sh-search__form:focus-within { border-color: var(--accent); }
.sh-search__form button {
  border: 0; border-radius: 10px; padding: 10px 24px; cursor: pointer;
  background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: var(--on-accent); font-weight: 800;
}
.sh-search__hint { margin: 22px 0 10px; color: var(--muted); font-size: 14px; }
.sh-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-tags a { padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; color: var(--muted); background: var(--surface); }
.sh-tags a:hover { border-color: var(--accent); color: var(--text); }

.sh-overlay { position: fixed; inset: 0; z-index: 94; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .25s; }
.sh-overlay.is-open { opacity: 1; }
.sh-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95; width: min(330px, 84vw);
  background: var(--ink-2); border-left: 1px solid var(--line);
  padding: 18px 20px 28px; transform: translateX(102%); transition: transform .28s ease; overflow-y: auto;
}
.sh-drawer.is-open { transform: translateX(0); }
.sh-drawer__close { display: block; margin: 0 0 8px auto; width: 40px; height: 40px; background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }
.sh-drawer__list { list-style: none; margin: 0; padding: 0; }
.sh-drawer__list a { display: block; padding: 14px 6px; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 700; }
.sh-drawer__list a[aria-current="page"] { color: var(--accent); }

/* ---------- buttons ---------- */
.sh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 26px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 700; font-size: 15px; cursor: pointer; transition: border-color .2s, transform .2s;
}
.sh-btn:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.sh-btn--primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2)); border-color: transparent;
  color: var(--on-accent); font-weight: 900; box-shadow: 0 14px 30px var(--accent-soft);
}
.sh-btn--primary:hover { color: var(--on-accent); filter: brightness(1.08); }
.sd-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 8px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: var(--on-accent); font-weight: 900;
}
.sd-btn:hover { color: var(--on-accent); filter: brightness(1.08); }

/* ---------- hero ---------- */
.sh-hero {
  position: relative; overflow: hidden; padding: 76px 0 70px; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 420px at 6% -20%, rgba(239, 68, 68, .34), transparent 70%),
    radial-gradient(700px 360px at 96% 8%, rgba(245, 158, 11, .20), transparent 72%),
    var(--ink);
}
.sh-hero__in { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: center; }
.sh-hero__kicker { margin: 0 0 18px; color: var(--accent-2); font-size: 12px; font-weight: 800; letter-spacing: .3em; }
.sh-hero h1 { font-size: clamp(40px, 7.2vw, 96px); line-height: 1.02; font-weight: 900; letter-spacing: -.03em; margin: 0 0 24px; }
.sh-hero__brand { display: block; overflow-wrap: anywhere; }
.sh-hero h1 em {
  display: block; margin-top: 16px; font-style: normal; font-size: .36em; font-weight: 700; letter-spacing: .01em; line-height: 1.35;
  color: var(--accent-2);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .sh-hero h1 em {
    background: linear-gradient(96deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  }
}
.sh-hero__lead { max-width: 560px; color: var(--muted); font-size: 17px; margin: 0 0 30px; }
.sh-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.sh-hero__stat { margin: 26px 0 0; color: var(--muted); font-size: 14px; }
.sh-hero__stat b { color: var(--text); font-size: 20px; margin-right: 4px; }
.sh-hero__feature {
  position: relative; display: block; border-radius: 16px; overflow: hidden; background: var(--surface);
  aspect-ratio: 2 / 3; transform: rotate(2.5deg); box-shadow: 0 30px 70px rgba(0, 0, 0, .6), 0 0 0 1px var(--line), 0 0 90px var(--accent-soft);
  transition: transform .35s ease;
}
.sh-hero__feature:hover { transform: rotate(0) scale(1.02); color: var(--text); }
.sh-hero__poster { width: 100%; height: 100%; object-fit: cover; }
.sh-hero__flag {
  position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 4px;
  background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 900; letter-spacing: .08em;
}
.sh-hero__cap { position: absolute; inset: auto 0 0; padding: 60px 16px 16px; background: linear-gradient(transparent, rgba(0, 0, 0, .9)); }
.sh-hero__cap b { display: block; font-size: 19px; line-height: 1.3; }
.sh-hero__cap small { color: #cfd4e0; font-size: 13px; }

/* ---------- sections ---------- */
.sh-section { padding: 52px 0 6px; }
.sh-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.sh-section__head h2, .sh-block h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 900; letter-spacing: -.01em; }
.sh-section__head h2::before, .sh-block h2::before {
  content: ""; display: inline-block; width: 5px; height: .85em; margin-right: 12px; vertical-align: -.08em; border-radius: 2px;
  background: linear-gradient(var(--accent), var(--accent-2));
}
.sh-section__head a { color: var(--muted); font-size: 14px; white-space: nowrap; }
.sh-section__head a:hover { color: var(--accent); }

/* ---------- rail ---------- */
.sh-rail {
  display: flex; gap: 18px; overflow-x: auto; padding: 4px 0 20px; scroll-snap-type: x proximity;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent; -webkit-overflow-scrolling: touch;
}
.sh-rail::-webkit-scrollbar { height: 6px; }
.sh-rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.sh-rail__item {
  position: relative; flex: 0 0 230px; scroll-snap-align: start; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 2 / 3; background: var(--surface);
}
.sh-rail__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.sh-rail__item:hover img { transform: scale(1.06); }
.sh-rail__item:hover { color: var(--text); }
.sh-rail__cap { position: absolute; inset: auto 0 0; padding: 64px 14px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .92)); }
.sh-rail__cap b { display: block; font-size: 18px; line-height: 1.3; font-weight: 900; }
.sh-rail__cap small { color: #cfd4e0; font-size: 12.5px; }

/* ---------- grid + card ---------- */
.sh-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 20px; }
.sh-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 18px; }
.sh-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px 16px; }
.sh-card { display: block; }
.sh-card:hover { color: var(--text); }
.sh-card__poster { position: relative; display: block; overflow: hidden; aspect-ratio: 2 / 3; border-radius: var(--radius); background: var(--surface); }
.sh-card__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.sh-card__poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0, 0, 0, .66)); pointer-events: none; }
.sh-card:hover .sh-card__poster img { transform: scale(1.06); }
.sh-card__badge {
  position: absolute; left: 10px; bottom: 10px; z-index: 2; padding: 3px 9px; border-radius: 4px;
  background: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; font-weight: 700; backdrop-filter: blur(4px);
}
.sh-card__play {
  position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 12px;
  opacity: 0; transform: scale(.8); transition: opacity .2s, transform .2s;
}
.sh-card:hover .sh-card__play, .sh-card:focus-visible .sh-card__play { opacity: 1; transform: scale(1); }
.sh-card__title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin: 12px 0 2px; font-size: 16px; font-weight: 800; line-height: 1.4;
}
.sh-card__meta { display: block; color: var(--muted); font-size: 13px; }

/* ---------- chips / rank ---------- */
.sh-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.sh-chips--bar { margin: 8px 0 30px; }
.sh-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600;
}
.sh-chip:hover, .sh-chip[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.sh-chip em { font-style: normal; font-size: 12px; color: var(--muted); }

.sh-rank { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 36px; }
.sh-rank a { display: flex; align-items: center; gap: 16px; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.sh-rank a:hover { background: var(--surface); color: var(--text); }
.sh-rank__no {
  flex: 0 0 38px; text-align: center; font-size: 26px; font-weight: 900; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px #5a6278;
}
.sh-rank li:nth-child(-n+3) .sh-rank__no { -webkit-text-stroke-color: var(--accent); }
.sh-rank__t { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-rank__e { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ---------- page head / crumbs / empty ---------- */
.sh-pagehead { padding: 18px 0 8px; }
.sh-pagehead h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 900; letter-spacing: -.02em; margin: 0 0 10px; }
.sh-pagehead p { color: var(--muted); margin: 0; }

.sd-crumbs { padding: 22px 0 4px; font-size: 14px; color: var(--muted); }
.sd-crumbs__list { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0; padding: 0; }
.sd-crumbs li + li::before { content: "/"; margin: 0 9px; opacity: .45; }
.sd-crumbs [aria-current="page"] { color: var(--text); }

.sh-empty { padding: 70px 0; text-align: center; color: var(--muted); }
.sh-empty__title { color: var(--text); font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.sh-empty .sh-chips { justify-content: center; margin-top: 18px; }
.sh-note { display: inline-block; margin: 18px 0 0; padding: 9px 16px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* ---------- detail ---------- */
.sh-detail { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 44px; padding: 28px 0 8px; }
.sh-detail__poster img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.sh-detail h1 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 900; letter-spacing: -.02em; line-height: 1.12; margin: 0 0 16px; }
.sh-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.sh-pill { display: inline-flex; align-items: center; padding: 5px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.sh-pill--accent { color: #fca5a5; border-color: rgba(239, 68, 68, .45); background: var(--accent-soft); }
.sh-pill--link:hover { border-color: var(--accent); color: var(--text); }
.sh-syn { max-width: 70ch; color: #cdd2de; font-size: 16.5px; line-height: 1.9; margin: 0 0 24px; }
.sh-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.sh-block { padding: 44px 0 0; }
.sh-block h2 { margin: 0 0 18px; }
.sh-block h2 small { color: var(--muted); font-size: 14px; font-weight: 500; margin-left: 10px; letter-spacing: 0; }
.sh-block h2 small::before { content: none; }

.sh-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.sh-fact { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.sh-fact dt { color: var(--muted); font-size: 13px; margin: 0 0 4px; }
.sh-fact dd { margin: 0; font-size: 17px; font-weight: 800; }

.sh-eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.sh-eps a, .sh-eps span {
  display: grid; place-items: center; height: 44px; border-radius: 8px; background: var(--surface);
  border: 1px solid var(--line); color: var(--muted); font-size: 15px; font-weight: 700;
}
.sh-eps a:hover { border-color: var(--accent); color: var(--text); }
.sh-eps .is-current { background: linear-gradient(120deg, var(--accent), var(--accent-2)); border-color: transparent; color: var(--on-accent); font-weight: 900; }
.sh-eps .is-off { opacity: .55; }

.sh-faq details { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: var(--ink-2); }
.sh-faq summary { cursor: pointer; padding: 15px 18px; font-weight: 700; list-style: none; position: relative; padding-right: 46px; }
.sh-faq summary::-webkit-details-marker { display: none; }
.sh-faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 22px; font-weight: 400; }
.sh-faq details[open] summary::after { content: "–"; }
.sh-faq p { margin: 0; padding: 0 18px 16px; color: var(--muted); }

/* ---------- player + watch ---------- */
.sh-player { max-width: 480px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 110px var(--accent-soft); }
.sd-player { background: #000; }
.sd-player video { display: block; width: 100%; aspect-ratio: 9 / 16; max-height: 78vh; object-fit: contain; background: #000; }
.sd-embed { aspect-ratio: 9 / 16; max-height: 78vh; background: #000; }
.sd-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.sd-player__fallback { padding: 20px; color: var(--muted); font-size: 14px; }
.sd-callout { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 22px; background: var(--ink-2); color: var(--text); }
.sd-callout__body { flex: 1 1 220px; }
.sd-callout__title { font-weight: 800; margin-bottom: 4px; }
.sd-callout__desc { color: var(--muted); font-size: 14px; }

.sh-watch { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 48px; padding: 18px 0 8px; align-items: start; }
.sh-watch__head h1 { font-size: clamp(24px, 3.4vw, 36px); font-weight: 900; margin: 0 0 6px; }
.sh-watch__head p { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.sh-watch .sh-player { margin: 0; }
.sh-pn { display: flex; gap: 10px; margin: 16px 0 0; }
.sh-pn a { flex: 1; text-align: center; padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 15px; font-weight: 700; }
.sh-pn a:hover { border-color: var(--accent); color: var(--text); }
.sh-pn a.is-next { background: linear-gradient(120deg, var(--accent), var(--accent-2)); border-color: transparent; color: var(--on-accent); font-weight: 900; }
.sh-watch__side { position: sticky; top: calc(var(--head-h) + 16px); background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.sh-watch__side h2 { font-size: 21px; font-weight: 900; margin: 0 0 14px; }
.sh-watch__side h2 small { color: var(--muted); font-size: 13px; font-weight: 500; margin-left: 8px; }
.sh-watch__side .sh-eps { max-height: 52vh; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.sh-side-link { display: block; margin-top: 16px; color: var(--muted); font-size: 14px; }

/* ---------- search results / 404 / prose ---------- */
.sh-searchbar { display: flex; gap: 8px; max-width: 560px; margin: 18px 0 26px; }
.sh-searchbar input { flex: 1; min-width: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 16px; }
.sh-searchbar input:focus { outline: none; border-color: var(--accent); }
.sh-searchbar button { padding: 0 24px; border: 0; border-radius: 8px; background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: var(--on-accent); font-weight: 900; cursor: pointer; }
.sh-results { display: grid; gap: 0; }
.sh-result { display: flex; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.sh-result:hover { color: var(--text); }
.sh-result__img { width: 84px; height: 126px; flex: 0 0 84px; object-fit: cover; border-radius: 8px; background: var(--surface); }
.sh-result__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sh-result__t { font-size: 18px; font-weight: 800; }
.sh-result:hover .sh-result__t { color: var(--accent); }
.sh-result__m { color: var(--accent-2); font-size: 13px; }
.sh-result__x { color: var(--muted); font-size: 14px; }

.sh-notfound { padding: 70px 0 20px; text-align: center; }
.sh-notfound__code { margin: 0; font-size: clamp(96px, 22vw, 220px); font-weight: 900; line-height: .9; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 2px var(--accent); }
.sh-notfound h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 900; margin: 10px 0 12px; }
.sh-notfound__desc { color: var(--muted); max-width: 520px; margin: 0 auto 24px; }
.sh-notfound__search { display: flex; gap: 8px; max-width: 480px; margin: 0 auto 22px; }
.sh-notfound__search input { flex: 1; min-width: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 16px; }
.sh-notfound__search button { padding: 0 22px; border: 0; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 900; cursor: pointer; }
.sh-notfound__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.sh-article { padding-bottom: 20px; }
.sh-prose { max-width: 780px; font-size: 17px; line-height: 1.95; color: #d4d8e2; overflow-wrap: anywhere; }
.sh-prose h2, .sh-prose h3 { color: var(--text); margin: 1.8em 0 .6em; }
.sh-prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.sh-prose img { border-radius: 10px; }
.sh-prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.sh-prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.sh-prose th, .sh-prose td { border: 1px solid var(--line); padding: 8px 12px; }
.sh-prose pre { max-width: 100%; overflow-x: auto; padding: 14px; background: var(--surface); border-radius: 8px; }
.sh-prose .alignleft { float: left; margin: 0 20px 10px 0; }
.sh-prose .alignright { float: right; margin: 0 0 10px 20px; }
.sh-prose .aligncenter { margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { color: var(--muted); font-size: 13px; }
.sh-pages { margin-top: 24px; }

/* ---------- pagination ---------- */
.sd-pagination { margin: 40px 0 8px; }
.sd-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sd-pagination .page-numbers {
  min-width: 42px; text-align: center; padding: 9px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 700;
}
.sd-pagination a.page-numbers:hover { border-color: var(--accent); color: var(--text); }
.sd-pagination .current { background: linear-gradient(120deg, var(--accent), var(--accent-2)); border-color: transparent; color: var(--on-accent); }
.sd-pagination .dots { border-color: transparent; background: none; }

/* ---------- footer ---------- */
.sh-foot { margin-top: 80px; border-top: 1px solid var(--line); background: var(--ink-2); padding: 50px 0 28px; }
.sh-foot__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.sh-foot__brand { margin: 0 0 14px; }
.sh-foot h2 { font-size: 14px; font-weight: 800; letter-spacing: .12em; color: var(--text); margin: 0 0 14px; }
.sh-foot p { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.sh-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.sh-foot a { color: var(--muted); font-size: 14px; }
.sh-foot a:hover { color: var(--accent); }
.sh-foot__bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }

/* ---------- mobile tabbar ---------- */
.sh-tabbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .sh-grid--6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sh-grid--5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sh-hero__in { gap: 40px; grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (max-width: 960px) {
  .sh-nav { display: none; }
  .sh-menu-btn { display: grid; }
  .sh-detail { grid-template-columns: 230px minmax(0, 1fr); gap: 28px; }
  .sh-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sh-watch { grid-template-columns: 1fr; gap: 28px; }
  .sh-watch .sh-player { margin: 0 auto; }
  .sh-watch__main { max-width: 480px; margin: 0 auto; width: 100%; }
  .sh-watch__side { position: static; }
  .sh-watch__side .sh-eps { max-height: none; }
  .sh-grid, .sh-grid--5, .sh-grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 14px; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 18px; }
  .sh-hero { padding: 48px 0 44px; }
  .sh-hero__in { grid-template-columns: 1fr; gap: 0; }
  .sh-hero__feature { display: none; }
  .sh-hero__lead { font-size: 16px; }
  .sh-rank { grid-template-columns: 1fr; }
  .sh-detail { grid-template-columns: 1fr; gap: 22px; }
  .sh-detail__poster { max-width: 220px; }
  .sh-foot__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .sh-foot__about { grid-column: 1 / -1; }
  .sh-search-btn__text { display: none; }
  .sh-search-btn { width: 40px; padding: 0; justify-content: center; }
  .sh-foot { padding-bottom: 92px; }
  .sh-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex;
    background: rgba(7, 8, 12, .96); border-top: 1px solid var(--line); backdrop-filter: blur(14px);
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  }
  .sh-tabbar a { flex: 1; display: grid; gap: 2px; justify-items: center; color: var(--muted); font-size: 12px; }
  .sh-tabbar a[aria-current="page"] { color: var(--accent); }
  .sh-tabbar b { font-size: 18px; font-weight: 400; line-height: 1.2; }
  .sh-rail { margin-inline: -18px; padding-inline: 18px; scroll-padding-inline: 18px; }
  .sh-rail__item { flex-basis: 150px; }
  .sh-rail__cap b { font-size: 15px; }
}
@media (max-width: 560px) {
  .sh-grid, .sh-grid--5, .sh-grid--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .sh-facts { grid-template-columns: 1fr 1fr; }
  .sh-section { padding-top: 38px; }
  .sh-head__in { gap: 12px; }
  .sh-logo { font-size: 18px; }
  .sh-eps { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
  .sh-result__img { width: 68px; height: 102px; flex-basis: 68px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .sh-hero__feature { transform: none; }
}
