:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface2: #f5f2ec;
  --surface3: #ede9e1;
  --border: rgba(160,130,80,0.14);
  --border-hover: rgba(160,130,80,0.32);
  --amber: #b06e20;
  --amber-soft: #c4832e;
  --amber-dim: rgba(176,110,32,0.08);
  --amber-mid: rgba(176,110,32,0.13);
  --text: #1e1a14;
  --text-muted: #6b6050;
  --text-dim: #9e9080;
  --red: #963028;
  --green: #3a7a52;
  --green-dim: rgba(58,122,82,0.09);
  --radius: 12px;
  --shadow: 0 1px 3px rgba(60,40,0,0.06), 0 12px 28px rgba(60,40,0,0.06);
  --shadow-soft: 0 8px 26px rgba(60,40,0,0.05);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: radial-gradient(1200px 600px at 70% -100px, rgba(176,110,32,0.08), transparent 60%), var(--bg); color: var(--text); font-family: 'Manrope', sans-serif; font-size: 14px; line-height: 1.65; min-height: 100vh; }
.shell { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar { width: 252px; min-width: 252px; background: var(--surface); border-right: 1px solid var(--border); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding-bottom: 2rem; }
.sidebar-brand { padding: 1.8rem 1.4rem 1.3rem; border-bottom: 1px solid var(--border); }
.sidebar-brand h1 { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; font-weight: 600; color: var(--amber); letter-spacing: 0.01em; line-height: 1.35; }
.sidebar-brand p { font-size: 11px; color: var(--text-dim); margin-top: 3px; letter-spacing: 0.07em; text-transform: uppercase; }
.progress-wrap { padding: 0.9rem 1.4rem; border-bottom: 1px solid var(--border); }
.progress-label { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-dim); margin-bottom: 5px; letter-spacing: 0.06em; text-transform: uppercase; }
.progress-bar { height: 3px; background: var(--surface3); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--amber); border-radius: 3px; transition: width 0.5s ease; width: 0%; }
.progress-next { margin-top: 0.5rem; font-size: 11px; color: var(--text-muted); line-height: 1.45; }
.chapter-progress { margin-top: 0.55rem; padding-top: 0.5rem; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 3px; }
.chapter-row { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-dim); }
.sidebar-meta { padding: 0.65rem 1.4rem 0; font-size: 10.5px; color: var(--text-dim); line-height: 1.45; }
.nav-section { padding: 1rem 1.4rem 0.35rem; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 6px 1.4rem; cursor: pointer; border: none; border-left: 2px solid transparent; background: transparent; width: 100%; text-align: left; transition: all 0.15s; font-size: 12px; color: var(--text-muted); font-family: inherit; text-decoration: none; }
.nav-item:hover { background: var(--amber-dim); color: var(--text); }
.nav-item.active { border-left-color: var(--amber); background: var(--amber-dim); color: var(--amber); }
.nav-item.done { color: var(--green); }
.nav-item.done .nav-dot { background: var(--green); border-color: var(--green); }
.nav-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--surface3); flex-shrink: 0; transition: background 0.3s; border: 1px solid var(--border-hover); }
.nav-item.active .nav-dot { background: var(--amber); border-color: var(--amber); }
.nav-time { margin-left: auto; font-size: 10px; color: var(--text-dim); }

/* MAIN */
.main { flex: 1; overflow-y: auto; padding: 3rem 3.5rem 6rem; max-width: 920px; margin: 0 auto; width: 100%; }

.journey-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.15rem; padding: 0.95rem 1.15rem; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,0.82); backdrop-filter: blur(8px); position: sticky; top: 0.75rem; z-index: 40; box-shadow: var(--shadow-soft); }
.journey-kicker { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); font-weight: 700; }
.journey-title { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; color: var(--text); line-height: 1.1; margin-top: 2px; }
.journey-sub { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; margin-top: 3px; }
.journey-context { font-size: 11px; color: var(--text-dim); line-height: 1.45; margin-top: 2px; }

