/*
Theme Name: Peony
Description: Light, app-like theme in Candy pink with a fixed side panel and a mobile tab bar.
Version: 1.0.0
Requires PHP: 8.1
Text Domain: peony
*/

:root {
  --paper: #fffafc;
  --paper-2: #fff1f6;
  --card: #ffffff;
  --line: #f6d6e2;
  --line-2: #f0bfd2;
  --pink: #ef3f7a;
  --pink-deep: #c8215a;
  --pink-glow: #ff6b9a;
  --blush: #ffd9e6;
  --peach: #ff8a5b;
  --plum: #2b0f1d;
  --plum-2: #6b4a5a;
  --mint: #12b886;
  --gold: #f4b942;
  --side-w: 272px;
  --dock-h: 64px;
  --r: 22px;
  --r-sm: 14px;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 3vw, 40px);
  --shadow: 0 18px 40px -22px rgba(200, 33, 90, .45);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--plum); font: 400 16.5px/1.65 var(--font); overflow-x: hidden; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--pink-deep); text-underline-offset: 3px; }
a:hover { color: var(--pink); }
h1, h2, h3 { font-weight: 900; line-height: 1.12; letter-spacing: -.015em; margin: 0 0 .5em; color: var(--plum); }
h1 { font-size: clamp(28px, 3.6vw, 44px); }
h2 { font-size: clamp(22px, 2.4vw, 30px); }
h3 { font-size: 19px; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--pink-glow); outline-offset: 3px; }
.hop { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--plum); color: #fff; padding: 8px 14px; border-radius: 8px; }
.hop:focus { left: 8px; }

