:root {
  --ink: #14241c;
  --muted: #5f7268;
  --accent: #1f6f5b;
  --accent-soft: #e4f2ec;
  --warm: #b85a2f;
  --card: #fffdf8;
  --line: #d7e1d9;
  --bg: #eef3ef;
  --sidebar: #f7faf7;
  --danger: #9f2d2d;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(20, 36, 28, 0.06);
  --font: "Manrope", sans-serif;
  --display: "Fraunces", serif;
  --sidebar-w: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, #fff5e4 0%, transparent 34%),
    radial-gradient(circle at 100% 0%, #dff1e8 0%, transparent 36%),
    var(--bg);
}
a { color: inherit; }
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.1rem 0.85rem;
  background: rgba(247, 250, 247, 0.92);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.brand-mark {
  font-family: var(--display);
  font-size: 1.35rem;
  padding: 0.35rem 0.7rem 1rem;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.side-link:hover { background: rgba(31, 111, 91, 0.08); }
.side-link.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.side-meta {
  margin-top: auto;
  padding: 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.content {
  min-width: 0;
  padding: 1.35rem 1.4rem 3rem;
}
.content-inner { max-width: 760px; margin: 0 auto; }
.eyebrow {
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--warm);
  font-size: .72rem;
  margin: 0;
}
h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0.25rem 0 0.45rem;
  line-height: 1.08;
}
.muted { color: var(--muted); }
.card {
  background: rgba(255, 253, 248, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow);
}
.stack { display: grid; gap: 0.85rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; }
button, a.btn {
  font: inherit;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.ghost, a.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
}
button.danger { background: var(--danger); }
.badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warm);
}
.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.list-clean li:last-child { border-bottom: 0; }
.exercise {
  display: grid;
  gap: 0.45rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.exercise:last-child { border-bottom: 0; }
.exercise input {
  width: 100%;
  max-width: 280px;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}
.ok { color: var(--accent); font-weight: 700; }
.bad { color: var(--danger); font-weight: 700; }
.mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 15;
  gap: 0.4rem;
  padding: 0.65rem 0.8rem;
  background: rgba(247,250,247,0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.mobile-bar button {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    z-index: 30;
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-bar { display: flex; }
  .backdrop {
    position: fixed; inset: 0; background: rgba(20,36,28,0.35); z-index: 25;
  }
  .backdrop[hidden] { display: none; }
  .content { padding: 1rem 0.9rem 2.5rem; }
}
.guide-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.guide-card {
  display: block;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,253,248,0.86);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}
.guide-card:hover { border-color: var(--accent); }
.guide-card strong { display: block; font-size: 1.08rem; margin: 0.2rem 0; }
.guide-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.guide-article .lede {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 1.2rem;
}
.prose { font-size: 1.02rem; line-height: 1.65; }
.prose h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin: 1.6rem 0 0.55rem;
}
.prose p { margin: 0.7rem 0; }
.prose ul, .prose ol { margin: 0.55rem 0; padding-left: 1.2rem; }
.prose li { margin: 0.25rem 0; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.9rem 0;
  font-size: 0.95rem;
}
.prose th, .prose td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.55rem;
  text-align: left;
}
.prose th { background: var(--accent-soft); }
.prose em { font-style: italic; }
.prose strong { font-weight: 700; }
.guide-article a { color: var(--accent); }
.spoiler-block {
  margin-top: 1.6rem;
  padding: 1rem 1.05rem;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(255,253,248,0.7);
}
.word-reveal { margin-top: 0.85rem; }
.spoiler-words {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.spoiler-words li {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: var(--accent-soft);
}
.spoiler-words strong { font-size: 1.05rem; }
.spoiler-words span { color: var(--muted); font-size: 0.92rem; }
.story-post .prose blockquote {
  margin: 0.9rem 0;
  padding: 0.55rem 0.9rem;
  border-left: 3px solid var(--accent);
  background: rgba(31,111,91,0.06);
  border-radius: 0 12px 12px 0;
}
.story-compose { margin-top: 1.2rem; }
.field { display: grid; gap: 0.3rem; font-size: 0.9rem; color: var(--muted); }
.field input, .field textarea {
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 8rem; }
.check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--ink);
}
.check input { margin-top: 0.2rem; }
.gloss-hint { min-height: 1.1em; font-size: 0.78rem; color: var(--muted); }
.gloss-hint.ok { color: var(--accent); }
.gloss-hint.bad { color: var(--danger); }
.progress-card {
  margin: 0.9rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,253,248,0.86);
}
.progress-card .row { justify-content: space-between; }
.progress-stat strong { font-size: 1.15rem; display: block; }
.progress-stat span { color: var(--muted); font-size: 0.82rem; }