/* INTRO */
.intro-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-bottom: 2.8rem; box-shadow: var(--shadow); }
.intro-header { background: linear-gradient(135deg, #b06e20, #a2651f); padding: 1.9rem 2.2rem 1.65rem; }
.intro-eyebrow { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.72); font-weight: 600; margin-bottom: 6px; }
.intro-title { font-family: 'Cormorant Garamond', serif; font-size: 2.25rem; font-weight: 500; color: #fff; line-height: 1.08; letter-spacing: 0.01em; }
.intro-title em { font-style: italic; font-weight: 300; }
.intro-sub { font-size: 12.5px; color: rgba(255,255,255,0.82); margin-top: 7px; line-height: 1.65; }
.intro-source { margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid rgba(255,255,255,0.22); }
.intro-source-link {
  display: inline-block;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.35);
  transition: background 0.15s, border-color 0.15s;
}
.intro-source-link:hover { background: rgba(0,0,0,0.32); border-color: rgba(255,255,255,0.55); }
.intro-source-url { display: block; margin-top: 0.35rem; font-size: 10px; color: rgba(255,255,255,0.65); letter-spacing: 0.04em; }
.intro-body { padding: 1.95rem 2.2rem 2.1rem; }
.intro-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 1rem; }
.intro-fact { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem 0.85rem; }
.intro-fact span { display: block; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 3px; }
.intro-fact strong { font-size: 12px; color: var(--text-muted); font-weight: 600; line-height: 1.5; }
.intro-quote { border-left: 3px solid var(--amber); padding: 0.8rem 1.2rem; background: var(--amber-dim); border-radius: 0 8px 8px 0; margin-bottom: 1.4rem; }
.intro-quote p { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; font-style: italic; color: var(--amber); line-height: 1.5; }
.intro-quote cite { display: block; font-size: 11px; color: var(--text-dim); margin-top: 5px; font-style: normal; letter-spacing: 0.05em; }
.section-mini-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; margin-bottom: 8px; }
.phase-row { display: flex; gap: 12px; margin-bottom: 1.65rem; }
.phase-pill { flex: 1; border-radius: 10px; padding: 0.9rem 1.05rem; border: 1px solid; }
.phase-pill.p1 { background: rgba(150,48,40,0.05); border-color: rgba(150,48,40,0.18); }
.phase-pill.p2 { background: rgba(176,110,32,0.07); border-color: rgba(176,110,32,0.2); }
.phase-pill.p3 { background: var(--green-dim); border-color: rgba(58,122,82,0.2); }
.phase-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px; }
.p1 .phase-label { color: var(--red); }
.p2 .phase-label { color: var(--amber); }
.p3 .phase-label { color: var(--green); }
.phase-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.55; }
.how-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 1.65rem; }
.how-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 1.05rem; }
.how-card-num { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 500; color: var(--amber); line-height: 1; margin-bottom: 6px; }
.how-card-title { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.how-card-time { font-size: 10.5px; color: var(--amber); font-weight: 600; letter-spacing: 0.04em; margin-bottom: 5px; }
.how-card-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.55; }
.rules-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.rules-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }
.rules-list li::before { content: ''; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); flex-shrink: 0; margin-top: 6px; }
.rules-list strong { color: var(--text); font-weight: 600; }
.intro-actions { display: flex; align-items: center; gap: 12px; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.intro-actions p { font-size: 11.5px; color: var(--text-dim); }
.howto-guide { margin-top: 0.9rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 0.9rem 1rem; }
.howto-title { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); font-weight: 700; margin-bottom: 0.35rem; }
.howto-guide ul { margin-left: 1.05rem; display: grid; gap: 0.3rem; }
.howto-guide li { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* HERO + TOOLBAR */
.hero { margin-bottom: 2.7rem; padding-bottom: 1.9rem; border-bottom: 1px solid var(--border); }
.hero-date { display: flex; gap: 10px; margin-bottom: 0.8rem; flex-wrap: wrap; }
.hero-date .field-wrap { flex: 1; min-width: 140px; }
.hero-date input[type="date"],
.hero-date input[type="text"] { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 7px 13px; color: var(--text); font-family: 'Manrope', sans-serif; font-size: 13px; outline: none; transition: border-color 0.2s; box-shadow: var(--shadow); }
.hero-date input:focus { border-color: var(--amber); }
.hero-date input::placeholder { color: var(--text-dim); }
.hero-date input.field-invalid { border-color: var(--red); }
.field-label { display: block; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; margin-bottom: 4px; }
.validation-banner { display: none; font-size: 12px; color: var(--red); background: rgba(150,48,40,0.06); border: 1px solid rgba(150,48,40,0.2); border-radius: 8px; padding: 0.65rem 0.9rem; margin-bottom: 0.75rem; }
.validation-banner.show { display: block; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 1rem; align-items: center; }
.toolbar-spacer { flex: 1; min-width: 8px; }
.trust-copy { font-size: 11.5px; color: var(--text-dim); margin-bottom: 0.85rem; }
.btn { border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); padding: 8px 14px; border-radius: 9px; font-size: 12px; font-family: 'Manrope', sans-serif; font-weight: 600; cursor: pointer; transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s; box-shadow: var(--shadow-soft); }
.btn:hover { border-color: var(--amber-soft); color: var(--text); background: var(--surface2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.btn-primary { border-color: rgba(176,110,32,0.35); background: var(--amber-dim); color: var(--amber); }
.btn-primary:hover { background: var(--amber-mid); }
.btn-danger { border-color: rgba(150,48,40,0.25); color: var(--red); background: rgba(150,48,40,0.04); }
.btn-danger:hover { background: rgba(150,48,40,0.08); }
.setup-row { display: flex; gap: 9px; flex-wrap: wrap; }
.setup-check { display: flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 7px 11px; cursor: pointer; transition: border-color 0.2s; font-size: 12px; color: var(--text-muted); box-shadow: var(--shadow-soft); }
.setup-check:hover { border-color: var(--amber-soft); }
.setup-check:focus-within { outline: 2px solid var(--amber); outline-offset: 2px; }
.setup-check.checked { border-color: var(--green); color: var(--green); background: var(--green-dim); }
.check-box { width: 15px; height: 15px; border-radius: 4px; border: 1px solid var(--border-hover); background: var(--surface); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s; }
.setup-check.checked .check-box { background: var(--green); border-color: var(--green); }
.setup-check.checked .check-box::after { content: ''; display: block; width: 7px; height: 4px; border-left: 1.5px solid white; border-bottom: 1.5px solid white; transform: rotate(-45deg) translateY(-1px); }

/* SECTION DIVIDER */
.section-divider { display: flex; align-items: center; gap: 12px; margin: 3.4rem 0 1.7rem; flex-wrap: wrap; }
.section-divider::before, .section-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.section-label { font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; white-space: nowrap; }
.section-support { width: 100%; font-size: 12px; color: var(--text-muted); margin-top: -4px; }
.chapter-intro { margin: -0.35rem 0 1.1rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 0.95rem 1.05rem; }
.chapter-intro-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); font-weight: 700; }
.chapter-intro h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; color: var(--text); font-weight: 600; margin-top: 2px; }
.chapter-intro p { font-size: 12px; color: var(--text-muted); margin-top: 3px; line-height: 1.55; }
.chapter-intro-day { background: rgba(176,110,32,0.06); border-color: rgba(176,110,32,0.2); }
.chapter-intro-evening { background: rgba(58,122,82,0.07); border-color: rgba(58,122,82,0.22); }

