/* ==========================================================================
   Kitsune design system — 狐火 "fox fire in the dark"
   One stylesheet for every visitor page (reader extras: kitsune-reader.css).
   Night-indigo ink lets covers and pages glow; torii vermilion marks actions;
   fox-fire amber marks progress and "continue". Thai-first typography.
   ========================================================================== */

/* ---------------------------------------------------------------- fonts --- */
@font-face { font-family: 'Anuphan'; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url('../arena/fonts/anuphan-var-thai.woff2') format('woff2');
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Anuphan'; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url('../arena/fonts/anuphan-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bai Jamjuree'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../arena/fonts/bai-jamjuree-600-thai.woff2') format('woff2'); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Bai Jamjuree'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../arena/fonts/bai-jamjuree-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'Bai Jamjuree'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../arena/fonts/bai-jamjuree-700-thai.woff2') format('woff2'); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Bai Jamjuree'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../arena/fonts/bai-jamjuree-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }

/* --------------------------------------------------------------- tokens --- */
:root {
  --ink-0: #080a12;            /* page — night indigo-black from the moon-shrine art */
  --ink-1: #0e111b;            /* surfaces */
  --ink-2: #151925;            /* raised panels */
  --ink-3: #1d2230;            /* inputs, hover */
  --ink-4: #272d3d;
  --line: rgba(214, 224, 255, .10);
  --line-strong: rgba(214, 224, 255, .18);
  --text: #eef0f5;             /* moon-white fur */
  --text-2: #b9bfcc;
  --text-3: #8a91a1;
  --shu: #e5533a;              /* torii vermilion */
  --shu-strong: #c73a22;       /* button fill, white text 5.2:1 */
  --shu-text: #ff7a5c;         /* vermilion text on ink 7.7:1 */
  --bi: #f4b860;               /* fox fire */
  --bi-glow: rgba(244, 184, 96, .35);
  --accent: var(--shu);
  --radius-cover: 6px;
  --radius-panel: 14px;
  --radius-pill: 999px;
  --font-body: 'Anuphan', 'Noto Sans Thai', 'Leelawadee UI', Tahoma, system-ui, sans-serif;
  --font-display: 'Bai Jamjuree', 'Anuphan', 'Leelawadee UI', Tahoma, sans-serif;
  --nav-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 92rem;
  --gutter: clamp(1rem, 3.2vw, 2.5rem);
  --card-min: 9.25rem;
  --shadow-lift: 0 18px 40px -18px rgba(0, 0, 0, .8);
}
@media (min-width: 1800px) { html { font-size: 17.5px; } :root { --card-min: 10.5rem; } }
@media (min-width: 2400px) { html { font-size: 21px; } :root { --wrap: 100rem; } }

/* ----------------------------------------------------------------- base --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 1rem); color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; background: var(--ink-0); color: var(--text);
  font: 400 1rem/1.7 var(--font-body); overflow-x: clip;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.35; margin: 0; overflow-wrap: anywhere; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--bi); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(229, 83, 58, .45); color: #fff; }
.kt-sr, .kt-cm-hp { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.yd-icon { flex: none; }
:lang(en) { letter-spacing: .01em; }

.yd-skip { position: fixed; left: 1rem; top: -4rem; z-index: 100; padding: .75rem 1.1rem; background: var(--bi); color: #1a1004; font-weight: 600; border-radius: var(--radius-pill); text-decoration: none; transition: top .15s var(--ease); }
.yd-skip:focus { top: .75rem; }
main { display: block; min-height: 60vh; }
main:focus { outline: none; }

.k-wrap, .kt-wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

/* ---------------------------------------------------------------- brand --- */
.k-logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); }
.k-mark { width: 2.25rem; height: 2.25rem; }
.k-mark-gate, .k-mark-eye { fill: var(--shu); }
.k-mark-fox { fill: currentColor; }
.k-wordmark { display: grid; line-height: 1.05; }
.k-wordmark-en { font: 700 1.15rem/1.1 var(--font-display); letter-spacing: .22em; }
.k-wordmark-th { font-size: .7rem; line-height: 1.5; color: var(--text-3); letter-spacing: 0; }

