/*
Theme Name: 甜劇吧 Tian
Theme URI: https://tianjuba.com/
Author: SD Network
Description: 甜寵向短劇主題：奶油粉底、襯線標題、心形點綴與大圖海報。適用於甜劇吧（tianjuba.com）。
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: sd-tian
*/

/* ==========================================================================
   甜劇吧 · 奶油粉 / 襯線標題 / 置中甜寵排版
   tokens → base → centered masthead → hero → arch posters → detail → watch → footer → pages
   ========================================================================== */

:root {
  --cream: #fff8f5;
  --paper: #fffdfb;
  --blush: #ffe3ea;
  --rose: #fbcfe8;
  --line: #f2d3dc;
  --ink: #43212f;
  --muted: #7d5563;
  --accent: #f472b6;
  --accent-2: #fda4af;
  --accent-soft: rgba(244, 114, 182, .14);
  --accent-ink: #be185d;
  --on-accent: #4a0f2b;
  --radius: 28px;
  --r-card: max(var(--radius), 20px);
  --wrap: 1120px;
  --serif: "Noto Serif TC", "Source Han Serif TC", "Noto Serif CJK TC", "Songti TC", "STSong", "PMingLiU", "MingLiU", Georgia, "Times New Roman", serif;
  --sans: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --soft: 0 14px 40px rgba(190, 24, 93, .10);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; color: var(--ink); font: 400 16px/1.8 var(--sans); overflow-x: clip;
  background:
    radial-gradient(620px 260px at 12% -4%, #ffe3ea, transparent 70%),
    radial-gradient(520px 240px at 94% 0%, #ffefe0, transparent 72%),
    var(--cream);
  background-repeat: no-repeat;
}
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; font-family: var(--serif); line-height: 1.3; font-weight: 700; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; border-radius: 10px; }

.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(--ink); color: #fff; border-radius: 999px; }
.skip:focus { top: 12px; color: #fff; }

/* ---------- centered masthead ---------- */
.tt-head { position: relative; z-index: 60; background: rgba(255, 253, 251, .86); border-bottom: 1px solid var(--line); }
.tt-head__top { display: flex; align-items: center; justify-content: center; position: relative; padding-top: 22px; padding-bottom: 8px; }
.tt-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; letter-spacing: .14em; color: var(--ink); text-align: center; }
.tt-logo:hover { color: var(--ink); }
.tt-logo__heart { color: var(--accent); font-size: .6em; }
.tt-logo__img { max-height: 54px; width: auto; }
.tt-icon-btn {
  position: absolute; top: 50%; width: 42px; height: 42px; margin-top: -10px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; cursor: pointer;
}
.tt-icon-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.tt-search-btn { right: 24px; }
.tt-menu-btn { left: 24px; display: none; }

.tt-nav { border-top: 1px solid var(--line); margin-top: 12px; }
.tt-nav .wrap { display: flex; justify-content: center; }
.tt-nav__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; list-style: none; margin: 0; padding: 4px 0; }
.tt-nav__list a { position: relative; display: block; padding: 8px 18px; font-family: var(--serif); font-size: 16px; letter-spacing: .12em; color: var(--muted); }
.tt-nav__list a::after { content: "♥"; position: absolute; left: 50%; bottom: -3px; transform: translateX(-50%) scale(0); color: var(--accent); font-size: 10px; transition: transform .2s; }
.tt-nav__list a:hover { color: var(--accent-ink); }
.tt-nav__list a[aria-current="page"], .tt-nav__list .current-menu-item > a { color: var(--accent-ink); font-weight: 700; }
.tt-nav__list a:hover::after, .tt-nav__list a[aria-current="page"]::after, .tt-nav__list .current-menu-item > a::after { transform: translateX(-50%) scale(1); }

