/* Level overview pages (n5–n1) — watercolor "calm path" design.
   Mirrors the landing/dashboard aesthetic. All classes are lv- prefixed and
   loaded AFTER styles.css. Like the landing page, .lv FORCES a light washi
   palette so the watercolor art always sits on cream, regardless of the global
   dark toggle. */

.lv {
  --bg: #fbf8f2;
  --ink: #1c1c1c;
  --ink-soft: #4a4339;
  --ink-mute: #8a8275;
  --line: #e9e0d1;
  --line-soft: #f1eadd;
  --vermilion: #b8362e;
  --vermilion-soft: #f7e7e3;
  --surface: #ffffff;
  --font-serif: "Noto Serif JP", Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: clip;
}
.lv * { box-sizing: border-box; }
.lv a { color: inherit; text-decoration: none; }
.lv-wrap { max-width: 1480px; margin: 0 auto; padding: 0 40px; }

/* ── Header ─────────────────────────────────────────────── */
.lv-top { position: relative; z-index: 4; padding: 26px 0 8px; }
.lv-top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lv-logo { display: inline-flex; align-items: center; gap: 14px; }
.lv-hanko {
  width: 46px; height: 46px; border-radius: 11px; background: var(--vermilion);
  color: #fff; display: grid; place-items: center; font-family: var(--font-serif);
  font-weight: 700; font-size: 26px; line-height: 1; box-shadow: 0 4px 12px rgba(184,54,46,.22);
}
.lv-logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.lv-logo-name { font-family: var(--font-serif); font-weight: 700; font-size: 22px; letter-spacing: .01em; }
.lv-logo-sub { font-size: 12.5px; color: var(--ink-mute); margin-top: 2px; }
.lv-back {
  display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500;
  color: var(--ink-soft); padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.6); transition: border-color .15s, color .15s;
}
.lv-back:hover { border-color: var(--vermilion); color: var(--vermilion); }

/* ── Hero ───────────────────────────────────────────────── */
.lv-hero { position: relative; z-index: 1; }
.lv-hero-grid {
  display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 16px; align-items: center;
  min-height: 360px;
}
.lv-hero-text { padding: 18px 0 6px; }
.lv-pill {
  display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
  color: var(--vermilion); border: 1px solid #e7c9c4; background: rgba(255,255,255,.55);
  padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
}
.lv-h1 { font-family: var(--font-serif); font-weight: 700; font-size: 64px; line-height: 1.04; margin: 0 0 18px; letter-spacing: -.01em; }
.lv-h1 .accent { color: var(--vermilion); }
.lv-lead { font-size: 18px; line-height: 1.6; color: var(--ink-soft); max-width: 30em; margin: 0; }
.lv-hero-art { position: relative; }
.lv-hero-art img {
  display: block; width: 100%; max-width: 900px; height: auto; margin: 0 -14px 0 auto;
  pointer-events: none; -webkit-user-select: none; user-select: none;
}