/* -------------------------------------------------------------- buttons --- */
.k-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.875rem; padding: .55rem 1.25rem; border-radius: var(--radius-pill);
  border: 1px solid transparent; font-weight: 600; font-size: .98rem; line-height: 1.4;
  text-decoration: none; white-space: nowrap; transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .15s var(--ease);
}
.k-btn:active { transform: translateY(1px); }
.k-btn-primary { background: var(--shu-strong); color: #fff; box-shadow: 0 10px 28px -14px rgba(229, 83, 58, .9); }
.k-btn-primary:hover { background: #d8432a; }
.k-btn-ghost { background: rgba(238, 240, 245, .04); border-color: var(--line-strong); color: var(--text); }
.k-btn-ghost:hover { background: rgba(238, 240, 245, .09); border-color: rgba(214, 224, 255, .3); }
.k-btn-quiet { background: transparent; color: var(--text-2); }
.k-btn-quiet:hover { color: var(--text); background: rgba(238, 240, 245, .06); }
.k-btn-fire { background: var(--bi); color: #20140a; }
.k-btn-fire:hover { background: #ffc877; }
.k-btn-sm { min-height: 2.5rem; padding: .4rem 1rem; font-size: .92rem; }
.k-btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.k-icon-btn {
  display: inline-grid; place-items: center; position: relative; width: 2.75rem; height: 2.75rem; flex: none;
  border-radius: 50%; border: 0; background: transparent; color: var(--text-2); text-decoration: none;
}
.k-icon-btn:hover { color: var(--text); background: rgba(238, 240, 245, .07); }
.k-text-link { color: var(--shu-text); font-weight: 600; text-decoration: none; background: none; border: 0; padding: .25rem 0; font-size: .95rem; }
.k-text-link:hover { text-decoration: underline; }
.k-badge { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem; border-radius: var(--radius-pill); background: var(--bi); color: #20140a; font-size: .78rem; font-weight: 700; line-height: 1; }
.k-tag, .kt-tag {
  display: inline-flex; align-items: center; min-height: 2rem; padding: .2rem .8rem; border-radius: var(--radius-pill);
  background: rgba(238, 240, 245, .06); border: 1px solid var(--line); color: var(--text-2); font-size: .88rem; line-height: 1.5; text-decoration: none;
}
.k-tag:hover, .kt-tag:hover { color: var(--text); border-color: var(--line-strong); }

/* save (bookshelf) button */
.yd-save {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(8, 10, 18, .72); color: var(--text);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background-color .15s, color .15s, border-color .15s;
}
.yd-save:hover { background: rgba(8, 10, 18, .92); border-color: rgba(255, 255, 255, .3); }
.yd-save[aria-pressed="true"] { background: var(--bi); border-color: var(--bi); color: #20140a; }
.yd-save.yd-save-label { width: auto; gap: .5rem; padding: .5rem 1.15rem; min-height: 2.875rem; border-radius: var(--radius-pill); font-weight: 600; display: inline-flex; background: rgba(238, 240, 245, .04); border-color: var(--line-strong); }
.yd-save.yd-save-label[aria-pressed="true"] { background: rgba(244, 184, 96, .14); border-color: rgba(244, 184, 96, .55); color: var(--bi); }

/* chips & segmented controls */
.k-chip, .kt-chip {
  display: inline-flex; align-items: center; min-height: 2.5rem; padding: .35rem 1rem; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); background: transparent; color: var(--text-2); font-size: .93rem; line-height: 1.45; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.k-chip:hover, .kt-chip:hover { color: var(--text); border-color: rgba(214, 224, 255, .32); }
.k-chip[aria-pressed="true"], .kt-chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--ink-0); font-weight: 600; }
.k-chip:disabled, .kt-chip:disabled { opacity: .55; }
.k-chip[aria-pressed="true"]:disabled { opacity: 1; background: rgba(244, 184, 96, .16); border-color: rgba(244, 184, 96, .5); color: var(--bi); }
.k-seg { display: inline-flex; gap: .25rem; padding: .25rem; border-radius: var(--radius-pill); background: var(--ink-1); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.k-seg::-webkit-scrollbar { display: none; }
.k-seg > button, .k-seg > a {
  flex: none; min-height: 2.25rem; padding: .3rem .95rem; border: 0; border-radius: var(--radius-pill); background: transparent;
  color: var(--text-2); font-size: .92rem; line-height: 1.5; text-decoration: none; white-space: nowrap;
}
.k-seg > button:hover, .k-seg > a:hover { color: var(--text); }
.k-seg > [aria-pressed="true"], .k-seg > [aria-current] { background: var(--ink-4); color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--shu); }
.k-seg-links { margin-top: .5rem; }

/* fields */
.k-field { position: relative; display: flex; align-items: center; }
.k-field .yd-icon { position: absolute; left: .9rem; color: var(--text-3); pointer-events: none; }
.k-field input, .k-input {
  width: 100%; min-height: 2.875rem; padding: .55rem 1rem .55rem 2.6rem; border-radius: var(--radius-pill);
  background: var(--ink-1); border: 1px solid var(--line-strong); color: var(--text); line-height: 1.5;
}
.k-field input::placeholder, .k-input::placeholder, input::placeholder, textarea::placeholder { color: var(--text-3); opacity: 1; }
.k-field input:focus-visible, .k-input:focus-visible { outline: 2px solid var(--bi); outline-offset: 1px; }
select { background-color: var(--ink-1); }
input[type="search"]::-webkit-search-cancel-button { filter: invert(.7); }

/* ---------------------------------------------------------------- header --- */
.yd-page { min-height: 100vh; display: flex; flex-direction: column; }
.yd-page > main { flex: 1; }
.k-header {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h);
  background: rgba(8, 10, 18, .78); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.k-header-inner { height: 100%; width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; display: flex; align-items: center; gap: .5rem; }
.k-brand { display: inline-flex; align-items: center; text-decoration: none; margin-right: .5rem; border-radius: 8px; }
.k-menu { display: flex; align-items: center; gap: .15rem; }
.k-menu-head { display: none; }
.k-menu-link {
  position: relative; display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: .35rem .8rem;
  border-radius: var(--radius-pill); color: var(--text-2); text-decoration: none; font-size: .95rem; white-space: nowrap;
}
.k-menu-link .yd-icon { display: none; }
.k-menu-link:hover { color: var(--text); background: rgba(238, 240, 245, .06); }
.k-menu-link[aria-current="page"] { color: var(--text); }
.k-menu-link[aria-current="page"]::after { content: ''; position: absolute; left: .8rem; right: .8rem; bottom: .2rem; height: 2px; border-radius: 2px; background: var(--shu); }
.k-menu-about, .k-menu-history { display: none; }
.k-search { position: relative; flex: 1; max-width: 28rem; margin-left: auto; display: flex; align-items: center; }
.k-search .yd-icon { position: absolute; left: .9rem; color: var(--text-3); pointer-events: none; }
.k-search input {
  width: 100%; min-height: 2.6rem; padding: .45rem 5.2rem .45rem 2.6rem; border-radius: var(--radius-pill);
  background: rgba(238, 240, 245, .05); border: 1px solid var(--line); color: var(--text); line-height: 1.5;
}
.k-search input:focus-visible { outline: 2px solid var(--bi); outline-offset: 1px; background: var(--ink-1); }
.k-search-go { position: absolute; right: .3rem; min-height: 2rem; padding: .2rem .9rem; border-radius: var(--radius-pill); border: 0; background: var(--ink-4); color: var(--text); font-size: .88rem; }
.k-search-go:hover { background: var(--shu-strong); }
.k-nav-search-link, .k-menu-btn { display: none; }
.k-count-dot { position: absolute; top: .3rem; right: .3rem; min-width: 1.1rem; height: 1.1rem; padding: 0 .25rem; border-radius: var(--radius-pill); background: var(--bi); color: #20140a; font-size: .66rem; font-weight: 700; line-height: 1.1rem; text-align: center; }
.kt-nav-right { display: flex; align-items: center; }
.kt-menu { position: relative; }
.kt-menu > button { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: transparent; }
.kt-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.kt-menu-list { position: absolute; right: 0; top: calc(100% + .4rem); min-width: 12rem; display: none; padding: .4rem; border-radius: 12px; background: var(--ink-2); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lift); }
.kt-menu[data-open="1"] .kt-menu-list { display: grid; }
.kt-menu-list a { padding: .6rem .8rem; border-radius: 8px; text-decoration: none; color: var(--text-2); }
.kt-menu-list a:hover { background: var(--ink-3); color: var(--text); }
.yd-menu-shade { display: none; }

@media (max-width: 1099px) {
  .k-search { max-width: 20rem; }
  .k-wordmark-th { display: none; }
}
@media (max-width: 899px) {
  :root { --nav-h: 58px; }
  .k-menu-btn, .k-nav-search-link { display: inline-grid; }
  .k-search { display: none; }
  .k-brand { margin-inline: 0 auto; }
  .k-mark { width: 2rem; height: 2rem; }
  .k-wordmark-en { font-size: 1.02rem; }
  .k-menu {
    position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(20rem, 86vw); flex-direction: column; align-items: stretch; gap: .2rem;
    padding: max(1rem, env(safe-area-inset-top)) 1rem 1.5rem; background: var(--ink-1); border-right: 1px solid var(--line-strong);
    transform: translateX(-104%); visibility: hidden; transition: transform .22s var(--ease), visibility 0s linear .22s; overflow-y: auto;
  }
  .yd-menu-open .k-menu { transform: none; visibility: visible; transition: transform .22s var(--ease); }
  .k-menu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
  .k-menu-head .k-wordmark-th { display: block; }
  .k-menu-link, .k-menu-about, .k-menu-history { display: flex; min-height: 3rem; padding: .6rem .9rem; border-radius: 12px; font-size: 1.02rem; }
  .k-menu-link .yd-icon { display: block; color: var(--text-3); }
  .k-menu-link[aria-current="page"] { background: rgba(229, 83, 58, .12); }
  .k-menu-link[aria-current="page"] .yd-icon { color: var(--shu-text); }
  .k-menu-link[aria-current="page"]::after { left: 0; right: auto; top: .7rem; bottom: .7rem; width: 3px; height: auto; }
  .yd-menu-shade { position: fixed; inset: 0; z-index: 55; display: block; border: 0; background: rgba(3, 4, 8, .62); }
  .yd-menu-open { overflow: hidden; }
  /* The drawer lives inside the sticky header. backdrop-filter would make the header
     the containing block of the fixed drawer, and the header's z-index would keep the
     drawer below the page-level shade, so taps on drawer links landed on the shade
     (which closes the menu) instead of following the link. On phones the header uses
     an opaque background instead, and rises above the shade while the menu is open. */
  .k-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(8, 10, 18, .97); }
  .yd-menu-open .k-header { z-index: 70; }
}
.k-icon-btn[aria-current="page"] { color: var(--bi); }
@media (max-width: 899px) { .k-nav-history { display: none; } }
@media (max-width: 380px) { .k-nav-shelf { display: none; } }

/* site news / ads */
.kt-news { display: flex; align-items: center; gap: .75rem; margin: .75rem 0 0; padding: .55rem .6rem .55rem 1rem; border-radius: 12px; background: rgba(244, 184, 96, .08); border: 1px solid rgba(244, 184, 96, .22); color: var(--text-2); font-size: .9rem; }
.kt-news span { flex: 1; }
.kt-news button { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); font-size: 1.3rem; }
.kt-news button:hover { background: rgba(238, 240, 245, .08); color: var(--text); }
.kt-ads { margin: 1.25rem 0; text-align: center; overflow: hidden; }
.kt-ads img, .kt-ads iframe { margin-inline: auto; max-width: 100%; }
.kt-adfix { position: fixed; bottom: 5rem; z-index: 30; max-width: 160px; }
.kt-adfix.l { left: .5rem; } .kt-adfix.r { right: .5rem; }
.kt-adfix .close { display: block; font-size: .8rem; color: var(--text-2); text-align: right; text-decoration: none; }
.kt-banners { margin: 1.25rem 0; }
.kt-banners-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; font-size: .82rem; color: var(--text-3); }
.kt-banners-heading a { color: var(--text-2); }
.kt-banners-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.kt-banner img { width: 100%; border-radius: 10px; }

/* breadcrumbs */
.kt-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .55rem; padding: 1.1rem 0 .25rem; font-size: .88rem; color: var(--text-3); }
.kt-crumb a { color: var(--text-2); text-decoration: none; }
.kt-crumb a:hover { color: var(--text); text-decoration: underline; }
.kt-crumb .on { color: var(--text-3); overflow-wrap: anywhere; }