/* BLOCK CARD */
.block-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; box-shadow: var(--shadow-soft); scroll-margin-top: 1.5rem; }
.block-card.guided-hidden { display: none; }
.block-card.active-card { border-color: var(--amber-soft); box-shadow: 0 0 0 3px var(--amber-dim), var(--shadow); }
.block-card.completed-card { border-color: rgba(58,122,82,0.35); }
.block-card.invalid-card { border-color: rgba(150,48,40,0.45); box-shadow: 0 0 0 2px rgba(150,48,40,0.08), var(--shadow-soft); }
.block-card.receded { opacity: 0.72; }
.block-card:hover { transform: translateY(-1px); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.block-header { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; padding: 1.15rem 1.4rem; cursor: pointer; border: none; border-bottom: 1px solid transparent; background: var(--surface); transition: background 0.15s; font-family: inherit; text-align: left; }
.block-header .chevron { flex-shrink: 0; margin-left: auto; }
.block-card.active-card .block-header { border-bottom-color: var(--border); background: #fffdf9; }
.block-header:hover { background: var(--surface2); }
.block-header:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--amber); }
.block-header-left { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0; }
.block-num { font-family: 'Cormorant Garamond', serif; font-size: 1rem; color: var(--amber); font-weight: 600; min-width: 1.5rem; }
.block-title { font-family: 'Cormorant Garamond', serif; font-size: 1.23rem; font-weight: 600; color: var(--text); line-height: 1.2; }
.block-time { font-size: 11px; color: var(--text-dim); letter-spacing: 0.04em; margin-top: 1px; }
.block-header-right { display: flex; align-items: center; gap: 8px; }
.block-state { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--border); color: var(--text-dim); border-radius: 999px; padding: 4px 8px; background: var(--surface2); }
.block-state.in-progress { border-color: rgba(176,110,32,0.35); color: var(--amber); background: var(--amber-dim); }
.block-state.complete { border-color: rgba(58,122,82,0.4); color: var(--green); background: var(--green-dim); }
.timer-badge { font-size: 11.5px; font-weight: 500; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--border); color: var(--text-muted); background: var(--surface2); font-variant-numeric: tabular-nums; min-width: 56px; text-align: center; }
.timer-badge.running { border-color: var(--amber); color: var(--amber); background: var(--amber-dim); }
.timer-badge.done { border-color: rgba(58,122,82,0.4); color: var(--green); background: var(--green-dim); }
.timer-start-btn { background: var(--surface2); border: 1px solid var(--border); color: var(--text-muted); padding: 4px 10px; border-radius: 6px; font-size: 11px; font-family: 'Manrope', sans-serif; cursor: pointer; transition: all 0.15s; }
.timer-start-btn:hover { background: var(--amber-dim); border-color: var(--amber); color: var(--amber); }
.timer-start-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.complete-btn { background: transparent; border: 1px solid rgba(58,122,82,0.3); color: var(--green); padding: 4px 10px; border-radius: 6px; font-size: 11px; font-family: 'Manrope', sans-serif; cursor: pointer; transition: all 0.15s; display: none; align-items: center; gap: 4px; }
.complete-btn:hover { background: var(--green-dim); }
.complete-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.block-card.active-card .complete-btn { display: flex; }
.block-card[data-always-complete] .complete-btn { display: flex; align-items: center; gap: 4px; }
.chevron { width: 15px; height: 15px; flex-shrink: 0; color: var(--text-dim); transition: transform 0.2s; }
.block-card.is-open .chevron { transform: rotate(180deg); }
.block-body { padding: 1.5rem 1.65rem; display: none; }
.block-body.open { display: block; }