/* ── Path tracker (injected by level-path-v2.js) ───────────── */
.level-path-section { position: relative; z-index: 2; margin: 8px 0 4px; }
.lv-path {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 14px 24px 14px; box-shadow: 0 10px 30px rgba(60,50,35,.05);
}
.lv-path-top { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.lv-path-label { font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.lv-path-label b { color: var(--vermilion); font-weight: 700; }
.lv-path-track { flex: 1; min-width: 120px; height: 6px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.lv-path-fill { height: 100%; background: linear-gradient(90deg, #cf6f5f, var(--vermilion)); border-radius: 999px; transition: width .4s ease; }
.lv-continue {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
  color: var(--vermilion); background: var(--vermilion-soft); padding: 6px 14px; border-radius: 999px;
}
.lv-continue.is-done { color: #5a7d4f; background: #eaf1e4; }

.lv-steps { display: flex; align-items: flex-start; gap: 2px; overflow-x: auto; padding: 2px 2px 0; scrollbar-width: thin; }
.lv-step {
  display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center;
  flex: 1 1 0; min-width: 68px; padding: 3px 2px; border-radius: 12px; transition: background .15s;
}
.lv-step:hover { background: var(--line-soft); }
.lv-step-circle { width: 44px; height: 44px; object-fit: contain; display: block; filter: drop-shadow(0 2px 4px rgba(60,50,35,.08)); }
.lv-step-doc { width: 44px; height: 44px; border-radius: 50%; box-sizing: border-box; display: grid; place-items: center;
  background: radial-gradient(circle at 46% 40%, #f5eddc, #e3d4b6 80%); box-shadow: inset 0 0 0 1px rgba(165,142,100,.2);
  filter: drop-shadow(0 2px 4px rgba(60,50,35,.08)); }
.lv-step-doc svg { width: 23px; height: 23px; color: var(--vermilion); }
.lv-step-name { font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.lv-step-count { font-size: 11px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.lv-step.is-done .lv-step-name { color: #5a7d4f; }
.lv-step.is-unavailable { opacity: .5; pointer-events: none; }
.lv-step-check { position: absolute; }
.lv-arrow { flex: 0 0 auto; align-self: center; color: var(--ink-mute); opacity: .5; font-size: 15px; margin-top: 18px; }
.lv-mocks-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.lv-mocks {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(250,246,238,.6);
  transition: border-color .15s, transform .15s;
}
.lv-mocks:hover { border-color: var(--vermilion); transform: translateY(-1px); }
.lv-mocks-ico { width: 26px; height: 26px; color: var(--vermilion); flex: 0 0 auto; }
.lv-mocks-name { font-size: 14px; font-weight: 600; }
.lv-mocks-count { font-size: 13px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* ── Categories ─────────────────────────────────────────── */
.lv-section { position: relative; z-index: 1; padding: 16px 0 28px; }
.lv-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.lv-head h2 { font-family: var(--font-serif); font-weight: 700; font-size: 34px; margin: 0; }
.lv-head .jp { font-size: 16px; color: var(--ink-mute); letter-spacing: .04em; }

.lv-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lv-cat {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 12px 20px 12px; min-height: 104px; display: flex; flex-direction: column;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.lv-cat:not(.is-soon):hover { border-color: #e7c9c4; transform: translateY(-3px); box-shadow: 0 14px 30px rgba(60,50,35,.08); }
.lv-cat.is-soon { cursor: default; }
.lv-cat-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; position: relative; z-index: 1; }
.lv-cat-circle { width: 66px; height: 66px; object-fit: contain; flex: 0 0 auto; filter: drop-shadow(0 3px 6px rgba(60,50,35,.1)); }
.lv-cat-titles { display: flex; flex-direction: column; }
.lv-cat-jp { font-size: 15px; color: var(--ink-mute); font-weight: 500; line-height: 1.2; }
.lv-cat-en { font-family: var(--font-serif); font-weight: 700; font-size: 23px; margin: 1px 0 0; line-height: 1.15; }
.lv-cat-desc { font-size: 14px; line-height: 1.48; color: var(--ink-soft); margin: 0 0 8px; position: relative; z-index: 1; max-width: 30em; }
.lv-cat-badge {
  align-self: flex-start; margin-top: auto; font-size: 12.5px; font-weight: 600; padding: 6px 13px;
  border-radius: 999px; position: relative; z-index: 1;
}
.lv-cat-badge.is-available { color: var(--vermilion); background: var(--vermilion-soft); }
.lv-cat-badge.is-soon { color: #998f7c; background: #f0ebe0; }
.lv-cat-dec { position: absolute; bottom: -6px; right: -4px; width: 130px; height: auto; opacity: .92; z-index: 0; pointer-events: none; }
.lv-cat-dec--vocab   { width: 74px;  right: 8px;   bottom: 0; }
.lv-cat-dec--kanji   { width: 104px; right: -10px; bottom: -10px; }
.lv-cat-dec--grammar { width: 122px; right: -4px;  bottom: -4px; }
.lv-cat-dec--stories { width: 108px; right: 4px;   bottom: 2px; }
.lv-cat-dec--kaiwa   { width: 68px;  right: 16px;  bottom: 4px; }
.lv-cat-dec--papers  { width: 102px; right: 6px;   bottom: 2px; }

/* ── Footer ─────────────────────────────────────────────── */
.lv-foot { border-top: 1px solid var(--line); margin-top: 10px; }
.lv-foot-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0 22px; flex-wrap: wrap; }
.lv-foot-brand { display: inline-flex; align-items: center; gap: 11px; font-size: 14px; color: var(--ink-soft); }
.lv-foot-stamp { width: 34px; height: 34px; border-radius: 9px; background: var(--vermilion); color: #fff; display: grid; place-items: center; font-family: var(--font-serif); font-weight: 700; font-size: 15px; }
.lv-foot-note { font-size: 13px; color: var(--ink-mute); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1080px) {
  .lv-wrap { padding: 0 26px; }
  .lv-h1 { font-size: 52px; }
  .lv-hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .lv-hero-art { order: -1; max-width: 560px; margin: 0 auto; }
  .lv-hero-art img { margin: 0 auto; max-width: 100%; }
  .lv-cats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .lv-wrap { padding: 0 18px; }
  .lv-top { padding: 18px 0 6px; }
  .lv-logo-name { font-size: 19px; }
  .lv-logo-sub { font-size: 11.5px; }
  .lv-back { display: none; }
  .lv-h1 { font-size: 42px; }
  .lv-lead { font-size: 16px; }
  .lv-path { padding: 18px 16px 20px; border-radius: 18px; }
  .lv-cats { grid-template-columns: 1fr; }
}

/* ── N4 green theme — level accent only; the 日 hanko stays red ──── */
.lv-n4 .lv-pill { color: #5c7a3d; border-color: #cedabb; }
.lv-n4 .lv-h1 .accent { color: #5c7a3d; }
.lv-n4 .lv-path-label b { color: #5c7a3d; }
.lv-n4 .lv-path-fill { background: linear-gradient(90deg, #9cb37b, #5c7a3d); }
.lv-n4 .lv-continue { color: #5c7a3d; background: #eaf0e0; }
.lv-n4 .lv-cat-badge.is-available { color: #5c7a3d; background: #eaf0e0; }
.lv-n4 .lv-cat:not(.is-soon):hover { border-color: #cedabb; }
.lv-n4 .lv-back:hover { border-color: #5c7a3d; color: #5c7a3d; }
/* N4 card decorations (own shapes/sizes) */
.lv-n4 .lv-cat-dec--vocab   { width: 72px;  right: 10px; bottom: 0; }
.lv-n4 .lv-cat-dec--kanji   { width: 64px;  right: 10px; bottom: 0; }
.lv-n4 .lv-cat-dec--grammar { width: 98px;  right: 6px;  bottom: 2px; }
.lv-n4 .lv-cat-dec--stories { width: 108px; right: 4px;  bottom: 2px; }
.lv-n4 .lv-cat-dec--kaiwa   { width: 94px;  right: 6px;  bottom: 2px; }
.lv-n4 .lv-cat-dec--papers  { width: 102px; right: 6px;  bottom: 2px; }

/* ── N3 wisteria-purple theme — hanko stays red ─────────── */
.lv-n3 .lv-pill { color: #6f5e9c; border-color: #d5cce4; }
.lv-n3 .lv-h1 .accent { color: #6f5e9c; }
.lv-n3 .lv-path-label b { color: #6f5e9c; }
.lv-n3 .lv-path-fill { background: linear-gradient(90deg, #a99cc6, #6f5e9c); }
.lv-n3 .lv-continue { color: #6f5e9c; background: #ebe5f3; }
.lv-n3 .lv-cat-badge.is-available { color: #6f5e9c; background: #ebe5f3; }
.lv-n3 .lv-cat:not(.is-soon):hover { border-color: #d5cce4; }
.lv-n3 .lv-back:hover { border-color: #6f5e9c; color: #6f5e9c; }
.lv-n3 .lv-cat-dec--vocab   { width: 104px; right: 4px;  bottom: 0; }
.lv-n3 .lv-cat-dec--kanji   { width: 102px; right: 6px;  bottom: 2px; }
.lv-n3 .lv-cat-dec--grammar { width: 98px;  right: 6px;  bottom: 2px; }
.lv-n3 .lv-cat-dec--stories { width: 108px; right: 4px;  bottom: 2px; }
.lv-n3 .lv-cat-dec--kaiwa   { width: 68px;  right: 16px; bottom: 4px; }
.lv-n3 .lv-cat-dec--papers  { width: 102px; right: 6px;  bottom: 2px; }

/* ── N2 indigo-blue theme — hanko stays red ─────────────── */
.lv-n2 .lv-pill { color: #3f6097; border-color: #ccd9ec; }
.lv-n2 .lv-h1 .accent { color: #3f6097; }
.lv-n2 .lv-path-label b { color: #3f6097; }
.lv-n2 .lv-path-fill { background: linear-gradient(90deg, #8fa6cb, #3f6097); }
.lv-n2 .lv-continue { color: #3f6097; background: #e8eef6; }
.lv-n2 .lv-cat-badge.is-available { color: #3f6097; background: #e8eef6; }
.lv-n2 .lv-cat:not(.is-soon):hover { border-color: #ccd9ec; }
.lv-n2 .lv-back:hover { border-color: #3f6097; color: #3f6097; }
/* N2 card decorations (own shapes/sizes) */
.lv-n2 .lv-cat-dec--vocab   { width: 100px; right: 6px;  bottom: 0; }
.lv-n2 .lv-cat-dec--kanji   { width: 104px; right: 4px;  bottom: 2px; }
.lv-n2 .lv-cat-dec--grammar { width: 90px;  right: 8px;  bottom: 2px; }
.lv-n2 .lv-cat-dec--stories { width: 112px; right: 2px;  bottom: 0; }
.lv-n2 .lv-cat-dec--kaiwa   { width: 96px;  right: 8px;  bottom: 2px; }
.lv-n2 .lv-cat-dec--papers  { width: 108px; right: 2px;  bottom: 0; }

/* ── N1 warm-amber theme (follows the autumn-street hero) — hanko stays red ── */
.lv-n1 .lv-pill { color: #b5742d; border-color: #e8d6b0; }
.lv-n1 .lv-h1 .accent { color: #b5742d; }
.lv-n1 .lv-path-label b { color: #b5742d; }
.lv-n1 .lv-path-fill { background: linear-gradient(90deg, #d8b06f, #b5742d); }
.lv-n1 .lv-continue { color: #9a6326; background: #f3e8d0; }
.lv-n1 .lv-cat-badge.is-available { color: #9a6326; background: #f3e8d0; }
.lv-n1 .lv-cat:not(.is-soon):hover { border-color: #e8d6b0; }
.lv-n1 .lv-back:hover { border-color: #b5742d; color: #b5742d; }
/* N1 card decorations (own shapes/sizes) */
.lv-n1 .lv-cat-dec--vocab   { width: 104px; right: 4px;  bottom: 0; }
.lv-n1 .lv-cat-dec--kanji   { width: 104px; right: 4px;  bottom: 2px; }
.lv-n1 .lv-cat-dec--grammar { width: 110px; right: 2px;  bottom: 0; }
.lv-n1 .lv-cat-dec--stories { width: 104px; right: 4px;  bottom: 0; }
.lv-n1 .lv-cat-dec--kaiwa   { width: 88px;  right: 10px; bottom: 2px; }
.lv-n1 .lv-cat-dec--papers  { width: 86px;  right: 12px; bottom: 2px; }