/* --------------------------------------------------------- page heads --- */
.k-page-head { padding: clamp(1.5rem, 4vw, 3rem) 0 1.25rem; max-width: 52rem; }
.k-page-head h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.1rem); line-height: 1.3; }
.k-page-head p { margin-top: .5rem; color: var(--text-2); font-size: 1.02rem; max-width: 40rem; }
.k-page-kind { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .35rem !important; color: var(--bi) !important; font-weight: 600; font-size: .92rem !important; }
.k-page-head-listing { border-left: 3px solid var(--shu); padding-left: 1.1rem; margin-top: 1rem; padding-top: .5rem; padding-bottom: .5rem; margin-bottom: 1.25rem; }
.k-subhead { margin: 1.5rem 0 .75rem; font-size: 1rem; color: var(--text-2); }

/* sections */
.k-section { margin-top: clamp(2.25rem, 5vw, 3.75rem); }
.k-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.k-section-head h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem); display: flex; align-items: center; gap: .65rem; }
.k-section-head h2::before { content: ''; width: .28rem; height: 1em; border-radius: 2px; background: linear-gradient(var(--shu), var(--shu) 60%, var(--bi)); flex: none; }
.k-section-head p { margin-top: .15rem; color: var(--text-3); font-size: .92rem; }
.k-section-head .k-text-link { white-space: nowrap; flex: none; }

/* ----------------------------------------------------------------- cover --- */
.k-cover {
  position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--radius-cover);
  background: var(--ink-2); box-shadow: 0 0 0 1px rgba(214, 224, 255, .07) inset;
}
.k-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.k-cover.is-missing > img { display: none; }
.k-cover-fallback {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; gap: .5rem; padding: 12% 10%;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(229, 83, 58, .22), transparent 60%),
    radial-gradient(90% 60% at 50% 110%, rgba(244, 184, 96, .14), transparent 65%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #1a1f2d, #10131d);
  color: rgba(238, 240, 245, .82);
}
.k-cover-mark { width: 36%; max-width: 4.5rem; color: rgba(238, 240, 245, .75); }
.k-cover-mark .k-mark-gate, .k-cover-mark .k-mark-eye, .k-empty-mark .k-mark-gate, .k-empty-mark .k-mark-eye { fill: var(--shu); }
.k-cover-mark .k-mark-fox, .k-empty-mark .k-mark-fox { fill: currentColor; }
.k-cover-fallback-title {
  font: 600 clamp(.78rem, .7rem + .3vw, .95rem)/1.45 var(--font-display); color: rgba(238, 240, 245, .85);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; padding-block: .15em; overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ cards --- */
.k-grid, .kt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--card-min), 44vw), 1fr)); gap: clamp(1.1rem, 2vw, 1.75rem) clamp(.75rem, 1.6vw, 1.4rem); }
.k-card, .yd-book { position: relative; min-width: 0; }
.k-card-link, .kt-card { display: grid; gap: .2rem; text-decoration: none; color: inherit; border-radius: var(--radius-cover); }
.k-card-link .k-cover { margin-bottom: .5rem; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.k-card-link:hover .k-cover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(244, 184, 96, .35) inset, var(--shadow-lift); }
.k-card-link:focus-visible { outline-offset: 4px; }
.k-card-title, .kt-title {
  font-weight: 600; font-size: .98rem; line-height: 1.5; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-bottom: .1em; overflow-wrap: anywhere;
}
.k-card-link:hover .k-card-title { color: #fff; text-decoration: underline; text-decoration-color: rgba(229, 83, 58, .7); }
.k-card-sub, .kt-sub { font-size: .82rem; line-height: 1.5; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-card-meta, .kt-meta { display: flex; flex-wrap: wrap; gap: .2rem .75rem; margin-top: .1rem; font-size: .8rem; color: var(--text-3); }
.k-card-meta > span { display: inline-flex; align-items: center; gap: .25rem; }
.k-card-meta .star { color: var(--bi); }
.k-card .yd-save { position: absolute; top: .45rem; right: .45rem; z-index: 2; width: 2.4rem; height: 2.4rem; }
.yd-chapter-badge {
  position: absolute; left: .45rem; bottom: .45rem; z-index: 1; padding: .1rem .55rem; border-radius: var(--radius-pill);
  background: rgba(8, 10, 18, .82); color: var(--text); font-size: .74rem; font-weight: 600; line-height: 1.6;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.yd-chapter-badge.is-empty { color: var(--text-3); }
.yd-new-ribbon { position: absolute; top: .55rem; left: .45rem; z-index: 1; padding: .05rem .55rem; border-radius: 4px; background: var(--shu-strong); color: #fff; font-size: .72rem; font-weight: 700; line-height: 1.6; }
.yd-card-category { font-size: .78rem; color: var(--bi); }

/* list view toggled by kt-design.js */
.yd-view-toggle { display: inline-flex; gap: .2rem; padding: .2rem; border-radius: var(--radius-pill); background: var(--ink-1); border: 1px solid var(--line); }
.yd-view-toggle button { display: grid; place-items: center; width: 2.4rem; height: 2.25rem; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--text-3); }
.yd-view-toggle button[aria-pressed="true"] { background: var(--ink-4); color: var(--text); }
.yd-list-view .k-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr)); gap: .75rem; }
.yd-list-view .k-card-link { grid-template-columns: 4.5rem 1fr; grid-template-rows: auto auto 1fr; column-gap: 1rem; padding: .6rem; padding-right: 3.5rem; border-radius: 12px; background: var(--ink-1); border: 1px solid var(--line); }
.yd-list-view .k-card-link .k-cover { grid-row: 1 / span 3; margin: 0; }
.yd-list-view .k-card-link:hover .k-cover { transform: none; }
.yd-list-view .k-cover-fallback-title, .yd-list-view .yd-chapter-badge, .yd-list-view .yd-new-ribbon { display: none; }
.yd-list-view .k-card .yd-save { top: 50%; right: .75rem; transform: translateY(-50%); }

/* horizontal rail */
.k-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(8.5rem, 38vw, 11.5rem); gap: clamp(.85rem, 1.6vw, 1.35rem);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: .25rem 0 1rem; scrollbar-width: thin; scrollbar-color: var(--ink-4) transparent;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 3rem), transparent);
}
.k-rail > * { scroll-snap-align: start; }
.k-rail:focus-visible { outline-offset: 4px; }
@media (min-width: 1800px) { .k-rail { grid-auto-columns: 11.5rem; } }

/* ------------------------------------------------------------------ hero --- */
/* Compact discovery band (revision 2): the fox sets the scene behind the featured
   readable story instead of filling the first screen. On a 390x844 phone the
   search box and the first cover sit inside the first viewport. */
