:root {
  --bg: #fffff0;          /* ivory */
  --bg-soft: #f7f3e3;
  --card: #fffcf2;
  --text: #2a2420;
  --muted: #6e645c;
  --accent: #c45c7a;
  --accent2: #8b6bb5;
  --border: #e5dcc8;
  --shadow: 0 8px 28px rgba(60, 45, 30, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  background:
    radial-gradient(900px 420px at 0% -10%, #ffe8ef 0%, transparent 55%),
    radial-gradient(800px 400px at 100% 0%, #f3e9ff 0%, transparent 50%),
    var(--bg);
}
a { color: var(--accent); }
.wrap { width: min(900px, 92vw); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 240, 0.86);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between; padding: 1rem 0;
}
.logo {
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem;
}
.logo span { color: var(--accent); }
.badge-18 {
  font-size: .75rem; border: 1px solid var(--accent); color: var(--accent);
  border-radius: 999px; padding: .2rem .55rem; background: #fff;
}
.hero { padding: 2.4rem 0 1rem; }
.hero h1 {
  margin: 0 0 .5rem; font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.2; color: var(--text);
}
.hero p { margin: 0; color: var(--muted); max-width: 34rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0; }
.chip {
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  border-radius: 999px; padding: .4rem .85rem; cursor: pointer; font: inherit;
}
.chip.active, .chip:hover {
  border-color: var(--accent); color: var(--accent); background: #fff5f8;
}
.grid { display: grid; gap: 1rem; padding-bottom: 3rem; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow);
}
.card:hover { border-color: #d9b8c4; }
.card h2 { margin: 0 0 .35rem; font-size: 1.2rem; }
.card h2 a { color: var(--text); text-decoration: none; }
.card h2 a:hover { color: var(--accent); }
.meta { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin: .55rem 0; }
.tag {
  font-size: .75rem; color: var(--accent2); background: rgba(139, 107, 181, 0.12);
  border-radius: 999px; padding: .18rem .5rem;
}
.time, .excerpt { color: var(--muted); }
.excerpt { margin: 0; }
.site-footer {
  border-top: 1px solid var(--border); color: var(--muted);
  padding: 2rem 0 3rem; font-size: .9rem;
}
.story-page { padding: 2rem 0 4rem; }
.story-page h1 {
  margin: .4rem 0 .2rem; font-size: clamp(1.6rem, 3.5vw, 2.2rem); color: var(--text);
}
.back { color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: .6rem; }
.back:hover { color: var(--accent); }
.story-body {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem; line-height: 1.85; color: #3a322c; max-width: 40rem;
}
.story-body p { margin: 0 0 1.1rem; }
#age-gate {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(255, 255, 240, 0.92); padding: 1.25rem;
}
#age-gate.hidden { display: none; }
.gate-box {
  width: min(420px, 100%); background: #fff; border: 1px solid var(--border);
  border-radius: 20px; padding: 1.6rem; text-align: center; box-shadow: var(--shadow);
}
.gate-box h2 { margin-top: 0; color: var(--text); }
.gate-box p { color: var(--muted); }
.gate-actions {
  display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; margin-top: 1.1rem;
}
.btn { border: 0; border-radius: 999px; padding: .7rem 1.2rem; font: inherit; cursor: pointer; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #a84adf); color: #fff;
}
.btn-ghost {
  background: #fff; border: 1px solid var(--border); color: var(--muted);
}

/* Layout with sidebar */
.page { min-height: 100vh; }
.menu-toggle {
  display: none; border: 1px solid var(--border); background: #fff; border-radius: 10px;
  width: 40px; height: 40px; font-size: 1.2rem; cursor: pointer; color: var(--text);
}
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 240px; z-index: 30;
  background: #fffcf2; border-right: 1px solid var(--border);
  padding: 1.2rem 0.9rem; overflow-y: auto;
}
.sidebar-head {
  font-weight: 700; font-size: .95rem; margin: 0.4rem 0.5rem 1rem; color: var(--text);
}
.sidebar-nav { display: flex; flex-direction: column; gap: .35rem; }
.nav-cat {
  text-align: left; border: 0; background: transparent; color: var(--muted);
  padding: .7rem .85rem; border-radius: 12px; cursor: pointer; font: inherit;
}
.nav-cat:hover, .nav-cat.active {
  background: #fff5f8; color: var(--accent); font-weight: 600;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(40,30,20,.35); z-index: 25;
}
.sidebar-overlay.open { display: block; }
.page { margin-left: 240px; }
.card-top { margin-bottom: .35rem; }
.cat-pill {
  display: inline-block; font-size: .72rem; color: var(--accent);
  background: #fff0f5; border: 1px solid #f0d0dc; border-radius: 999px; padding: .15rem .55rem;
}
.stat { font-size: .85rem; color: var(--muted); }
.stat b { color: var(--text); font-weight: 600; }
.story-actions {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: center;
  margin: 1rem 0 1.4rem; padding: .85rem 1rem; background: #fff; border: 1px solid var(--border);
  border-radius: 14px;
}
.like-btn {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  border-radius: 999px; padding: .45rem .9rem; cursor: pointer; font: inherit;
}
.like-btn.liked { border-color: var(--accent); color: var(--accent); background: #fff5f8; }
@media (max-width: 860px) {
  .page { margin-left: 0; }
  .sidebar {
    transform: translateX(-105%); transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-header .inner { gap: .7rem; }
}
body.has-sidebar { margin-left: 240px; }
body.has-sidebar .sidebar a.nav-cat { display: block; text-decoration: none; }
@media (max-width: 860px) {
  body.has-sidebar { margin-left: 0; }
}