/* ---------- search panel / drawer ---------- */
.tt-search { position: fixed; inset: 0; z-index: 90; display: none; background: rgba(67, 33, 47, .84); backdrop-filter: blur(6px); padding: 100px 20px 20px; overflow-y: auto; }
.tt-search.is-open { display: block; }
.tt-search__box { max-width: 620px; margin: 0 auto; }
.tt-search__form { display: flex; gap: 8px; background: var(--paper); border-radius: 999px; padding: 8px 8px 8px 26px; box-shadow: 0 26px 70px rgba(190, 24, 93, .22); }
.tt-search__form input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 17px; font-family: var(--serif); color: var(--ink); }
.tt-search__form input:focus { outline: none; }
.tt-search__form button { border: 0; border-radius: 999px; padding: 11px 26px; background: var(--accent); color: var(--on-accent); font-weight: 800; cursor: pointer; }
.tt-search__hint { margin: 24px 0 10px; text-align: center; color: #fff; font-family: var(--serif); letter-spacing: .12em; }
.tt-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tt-tags a { background: rgba(255, 253, 251, .96); border-radius: 999px; padding: 6px 16px; font-size: 14px; }
.tt-tags a:hover { background: var(--accent); color: var(--on-accent); }

.tt-overlay { position: fixed; inset: 0; z-index: 94; background: rgba(67, 33, 47, .4); opacity: 0; transition: opacity .25s; }
.tt-overlay.is-open { opacity: 1; }
.tt-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 95; width: min(300px, 84vw); background: var(--paper);
  border-radius: 0 var(--r-card) var(--r-card) 0; box-shadow: var(--soft); padding: 16px 20px 28px;
  transform: translateX(-104%); transition: transform .28s ease; overflow-y: auto;
}
.tt-drawer.is-open { transform: translateX(0); }
.tt-drawer__close { display: block; margin: 0 0 8px auto; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--cream); font-size: 16px; cursor: pointer; }
.tt-drawer__list { list-style: none; margin: 0; padding: 0; text-align: center; }
.tt-drawer__list a { display: block; padding: 14px 6px; border-bottom: 1px dashed var(--rose); font-family: var(--serif); font-size: 18px; letter-spacing: .1em; }
.tt-drawer__list a[aria-current="page"] { color: var(--accent-ink); font-weight: 700; }

/* ---------- buttons ---------- */
.tt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 30px;
  border-radius: 999px; border: 1px solid var(--rose); background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-weight: 700; font-size: 16px; letter-spacing: .08em; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.tt-btn:hover { transform: translateY(-2px); box-shadow: var(--soft); color: var(--accent-ink); }
.tt-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 12px 28px var(--accent-soft); }
.tt-btn--primary:hover { color: var(--on-accent); filter: brightness(1.04); }
.sd-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 26px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.sd-btn:hover { color: var(--on-accent); filter: brightness(1.04); }

/* ---------- hero ---------- */
.tt-hero { text-align: center; padding: 60px 0 26px; }
.tt-hero__orn { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 16px; color: var(--accent-2); font-size: 18px; }
.tt-hero__orn::before, .tt-hero__orn::after { content: ""; width: 64px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-2)); }
.tt-hero__orn::after { background: linear-gradient(270deg, transparent, var(--accent-2)); }
.tt-hero__orn span { order: 0; }
.tt-hero__heart { color: var(--accent); font-size: 26px; }
.tt-hero h1 { margin: 0 0 14px; }
.tt-hero__brand { display: block; font-size: clamp(38px, 7vw, 72px); line-height: 1.12; letter-spacing: .1em; overflow-wrap: anywhere; }
.tt-hero__tag { display: block; margin-top: 12px; font-size: clamp(17px, 2.4vw, 23px); font-weight: 400; font-style: italic; letter-spacing: .08em; color: var(--accent-ink); }
.tt-hero__lead { max-width: 540px; margin: 0 auto 26px; color: var(--muted); }
.tt-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- sections (centered ornamented heads) ---------- */
.tt-sec { padding: 46px 0 6px; }
.tt-sec__head { text-align: center; margin-bottom: 26px; }
.tt-sec__head h2 { font-size: clamp(24px, 3.4vw, 32px); letter-spacing: .14em; display: inline-flex; align-items: center; gap: 16px; }
.tt-sec__head h2::before, .tt-sec__head h2::after { content: "♥"; color: var(--accent); font-size: .55em; }
.tt-sec__head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.tt-sec__head p a { color: var(--accent-ink); font-weight: 700; }
.tt-sec__head p a:hover { text-decoration: underline; }

/* ---------- cards ---------- */
.tt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 20px; }
.tt-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; max-width: 900px; margin: 0 auto; }
.tt-card { display: block; text-align: center; }
.tt-card:hover { color: var(--ink); }
.tt-card__media {
  position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 4; background: var(--blush);
  border-radius: var(--r-card); border: 4px solid var(--paper); box-shadow: var(--soft); transition: transform .3s ease, box-shadow .3s ease;
}
.tt-card:hover .tt-card__media { transform: translateY(-5px); box-shadow: 0 22px 50px rgba(190, 24, 93, .18); }
.tt-card__media img { width: 100%; height: 100%; object-fit: cover; }
.tt-card--arch .tt-card__media { aspect-ratio: 2 / 3; border-radius: 999px 999px var(--r-card) var(--r-card); border-color: var(--rose); }
.tt-card__badge {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 2px 14px; border-radius: 999px;
  background: rgba(255, 253, 251, .95); color: var(--accent-ink); font-size: 12px; font-weight: 800; white-space: nowrap;
}
.tt-card__b { display: block; padding: 14px 6px 0; }
.tt-card__t {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-family: var(--serif); font-size: 17px; font-weight: 700; line-height: 1.5; letter-spacing: .04em;
}
.tt-card--arch .tt-card__t { font-size: 20px; }
.tt-card:hover .tt-card__t { color: var(--accent-ink); }
.tt-card__m { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }

/* ---------- chips ---------- */
.tt-hearts, .tt-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tt-chips { margin: 8px 0 34px; }
.tt-heart, .tt-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--rose); color: var(--ink); font-family: var(--serif); font-size: 15px; letter-spacing: .06em;
}
.tt-heart::before { content: "♥"; color: var(--accent); font-size: 11px; }
.tt-heart:hover, .tt-chip:hover, .tt-chip[aria-current="page"] { background: var(--blush); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- page head / crumbs / empty ---------- */
.tt-pagehead { text-align: center; padding: 14px 0 6px; }
.tt-pagehead__orn, .tt-watch__orn { display: block; color: var(--accent-2); letter-spacing: .5em; font-size: 14px; margin-bottom: 8px; }
.tt-pagehead h1 { font-size: clamp(30px, 5vw, 48px); letter-spacing: .12em; margin: 0 0 8px; }
.tt-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; justify-content: center; gap: 4px 0; list-style: none; margin: 0; padding: 0; }
.sd-crumbs li + li::before { content: "♥"; margin: 0 10px; color: var(--accent-2); font-size: 9px; vertical-align: 2px; }
.sd-crumbs a:hover { color: var(--accent-ink); }
.sd-crumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

.tt-empty { margin: 24px auto; max-width: 560px; padding: 56px 24px; text-align: center; color: var(--muted); background: var(--paper); border: 1px dashed var(--rose); border-radius: var(--r-card); }
.tt-empty__title { color: var(--ink); font-family: var(--serif); font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.tt-empty .tt-chips { margin: 16px 0 0; }
.tt-note { display: block; max-width: 520px; margin: 14px auto 0; padding: 9px 18px; border-radius: 999px; background: var(--blush); color: var(--accent-ink); font-size: 14px; text-align: center; }

/* ---------- detail (centered) ---------- */
.tt-detail { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 0 6px; }
.tt-detail__poster { width: min(270px, 62vw); margin-bottom: 26px; }
.tt-detail__poster img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 999px 999px var(--r-card) var(--r-card); border: 5px solid var(--rose); box-shadow: var(--soft); }
.tt-detail h1 { font-size: clamp(28px, 4.6vw, 44px); letter-spacing: .08em; margin: 0 0 16px; }
.tt-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 20px; }
.tt-pill { display: inline-flex; align-items: center; padding: 4px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--rose); font-size: 13px; color: var(--muted); }
.tt-pill--accent { background: var(--blush); border-color: var(--accent-2); color: var(--accent-ink); font-weight: 700; }
.tt-pill--link:hover { background: var(--blush); border-color: var(--accent); color: var(--accent-ink); }
.tt-syn { position: relative; max-width: 640px; margin: 0 0 24px; padding: 22px 30px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); color: #5a3a47; font-size: 16.5px; line-height: 2; text-align: left; }
.tt-syn::before { content: "“"; position: absolute; left: 12px; top: -4px; font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--accent-2); }

.tt-block { padding: 46px 0 0; text-align: center; }
.tt-block h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: .12em; margin: 0 0 18px; display: inline-flex; align-items: center; gap: 14px; }
.tt-block h2::before, .tt-block h2::after { content: "♥"; color: var(--accent); font-size: .5em; }
.tt-block__sub { color: var(--muted); font-size: 14px; margin: -8px 0 16px; }
.tt-block__link { margin: 18px 0 0; font-size: 14px; }
.tt-block__link a { color: var(--accent-ink); font-weight: 700; }

.tt-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; text-align: center; }
.tt-fact { padding: 18px 12px; background: var(--paper); border: 1px dashed var(--rose); border-radius: var(--r-card); }
.tt-fact dt { color: var(--muted); font-size: 13px; margin: 0 0 4px; }
.tt-fact dd { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 700; }