.k-hero { position: relative; isolation: isolate; overflow: hidden; }
.k-hero-art { position: absolute; inset: 0; z-index: -1; }
.k-hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 32%; }
.k-hero-art::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 18, .97) 0%, rgba(8, 10, 18, .8) 36%, rgba(8, 10, 18, .2) 66%, rgba(8, 10, 18, .45) 100%),
    linear-gradient(0deg, var(--ink-0) 0%, rgba(8, 10, 18, 0) 38%),
    linear-gradient(180deg, rgba(8, 10, 18, .6), transparent 26%);
}
.k-hero-inner { display: grid; gap: 1.5rem; align-items: center; padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.75rem, 4vw, 3rem); grid-template-columns: minmax(0, 1fr); }
.k-hero-copy { max-width: 36rem; }
.k-hero-title { font-size: clamp(2rem, 1.4rem + 2.8vw, 3.6rem); line-height: 1.28; letter-spacing: 0; text-wrap: balance; text-shadow: 0 2px 24px rgba(0, 0, 0, .6); padding-top: .1em; }
.k-br { display: none; }
.k-hero-lead { margin-top: .6rem; color: var(--text-2); font-size: clamp(.98rem, .94rem + .2vw, 1.08rem); line-height: 1.7; max-width: 32rem; }
.k-hero-search { position: relative; display: flex; align-items: center; gap: .5rem; margin-top: 1.1rem; max-width: 34rem; padding: .35rem; border-radius: var(--radius-pill); background: rgba(14, 17, 27, .86); border: 1px solid var(--line-strong); box-shadow: 0 20px 50px -25px #000; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.k-hero-search:focus-within { border-color: rgba(244, 184, 96, .55); outline: 2px solid var(--bi); outline-offset: 2px; }
.k-hero-search .yd-icon { margin-left: .75rem; color: var(--text-3); }
.k-hero-search input { flex: 1; min-width: 0; min-height: 2.75rem; border: 0; background: transparent; color: var(--text); font-size: 1.02rem; padding: 0 .25rem; }
.k-hero-search input:focus-visible { outline: none; }
.k-hero-genres { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .85rem; }
.k-hero-genres a { display: inline-flex; align-items: center; min-height: 2.5rem; padding: .3rem .9rem; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: rgba(8, 10, 18, .55); color: var(--text-2); font-size: .92rem; text-decoration: none; white-space: nowrap; }
.k-hero-genres a:hover { color: var(--text); border-color: rgba(244, 184, 96, .5); }

.k-spotlight {
  display: grid; grid-template-columns: 6.75rem 1fr; gap: 1rem; align-items: start; padding: 1rem; border-radius: var(--radius-panel);
  background: rgba(14, 17, 27, .88); border: 1px solid var(--line-strong); box-shadow: 0 30px 60px -30px #000; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.k-spotlight.is-readable { border-color: rgba(244, 184, 96, .38); box-shadow: 0 30px 60px -30px #000, 0 0 0 1px rgba(244, 184, 96, .12), 0 0 40px -18px var(--bi-glow); }
.k-spotlight-cover { box-shadow: 0 14px 30px -12px #000; }
.k-spotlight-kicker { display: inline-flex; align-items: center; gap: .35rem; color: var(--bi); font-weight: 600; font-size: .86rem; }
.k-spotlight h2 { margin-top: .3rem; font-size: clamp(1.15rem, 1rem + .7vw, 1.5rem); line-height: 1.4; }
.k-spotlight h2 a { text-decoration: none; }
.k-spotlight h2 a:hover { text-decoration: underline; text-decoration-color: var(--shu); }
.k-spotlight-alt { color: var(--text-3); font-size: .88rem; }
.k-facts { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin-top: .6rem; color: var(--text-2); font-size: .88rem; }
.k-facts li { display: inline-flex; align-items: center; gap: .35rem; }
.k-facts .yd-icon { color: var(--text-3); }
.k-spotlight-genres { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .65rem; }
.k-spotlight-genres .k-tag { min-height: 1.8rem; font-size: .8rem; padding: .1rem .65rem; }
.k-spotlight-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; grid-column: 1 / -1; }
.k-spotlight-actions .k-btn { flex: 1 1 auto; white-space: normal; text-align: center; }
.k-spotlight-next { grid-column: 1 / -1; margin-top: .55rem; color: var(--text-3); font-size: .85rem; line-height: 1.55; }
@media (min-width: 640px) {
  .k-spotlight { grid-template-columns: 8.5rem 1fr; }
  .k-spotlight-actions, .k-spotlight-next { grid-column: 2; }
  .k-spotlight-actions .k-btn { flex: 0 1 auto; }
}
@media (min-width: 1024px) {
  .k-br { display: block; }
  .k-hero-inner { grid-template-columns: minmax(0, 1.1fr) minmax(22rem, .9fr); gap: 3rem; }
  .k-spotlight { max-width: 34rem; justify-self: end; grid-template-columns: 9.5rem 1fr; padding: 1.25rem; }
}
@media (max-width: 639px) {
  .k-hero-art { height: 15.5rem; bottom: auto; }
  .k-hero-art img { object-position: 74% 22%; }
  .k-hero-art::after { background: linear-gradient(0deg, var(--ink-0) 0%, rgba(8, 10, 18, .55) 42%, rgba(8, 10, 18, .1) 78%, rgba(8, 10, 18, .45) 100%); }
  .k-hero-inner { padding-top: 8.5rem; gap: 1.1rem; }
  .k-hero-genres { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: .1rem var(--gutter) .2rem; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 2rem), transparent); }
  .k-hero-genres::-webkit-scrollbar { display: none; }
  .k-hero-genres a { flex: none; }
  .k-hero-search .k-btn { padding-inline: 1rem; }
}

/* honest "readable on this copy" marker (yd_media_note / card badges) */
.k-honest { display: flex; align-items: flex-start; gap: .6rem; margin: 1rem 0 0; padding: .7rem .95rem; border-radius: 12px; background: rgba(244, 184, 96, .06); border: 1px solid rgba(244, 184, 96, .22); color: var(--text-2); font-size: .9rem; line-height: 1.65; max-width: 52rem; }
.k-honest > .yd-icon { color: var(--bi); margin-top: .2rem; }
.k-honest strong { color: var(--text); font-weight: 600; }
.k-honest-home { margin-top: 1.25rem; }
.k-honest-pill, .yd-chapter-badge.is-readable { display: inline-flex; align-items: center; gap: .35rem; }
.k-honest-pill { padding: 0 .55rem; border-radius: var(--radius-pill); background: rgba(244, 184, 96, .16); color: var(--bi); font-weight: 600; font-size: .85em; line-height: 1.7; white-space: nowrap; }
.k-honest-pill i, .yd-chapter-badge.is-readable i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--bi); box-shadow: 0 0 8px var(--bi); flex: none; }
.yd-chapter-badge.is-readable { background: rgba(20, 14, 4, .88); color: var(--bi); border: 1px solid rgba(244, 184, 96, .45); }
.k-rank-eps.is-readable { color: var(--bi); font-weight: 600; }

/* resume rail (markup rendered by composition/kt/resume.php) */
.k-resume-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: .75rem; }
.k-resume-card { position: relative; display: grid; grid-template-columns: 3.6rem 1fr; gap: .9rem; align-items: center; padding: .7rem 3.25rem .7rem .7rem; border-radius: 12px; background: var(--ink-1); border: 1px solid var(--line); }
.k-resume-card:hover { border-color: rgba(244, 184, 96, .35); }
.k-resume-card .k-cover { border-radius: 4px; }
.k-resume-card .k-cover-fallback { padding: 10%; }
.k-resume-card .k-cover-fallback-title { display: none; }
.k-resume-card .k-cover-mark { width: 70%; margin: auto; }
.k-resume-title { font-weight: 600; line-height: 1.45; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; padding-bottom: .1em; }
.k-resume-title::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }
.k-resume-title:focus-visible { outline: none; }
.k-resume-card:focus-within { outline: 2px solid var(--bi); outline-offset: 2px; }
.k-resume-ep { font-size: .85rem; color: var(--text-2); line-height: 1.5; margin-top: .1rem; }
.kt-bar { position: relative; height: 4px; margin-top: .55rem; border-radius: 4px; background: var(--ink-4); overflow: hidden; }
.kt-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, var(--shu), var(--bi)); box-shadow: 0 0 10px var(--bi-glow); }
.k-resume-card .x { position: absolute; z-index: 2; top: 50%; right: .4rem; transform: translateY(-50%); display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); }
.k-resume-card .x:hover { background: var(--ink-3); color: var(--text); }
.kt-resume-empty { color: var(--text-3); }

