:root {
  --bg: #141210;
  --paper: #1e1b18;
  --ink: #f6f1ea;
  --muted: #b3a89e;
  --line: #3a342e;
  --accent: #e15b4c;
  --accent-ink: #fff8f4;
  --chip: #2a2622;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --sans: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 420px at 10% -10%, rgba(225, 91, 76, 0.16), transparent 55%),
    var(--bg);
  font-family: var(--sans);
  line-height: 1.55;
}
img { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 1.35rem; margin: 0 0 0.4rem; }
h2 { font-size: 1.35rem; margin: 0; }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.narrow { padding: 0 0 72px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(20, 18, 16, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner { display: flex; align-items: center; gap: 22px; min-height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.logo-mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); border-radius: 8px; font-size: 0.95rem;
}
.logo-image { height: 36px; width: auto; max-width: 148px; object-fit: contain; display: block; }
.nav { display: flex; align-items: center; gap: 16px; }
.nav > a, .nav-drop > a, .nav-drop > span { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav > a:hover, .nav-drop > a:hover { color: var(--ink); }
.nav-drop { position: relative; }
.nav-menu {
  display: none; position: absolute; top: 100%; left: -16px; min-width: 240px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; box-shadow: var(--shadow);
}
.nav-drop:hover .nav-menu, .nav-drop:focus-within .nav-menu { display: block; }
.main-menu > .wrap,
.main-menu .area-menu,
.main-menu .widget,
.main-menu .nav { align-items: stretch; }
.main-menu .widget { display: flex; }
.main-menu .nav-drop { display: flex; align-items: center; }
.main-menu .nav > a,
.main-menu .nav-drop > a { display: flex; align-items: center; }
.main-menu .nav-mega { position: static; }
.main-menu .nav-mega .nav-menu {
  box-sizing: border-box;
  left: 50%;
  right: auto;
  width: min(1120px, calc(100% - 32px));
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  top: calc(100% - 1px);
  border-radius: 0 0 14px 14px;
  padding: 16px 22px 18px;
}
.nav-mega .cat-tree { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
.nav-mega-3 .cat-tree { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cat-tree, .cat-tree ul { list-style: none; margin: 0; padding: 0; }
.cat-tree ul { margin-left: 12px; }
.cat-tree a { display: block; padding: 4px 0; text-decoration: none; }
.cat-tree a:hover { color: var(--accent); }
.search { margin-left: auto; display: flex; background: var(--chip); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.header-account { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header-inner > .search { margin-left: 0; }
.account-link { text-decoration: none; font-weight: 650; white-space: nowrap; }
.account-link:hover { color: var(--accent); }
.search input { border: 0; padding: 8px 14px; width: 210px; background: transparent; outline: none; }
.search button { border: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; cursor: pointer; }

.hero { padding: 0 0 10px; }
.hero-copy p { color: var(--muted); }
.hero-links { display: flex; gap: 10px; }
.kicker { color: var(--accent); font-weight: 650; margin: 0 0 8px; }
.btn, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; border-radius: 999px; padding: 10px 16px; border: 1px solid var(--accent);
}
.btn { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--accent); }

.block { padding: 18px 0 8px; }
.block-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 14px; }
.block-head p, .block-head a { color: var(--muted); margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.card { text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.card-cover { position: relative; display: block; border-radius: 12px; overflow: hidden; background: var(--chip); }
.card-cover img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.badge {
  position: absolute; left: 8px; top: 8px; background: rgba(31, 26, 23, 0.88); color: #fff;
  font-size: 0.72rem; padding: 3px 7px; border-radius: 999px;
}
.badge-genre {
  top: auto; bottom: 8px; max-width: calc(100% - 16px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: rgba(225, 91, 76, 0.92);
}
.card-body { display: flex; flex-direction: column; gap: 2px; min-height: 3.2em; }
.card-body strong {
  font-size: 0.98rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.card-body em { color: var(--muted); font-style: normal; font-size: 0.82rem; }
.card:hover strong { color: var(--accent); }

.page-intro { padding: 12px 0 8px; }
.page-intro p { color: var(--muted); max-width: none; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 0.92rem; }
.crumbs a { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a, .chips span, .filter select, .filter input, .reader-nav select {
  background: var(--chip); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; text-decoration: none;
}
.muted-chips a { background: transparent; }
.filter { display: flex; gap: 8px; margin-top: 12px; width: 100%; }
.filter input { flex: 1 1 auto; width: 100%; min-width: 0; border-radius: 999px; }
.filter select { flex: 0 1 190px; min-width: 0; }
.filter .btn { flex: 0 0 auto; }
.empty { color: var(--muted); padding: 12px 0 24px; }
.notice { border-radius: 10px; padding: 10px 12px; }
.notice.ok { background: #16352a; color: #b7ebc9; }
.notice.bad { background: #3a1c1c; color: #ffc9c9; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; padding: 18px 0 28px; }
.pager a, .pager span { min-width: 36px; text-align: center; text-decoration: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--paper); }
.pager span { background: var(--accent); color: var(--accent-ink); }

.story-layout { padding: 0 0 40px; }
.story-hero {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 14px 18px;
  align-items: start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.story-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.story-cover { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; background: var(--chip); }
.story-info { min-width: 0; align-self: start; display: flex; flex-direction: column; gap: 10px; }
.story-heading h1 { display: inline; font-size: 1.2rem; margin: 0; }
.origin { margin-left: 0.4em; color: var(--muted); font-size: 0.95rem; }
.story-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.story-badges span {
  color: var(--accent); background: rgba(225, 91, 76, 0.14);
  font-size: 0.75rem; font-weight: 650; border-radius: 999px; padding: 3px 8px;
}
.story-genres { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; }
.story-genres-label { color: var(--ink); font-weight: 650; }
.story-genres a { color: var(--muted); text-decoration: none; }
.story-genres a:hover { color: var(--accent); }
.story-hero .story-actions { margin: 0; flex-direction: column; align-items: stretch; }
.story-hero .story-actions > .btn { width: 100%; }
.story-tools { display: flex; justify-content: center; align-items: center; gap: 8px; }
.story-tools form { margin: 0; display: flex; }
.story-hero .story-tools .btn {
  position: relative;
  width: 42px; height: 42px; padding: 0; border-radius: 50%;
  background: transparent; color: var(--ink); border-color: var(--line);
}
.story-hero .story-tools .btn::after {
  content: attr(aria-label);
  position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  padding: 4px 8px; border-radius: 6px; background: var(--ink); color: var(--paper);
  font-size: 0.75rem; font-weight: 650; line-height: 1.3; white-space: nowrap;
  pointer-events: none; opacity: 0; visibility: hidden; z-index: 5;
}
.story-hero .story-tools .btn:hover::after,
.story-hero .story-tools .btn:focus-visible::after { opacity: 1; visibility: visible; }
.story-tools svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.story-hero .story-tools .is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.story-hero .story-tools .is-on svg { fill: currentColor; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; margin: 0; }
.meta div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  min-width: 0; padding: 7px 0; border-top: 1px solid var(--line);
}
.meta div:nth-child(-n + 2) { border-top: 0; padding-top: 0; }
.meta div:last-child:nth-child(odd) { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 7px; }
.meta dt { margin: 0; color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.meta dd { margin: 0; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.meta dd a { text-decoration: none; }
.meta dd a:hover { color: var(--accent); }
.related-stories { padding-top: 8px; }
.related-stories .widget-stories { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.synopsis { color: var(--muted); font-size: 0.95rem; }
.synopsis p { margin: 0 0 0.7rem; }
.synopsis p:last-child { margin-bottom: 0; }
.chapter-panel { margin-top: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 8px 8px 4px; }
.chapter-list a {
  display: flex; justify-content: space-between; gap: 12px; padding: 12px 12px;
  text-decoration: none; border-top: 1px solid var(--line);
}
.chapter-list a:hover { background: rgba(255, 255, 255, 0.04); }
.chapter-list time, .chapter-list small { color: var(--muted); }

.reader { padding: 0 0 64px; min-width: 0; }
.reader h1 { overflow-wrap: anywhere; }
.reader-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin: 16px 0 22px; min-width: 0; }
.reader-nav a { text-decoration: none; color: var(--accent); font-weight: 600; }
.reader-nav a:last-child { text-align: right; }
.read-lock {
  margin: 18px auto; max-width: 520px; text-align: center;
  background: var(--paper); border: 1px dashed var(--line); border-radius: 16px; padding: 22px 16px;
}
.read-lock p { margin: 0 0 12px; color: var(--muted); }
.read-gate {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center;
  padding: 16px; background: rgba(31, 26, 23, 0.55);
}
.read-gate[hidden] { display: none; }
.read-gate-card {
  position: relative; width: min(420px, 100%); background: var(--paper); color: var(--ink);
  border-radius: 16px; padding: 22px 18px 18px; box-shadow: var(--shadow);
}
.read-gate-card h2 { font-size: 1.35rem; margin: 0 0 8px; }
.read-gate-card p { margin: 0 0 12px; }
.read-gate-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.read-gate-close {
  position: absolute; top: 8px; right: 8px; width: 36px; height: 36px;
  border: 0; border-radius: 999px; background: var(--chip); cursor: pointer; font-size: 1.3rem; line-height: 1;
}
.reader-comic .read-lock, .reader-comic .read-gate-card { background: #1b1b1b; color: #f3efe7; border-color: #333; }
.reader-comic .read-lock p, .reader-comic .read-gate-card p { color: #c8c2b8; }
.reader-comic .read-gate-close { background: #2a2a2a; color: #f3efe7; }
.reader-nav select { background: var(--paper); color: var(--ink); }
.prose { max-width: 68ch; margin: 0 auto; font-family: var(--serif); font-size: 1.12rem; line-height: 1.9; }
.prose p { margin: 0 0 1.1rem; }
.prose h2, .prose h3, .prose h4 { font-family: inherit; line-height: 1.3; margin: 1.2rem 0 0.45rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.prose blockquote { margin: 0 0 1rem; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.prose img { max-width: 100%; height: auto; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 8px; }
.prose.lead { max-width: none; margin: 8px 0 0; font-size: 1rem; line-height: 1.7; }
.home-seo { margin-top: 8px; }
.home-seo .widget { margin: 0 0 18px; }
.home-seo .widget h2 { font-size: 1.2rem; margin: 0 0 10px; }
.home-seo .prose,
.widget .prose {
  max-width: none;
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
}
.pages { max-width: 100%; }
.pages img { display: block; width: min(900px, 100%); max-width: 100%; height: auto; margin: 0 auto 8px; background: #111; }
.entry-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 12px; }
.entry-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.entry-card h2 { font-size: 1.25rem; margin: 0 0 6px; }
.entry-card h2 a { text-decoration: none; }
.entry-card h2 a:hover, .entry-meta a:hover { color: var(--accent); }
.entry-meta { color: var(--muted); font-size: 0.9rem; }
.entry-meta a { color: var(--accent); text-decoration: none; }
.article { padding-bottom: 48px; }
.article .prose { max-width: none; margin: 16px 0 0; }
.subpages { margin-top: 28px; }
.subpages a { display: block; padding: 10px 0; text-decoration: none; border-top: 1px solid var(--line); }
.subpages a:hover { color: var(--accent); }

.reader-comic,
.reader-novel { background: var(--bg); color: var(--ink); }

.topbar { position: relative; z-index: 30; background: #0e0c0b; color: var(--ink); }
.topbar a { color: #f6f1ea; text-decoration: none; }
.area-topbar { display: flex; gap: 18px; align-items: stretch; min-height: 38px; flex-wrap: wrap; }
.area-topbar .widget { display: flex; gap: 10px; align-items: stretch; margin: 0; }
.topbar .nav { align-items: stretch; }
.topbar .nav-drop { display: flex; align-items: center; }
.topbar .nav > a,
.topbar .nav-drop > a { display: flex; align-items: center; }
.topbar .nav-menu { top: calc(100% - 1px); }
.topbar .nav-mega { position: static; }
.topbar .nav-mega .nav-menu {
  box-sizing: border-box;
  left: 50%;
  right: auto;
  width: min(1120px, calc(100% - 32px));
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  border-radius: 0 0 14px 14px;
  padding: 16px 22px 18px;
}
.area-topbar h2 { margin: 0; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: #e7b3b3; }
.area-topbar .widget-links, .area-menu .widget-links, .area-header .widget-links { display: flex; gap: 12px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.area-topbar .widget-links li, .area-menu .widget-links li, .area-header .widget-links li { margin: 0; }
.header-slot { flex: 1; min-width: 0; }
.main-menu { border-bottom: 1px solid var(--line); background: rgba(20, 18, 16, 0.96); position: relative; z-index: 19; }
.main-menu > .wrap { min-height: 48px; display: flex; align-items: stretch; }
.area-menu { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; width: 100%; }
.area-menu .widget { margin: 0; }
.area-menu h2 { display: none; }
.shell { display: grid; gap: 22px; align-items: start; padding: 18px 0 8px; }
.shell.has-left.has-right { grid-template-columns: 280px minmax(0, 1fr) 280px; }
.shell.has-left:not(.has-right) { grid-template-columns: 280px minmax(0, 1fr); }
.shell.has-right:not(.has-left) { grid-template-columns: minmax(0, 1fr) 280px; }
.shell-main { min-width: 0; }
.shell-main .wrap { width: 100%; margin: 0; }
@media (min-width: 861px) {
  .sidebar {
    position: sticky;
    top: 88px;
    align-self: start;
    overflow: visible;
    z-index: 1;
  }
}
.sidebar .widget { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; }
.sidebar h2 { font-size: 1.08rem; margin: 0 0 10px; }
.sidebar .widget-stories a { grid-template-columns: 54px minmax(0, 1fr); gap: 10px; }
.sidebar .widget-stories img { width: 54px; height: 72px; border-radius: 8px; }
.sidebar .widget-stories strong { font-size: 0.98rem; }
.widget-stories, .widget-links { list-style: none; margin: 0; padding: 0; }
.widget-links li { margin: 0 0 8px; }
.widget-links a { text-decoration: none; }
.widget-links a:hover, .widget-stories a:hover { color: var(--accent); }
.widget-stories { display: flex; flex-direction: column; gap: 10px; }
.widget-stories a { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; text-decoration: none; align-items: center; }
.widget-stories img { width: 42px; height: 56px; object-fit: cover; border-radius: 6px; background: var(--chip); }
.widget-stories strong, .widget-links strong { display: block; font-size: 0.92rem; }
.widget-stories strong {
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.widget-stories small, .widget-links small { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 500; }
ul.widget-genres { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; list-style: none; margin: 0; padding: 0; width: 100%; }
.widget-genres li { display: block; min-width: 0; }
.widget-genres a { display: block; width: 100%; padding: 5px 0; text-decoration: none; font-size: 0.9rem; line-height: 1.35; overflow-wrap: anywhere; }
.widget-genres a:hover { color: var(--accent); }
.widget-pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.widget-pager a, .widget-pager span { min-width: 28px; text-align: center; text-decoration: none; border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; background: var(--chip); font-size: 0.82rem; }
.widget-pager span { background: var(--accent); color: var(--accent-ink); }
.site-footer .widget-area { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.site-footer .widget h2 { font-size: 1rem; margin: 0 0 8px; }
.story-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.like-form { margin: 0; }
.like-form button { cursor: pointer; }
.like-form .btn { background: transparent; color: var(--ink); border-color: var(--line); }
.like-form .is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.auth-card { width: min(460px, 100%); margin: 0 auto 48px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.auth-card h1 { font-size: 1.35rem; }
.auth-card h2 { font-size: 1.05rem; margin: 18px 0 8px; }
.auth-card .field { display: block; margin: 0 0 12px; }
.auth-card .field span { display: block; margin-bottom: 6px; font-weight: 650; }
.auth-card input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--chip); }
.auth-submit, .social-list .btn { width: 100%; margin-top: 4px; }
.social-list { display: grid; gap: 8px; margin: 8px 0 14px; }
.btn-google { background: #fff; color: #1f1a17; border-color: #fff; }
.btn-facebook { background: #1877f2; color: #fff; border-color: #1877f2; }
.auth-or { text-align: center; color: var(--muted); margin: 0 0 12px; }
.only-mobile, .menu-toggle, .mobile-drawer, .header-tools, .search-toggle { display: none; }
.search-toggle {
  width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  border-radius: 50%; cursor: pointer; align-items: center; justify-content: center;
}
.search-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-toggle {
  width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  border-radius: 10px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
}
.menu-toggle span { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 1px; }
.mobile-drawer { border-bottom: 1px solid var(--line); background: var(--paper); }
.mobile-nav ul { list-style: none; margin: 0; padding: 8px 16px 14px; }
.mobile-nav li { border-top: 1px solid var(--line); }
.mobile-nav a { display: inline-block; padding: 10px 0; text-decoration: none; font-weight: 600; }
.mobile-nav .has-children { display: flex; flex-wrap: wrap; align-items: center; }
.mobile-nav .has-children > a { flex: 1; }
.mobile-nav .has-children > ul { flex-basis: 100%; padding: 0 0 8px 12px; }
.sub-toggle { border: 1px solid var(--line); background: var(--chip); border-radius: 8px; padding: 4px 8px; cursor: pointer; }

.site-footer { border-top: 1px solid var(--line); margin-top: 20px; padding: 28px 0 18px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 18px; }
.site-footer strong { color: var(--ink); }
.site-footer ul { list-style: none; margin: 8px 0 0; padding: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; font-size: 0.9rem; }
.text-link { color: var(--accent); }
.bottom-nav { display: none; }
.bottom-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 861px) {
  .hide-desktop { display: none !important; }
}
@media (max-width: 860px) {
  .footer-grid { display: flex; flex-direction: column; align-items: stretch; }
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "logo tools";
    align-items: center;
    gap: 8px 10px;
    min-height: 0;
    padding: 10px 0;
  }
  .logo { grid-area: logo; min-width: 0; }
  .logo-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-account { display: none !important; }
  .header-tools { display: flex; grid-area: tools; align-items: center; gap: 8px; }
  .search-toggle { display: inline-flex; }
  body.search-open .search-toggle { background: var(--accent); color: #fff; border-color: var(--accent); }
  .header-inner > .search { display: none; grid-area: search; width: 100%; }
  body.search-open .header-inner { grid-template-areas: "logo tools" "search search"; }
  body.search-open .header-inner > .search { display: flex; }
  .menu-toggle { display: inline-flex; }
  .header-slot, body.m-drawer .main-menu { display: none !important; }
  .shell.has-left,
  .shell.has-right,
  .shell.has-left.has-right,
  .shell.has-left:not(.has-right),
  .shell.has-right:not(.has-left) { grid-template-columns: 1fr; }
  .only-mobile { display: block; }
  .only-desktop, .hide-mobile { display: none !important; }
  body.nav-open .mobile-drawer { display: block; }
  body.m-hide-topbar .topbar,
  body.m-hide-search .search,
  body.m-hide-search .search-toggle,
  body.m-hide-footer .footer-widgets,
  body.m-sidebars-hide .sidebar { display: none !important; }
  body.search-open.m-hide-search .header-inner { grid-template-areas: "logo tools"; }
  .search, .search input { width: 100%; }
  .filter { flex-direction: column; align-items: stretch; }
  .filter input, .filter select, .filter .btn { width: 100%; flex: 1 1 auto; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .card-body strong, .card-body em {
    display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
  }
  .card-body strong { -webkit-line-clamp: 2; font-size: 0.9rem; line-height: 1.3; }
  .card-body em { -webkit-line-clamp: 2; }
  .story-hero {
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-areas: none;
    gap: 12px;
    padding: 12px;
  }
  .story-cover, .story-info, .story-actions { grid-area: auto; }
  .story-hero .story-actions > .btn { padding: 8px 4px; font-size: 0.8rem; }
  .story-tools { gap: 6px; }
  .story-hero .story-tools .btn { width: 30px; height: 30px; }
  .story-tools svg { width: 16px; height: 16px; }
  .meta { grid-template-columns: 1fr; gap: 0; }
  .meta div:nth-child(2) { border-top: 1px solid var(--line); padding-top: 7px; }
  .synopsis { font-size: 0.9rem; }
  .related-stories .widget-stories { grid-template-columns: 1fr; }
  .reader-nav a, .reader-nav > span, .reader-nav.bottom { display: none; }
  .reader-nav { grid-template-columns: 1fr; }
  .reader-nav form, .reader-nav select { width: 100%; max-width: 100%; min-width: 0; }
  body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 32;
    min-height: 64px; padding: 8px 2px calc(8px + env(safe-area-inset-bottom));
    background: rgba(20, 18, 16, 0.9); border-top: 1px solid var(--line);
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
  }
  .bottom-nav a, .bottom-nav > span {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    gap: 3px; min-width: 0; min-height: 48px; padding: 0 2px 2px;
    color: var(--muted); font-size: 10px; font-weight: 650; line-height: 1.15; text-align: center; text-decoration: none;
  }
  .bottom-nav a span:last-child, .bottom-nav > span span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottom-nav a.is-active { color: var(--accent); }
  .bottom-nav .is-off { color: var(--muted); opacity: 0.55; }
  .bottom-nav-bubble {
    position: absolute; left: 50%; top: -22px; transform: translateX(-50%);
    display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
    background: var(--accent); color: #fff; border: 4px solid var(--bg);
    box-shadow: 0 8px 18px rgba(225, 91, 76, 0.38);
  }
  .bottom-nav-home { color: var(--muted); }
  .bottom-nav-home.is-active { color: var(--accent); }
  .bottom-nav a.bottom-nav-next { color: #d6ef3a; }
  .bottom-nav a.bottom-nav-next svg { stroke-width: 2.4; }
  #muc-luc { scroll-margin-top: 12px; }
}