/* ---------- shell ---------- */
.lounge { min-height: 100vh; }
.lounge__side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 60; display: flex; flex-direction: column; gap: 22px;
  padding: 24px 18px 22px; background: var(--card); border-right: 1px solid var(--line); overflow-y: auto;
}
.lounge__main { margin-left: var(--side-w); min-width: 0; }
.lounge__content { min-width: 0; }
.crest { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--plum); }
.crest__mark {
  position: relative; display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; flex: none;
  background: linear-gradient(145deg, var(--pink-glow), var(--pink) 55%, var(--pink-deep)); color: #fff; font: 900 15px/1 var(--font); letter-spacing: .02em;
  box-shadow: 0 10px 24px -8px rgba(239, 63, 122, .7);
}
.crest__mark i { position: absolute; right: -6px; top: -6px; width: 20px; height: 20px; border-radius: 7px; background: var(--peach); color: #fff; font: 900 11px/20px var(--font); font-style: normal; text-align: center; box-shadow: 0 4px 10px -3px rgba(0,0,0,.3); }
.crest__text { display: flex; flex-direction: column; }
.crest__name { font-weight: 900; font-size: 18px; letter-spacing: -.01em; }
.crest__name em { font-style: normal; color: var(--pink); }
.crest__tag { font-size: 11.5px; color: var(--plum-2); font-weight: 600; }
.crest--mini .crest__mark { width: 36px; height: 36px; font-size: 12px; border-radius: 11px; }
.crest--mini .crest__mark i { width: 16px; height: 16px; font-size: 9px; line-height: 16px; right: -5px; top: -5px; }
.crest--mini .crest__name { font-size: 16px; }

.sidenav__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.sidenav__list a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--plum-2); text-decoration: none; font-weight: 700; font-size: 15px; transition: background .2s, color .2s; }
.sidenav__list a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: background .2s; }
.sidenav__list a:hover { background: var(--paper-2); color: var(--plum); }
.sidenav__list .current-menu-item > a, .sidenav__list .current_page_parent > a { background: var(--blush); color: var(--pink-deep); }
.sidenav__list .current-menu-item > a::before { background: var(--pink); }
.ribbon { margin-top: auto; padding: 16px; border-radius: var(--r-sm); background: linear-gradient(160deg, var(--paper-2), #fff); border: 1px solid var(--line); font-size: 14px; color: var(--plum-2); }
.ribbon__t { margin: 0 0 4px; font-weight: 900; color: var(--plum); font-size: 15px; }
.ribbon p { margin: 0 0 12px; }
.side__close { display: none; }
.veil { position: fixed; inset: 0; z-index: 59; background: rgba(43, 15, 29, .45); backdrop-filter: blur(3px); }
.appbar { display: none; }

/* ---------- buttons ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 999px;
  font-weight: 900; font-size: 16px; text-decoration: none; cursor: pointer; border: 0; transition: transform .15s, box-shadow .2s, background .2s;
}
.pill--go { color: #fff; background: linear-gradient(135deg, var(--pink-glow) 0%, var(--pink) 50%, var(--pink-deep) 100%); box-shadow: 0 14px 28px -12px rgba(239, 63, 122, .9); }
.pill--go i { font-style: normal; opacity: .85; font-size: 14px; }
.pill--go:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(239, 63, 122, 1); }
.pill--in { color: var(--pink-deep); background: #fff; border: 2px solid var(--line-2); }
.pill--in:hover { border-color: var(--pink); color: var(--pink); }
.pill--full { width: 100%; }
.pill--mini { min-height: 40px; padding: 0 14px; font-size: 14px; }

/* ---------- landing block ---------- */
.splash { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 32px var(--gutter); align-items: center; padding: 40px var(--gutter) 28px; }
.splash__poster { position: relative; display: block; border-radius: var(--r); overflow: hidden; background: var(--paper-2); box-shadow: var(--shadow); aspect-ratio: 4 / 5; transition: transform .25s; }
.splash__poster:hover { transform: translateY(-3px); }
.splash__media { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.splash__play { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--pink-deep); font-weight: 900; font-size: 13.5px; backdrop-filter: blur(6px); box-shadow: 0 6px 16px -6px rgba(0,0,0,.35); }
.splash__play i { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--pink); color: #fff; font-size: 10px; font-style: normal; }
.splash__kicker { display: inline-flex; margin: 0 0 12px; padding: 6px 12px; border-radius: 999px; background: var(--blush); color: var(--pink-deep); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.splash__lead { font-size: clamp(16px, 1.3vw, 18.5px); color: var(--plum-2); margin: 0; max-width: 60ch; }
.splash__fine { margin: 12px 0 0; font-size: 13px; color: var(--plum-2); font-weight: 600; }

/* ---------- shelves + tiles ---------- */
.shelf { padding: 10px 0 10px var(--gutter); }
.shelf__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-right: var(--gutter); margin-bottom: 8px; }
.shelf__head h2 { margin: 0; font-size: 20px; }
.shelf__more { font-weight: 800; font-size: 14px; text-decoration: none; white-space: nowrap; }
.shelf__track { display: flex; gap: 12px; overflow-x: auto; padding: 6px var(--gutter) 14px 2px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.shelf__track::-webkit-scrollbar { display: none; }
.shelf__track .tile { flex: 0 0 150px; scroll-snap-align: start; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; counter-reset: tile; }
.tile { list-style: none; }
.tile__link { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--plum); }
.tile__frame { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); transition: transform .25s, box-shadow .25s; }
.tile__poster { width: 100%; height: 100%; object-fit: cover; }
.tile__link:hover .tile__frame { transform: translateY(-4px); box-shadow: var(--shadow); }
.tile__flag { position: absolute; top: 8px; left: 8px; z-index: 1; padding: 4px 8px; border-radius: 8px; background: var(--pink); color: #fff; font-size: 10.5px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.tile__flag--star { background: var(--gold); color: #3a2300; }
.tile__heat { position: absolute; top: 8px; right: 8px; z-index: 1; padding: 4px 7px; border-radius: 8px; background: rgba(255,255,255,.92); color: var(--pink-deep); font-size: 11px; font-weight: 900; }
.tile__kind { position: absolute; bottom: 8px; right: 8px; z-index: 1; padding: 4px 9px; border-radius: 999px; background: rgba(43,15,29,.75); color: #fff; font-size: 11px; font-weight: 800; }
.tile__name { font-weight: 800; font-size: 14px; line-height: 1.3; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile__meta { font-size: 12px; color: var(--plum-2); font-weight: 600; }
.tiles--ranked .tile { counter-increment: tile; }
.tiles--ranked .tile__frame::before { content: counter(tile); position: absolute; left: 8px; bottom: 6px; z-index: 2; font: 900 40px/1 var(--font); color: #fff; text-shadow: 0 3px 14px rgba(0,0,0,.6); }

/* ---------- numbers ---------- */
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 1.4em 0; }
.figures__cell { padding: 16px 14px; border-radius: var(--r-sm); background: linear-gradient(160deg, var(--paper-2), #fff); border: 1px solid var(--line); }
.figures__cell b { display: block; font-size: 30px; font-weight: 900; line-height: 1; color: var(--pink-deep); }
.figures__cell span { font-size: 13px; color: var(--plum-2); font-weight: 700; }

/* ---------- article ---------- */
.sheet { max-width: 780px; padding: 20px var(--gutter) 10px; }
.sheet--plain { padding-top: 48px; min-height: 50vh; }
.sheet h2 { margin-top: 1.6em; padding-top: .2em; }
.sheet h2::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 5px; margin-bottom: 12px; background: linear-gradient(90deg, var(--pink), var(--peach)); }
.sheet p, .sheet li { color: #3f2433; }
.sheet strong { color: var(--plum); }
.sheet ul, .sheet ol { padding-left: 1.25em; }
.sheet li { margin: .35em 0; }
.sheet li::marker { color: var(--pink); font-weight: 900; }
.sheet .tiles, .sheet .shelf, .sheet .figures, .sheet .cast { margin: 1.4em 0; }
.sheet .shelf { padding-left: 0; }
.sheet .shelf__track { padding-left: 2px; }
.sheet .shelf__head { padding-right: 0; }
.byline { margin-top: 2em; font-size: 13.5px; color: var(--plum-2); font-weight: 600; }
.trail { padding: 0 var(--gutter); font-size: 13px; font-weight: 600; }
.trail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; color: var(--plum-2); }
.trail li + li::before { content: "›"; margin-right: 6px; opacity: .6; }
.trail a { color: var(--plum-2); text-decoration: none; }

/* ---------- series facts + heat ---------- */
.facts { margin: 14px var(--gutter) 0; padding: 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); box-shadow: 0 10px 30px -24px rgba(200,33,90,.4); }
.facts dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.facts dt { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--plum-2); }
.facts dd { margin: 2px 0 0; font-weight: 900; font-size: 17px; }
.facts__heat { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); display: grid; gap: 8px; }
.facts__heat p { margin: 4px 0 0; font-size: 14px; color: var(--plum-2); }
.heat { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; }
.heat b { min-width: 86px; font-weight: 800; }
.heat__dots { display: inline-flex; gap: 4px; }
.heat__dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.heat__dots i.is-hot { background: linear-gradient(135deg, var(--peach), var(--pink)); box-shadow: 0 0 0 2px rgba(239,63,122,.15); }
.heat em { font-style: normal; font-weight: 900; color: var(--pink-deep); }

/* ---------- FAQ ---------- */
.qa { max-width: 780px; padding: 20px var(--gutter) 10px; }
.qa__item { border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; margin-bottom: 10px; overflow: hidden; }
.qa__item[open] { border-color: var(--line-2); background: var(--paper-2); }
.qa__item summary { list-style: none; cursor: pointer; padding: 15px 50px 15px 18px; font-weight: 800; position: relative; }
.qa__item summary::-webkit-details-marker { display: none; }
.qa__item summary::after { content: "+"; position: absolute; right: 16px; top: 50%; translate: 0 -50%; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--blush); color: var(--pink-deep); font-weight: 900; transition: rotate .2s; }
.qa__item[open] summary::after { rotate: 45deg; }
.qa__body { padding: 0 18px 6px; color: #3f2433; }

/* ---------- related, cast, plug ---------- */
.kin { padding: 10px var(--gutter) 20px; max-width: 980px; }
.kin__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.kin__card { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--plum); transition: box-shadow .2s, transform .2s; }
.kin__card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.kin__thumb { width: 56px; height: 74px; object-fit: cover; border-radius: 10px; flex: none; }
.kin__text { display: flex; flex-direction: column; gap: 2px; }
.kin__text b { font-size: 14.5px; line-height: 1.25; }
.kin__text small { font-size: 12.5px; color: var(--plum-2); }
.cast { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 12px; }
.cast__card a { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--plum); }
.cast__frame { position: relative; aspect-ratio: 3 / 5; border-radius: 16px; overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); }
.cast__frame img, .cast__loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cast__loop { opacity: 0; transition: opacity .3s; }
.cast__card a:hover .cast__loop.is-on { opacity: 1; }
.cast__name { font-weight: 900; margin-top: 6px; }
.cast__meta { font-size: 12px; color: var(--plum-2); font-weight: 600; }
.cast__tag { align-self: flex-start; margin-top: 4px; padding: 3px 9px; border-radius: 999px; background: var(--blush); color: var(--pink-deep); font-size: 11px; font-weight: 900; }
.cast__tag--out { background: var(--paper-2); color: var(--plum-2); }
.plug { padding: 10px var(--gutter); max-width: 780px; }
.plug__card { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: var(--r); background: linear-gradient(135deg, var(--blush), #fff); border: 1px solid var(--line-2); text-decoration: none; color: var(--plum); }
.plug__card img { width: 64px; height: 96px; object-fit: cover; object-position: top; border-radius: 12px; }
.plug__card b { display: block; font-size: 16px; }
.plug__card small { color: var(--plum-2); }

/* ---------- footer ---------- */
.plate { margin-top: 40px; padding: 36px var(--gutter) 28px; border-top: 1px solid var(--line); background: #fff; font-size: 14px; color: var(--plum-2); }
.plate__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.plate__brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 17px; color: var(--plum); margin-top: 0; }
.plate__brand .crest__mark { width: 34px; height: 34px; font-size: 11px; border-radius: 10px; }
.plate__brand .crest__mark i { display: none; }
.plate__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plate__list a { color: var(--plum-2); text-decoration: none; font-weight: 700; }
.plate__list a:hover { color: var(--pink); }
.plate__fine { margin: 20px 0 0; font-size: 12.5px; line-height: 1.6; max-width: 90ch; }

/* ---------- mobile dock + sticky CTA + gate ---------- */
.dock { display: none; }
.stick { display: none; }
.gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(43, 15, 29, .6); backdrop-filter: blur(10px); }
.gate[hidden] { display: none; }
.gate__box { max-width: 420px; width: 100%; text-align: center; padding: 30px 24px 26px; border-radius: 26px; background: #fff; box-shadow: 0 40px 90px -30px rgba(200,33,90,.6); }
.gate__box .crest__mark { margin: 0 auto 12px; }
.gate__box p { color: var(--plum-2); }
.gate__box .pills { justify-content: center; }
body.is-gated { overflow: hidden; }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .lounge__side { transform: translateX(-100%); transition: transform .28s ease; width: min(320px, 86vw); box-shadow: 30px 0 60px rgba(43,15,29,.25); }
  .lounge__side.is-open { transform: none; }
  .side__close { display: grid; place-items: center; position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: var(--plum-2); }
  .lounge__main { margin-left: 0; padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom)); }
  .appbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 40; padding: 10px 16px; background: rgba(255,250,252,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .dock { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(var(--dock-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -20px rgba(200,33,90,.4); }
  .dock__tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--plum-2); font-size: 11px; font-weight: 800; border: 0; background: none; cursor: pointer; padding: 0; }
  .dock__tab svg { width: 24px; height: 24px; fill: currentColor; }
  .dock__tab.is-here { color: var(--pink); }
  .dock__tab--go { color: #fff; }
  .dock__tab--go svg { width: 46px; height: 46px; padding: 11px; border-radius: 50%; background: linear-gradient(135deg, var(--pink-glow), var(--pink-deep)); margin-top: -22px; box-shadow: 0 10px 22px -8px rgba(239,63,122,.9); }
  .dock__tab--go span { color: var(--pink-deep); }
  .splash { grid-template-columns: 1fr; gap: 16px; padding: 14px 16px 10px; }
  .splash__poster { aspect-ratio: auto; max-height: 56vh; }
  .splash__media { max-height: 56vh; }
  .splash__copy h1 { font-size: clamp(26px, 7vw, 34px); }
  .splash__lead { font-size: 16px; }
  .pills .pill { flex: 1 1 100%; }
  .stick { display: block; position: fixed; left: 12px; right: 12px; bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 10px); z-index: 45; transform: translateY(140%); transition: transform .3s; }
  .stick.is-on { transform: none; }
  .stick .pill { width: 100%; box-shadow: 0 18px 40px -14px rgba(239,63,122,1); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plate__grid { grid-template-columns: 1fr; }
  .sheet { padding-top: 12px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .cast { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf__track .tile { flex-basis: 136px; }
  .tiles--ranked .tile__frame::before { font-size: 32px; }
  .figures__cell b { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