/* split: ranking + genres */
.k-split { display: grid; gap: 0 3rem; }
@media (min-width: 1024px) { .k-split { grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 1fr); } }
.k-rank { list-style: none; display: grid; gap: .25rem; counter-reset: rank; }
@media (min-width: 640px) and (max-width: 1023px), (min-width: 1500px) { .k-rank { grid-template-columns: 1fr 1fr; column-gap: 1.25rem; } }
.k-rank-item a { display: grid; grid-template-columns: 2.4rem 3.4rem 1fr; gap: .9rem; align-items: center; padding: .55rem .5rem; border-radius: 12px; text-decoration: none; }
.k-rank-item a:hover { background: var(--ink-1); }
.k-rank-no {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 6px; transform: rotate(-4deg);
  border: 1.5px solid rgba(229, 83, 58, .7); color: var(--shu-text); font: 700 1rem/1 var(--font-display);
}
.k-rank-item:nth-child(-n+3) .k-rank-no { background: var(--shu-strong); border-color: var(--shu-strong); color: #fff; box-shadow: 0 6px 16px -6px rgba(229, 83, 58, .8); }
.k-rank-cover { border-radius: 4px; }
.k-rank-cover .k-cover-fallback { padding: 10%; }
.k-rank-cover .k-cover-fallback-title { display: none; }
.k-rank-cover .k-cover-mark { width: 70%; margin: auto; }
.k-rank-text { display: grid; min-width: 0; }
.k-rank-title { font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-bottom: .1em; }
.k-rank-sub { font-size: .8rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-rank-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .15rem; font-size: .8rem; color: var(--text-3); }
.k-rank-eps { margin-left: .4rem; padding-left: .6rem; border-left: 1px solid var(--line-strong); }

.k-genre-tiles { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr)); gap: .5rem; }
.k-genre-tiles a {
  position: relative; display: grid; gap: .05rem; min-height: 4.25rem; padding: .7rem .9rem; border-radius: 12px; overflow: hidden;
  background: var(--ink-1); border: 1px solid var(--line); text-decoration: none; font-weight: 600; line-height: 1.45;
}
.k-genre-tiles a::after { content: ''; position: absolute; left: .9rem; right: .9rem; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--shu), var(--bi)); transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease); }
.k-genre-tiles a:hover { border-color: var(--line-strong); background: var(--ink-2); }
.k-genre-tiles a:hover::after { transform: scaleX(1); }
.k-genre-en { font-size: .78rem; font-weight: 400; color: var(--text-3); }
.k-genre-tiles-wide { grid-template-columns: 1fr 1fr; }

/* ---------------------------------------------------------------- browse --- */
#k-catalog { scroll-margin-top: var(--nav-h); }
.k-browse { margin-top: clamp(2.25rem, 5vw, 3.75rem); padding-bottom: 2rem; }
.k-route-catalog .k-browse, .k-route-category .k-browse, .k-route-genre .k-browse, .k-route-artist .k-browse, .k-route-year .k-browse { margin-top: 0; }
.k-browse-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; margin-bottom: 1rem; }
.k-browse-head h1, .k-browse-head h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem); }
.k-count { color: var(--text-3); font-size: .95rem; }
.k-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .85rem; }
.k-toolbar-end { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.k-toolbar .yd-view-toggle { order: 3; }
.k-chip-row { display: flex; gap: .5rem; overflow-x: auto; padding: .15rem .1rem .6rem; margin-bottom: .75rem; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 2rem), transparent); }
.k-chip-row::-webkit-scrollbar { display: none; }
.k-chip-row .k-chip { flex: none; }
@media (max-width: 599px) {
  .k-toolbar { gap: .5rem; }
  .k-toolbar .k-seg { order: 2; width: 100%; }
  .k-toolbar-end { order: 1; margin-left: auto; }
  .k-toolbar .yd-view-toggle { order: 1; }
}

.k-filters { margin-bottom: 1.25rem; padding: 1.25rem; border-radius: var(--radius-panel); background: var(--ink-1); border: 1px solid var(--line-strong); }
.k-filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.k-filters-head h2 { font-size: 1.2rem; }
.k-filters-body { display: grid; gap: 1.1rem; }
@media (min-width: 900px) {
  .k-filters-body { grid-template-columns: minmax(14rem, .8fr) minmax(0, 2fr); grid-template-areas: "c g" "y g"; align-items: start; }
  .k-filters-body > .k-fgroup:first-child { grid-area: c; }
  .k-filters-body > .kt-filter-years { grid-area: y; }
  .k-filters-body > .k-fgroup-genres { grid-area: g; }
}
.k-fgroup { border: 0; margin: 0; padding: 0; min-width: 0; }
.k-fgroup legend { padding: 0; margin-bottom: .55rem; font-weight: 600; color: var(--text); }
.k-fgroup legend small { font-weight: 400; color: var(--text-3); font-size: .82rem; margin-left: .35rem; }
.k-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.k-chips .k-chip { min-height: 2.35rem; padding: .25rem .85rem; font-size: .9rem; }
.k-fgroup-genres .k-field { margin-bottom: .7rem; max-width: 26rem; }
#kt-genre-chips.is-collapsed { max-height: 8.6rem; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.kt-more { margin-top: .5rem; }
.k-genre-status { color: var(--text-3); font-size: .88rem; margin-top: .4rem; }
.k-genre-status:empty { display: none; }
.k-filters-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.kt-live { display: inline-flex; align-items: center; gap: .5rem; color: var(--text-3); font-size: .88rem; margin-right: auto; }
.kt-live .dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--bi); box-shadow: 0 0 10px var(--bi); }
.k-filters-done { display: none; }
.kt-scrim { display: none; }
@media (max-width: 899px) {
  .k-filters {
    position: fixed; inset: auto 0 0 0; z-index: 70; max-height: min(86vh, 46rem); margin: 0; display: flex; flex-direction: column;
    border-radius: 20px 20px 0 0; padding: .75rem 1rem calc(1rem + env(safe-area-inset-bottom)); box-shadow: 0 -30px 60px -20px #000;
    animation: k-sheet-in .24s var(--ease);
  }
  .k-filters::before { content: ''; align-self: center; width: 2.75rem; height: 4px; border-radius: 4px; background: var(--ink-4); margin-bottom: .6rem; }
  .k-filters-body { overflow-y: auto; overscroll-behavior: contain; padding-bottom: .5rem; }
  .k-filters-done { display: inline-flex; }
  .kt-live { width: 100%; }
  .kt-scrim { position: fixed; inset: 0; z-index: 65; display: block; background: rgba(3, 4, 8, .65); }
  .k-sheet-open { overflow: hidden; }
}
@keyframes k-sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.k-feed { position: relative; min-height: 12rem; }
.k-grid.is-busy { opacity: .45; transition: opacity .2s; }
.k-load { margin: 1rem 0; color: var(--text-3); text-align: center; }
.k-alert { margin: 1rem 0; padding: .9rem 1.1rem; border-radius: 12px; background: rgba(229, 83, 58, .1); border: 1px solid rgba(229, 83, 58, .4); color: var(--text); }
#kt-retry { margin: 0 auto 1rem; display: flex; }