.tt-eps { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tt-eps a, .tt-eps span {
  min-width: 52px; padding: 7px 16px; border-radius: 999px; background: var(--paper); border: 1px solid var(--rose);
  color: var(--ink); font-family: var(--serif); font-size: 15px; font-weight: 700; text-align: center;
}
.tt-eps a:hover { background: var(--blush); border-color: var(--accent); color: var(--accent-ink); }
.tt-eps .is-current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 8px 20px var(--accent-soft); }
.tt-eps span { opacity: .55; }

.tt-faq { text-align: left; }
.tt-faq h2 { display: flex; justify-content: center; }
.tt-faq details { max-width: 720px; margin: 0 auto 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; }
.tt-faq summary { cursor: pointer; padding: 16px 26px; font-family: var(--serif); font-weight: 700; list-style: none; position: relative; padding-right: 52px; }
.tt-faq summary::-webkit-details-marker { display: none; }
.tt-faq summary::after { content: "♥"; position: absolute; right: 24px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 13px; transition: transform .2s; }
.tt-faq details[open] summary::after { transform: translateY(-50%) scale(1.4); }
.tt-faq p { margin: 0; padding: 0 26px 18px; color: var(--muted); }

/* ---------- player + watch ---------- */
.tt-player { max-width: 440px; margin: 0 auto; overflow: hidden; background: #000; border-radius: var(--r-card); border: 6px solid var(--paper); box-shadow: 0 0 0 1px var(--rose), var(--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: #f5e1e8; font-size: 14px; }
.sd-callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; padding: 24px; background: var(--paper); color: var(--ink); text-align: center; }
.sd-callout__body { flex: 1 1 220px; }
.sd-callout__title { font-family: var(--serif); font-weight: 700; margin-bottom: 4px; }
.sd-callout__desc { color: var(--muted); font-size: 14px; }

.tt-watch { text-align: center; padding: 6px 0 0; }
.tt-watch__head { padding: 6px 0 22px; }
.tt-watch__head h1 { font-size: clamp(24px, 3.8vw, 36px); letter-spacing: .08em; margin: 0 0 6px; }
.tt-watch__head p { color: var(--muted); margin: 0; }
.tt-pn { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 24px 0 0; }
.tt-pn .tt-btn { min-width: 150px; }

/* ---------- search / 404 / prose ---------- */
.tt-searchbar { display: flex; gap: 8px; max-width: 580px; margin: 16px auto 30px; padding: 6px 6px 6px 24px; background: var(--paper); border: 1px solid var(--rose); border-radius: 999px; box-shadow: var(--soft); }
.tt-searchbar input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; font-family: var(--serif); color: var(--ink); }
.tt-searchbar input:focus { outline: none; }
.tt-searchbar button { border: 0; border-radius: 999px; padding: 0 26px; min-height: 44px; background: var(--accent); color: var(--on-accent); font-weight: 800; cursor: pointer; }
.tt-results { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; }
.tt-result { display: flex; gap: 18px; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); }
.tt-result:hover { border-color: var(--accent); color: var(--ink); }
.tt-result__img { width: 74px; height: 111px; flex: 0 0 74px; object-fit: cover; border-radius: 999px 999px 14px 14px; background: var(--blush); }
.tt-result__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; justify-content: center; }
.tt-result__t { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.tt-result:hover .tt-result__t { color: var(--accent-ink); }
.tt-result__m { color: var(--accent-ink); font-size: 13px; }
.tt-result__x { color: var(--muted); font-size: 14px; }

.tt-notfound { margin: 24px auto 0; max-width: 640px; padding: 52px 24px; text-align: center; background: var(--paper); border: 1px solid var(--rose); border-radius: calc(var(--r-card) + 8px); box-shadow: var(--soft); }
.tt-notfound__code { margin: 0; font-family: var(--serif); font-size: clamp(76px, 18vw, 140px); line-height: 1; font-weight: 700; color: var(--rose); letter-spacing: .06em; }
.tt-notfound__code::after { content: "♥"; display: block; margin-top: -6px; font-size: 28px; color: var(--accent); letter-spacing: 0; }
.tt-notfound h1 { font-size: clamp(24px, 4vw, 34px); letter-spacing: .1em; margin: 14px 0 10px; }
.tt-notfound__desc { color: var(--muted); max-width: 460px; margin: 0 auto 22px; }
.tt-notfound__search { display: flex; gap: 8px; max-width: 440px; margin: 0 auto 20px; padding: 5px 5px 5px 22px; background: var(--cream); border: 1px solid var(--rose); border-radius: 999px; }
.tt-notfound__search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; color: var(--ink); }
.tt-notfound__search input:focus { outline: none; }
.tt-notfound__search button { border: 0; border-radius: 999px; padding: 0 22px; min-height: 42px; background: var(--accent); color: var(--on-accent); font-weight: 800; cursor: pointer; }
.tt-notfound__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0; }

