/*
Theme Name: 7貓看劇 Mao
Theme URI: https://7maokanju.com/
Author: SD Network
Description: 貓系活力短劇主題：暖橙配色、圓潤卡片、五列網格與輕快分割槽。適用於7貓看劇（7maokanju.com）。
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: sd-mao
*/

/* ==========================================================================
   7貓看劇 · 暖橙貓系 / 五列密排 / 貼紙小角標
   tokens → base → two-tier header → hero → dense grid → detail → watch → footer → pages
   ========================================================================== */

:root {
  --bg: #fff6ea;
  --card: #ffffff;
  --line: #f3d9bb;
  --ink: #3a2412;
  --muted: #7a5535;
  --accent: #fb923c;
  --accent-2: #f43f5e;
  --accent-soft: rgba(251, 146, 60, .14);
  --accent-ink: #b8380a;
  --on-accent: #3a1a05;
  --cream: #ffedd5;
  --radius: 14px;
  --r: 14px;
  --wrap: 1240px;
  --sticker: 0 3px 0 var(--line);
  --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-padding-top: 120px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 15.5px/1.65 var(--font); overflow-x: clip;
  background-image: radial-gradient(circle at 1px 1px, rgba(251, 146, 60, .16) 1px, transparent 1.4px);
  background-size: 22px 22px;
}
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-ink); }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.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(--ink); color: #fff; border-radius: 10px; }
.skip:focus { top: 12px; color: #fff; }

/* ---------- two-tier header ---------- */
.mm-head { position: sticky; top: 0; z-index: 60; background: rgba(255, 246, 234, .96); backdrop-filter: blur(10px); border-bottom: 2px solid var(--line); }
.mm-head__in { display: flex; align-items: center; gap: 20px; height: 62px; }
.mm-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; white-space: nowrap; }
.mm-logo:hover { color: var(--ink); }
.mm-logo__mark {
  position: relative; width: 36px; height: 34px; border-radius: 12px 12px 14px 14px; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-size: 17px; font-weight: 800; box-shadow: 0 3px 0 #e07a1f;
}
.mm-logo__mark::before, .mm-logo__mark::after {
  content: ""; position: absolute; top: -6px; width: 11px; height: 11px; background: var(--accent);
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}
.mm-logo__mark::before { left: 3px; }
.mm-logo__mark::after { right: 3px; }
.mm-logo__img { max-height: 38px; width: auto; }