/* pager markup comes from kt_pager() */
.k-pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .75rem; margin: 2.25rem 0 1rem; }
.k-pager:empty { display: none; }
.kt-page-control {
  display: inline-flex; align-items: center; min-height: 2.875rem; padding: .5rem 1.15rem; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); color: var(--text); text-decoration: none; font-weight: 600; white-space: nowrap;
}
a.kt-page-control:hover { background: var(--ink-2); border-color: rgba(214, 224, 255, .3); }
.kt-page-control.is-disabled { color: var(--text-3); opacity: .55; }
.kt-page-navigation { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.kt-page-picker select, .kt-episode-page-form select {
  min-height: 2.875rem; padding: .4rem 2.25rem .4rem 1rem; border-radius: var(--radius-pill); border: 1px solid var(--line-strong);
  background: var(--ink-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23b9bfcc' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .85rem center;
  appearance: none; -webkit-appearance: none; color: var(--text); font-weight: 600;
}
.kt-page-summary { display: flex; align-items: center; gap: .6rem; color: var(--text-3); font-size: .9rem; }
.kt-page-direct { position: relative; }
.kt-page-direct summary { cursor: pointer; list-style: none; color: var(--shu-text); font-weight: 600; padding: .4rem .2rem; }
.kt-page-direct summary::-webkit-details-marker { display: none; }
.kt-page-direct-form { position: absolute; bottom: calc(100% + .5rem); left: 50%; transform: translateX(-50%); z-index: 5; display: grid; gap: .4rem; width: 13rem; padding: .9rem; border-radius: 12px; background: var(--ink-2); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lift); }
.kt-page-direct-form label { font-size: .85rem; color: var(--text-2); }
.kt-page-number-row { display: flex; gap: .4rem; }
.kt-page-number-row input { flex: 1; min-width: 0; min-height: 2.5rem; padding: .3rem .7rem; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--ink-1); }
.kt-page-go { min-height: 2.5rem; padding: .3rem 1rem; border-radius: 10px; border: 0; background: var(--shu-strong); color: #fff; font-weight: 600; }
@media (max-width: 599px) {
  .k-pager { gap: .5rem; }
  .kt-page-control { padding-inline: .9rem; }
  .kt-page-navigation { order: -1; width: 100%; }
}

/* empty states */
.k-empty, .kt-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: .5rem; padding: 3rem 1rem; text-align: center; color: var(--text-2); border: 1px dashed var(--line-strong); border-radius: var(--radius-panel); }
.k-empty h2, .k-empty h3 { font-size: 1.2rem; color: var(--text); }
.k-empty p { max-width: 30rem; }
.k-empty .k-btn { margin-top: .75rem; }
.k-empty-mark { width: 3.5rem; height: 3.5rem; color: var(--text-3); margin-bottom: .25rem; }
p.kt-empty { display: block; }

/* ---------------------------------------------------------------- detail --- */
.k-story { position: relative; isolation: isolate; }
.k-story-backdrop { position: absolute; inset: 0 0 auto; height: min(44rem, 95vh); z-index: -1; overflow: hidden; pointer-events: none; }
.k-story-backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(38px) saturate(1.25) brightness(.55); transform: scale(1.2); opacity: .7; }
.k-story-backdrop::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 10, 18, .35), var(--ink-0) 92%); }
.k-story-hero { display: grid; gap: 1.5rem; padding: 1rem 0 2rem; grid-template-columns: minmax(0, 1fr); }
.k-story-cover { width: min(15rem, 58vw); justify-self: center; box-shadow: 0 30px 60px -24px #000, 0 0 0 1px rgba(255, 255, 255, .08) inset; border-radius: 8px; }
.k-story-main { min-width: 0; }
.k-story-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.k-status { display: inline-flex; align-items: center; gap: .35rem; min-height: 1.9rem; padding: .1rem .7rem; border-radius: var(--radius-pill); font-size: .82rem; font-weight: 600; line-height: 1.5; background: rgba(238, 240, 245, .07); color: var(--text-2); border: 1px solid var(--line); }
.k-status::before { content: ''; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.k-status.st-live { color: #8be0a6; } .k-status.st-done { color: var(--bi); } .k-status.st-pause, .k-status.st-drop { color: var(--text-3); }
.k-story-title { font-size: clamp(1.85rem, 1.25rem + 2.6vw, 3.25rem); line-height: 1.3; text-wrap: balance; padding-top: .1em; }
.k-story-alt { margin-top: .35rem; color: var(--text-2); font-size: 1rem; }
.k-story-facts { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 1rem; color: var(--text-2); font-size: .93rem; }
.k-story-facts li { display: inline-flex; align-items: center; gap: .4rem; }
.k-story-facts .yd-icon { color: var(--text-3); }
.k-story-facts a { color: var(--text); text-decoration: none; }
.k-story-facts a:hover { text-decoration: underline; }
.k-story-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.k-story-actions .k-btn-primary { min-width: 11rem; }
.ys-resume-note { width: 100%; margin-top: .2rem; color: var(--bi); font-size: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.ys-resume-note .k-resume-bar { flex: 1 1 8rem; max-width: 14rem; margin-top: 0; }
.k-start-note { width: 100%; margin-top: .2rem; color: var(--text-3); font-size: .88rem; }
.k-no-pages { margin-bottom: -.25rem; }
.k-story-genres { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.25rem; }
.k-more-tags[open] { flex-basis: 100%; }
.k-more-tags summary { display: inline-flex; align-items: center; min-height: 2rem; padding: .2rem .8rem; border-radius: var(--radius-pill); border: 1px dashed var(--line-strong); color: var(--shu-text); font-size: .88rem; cursor: pointer; list-style: none; }
.k-more-tags summary::-webkit-details-marker { display: none; }
.k-more-tags[open] summary { display: none; }
.k-more-tags .k-story-genres { margin-top: 0; }
.k-synopsis { margin-top: 1.5rem; max-width: 46rem; }
.k-synopsis h2 { font-size: 1.05rem; margin-bottom: .4rem; color: var(--text-2); }
.k-synopsis p { color: var(--text); line-height: 1.85; }
.ys-synopsis.is-collapsed p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.k-synopsis button { margin-top: .4rem; }
.k-no-chapters { margin-top: 1.4rem; padding: 1rem 1.1rem; border-radius: 12px; background: rgba(238, 240, 245, .04); border: 1px dashed var(--line-strong); color: var(--text-2); max-width: 40rem; }
.k-no-chapters strong { color: var(--text); display: block; margin-bottom: .2rem; }
@media (min-width: 768px) {
  .k-story-hero { grid-template-columns: 13.5rem minmax(0, 1fr); gap: 2.25rem; align-items: start; padding-top: 1.5rem; }
  .k-story-cover { width: 100%; position: sticky; top: calc(var(--nav-h) + 1.25rem); }
}
@media (min-width: 1200px) {
  .k-story-hero { grid-template-columns: 16rem minmax(0, 1fr) 20rem; gap: 2.75rem; }
}
.k-story-aside { display: grid; gap: 1rem; align-content: start; }
@media (max-width: 1199px) { .k-story-aside { grid-column: 1 / -1; } }
@media (min-width: 768px) and (max-width: 1199px) { .k-story-aside { grid-template-columns: 1fr 1fr; } }
.k-panel { padding: 1.1rem 1.2rem; border-radius: var(--radius-panel); background: rgba(14, 17, 27, .82); border: 1px solid var(--line); }
.k-panel h2 { font-size: 1rem; margin-bottom: .7rem; }
.k-facts-list { display: grid; gap: .7rem; margin: 0; }
.k-facts-list > div { display: grid; grid-template-columns: 7rem 1fr; gap: .75rem; align-items: baseline; }
.k-facts-list dt { color: var(--text-3); font-size: .88rem; }
.k-facts-list dd { margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; min-width: 0; overflow-wrap: anywhere; }
.k-aliases { font-size: .9rem; color: var(--text-2); }

/* rating */
.kt-rate { display: grid; gap: .5rem; }
.kt-stars { display: flex; gap: .15rem; }
.kt-stars button { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 10px; background: transparent; color: var(--ink-4); font-size: 1.6rem; line-height: 1; transition: color .12s, transform .12s; }
.kt-stars button:hover { background: rgba(244, 184, 96, .08); }
.kt-stars button.lit, .kt-stars button.on { color: var(--bi); text-shadow: 0 0 12px var(--bi-glow); }
.kt-rate.is-saving { opacity: .6; pointer-events: none; }
.kt-score { color: var(--text-2); font-size: .92rem; }
.kt-score b { color: var(--text); font-size: 1.15rem; font-family: var(--font-display); }
.kt-score i { font-style: normal; }

/* chapter list */
.k-chapters { margin-top: clamp(2rem, 4vw, 3rem); }
.k-chapters-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1rem; }
.k-chapters-head h2 { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.75rem); display: flex; align-items: baseline; gap: .6rem; }
.k-chapters-head h2 span { font: 400 .95rem var(--font-body); color: var(--text-3); }
.ys-chapter-search { margin-bottom: 1rem; max-width: 30rem; }
.ys-chapter-search label { display: block; margin-bottom: .35rem; font-size: .9rem; color: var(--text-2); }
.ys-chapter-search > div { display: flex; gap: .5rem; }
.ys-chapter-search input { flex: 1; min-width: 0; min-height: 2.75rem; padding: .4rem 1rem; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--ink-1); }
.ys-search-result { margin-bottom: 1rem; color: var(--text-2); }
.ys-search-result a { color: var(--shu-text); margin-left: .5rem; }
.kt-episode-range { color: var(--text-3); font-size: .88rem; margin-bottom: .5rem; }
.kt-ep-list { list-style: none; display: grid; gap: .45rem; }
@media (min-width: 900px) { .k-chapters .kt-ep-list { grid-template-columns: 1fr 1fr; column-gap: 1rem; } }
@media (min-width: 1800px) { .k-chapters .kt-ep-list { grid-template-columns: repeat(3, 1fr); } }
.kt-ep-list a {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "n t p" "n d p"; column-gap: 1rem; align-items: center;
  min-height: 4rem; padding: .65rem 1rem; border-radius: 12px; background: var(--ink-1); border: 1px solid var(--line); text-decoration: none;
  transition: border-color .15s, background-color .15s;
}
.kt-ep-list a:hover { background: var(--ink-2); border-color: var(--line-strong); }
.kt-ep-list .n { grid-area: n; display: grid; place-items: center; min-width: 2.75rem; height: 2.75rem; padding: 0 .4rem; border-radius: 10px; background: var(--ink-3); font: 700 1rem/1 var(--font-display); color: var(--text); }
.kt-ep-list .t { grid-area: t; font-weight: 600; line-height: 1.5; min-width: 0; overflow-wrap: anywhere; }
.kt-ep-list .d { grid-area: d; font-size: .82rem; color: var(--text-3); }
.kt-ep-list .p { grid-area: p; font-size: .82rem; color: var(--text-3); white-space: nowrap; }
.ys-reading-badge { display: inline-flex; margin-left: .5rem; padding: 0 .5rem; border-radius: var(--radius-pill); background: rgba(244, 184, 96, .15); color: var(--bi); font-size: .74rem; font-weight: 600; line-height: 1.7; vertical-align: middle; }
.kt-ep-list li.is-reading a { border-color: rgba(244, 184, 96, .55); background: linear-gradient(90deg, rgba(244, 184, 96, .08), var(--ink-1) 60%); }
.kt-ep-list li.is-reading .n { background: var(--bi); color: #20140a; }
.ys-empty { padding: 1.5rem; border-radius: 12px; border: 1px dashed var(--line-strong); color: var(--text-2); text-align: center; }
.kt-episode-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; margin: 1rem 0; }
.kt-episode-pager > a, .kt-episode-pager > .off { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .4rem 1rem; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); text-decoration: none; font-weight: 600; }
.kt-episode-pager > .off { color: var(--text-3); opacity: .55; }
.kt-episode-page-form { display: flex; align-items: center; gap: .5rem; color: var(--text-2); font-size: .9rem; }
.kt-episode-page-form label { display: flex; align-items: center; gap: .4rem; }
.kt-episode-page-form button { min-height: 2.75rem; padding: .3rem 1rem; border-radius: var(--radius-pill); border: 0; background: var(--ink-4); color: var(--text); font-weight: 600; }