.tt-article { margin-bottom: 10px; }
.tt-prose { max-width: 740px; margin: 10px auto 0; font-size: 17px; line-height: 2; color: #4f2f3c; overflow-wrap: anywhere; }
.tt-prose h2, .tt-prose h3 { color: var(--ink); margin: 1.8em 0 .6em; letter-spacing: .06em; }
.tt-prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.tt-prose img { border-radius: 20px; }
.tt-prose blockquote { margin: 1.6em 0; padding: 6px 0 6px 20px; border-left: 3px solid var(--accent-2); font-family: var(--serif); color: var(--muted); }
.tt-prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.tt-prose th, .tt-prose td { border: 1px solid var(--line); padding: 8px 12px; }
.tt-prose pre { max-width: 100%; overflow-x: auto; padding: 14px; background: var(--paper); border-radius: 14px; }
.tt-prose .alignleft { float: left; margin: 0 20px 10px 0; }
.tt-prose .alignright { float: right; margin: 0 0 10px 20px; }
.tt-prose .aligncenter { margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { color: var(--muted); font-size: 13px; }
.tt-pages { margin-top: 24px; text-align: center; }

/* ---------- pagination ---------- */
.sd-pagination { margin: 40px 0 6px; }
.sd-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sd-pagination .page-numbers { min-width: 44px; text-align: center; padding: 8px 16px; border-radius: 999px; background: var(--paper); border: 1px solid var(--rose); color: var(--muted); font-family: var(--serif); font-weight: 700; }
.sd-pagination a.page-numbers:hover { background: var(--blush); color: var(--accent-ink); }
.sd-pagination .current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sd-pagination .dots { background: none; border-color: transparent; }

/* ---------- footer (centered) ---------- */
.tt-foot { margin-top: 80px; padding: 44px 0 30px; text-align: center; background: var(--paper); border-top: 1px solid var(--line); }
.tt-foot__orn { display: block; color: var(--accent-2); letter-spacing: .5em; font-size: 14px; margin-bottom: 6px; }
.tt-foot__brand .tt-logo { font-size: 28px; margin: 0 0 8px; }
.tt-foot__desc { max-width: 520px; margin: 0 auto 22px; color: var(--muted); font-size: 14px; }
.tt-foot__nav { margin: 0 auto 22px; }
.tt-foot__nav h2 { font-size: 15px; letter-spacing: .2em; color: var(--accent-ink); margin: 0 0 10px; }
.tt-foot__nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.tt-foot__nav a { color: var(--muted); font-size: 14px; }
.tt-foot__nav a:hover { color: var(--accent-ink); }
.tt-foot__note { max-width: 560px; margin: 0 auto 8px; color: var(--muted); font-size: 13px; }
.tt-foot__copy { margin: 0; color: var(--muted); font-size: 13px; }

.tt-tabbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .tt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tt-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .tt-head { position: sticky; top: 0; background: rgba(255, 253, 251, .94); backdrop-filter: blur(10px); }
  .tt-head__top { padding-top: 10px; padding-bottom: 10px; }
  .tt-icon-btn { margin-top: -21px; }
  .tt-logo { font-size: 24px; }
  .tt-menu-btn { display: grid; }
  .tt-nav { display: none; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 18px; }
  .tt-hero { padding-top: 38px; }
  .tt-hero__orn::before, .tt-hero__orn::after { width: 36px; }
  .tt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .tt-trio { grid-template-columns: 1fr; max-width: 280px; gap: 26px; }
  .tt-syn { padding: 20px 22px; }
  .tt-foot { padding-bottom: 96px; }
  .tt-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; background: rgba(255, 253, 251, .96);
    backdrop-filter: blur(12px); border-top: 1px solid var(--rose); border-radius: 22px 22px 0 0;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  }
  .tt-tabbar a { flex: 1; display: grid; justify-items: center; color: var(--muted); font-size: 12px; }
  .tt-tabbar a[aria-current="page"] { color: var(--accent-ink); font-weight: 700; }
  .tt-tabbar b { font-size: 18px; font-weight: 400; line-height: 1.2; }
}
@media (max-width: 460px) {
  .tt-search-btn { right: 18px; }
  .tt-menu-btn { left: 18px; }
  .tt-facts { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tt-result__img { width: 62px; height: 93px; flex-basis: 62px; }
  .tt-eps a, .tt-eps span { min-width: 46px; padding: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