.mm-headsearch { flex: 1; max-width: 560px; margin: 0 auto; display: flex; gap: 6px; padding: 4px 4px 4px 16px; background: #fff; border: 2px solid var(--line); border-radius: 999px; }
.mm-headsearch:focus-within { border-color: var(--accent); }
.mm-headsearch input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 15px; color: var(--ink); }
.mm-headsearch input:focus { outline: none; }
.mm-headsearch input::placeholder { color: #8a6a4d; }
.mm-headsearch button { border: 0; border-radius: 999px; padding: 0 20px; background: var(--accent); color: var(--on-accent); font-weight: 800; cursor: pointer; }
.mm-tools { display: flex; gap: 8px; margin-left: auto; }
.mm-icon-btn { width: 40px; height: 40px; border: 2px solid var(--line); border-radius: 12px; background: #fff; display: none; place-items: center; cursor: pointer; }
.mm-icon-btn:hover { border-color: var(--accent); color: var(--accent-ink); }

.mm-strip { border-top: 1px dashed var(--line); background: var(--cream); }
.mm-strip .wrap { overflow-x: auto; scrollbar-width: none; }
.mm-strip .wrap::-webkit-scrollbar { display: none; }
.mm-strip__list { display: flex; gap: 6px; list-style: none; margin: 0; padding: 7px 0; white-space: nowrap; }
.mm-strip__list a { display: block; padding: 5px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--muted); }
.mm-strip__list a:hover { background: #fff; color: var(--accent-ink); }
.mm-strip__list a[aria-current="page"], .mm-strip__list .current-menu-item > a { background: var(--accent); color: var(--on-accent); }

/* ---------- search panel / drawer ---------- */
.mm-search { position: fixed; inset: 0; z-index: 90; display: none; background: rgba(58, 36, 18, .84); padding: 90px 18px 20px; overflow-y: auto; }
.mm-search.is-open { display: block; }
.mm-search__box { max-width: 600px; margin: 0 auto; }
.mm-search__form { display: flex; gap: 8px; background: #fff; border-radius: 16px; padding: 8px; border: 2px solid var(--accent); }
.mm-search__form input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 17px; padding: 6px 10px; color: var(--ink); }
.mm-search__form input:focus { outline: none; }
.mm-search__form button { border: 0; border-radius: 12px; padding: 10px 22px; background: var(--accent); color: var(--on-accent); font-weight: 800; cursor: pointer; }
.mm-search__hint { margin: 20px 4px 8px; color: #fff; font-size: 14px; }
.mm-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.mm-tags a { background: #fff; border-radius: 999px; padding: 6px 15px; font-size: 14px; font-weight: 600; }
.mm-tags a:hover { background: var(--accent); color: var(--on-accent); }

.mm-overlay { position: fixed; inset: 0; z-index: 94; background: rgba(58, 36, 18, .45); opacity: 0; transition: opacity .22s; }
.mm-overlay.is-open { opacity: 1; }
.mm-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95; width: min(300px, 84vw); background: var(--bg);
  border-left: 3px solid var(--accent); border-radius: 20px 0 0 20px; padding: 16px 18px 26px;
  transform: translateX(104%); transition: transform .24s ease; overflow-y: auto;
}
.mm-drawer.is-open { transform: translateX(0); }
.mm-drawer__close { display: block; margin: 0 0 6px auto; width: 38px; height: 38px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px; cursor: pointer; }
.mm-drawer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mm-drawer__list a { display: block; padding: 11px 14px; border-radius: 12px; background: #fff; border: 2px solid var(--line); font-weight: 700; }
.mm-drawer__list a:hover, .mm-drawer__list a[aria-current="page"] { border-color: var(--accent); color: var(--accent-ink); }

/* ---------- buttons ---------- */
.mm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 20px;
  border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; font-size: 15px;
  cursor: pointer; box-shadow: var(--sticker); transition: transform .15s, box-shadow .15s;
}
.mm-btn:hover { transform: translateY(1px); box-shadow: 0 2px 0 var(--line); color: var(--accent-ink); }
.mm-btn--primary { background: var(--accent); border-color: #e07a1f; color: var(--on-accent); box-shadow: 0 3px 0 #e07a1f; }
.mm-btn--primary:hover { color: var(--on-accent); box-shadow: 0 2px 0 #e07a1f; }
.sd-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 20px; border-radius: 12px; border: 2px solid #e07a1f; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.sd-btn:hover { color: var(--on-accent); }

/* ---------- compact hero ---------- */
.mm-hero { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 28px; align-items: center; padding: 28px 0 10px; }
.mm-hero__kicker { margin: 0 0 8px; color: var(--accent-ink); font-size: 12px; font-weight: 800; letter-spacing: .22em; }
.mm-hero h1 { margin: 0 0 8px; font-weight: 800; letter-spacing: -.01em; }
.mm-hero__brand { display: block; font-size: clamp(30px, 4.6vw, 48px); line-height: 1.1; overflow-wrap: anywhere; }
.mm-hero__tag { display: block; margin-top: 4px; font-size: clamp(16px, 2vw, 20px); font-weight: 700; color: var(--accent-ink); }
.mm-hero__lead { color: var(--muted); margin: 0 0 16px; max-width: 520px; }
.mm-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mm-mascot {
  justify-self: center; width: 100%; max-width: 250px; padding: 16px 18px; text-align: center;
  background: #fff; border: 2px dashed var(--accent); border-radius: 24px; transform: rotate(2deg);
}
.mm-mascot__face { font-size: 48px; line-height: 1.1; }
.mm-mascot b { display: block; margin-top: 4px; font-size: 15px; }
.mm-mascot span { color: var(--muted); font-size: 13px; }

/* ---------- sections ---------- */
.mm-sec { padding: 26px 0 2px; }
.mm-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mm-sec__head h2, .mm-block h2 { font-size: 21px; font-weight: 800; }
.mm-sec__head h2::before, .mm-block h2::before { content: "🐾"; margin-right: 8px; font-size: .85em; }
.mm-sec__head a { font-size: 13.5px; font-weight: 700; color: var(--accent-ink); white-space: nowrap; }
.mm-sec__head a:hover { text-decoration: underline; }

/* ---------- dense 5-col grid + card ---------- */
.mm-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 12px; }
.mm-card { display: block; padding: 6px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r); box-shadow: var(--sticker); transition: transform .15s, box-shadow .15s, border-color .15s; }
.mm-card:hover { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); border-color: var(--accent); color: var(--ink); }
.mm-card__media { position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 4; border-radius: calc(var(--r) - 4px); background: var(--cream); }
.mm-card__media img { width: 100%; height: 100%; object-fit: cover; }
.mm-card__ep {
  position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); padding: 1px 8px; border-radius: 6px;
  background: var(--accent); color: var(--on-accent); font-size: 11.5px; font-weight: 800; line-height: 1.6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mm-card__new {
  position: absolute; right: 6px; top: 6px; padding: 0 7px; border-radius: 6px; background: #be123c; color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .06em; line-height: 1.6;
}
.mm-card__b { display: block; padding: 6px 3px 2px; }
.mm-card__t {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13.5px; font-weight: 700; line-height: 1.4; min-height: 2.8em;
}
.mm-card__m { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- chips ---------- */
.mm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.mm-sec .mm-chips { margin-bottom: 0; }
.mm-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px;
  background: #fff; border: 2px solid var(--line); font-size: 14px; font-weight: 700; color: var(--ink);
}
.mm-chip em { font-style: normal; font-size: 11.5px; padding: 0 6px; border-radius: 999px; background: var(--cream); color: var(--muted); }
.mm-chip:nth-child(odd) { transform: rotate(-1deg); }
.mm-chip:nth-child(even) { transform: rotate(1deg); }
.mm-chip:hover, .mm-chip[aria-current="page"] { transform: none; background: var(--accent); border-color: #e07a1f; color: var(--on-accent); }
.mm-chip:hover em, .mm-chip[aria-current="page"] em { background: rgba(255, 255, 255, .55); color: var(--on-accent); }

/* ---------- page head / crumbs / empty ---------- */
.mm-pagehead { padding: 8px 0 4px; }
.mm-pagehead h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; margin: 0 0 4px; }
.mm-pagehead h1::before { content: "🐾"; margin-right: 8px; font-size: .8em; }
.mm-pagehead p { color: var(--muted); margin: 0 0 8px; }

.sd-crumbs { padding: 16px 0 2px; font-size: 13.5px; color: var(--muted); }
.sd-crumbs__list { display: flex; flex-wrap: wrap; gap: 2px 0; list-style: none; margin: 0; padding: 0; }
.sd-crumbs li + li::before { content: "›"; margin: 0 8px; opacity: .6; }
.sd-crumbs a:hover { text-decoration: underline; }
.sd-crumbs [aria-current="page"] { color: var(--ink); font-weight: 700; }

.mm-empty { margin: 24px 0; padding: 44px 20px; text-align: center; background: #fff; border: 2px dashed var(--line); border-radius: 20px; color: var(--muted); }
.mm-empty__title { color: var(--ink); font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.mm-empty .mm-chips { justify-content: center; margin: 14px 0 0; }
.mm-note { display: inline-block; margin: 12px 0 0; padding: 7px 14px; border-radius: 10px; background: var(--cream); border: 2px dashed var(--line); color: var(--muted); font-size: 14px; }

/* ---------- detail ---------- */
.mm-detail { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; padding: 14px 0 6px; align-items: start; }
.mm-detail__poster { padding: 8px; background: #fff; border: 2px solid var(--line); border-radius: 18px; box-shadow: var(--sticker); transform: rotate(-1.5deg); }
.mm-detail__poster img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; }
.mm-detail h1 { font-size: clamp(25px, 3.6vw, 36px); font-weight: 800; letter-spacing: -.01em; margin: 4px 0 12px; }
.mm-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.mm-pill { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; background: #fff; border: 2px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.mm-pill--accent { background: var(--cream); border-color: var(--accent); color: var(--accent-ink); }
.mm-pill--link:hover { background: var(--accent); border-color: #e07a1f; color: var(--on-accent); }
.mm-syn { max-width: 66ch; margin: 0 0 18px; padding: 14px 18px; background: #fff; border: 2px dashed var(--line); border-radius: 16px; color: #4a2f18; font-size: 15.5px; line-height: 1.85; }

.mm-block { padding: 30px 0 0; }
.mm-block h2 { margin: 0 0 12px; }
.mm-block h2 small { color: var(--muted); font-size: 13px; font-weight: 600; margin-left: 6px; }

.mm-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.mm-fact { padding: 10px 14px; background: #fff; border: 2px solid var(--line); border-radius: 14px; box-shadow: var(--sticker); }
.mm-fact dt { color: var(--muted); font-size: 12.5px; margin: 0; }
.mm-fact dd { margin: 0; font-size: 16px; font-weight: 800; }

.mm-eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 7px; }
.mm-eps a, .mm-eps span {
  display: grid; place-items: center; height: 38px; border-radius: 10px; background: #fff;
  border: 2px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 700;
}
.mm-eps a:hover { border-color: var(--accent); color: var(--accent-ink); }
.mm-eps .is-current { background: var(--accent); border-color: #e07a1f; color: var(--on-accent); font-weight: 800; }
.mm-eps span { opacity: .55; }

.mm-faq details { background: #fff; border: 2px solid var(--line); border-radius: 14px; margin-bottom: 8px; }
.mm-faq summary { cursor: pointer; padding: 12px 16px; font-weight: 700; list-style: none; position: relative; padding-right: 42px; }
.mm-faq summary::-webkit-details-marker { display: none; }
.mm-faq summary::after { content: "🐾"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%) rotate(0); transition: transform .2s; font-size: 15px; }
.mm-faq details[open] summary::after { transform: translateY(-50%) rotate(90deg); }
.mm-faq p { margin: 0; padding: 0 16px 14px; color: var(--muted); }

/* ---------- player + watch ---------- */
.mm-player { max-width: 420px; margin: 0 auto; overflow: hidden; background: #000; border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 5px 0 var(--line); }
.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: 18px; color: #e5e7eb; font-size: 14px; }
.sd-callout { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 20px; background: #fff; color: var(--ink); }
.sd-callout__body { flex: 1 1 200px; }
.sd-callout__title { font-weight: 800; margin-bottom: 4px; }
.sd-callout__desc { color: var(--muted); font-size: 14px; }

.mm-watch { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 32px; padding: 10px 0 0; align-items: start; }
.mm-watch__head h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; margin: 0 0 2px; }
.mm-watch__head p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.mm-watch .mm-player { margin: 0; }
.mm-pn { display: flex; gap: 10px; margin: 14px 0 0; }
.mm-pn a { flex: 1; text-align: center; padding: 10px 12px; border-radius: 12px; background: #fff; border: 2px solid var(--line); box-shadow: var(--sticker); font-weight: 700; }
.mm-pn a:hover { border-color: var(--accent); color: var(--accent-ink); }
.mm-pn a.is-next { background: var(--accent); border-color: #e07a1f; color: var(--on-accent); box-shadow: 0 3px 0 #e07a1f; }
.mm-watch__side { padding: 18px; background: #fff; border: 2px solid var(--line); border-radius: 20px; box-shadow: var(--sticker); position: sticky; top: 124px; }
.mm-watch__side h2 { font-size: 18px; font-weight: 800; margin: 0 0 12px; }
.mm-watch__side h2::before { content: "🐾"; margin-right: 6px; }
.mm-watch__side .mm-eps { max-height: 56vh; overflow-y: auto; padding: 2px 4px 2px 2px; scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
.mm-side-link { display: block; margin-top: 14px; font-size: 14px; font-weight: 700; color: var(--accent-ink); }

/* ---------- search / 404 / prose ---------- */
.mm-searchbar { display: flex; gap: 8px; max-width: 560px; margin: 10px 0 20px; padding: 5px 5px 5px 18px; background: #fff; border: 2px solid var(--line); border-radius: 999px; }
.mm-searchbar:focus-within { border-color: var(--accent); }
.mm-searchbar input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; color: var(--ink); }
.mm-searchbar input:focus { outline: none; }
.mm-searchbar button { border: 0; border-radius: 999px; padding: 0 22px; min-height: 40px; background: var(--accent); color: var(--on-accent); font-weight: 800; cursor: pointer; }
.mm-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.mm-result { display: flex; gap: 12px; padding: 8px; background: #fff; border: 2px solid var(--line); border-radius: 14px; box-shadow: var(--sticker); }
.mm-result:hover { border-color: var(--accent); color: var(--ink); }
.mm-result__img { width: 66px; height: 88px; flex: 0 0 66px; object-fit: cover; border-radius: 10px; background: var(--cream); }
.mm-result__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; justify-content: center; }
.mm-result__t { font-size: 15.5px; font-weight: 800; }
.mm-result__m { color: var(--accent-ink); font-size: 12.5px; font-weight: 700; }
.mm-result__x { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.mm-notfound { margin: 20px 0 0; padding: 40px 20px; text-align: center; background: #fff; border: 2px dashed var(--accent); border-radius: 26px; }
.mm-notfound__code { margin: 0; font-size: clamp(72px, 16vw, 130px); font-weight: 800; line-height: 1; color: var(--accent); text-shadow: 0 5px 0 var(--line); }
.mm-notfound__code::before { content: "🐱"; display: block; font-size: .42em; line-height: 1.2; }
.mm-notfound h1 { font-size: clamp(22px, 3.6vw, 32px); font-weight: 800; margin: 6px 0 8px; }
.mm-notfound__desc { color: var(--muted); max-width: 460px; margin: 0 auto 18px; }
.mm-notfound__search { display: flex; gap: 8px; max-width: 440px; margin: 0 auto 16px; padding: 5px 5px 5px 18px; background: var(--bg); border: 2px solid var(--line); border-radius: 999px; }
.mm-notfound__search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; color: var(--ink); }
.mm-notfound__search input:focus { outline: none; }
.mm-notfound__search button { border: 0; border-radius: 999px; padding: 0 20px; min-height: 40px; background: var(--accent); color: var(--on-accent); font-weight: 800; cursor: pointer; }
.mm-notfound__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0; }

.mm-article { padding-bottom: 8px; }
.mm-prose { max-width: 780px; padding: 22px 26px; background: #fff; border: 2px solid var(--line); border-radius: 18px; font-size: 16px; line-height: 1.9; color: #4a2f18; overflow-wrap: anywhere; }
.mm-prose h2, .mm-prose h3 { color: var(--ink); margin: 1.5em 0 .5em; }
.mm-prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.mm-prose img { border-radius: 12px; }
.mm-prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 16px; border-left: 4px solid var(--accent); color: var(--muted); }
.mm-prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.mm-prose th, .mm-prose td { border: 1px solid var(--line); padding: 6px 10px; }
.mm-prose pre { max-width: 100%; overflow-x: auto; padding: 12px; background: var(--cream); border-radius: 10px; }
.mm-prose .alignleft { float: left; margin: 0 18px 10px 0; }
.mm-prose .alignright { float: right; margin: 0 0 10px 18px; }
.mm-prose .aligncenter { margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { color: var(--muted); font-size: 13px; }
.mm-pages { margin-top: 20px; }

/* ---------- pagination ---------- */
.sd-pagination { margin: 28px 0 4px; }
.sd-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.sd-pagination .page-numbers { min-width: 40px; text-align: center; padding: 7px 13px; border-radius: 10px; background: #fff; border: 2px solid var(--line); color: var(--muted); font-weight: 800; box-shadow: var(--sticker); }
.sd-pagination a.page-numbers:hover { border-color: var(--accent); color: var(--accent-ink); }
.sd-pagination .current { background: var(--accent); border-color: #e07a1f; color: var(--on-accent); }
.sd-pagination .dots { background: none; border-color: transparent; box-shadow: none; }

/* ---------- footer ---------- */
.mm-foot { margin-top: 46px; background: #fff; border-top: 3px solid var(--accent); padding: 32px 0 20px; }
.mm-foot__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.mm-foot__brand { margin: 0 0 10px; }
.mm-foot h2 { font-size: 15px; font-weight: 800; color: var(--accent-ink); margin: 0 0 10px; }
.mm-foot p { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.mm-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mm-foot a { color: var(--muted); font-size: 14px; }
.mm-foot a:hover { color: var(--accent-ink); text-decoration: underline; }
.mm-foot__bottom { margin-top: 22px; padding-top: 14px; border-top: 2px dashed var(--line); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }

.mm-tabbar { display: none; }

/* ---------- responsive (dense stays dense: 5 → 4 → 3 columns) ---------- */
@media (max-width: 1100px) {
  .mm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mm-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .mm-headsearch { display: none; }
  .mm-icon-btn { display: grid; }
  .mm-search-btn { display: grid; }
  .mm-watch { grid-template-columns: 1fr; gap: 20px; }
  .mm-watch__main { max-width: 420px; margin: 0 auto; width: 100%; }
  .mm-watch__side { position: static; }
  .mm-watch__side .mm-eps { max-height: none; }
  .mm-results { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 14px; }
  .mm-hero { grid-template-columns: 1fr; padding-top: 18px; }
  .mm-mascot { display: none; }
  .mm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
  .mm-card { padding: 4px; border-width: 1.5px; }
  .mm-card__t { font-size: 12.5px; }
  .mm-card__m { display: none; }
  .mm-card__ep { font-size: 10.5px; padding: 0 6px; left: 4px; bottom: 4px; }
  .mm-detail { grid-template-columns: 1fr; gap: 16px; }
  .mm-detail__poster { max-width: 190px; }
  .mm-foot__grid { grid-template-columns: 1fr 1fr; }
  .mm-foot__grid > :first-child { grid-column: 1 / -1; }
  .mm-foot { padding-bottom: 84px; }
  .mm-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; background: #fff;
    border-top: 3px solid var(--accent); padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  }
  .mm-tabbar a { flex: 1; display: grid; justify-items: center; color: var(--muted); font-size: 12px; font-weight: 700; }
  .mm-tabbar a[aria-current="page"] { color: var(--accent-ink); }
  .mm-tabbar b { font-size: 18px; font-weight: 400; line-height: 1.2; }
}
@media (max-width: 420px) {
  .mm-grid { gap: 8px 6px; }
  .mm-logo { font-size: 17px; }
  .mm-facts { grid-template-columns: 1fr 1fr; }
  .mm-eps { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .mm-chip, .mm-mascot, .mm-detail__poster { transform: none; }
}