/* recommendations / comments */
.k-more { margin-top: clamp(2.5rem, 5vw, 4rem); }
.k-more .k-grid { grid-template-columns: repeat(auto-fill, minmax(min(8.5rem, 40vw), 1fr)); }
.kt-cm { margin: clamp(2.5rem, 5vw, 4rem) 0 2rem; max-width: 52rem; }
.kt-cm-head { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.75rem); margin-bottom: 1rem; }
.kt-cm-head span { font: 400 .95rem var(--font-body); color: var(--text-3); }
.kt-cm-form { display: grid; gap: .6rem; padding: 1rem; border-radius: var(--radius-panel); background: var(--ink-1); border: 1px solid var(--line); }
.kt-cm-form label { font-size: .88rem; color: var(--text-2); }
.kt-cm-form input[type="text"], .kt-cm-form textarea { width: 100%; padding: .65rem .9rem; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--ink-0); color: var(--text); line-height: 1.6; resize: vertical; }
.kt-cm-form input:focus-visible, .kt-cm-form textarea:focus-visible { outline: 2px solid var(--bi); outline-offset: 1px; }
.kt-cm-foot { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; }
.kt-cm-msg { margin-right: auto; font-size: .9rem; color: var(--text-2); }
.kt-cm-msg.ok { color: #8be0a6; } .kt-cm-msg.bad { color: var(--shu-text); }
.kt-cm-btn { min-height: 2.75rem; padding: .4rem 1.4rem; border-radius: var(--radius-pill); border: 0; background: var(--shu-strong); color: #fff; font-weight: 600; }
.kt-cm-btn:disabled { opacity: .55; }
.kt-cm-list { display: grid; gap: .5rem; margin-top: 1rem; }
.kt-cm-item { padding: .85rem 1rem; border-radius: 12px; background: var(--ink-1); border: 1px solid var(--line); }
.kt-cm-by { display: flex; gap: .75rem; align-items: baseline; margin-bottom: .2rem; }
.kt-cm-by span { font-size: .8rem; color: var(--text-3); }
.kt-cm-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.kt-cm-empty { color: var(--text-3); padding: .5rem 0; }

/* ------------------------------------------------------- search page --- */
.k-search-page { padding-bottom: 2rem; }
.k-search-big { position: relative; display: flex; align-items: center; max-width: 46rem; }
.k-search-big .yd-icon { position: absolute; left: 1.1rem; color: var(--text-3); pointer-events: none; }
.k-search-big input { width: 100%; min-height: 3.6rem; padding: .6rem 1.25rem .6rem 3.2rem; border-radius: 18px; border: 1px solid var(--line-strong); background: var(--ink-1); font-size: 1.15rem; color: var(--text); }
.k-search-big input:focus-visible { outline: 2px solid var(--bi); outline-offset: 2px; }
.k-search-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .9rem 0 1.5rem; color: var(--text-3); font-size: .92rem; }
.k-search-meta .kt-count { color: var(--text-2); font-weight: 600; }
.k-search-suggest { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
#kt-search-result.is-busy { opacity: .5; transition: opacity .2s; }
.k-search-start { grid-column: 1 / -1; display: grid; gap: 1.75rem; }
.k-search-start h2 { font-size: 1.05rem; margin-bottom: .7rem; color: var(--text-2); }
.k-search-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.k-search-chips .k-chip { gap: .4rem; text-decoration: none; white-space: normal; text-align: left; }
.k-search-chips .k-chip .yd-icon { color: var(--text-3); }
.k-search-ready { grid-template-columns: repeat(auto-fill, minmax(min(var(--card-min), 44vw), 11rem)); }
.k-search-tip { color: var(--text-3); font-size: .88rem; }

/* --------------------------------------------------------- personal --- */
.k-personal-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: 1.5rem; }
.k-personal-tools .k-field { flex: 1 1 18rem; max-width: 28rem; }
.k-personal-tools #yd-personal-count { color: var(--text-3); font-size: .92rem; }
.yd-storage-note { display: flex; align-items: center; gap: .5rem; margin: 2rem 0 1rem; color: var(--text-3); font-size: .88rem; }
.yd-personal-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: .5rem; padding: 3.5rem 1rem; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-panel); color: var(--text-2); }
.yd-personal-empty .k-empty-mark { width: 4rem; height: 4rem; }
.yd-personal-empty h2 { font-size: 1.3rem; color: var(--text); }
.yd-personal-empty p { max-width: 28rem; }
.yd-personal-empty .k-btn { margin-top: .75rem; }
.yd-history-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr)); }
.yd-history-row { position: relative; display: grid; grid-template-columns: 5.25rem 1fr; gap: 1rem; padding: .8rem 3.5rem .8rem .8rem; border-radius: var(--radius-panel); background: var(--ink-1); border: 1px solid var(--line); }
.yd-history-row h2 { font-size: 1.05rem; line-height: 1.45; }
.yd-history-row h2 a { text-decoration: none; }
.yd-history-row h2 a:hover { text-decoration: underline; }
.yd-history-row p { color: var(--text-2); font-size: .9rem; margin-top: .15rem; }
.yd-history-row .kt-bar { max-width: 18rem; }
.yd-history-row .k-btn { margin-top: .75rem; }
.yd-history-row > .k-icon-btn { position: absolute; top: .5rem; right: .5rem; }
.yd-history-time { font-size: .8rem !important; color: var(--text-3) !important; }