/* PROMPT */
.prompt { margin-bottom: 1.45rem; }
.prompt-q { font-family: 'Cormorant Garamond', serif; font-size: 1.18rem; font-weight: 500; font-style: italic; color: var(--amber); margin-bottom: 8px; line-height: 1.4; }
.required-tag { margin-left: 6px; font-family: 'Manrope', sans-serif; font-size: 10px; font-style: normal; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.optional-tag { margin-left: 6px; font-family: 'Manrope', sans-serif; font-size: 10px; font-style: normal; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.prompt-hint { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; line-height: 1.6; }
.prompt textarea, textarea.field, .lens-card textarea, .game-cell textarea { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-family: 'Cormorant Garamond', serif; font-size: 1rem; line-height: 1.7; padding: 11px 14px; resize: vertical; outline: none; min-height: 85px; transition: border-color 0.2s; }
.block-card.active-card .prompt textarea,
.block-card.active-card textarea.field { background: #fffdfa; border-color: rgba(176,110,32,0.22); }
.lens-card textarea, .game-cell textarea { background: var(--surface); min-height: 70px; padding: 10px 12px; font-size: 1rem; }
.game-cell textarea { font-size: 0.95rem; min-height: 70px; padding: 8px 10px; border-radius: 6px; }
.prompt textarea:focus, textarea.field:focus, .lens-card textarea:focus, .game-cell textarea:focus { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-dim); }
.field-error { border-color: rgba(150,48,40,0.55) !important; box-shadow: 0 0 0 3px rgba(150,48,40,0.1) !important; }
.inline-error { margin-top: 5px; font-size: 11px; color: var(--red); line-height: 1.4; }
.step-error-summary { margin-bottom: 0.85rem; padding: 0.6rem 0.75rem; border: 1px solid rgba(150,48,40,0.25); background: rgba(150,48,40,0.06); border-radius: 8px; font-size: 12px; color: var(--red); }
.prompt textarea::placeholder, textarea.field::placeholder { color: var(--text-dim); font-style: italic; }
.prompt-numbered { display: flex; flex-direction: column; gap: 6px; }
.prompt-item { display: flex; gap: 9px; align-items: flex-start; }
.prompt-item-num { font-size: 12px; color: var(--amber); font-weight: 600; min-width: 18px; padding-top: 9px; }
.prompt-item textarea { min-height: 56px; flex: 1; }
.prompt-step-hidden { display: none; }
.block-stepper { margin-top: 0.5rem; padding-top: 0.65rem; border-top: 1px dashed var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stepper-meta { font-size: 11px; color: var(--text-dim); }
.stepper-actions { display: flex; gap: 6px; }
.stepper-actions .btn { padding: 6px 10px; font-size: 11px; border-radius: 7px; box-shadow: none; }
.step-nav { margin-top: 0.35rem; padding-top: 0.7rem; border-top: 1px dashed var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.step-nav-group { display: flex; gap: 8px; align-items: center; }
.step-nav .btn { box-shadow: none; }
.step-nav-helper { font-size: 11px; color: var(--text-dim); }

/* REMINDER */
.reminder-card { background: var(--surface2); border: 1px solid var(--border); border-left: 3px solid var(--amber); border-radius: 0 10px 10px 0; padding: 0.95rem 1.1rem; margin-bottom: 1rem; }
.block-card[data-always-complete] .block-title { font-size: 1.12rem; }
.block-card[data-always-complete] .block-time { color: var(--amber); }
.block-card[data-always-complete] .reminder-card { background: #fdf8f1; border-color: rgba(176,110,32,0.24); }
.reminder-time { font-size: 10.5px; color: var(--amber); letter-spacing: 0.08em; font-weight: 700; margin-bottom: 5px; text-transform: uppercase; }
.reminder-q { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; font-style: italic; color: var(--text-muted); line-height: 1.45; }
.two-col { display: flex; gap: 10px; }
.two-col > div { flex: 1; }
.col-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 5px; }
.col-label.green { color: var(--green); }
.col-label.red { color: var(--red); }

/* IDENTITY */
.identity-box { background: linear-gradient(135deg, rgba(176,110,32,0.15), rgba(176,110,32,0.07)); border: 1px solid rgba(176,110,32,0.25); border-radius: 10px; padding: 1.15rem 1.3rem; margin-bottom: 1.05rem; }
.identity-label { font-size: 10px; color: var(--amber); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; margin-bottom: 6px; }
.identity-prefix { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; color: var(--text-muted); font-style: italic; margin-bottom: 7px; }

/* LENS */
.lens-row { display: flex; gap: 12px; margin-bottom: 1.2rem; }
.lens-card { flex: 1; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 0.95rem 1rem; }
.lens-tag { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; margin-bottom: 5px; }
.lens-card:nth-child(1) .lens-tag { color: var(--red); }
.lens-card:nth-child(2) .lens-tag { color: #7a5ab8; }

/* GAME */
.game-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 12px; margin-bottom: 1.25rem; }
.game-cell { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 0.95rem 1rem; }
.game-cell-title { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); font-weight: 700; margin-bottom: 7px; }

/* COMMIT */
.commit-banner { background: linear-gradient(135deg,var(--amber-mid),var(--amber-dim)); border: 1px solid rgba(176,110,32,0.3); border-radius: var(--radius); padding: 1.55rem 1.8rem; margin-top: 1.6rem; text-align: center; box-shadow: var(--shadow-soft); }
.commit-label { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 400; color: var(--amber); margin-bottom: 1rem; font-style: italic; }
.commit-row { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.commit-row input { background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: 8px 13px; color: var(--text); font-family: 'Manrope', sans-serif; font-size: 13px; outline: none; transition: border-color 0.2s; min-width: 170px; }
.commit-row input:focus { border-color: var(--amber); }
.commit-row input::placeholder { color: var(--text-dim); }
.commit-row input.field-invalid { border-color: var(--red); }
.at-label { color: var(--text-muted); font-size: 13px; }

/* SAVE */
.save-indicator { position: fixed; bottom: 1.4rem; right: 1.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 5px 13px; font-size: 11px; color: var(--text-dim); opacity: 0; transition: opacity 0.3s; pointer-events: none; box-shadow: var(--shadow); max-width: 240px; text-align: right; }
.save-indicator.show { opacity: 1; }
.save-indicator.error { color: var(--red); border-color: rgba(150,48,40,0.25); }
.mobile-journey { display: none; }
.note-box { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.15rem; margin-bottom: 1.3rem; font-size: 12.5px; color: var(--text-muted); line-height: 1.68; }
.note-box strong { color: var(--text); }

/* MODAL */
.modal-backdrop { position: fixed; inset: 0; background: rgba(30,26,20,0.45); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1.2rem; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal-panel { background: var(--surface); border-radius: 12px; border: 1px solid var(--border); max-width: 640px; width: 100%; max-height: min(88vh, 900px); display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.modal-panel-wide { max-width: 900px; }
.modal-head { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; font-weight: 600; color: var(--text); }
.modal-body { padding: 1rem 1.25rem 1.2rem; overflow-y: auto; flex: 1; }
.modal-foot { padding: 0.85rem 1.25rem 1rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.review-section { margin-bottom: 1.25rem; page-break-inside: avoid; }
.review-meta { font-size: 12.5px; color: var(--text-muted); margin-bottom: 0.35rem; line-height: 1.55; }
.review-section h3 { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.5rem; }
.review-pair { margin-bottom: 0.85rem; break-inside: avoid; }
.review-q { font-family: 'Cormorant Garamond', serif; font-size: 1rem; font-style: italic; color: var(--amber); margin-bottom: 4px; }
.review-a { font-size: 13px; color: var(--text); line-height: 1.65; white-space: pre-wrap; }
.review-empty { font-size: 12px; color: var(--text-dim); font-style: italic; }
.sample-meta { margin-bottom: 1rem; padding: 0.8rem 0.9rem; border: 1px solid rgba(176,110,32,0.22); background: #fffaf2; border-radius: 10px; font-size: 12px; color: var(--text-muted); }
.sample-meta strong { color: var(--text); }
.sample-readonly-note { margin-top: 0.4rem; font-size: 11px; color: var(--text-dim); }

/* PDF / PRINT HOST (filled by JS) — base styles used by html2canvas + print */
#pdf-document { display: none; }
/* .pdf-render-node is used for html2pdf capture; it is NOT inside #pdf-document, so share all .pdf-doc rules */
#pdf-document .pdf-doc,
.pdf-render-node .pdf-doc {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  line-height: 1.55;
  color: #1e1a14;
  max-width: 720px;
}
#pdf-document .pdf-doc h1,
.pdf-render-node .pdf-doc h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  color: #b06e20;
  margin: 0 0 10px;
}
#pdf-document .pdf-doc .pdf-meta,
.pdf-render-node .pdf-doc .pdf-meta { font-size: 11px; color: #6b6050; margin-bottom: 6px; }
#pdf-document .pdf-doc .pdf-section-title,
.pdf-render-node .pdf-doc .pdf-section-title {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9e9080;
  margin: 16px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(160,130,80,0.2);
}
#pdf-document .pdf-doc .pdf-pair,
.pdf-render-node .pdf-doc .pdf-pair { margin-bottom: 12px; }
#pdf-document .pdf-doc .pdf-q,
.pdf-render-node .pdf-doc .pdf-q {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  font-style: italic;
  color: #b06e20;
  margin-bottom: 4px;
}
#pdf-document .pdf-doc .pdf-a,
.pdf-render-node .pdf-doc .pdf-a { font-size: 12px; white-space: pre-wrap; word-wrap: break-word; }
#pdf-document .pdf-doc .pdf-empty,
.pdf-render-node .pdf-doc .pdf-empty { font-size: 11px; color: #9e9080; font-style: italic; }
#pdf-document .pdf-doc .pdf-blank-note,
.pdf-render-node .pdf-doc .pdf-blank-note { font-size: 11px; color: #6b6050; margin-bottom: 8px; line-height: 1.5; }
#pdf-document .pdf-doc .pdf-blank-source,
.pdf-render-node .pdf-doc .pdf-blank-source { font-size: 10px; color: #9e9080; margin-bottom: 10px; word-break: break-all; }
#pdf-document .pdf-doc .pdf-blank-label,
.pdf-render-node .pdf-doc .pdf-blank-label { font-size: 10px; font-weight: 600; color: #6b6050; margin: 6px 0 2px; }
/* Ruled lines rasterize reliably in html2canvas (underscore-only text can vanish) */
#pdf-document .pdf-doc .pdf-write-line,
.pdf-render-node .pdf-doc .pdf-write-line {
  border-bottom: 1px solid #4a4338;
  min-height: 22px;
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
}
#pdf-document .pdf-doc .pdf-blank-block,
.pdf-render-node .pdf-doc .pdf-blank-block { margin-top: 4px; margin-bottom: 10px; }
#pdf-document .pdf-doc a,
.pdf-render-node .pdf-doc a { color: #6b6050; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .no-print { display: none !important; }
  #pdf-document { display: block !important; position: static !important; width: auto !important; height: auto !important; overflow: visible !important; left: auto !important; top: auto !important; opacity: 1 !important; z-index: 1 !important; }
  .pdf-doc { font-family: 'Manrope', sans-serif; font-size: 11pt; color: #1e1a14; line-height: 1.55; }
  .pdf-doc h1 { font-family: 'Cormorant Garamond', serif; font-size: 22pt; color: #b06e20; margin-bottom: 4mm; }
  .pdf-doc .pdf-meta { font-size: 10pt; color: #6b6050; margin-bottom: 6mm; }
  .pdf-doc .pdf-section-title { font-size: 9pt; letter-spacing: 0.12em; text-transform: uppercase; color: #9e9080; margin: 5mm 0 2mm; border-bottom: 0.3pt solid #ddd; padding-bottom: 1mm; break-after: avoid; }
  .pdf-doc .pdf-pair { margin-bottom: 3.5mm; }
  .pdf-doc .pdf-q { font-family: 'Cormorant Garamond', serif; font-size: 11pt; font-style: italic; color: #b06e20; margin-bottom: 1mm; }
  .pdf-doc .pdf-a { font-size: 10.5pt; white-space: pre-wrap; word-wrap: break-word; orphans: 3; widows: 3; }
  .pdf-doc .pdf-empty { font-size: 10pt; color: #9e9080; font-style: italic; }
  .pdf-doc .pdf-blank-note { font-size: 10pt; margin-bottom: 3mm; }
  .pdf-doc .pdf-blank-source { font-size: 9pt; margin-bottom: 4mm; }
  .pdf-doc .pdf-blank-label { font-size: 9pt; }
  .pdf-doc .pdf-write-line {
    border-bottom: 0.35pt solid #333;
    min-height: 6mm;
    margin-bottom: 2.5mm;
  }
  .pdf-doc .pdf-blank-block { margin-bottom: 3mm; }
  .pdf-doc .pdf-break-avoid { break-inside: avoid-page; page-break-inside: avoid; }
}

@media (max-width: 1100px) {
  .main { padding: 2.2rem 2rem 5rem; max-width: 860px; }
  .intro-title { font-size: 2.02rem; }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { padding: 1.25rem 1rem 5rem; max-width: 760px; }
  .how-grid, .phase-row { grid-template-columns: 1fr; flex-direction: column; }
  .lens-row, .two-col { flex-direction: column; }
  .journey-banner { top: 0.55rem; padding: 0.8rem 0.9rem; }
  .toolbar { position: sticky; top: 4.9rem; z-index: 30; padding: 0.65rem 0; background: linear-gradient(to bottom, var(--bg), rgba(250,248,244,0.96)); backdrop-filter: blur(5px); flex-direction: column; align-items: stretch; }
  .toolbar-spacer { display: none; }
  .intro-header { padding: 1.45rem 1.25rem 1.25rem; }
  .intro-body { padding: 1.3rem 1.2rem 1.4rem; }
  .intro-facts { grid-template-columns: 1fr; }
  .intro-actions { flex-direction: column; align-items: flex-start; }
  .howto-guide ul { margin-left: 0.9rem; }
  .intro-title { font-size: 1.85rem; }
  .hero { margin-bottom: 2.2rem; padding-bottom: 1.5rem; }
  .section-divider { margin: 2.5rem 0 1.25rem; }
  .block-header { padding: 0.95rem 1rem; align-items: flex-start; }
  .block-header-left { padding-right: 6px; }
  .block-title { font-size: 1.1rem; }
  .block-time { font-size: 10.5px; }
  .block-header-right { width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
  .block-header { flex-wrap: wrap; }
  .block-header .chevron { margin-left: 0; margin-top: 2px; }
  .block-body { padding: 1rem 1rem 1.15rem; }
  .prompt-q { font-size: 1.08rem; }
  .prompt textarea, textarea.field, .lens-card textarea, .game-cell textarea { min-height: 112px; font-size: 1.04rem; }
  .prompt-item textarea { min-height: 90px; }
  .setup-check { flex: 1 1 100%; }
  .commit-banner { padding: 1.1rem 1rem; }
  .commit-row { flex-direction: column; align-items: stretch; }
  .commit-row input { min-width: 0; width: 100%; }
  .at-label { text-align: center; }
  .mobile-journey { display: flex; position: fixed; left: 0.7rem; right: 0.7rem; bottom: 0.7rem; z-index: 120; padding: 0.7rem; border: 1px solid var(--border); background: rgba(255,255,255,0.94); backdrop-filter: blur(8px); border-radius: 12px; box-shadow: var(--shadow); gap: 10px; align-items: center; }
  .mobile-journey-meta { flex: 1; min-width: 0; }
  .mobile-journey-meta span { display: block; font-size: 9.5px; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; }
  .mobile-journey-meta strong { display: block; color: var(--text); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-journey .btn { width: auto; min-width: 110px; }
  .main { padding-bottom: 7rem; }
  .step-nav { position: sticky; bottom: 4.2rem; background: rgba(250,248,244,0.96); backdrop-filter: blur(6px); padding-bottom: 0.5rem; z-index: 35; }
  .step-nav .btn { min-width: 100px; }
}

@media (max-width: 520px) {
  body { font-size: 13.5px; }
  .btn { width: 100%; justify-content: center; }
  .intro-title { font-size: 1.65rem; }
  .intro-sub { font-size: 12px; }
  .save-indicator { right: 0.85rem; bottom: 0.85rem; }
}