/* --------------------------------------------------------------- about --- */
.k-about-hero { position: relative; isolation: isolate; overflow: hidden; border-radius: 0 0 28px 28px; }
.k-about-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 35%; z-index: -1; }
.k-about-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--ink-0) 10%, rgba(8, 10, 18, .55) 55%, rgba(8, 10, 18, .2)), linear-gradient(0deg, var(--ink-0), transparent 40%); }
.k-about-hero .k-wrap { padding: clamp(4rem, 12vw, 9rem) 0 clamp(3rem, 6vw, 5rem); }
.k-about-hero h1 { font-size: clamp(2.3rem, 1.4rem + 4vw, 4.4rem); line-height: 1.25; max-width: 14ch; padding-top: .1em; }
.k-about-hero p { margin-top: 1rem; max-width: 34rem; color: var(--text-2); font-size: 1.08rem; }
.k-about-grid { display: grid; gap: 1rem; margin: clamp(2rem, 5vw, 3.5rem) 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.k-about-grid article { padding: 1.4rem; border-radius: var(--radius-panel); background: var(--ink-1); border: 1px solid var(--line); }
.k-about-grid article .yd-icon { color: var(--bi); width: 1.75rem; height: 1.75rem; }
.k-about-grid h2 { font-size: 1.15rem; margin: .75rem 0 .35rem; }
.k-about-grid p { color: var(--text-2); }
.k-about-steps { max-width: 46rem; margin-bottom: 2.5rem; }
.k-about-steps ol { list-style: none; counter-reset: step; display: grid; gap: .9rem; margin-top: 1rem; }
.k-about-steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; align-items: start; }
.k-about-steps li::before { content: counter(step); display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 6px; transform: rotate(-4deg); border: 1.5px solid rgba(229, 83, 58, .7); color: var(--shu-text); font: 700 1rem/1 var(--font-display); }
.k-about-steps li p { color: var(--text-2); }
.k-about-steps li strong { color: var(--text); display: block; }
.k-about-note { color: var(--text-3); font-size: .9rem; max-width: 46rem; margin-bottom: 2rem; }

/* ----------------------------------------------------------------- 404 --- */
.k-notfound { display: grid; gap: 2rem; align-items: center; padding: clamp(2rem, 6vw, 5rem) 0; }
.k-notfound-code { font: 700 clamp(4rem, 3rem + 6vw, 8rem)/1 var(--font-display); color: transparent; -webkit-text-stroke: 1.5px var(--shu); letter-spacing: .04em; }
.k-notfound h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); margin-top: .5rem; }
.k-notfound p { color: var(--text-2); margin-top: .5rem; max-width: 34rem; }
.k-notfound-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.k-notfound .k-search-big { margin-top: 1.5rem; max-width: 34rem; }
.k-notfound-art { display: none; }
@media (min-width: 900px) {
  .k-notfound { grid-template-columns: 1fr 1fr; }
  .k-notfound-art { display: block; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; position: relative; }
  .k-notfound-art img { width: 100%; height: 100%; object-fit: cover; object-position: 66% 50%; }
  .k-notfound-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink-0), transparent 40%), linear-gradient(0deg, var(--ink-0), transparent 30%); }
}

/* -------------------------------------------------------------- footer --- */
.k-footer { margin-top: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--ink-1), var(--ink-0)); }
.k-footer-inner { display: grid; gap: 2rem; padding: 2.5rem 0 1.5rem; grid-template-columns: 1fr 1fr; }
.k-footer-brand { grid-column: 1 / -1; }
.k-footer-brand a { display: inline-flex; text-decoration: none; }
.k-footer-brand p { margin-top: .75rem; color: var(--text-3); max-width: 26rem; font-size: .92rem; }
.k-footer-nav { display: grid; gap: .15rem; align-content: start; }
.k-footer-nav h2 { font: 600 .9rem var(--font-body); color: var(--text-3); margin-bottom: .35rem; }
.k-footer-nav a { color: var(--text-2); text-decoration: none; padding: .35rem 0; }
.k-footer-nav a:hover { color: var(--text); text-decoration: underline; }
.k-footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0 1.5rem; border-top: 1px solid var(--line); color: var(--text-3); font-size: .85rem; }
.k-footer-bottom a { color: var(--text-2); }
@media (min-width: 768px) { .k-footer-inner { grid-template-columns: 2fr 1fr 1fr; } .k-footer-brand { grid-column: auto; } }

/* --------------------------------------------------------- mobile nav --- */
.kt-mobile-nav-space { display: none; }
.kt-mobile-nav { display: none; }
@media (max-width: 899px) {
  .kt-mobile-nav-space { display: block; height: calc(4.25rem + env(safe-area-inset-bottom)); }
  .kt-mobile-nav {
    position: fixed; inset: auto 0 0 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom)); background: rgba(10, 12, 20, .94);
    border-top: 1px solid var(--line-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    transition: transform .22s var(--ease);
  }
  .kt-mobile-nav a { position: relative; display: grid; justify-items: center; gap: .1rem; min-height: 3.4rem; padding: .35rem .15rem .25rem; border-radius: 12px; color: var(--text-3); text-decoration: none; font-size: .72rem; line-height: 1.45; }
  .kt-mobile-nav a span { white-space: nowrap; }
  .kt-mobile-nav a[aria-current="page"] { color: var(--text); }
  .kt-mobile-nav a[aria-current="page"] .yd-icon { color: var(--shu-text); }
  .kt-mobile-nav a[aria-current="page"]::before { content: ''; position: absolute; top: -.32rem; left: 30%; right: 30%; height: 2px; border-radius: 2px; background: var(--shu); }
  .yd-reader-active .kt-mobile-nav { transform: translateY(110%); }
}

/* --------------------------------------------------------------- toast --- */
.yd-toast { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom)); z-index: 90; transform: translateX(-50%); max-width: calc(100vw - 2rem); padding: .7rem 1.2rem; border-radius: var(--radius-pill); background: var(--text); color: var(--ink-0); font-weight: 600; box-shadow: var(--shadow-lift); animation: k-toast .2s var(--ease); }
@media (max-width: 899px) { .yd-toast { bottom: calc(5.25rem + env(safe-area-inset-bottom)); } }
@keyframes k-toast { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------------------------------------------------------- motion/a11y --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .k-card-link:hover .k-cover { transform: none; }
}
@media (forced-colors: active) {
  .k-chip[aria-pressed="true"], .k-seg > [aria-pressed="true"] { outline: 2px solid CanvasText; }
}
@media print { .k-header, .kt-mobile-nav, .k-footer, .yd-save { display: none !important; } body { background: #fff; color: #000; } }
