/* ══════════════════════════════════════════
   PolitiLab — My Political Journey
   ══════════════════════════════════════════ */

.jrn-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 28px 80px;
  display: flex; flex-direction: column; gap: 24px;
}

/* ── Header ── */
.jrn-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.jrn-kicker {
  font-family: var(--f-mono);
  font-size: .65rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
  opacity: .8;
}

.jrn-title {
  font-family: var(--f-display);
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.05;
  color: var(--text); margin-bottom: 8px;
}
.jrn-title em {
  font-style: italic; font-weight: 300; color: var(--teal);
}

.jrn-sub {
  font-size: .875rem; color: var(--muted); letter-spacing: .01em;
}

/* ── Controls ── */
.jrn-controls {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}

.jrn-input-wrap {
  position: relative; flex: 1; min-width: 200px;
}
.jrn-input-wrap input {
  width: 100%;
  padding: 10px 50px 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--f-body); font-size: .9rem;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.jrn-input-wrap input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 15%, transparent);
}
.jrn-input-wrap input::placeholder { color: var(--muted); }
.jrn-input-wrap input:disabled { opacity: .45; cursor: not-allowed; }

.jrn-char-count {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: .65rem; color: var(--muted);
  pointer-events: none; font-family: var(--f-mono);
  transition: color var(--t);
}
.jrn-char-count.warn { color: var(--accent2); }

/* ── Canvas wrapper ── */
.jrn-canvas-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.jrn-canvas-scroller {
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

#journey {
  position: relative;
  width: 760px; height: 480px;
  background: #f5f4ef;
  flex-shrink: 0;
}

/* Light theme canvas background */
[data-theme="light"] #journey { background: #f0ede5; }

#arrow-svg {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 5;
}

/* Arrow marker adjusts for light theme */
[data-theme="light"] #journey .arrow-stroke { stroke: #222; }
[data-theme="light"] #journey .arrow-fill   { fill: #222; }

#title-label {
  position: absolute; right: 24px; bottom: 20px;
  font-family: var(--f-display);
  font-weight: 800; font-size: 28px;
  color: #7a0000; text-align: right;
  line-height: 1.05; text-transform: uppercase;
  z-index: 10; pointer-events: none;
}

/* ── Empty state ── */
#empty-state {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; z-index: 1;
}
#empty-state.hidden { display: none; }

.empty-icon { font-size: 2.5rem; opacity: .4; }
.empty-text { font-family: var(--f-body); font-size: .95rem; font-weight: 600; color: #555; }
.empty-hint { font-size: .75rem; color: #888; }

/* ── Step blocks ── */
.step { position: absolute; z-index: 2; }
.step-name {
  font-family: var(--f-body), Arial, sans-serif;
  font-size: 9px; font-weight: 700;
  color: #111; white-space: normal;
  word-break: break-word; margin-bottom: 2px;
  line-height: 1.2; max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-height: 22px; /* 2 × 9px × 1.2 lh ≈ 21.6px */
}
.step-img {
  object-fit: cover; display: block;
  background: #cc0000;
  border: 1px solid rgba(0,0,0,.15);
}

/* ── Canvas footer ── */
.jrn-canvas-footer {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
}
.jrn-info {
  font-size: .75rem; color: var(--muted); font-family: var(--f-mono);
}
.jrn-hint { font-size: .72rem; color: var(--muted); }

/* ── Suggestions ── */
.jrn-suggestions {
  display: flex; flex-direction: column; gap: 10px;
}
.jrn-suggestions-label {
  font-family: var(--f-mono);
  font-size: .65rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted);
}
.jrn-suggestions-list {
  display: flex; flex-wrap: wrap; gap: 7px;
}
.suggestion-btn {
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text2);
  font-family: var(--f-body); font-size: .78rem;
  cursor: pointer;
  transition: all var(--t) var(--ease);
}
.suggestion-btn:hover {
  background: var(--surface2);
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-1px);
}
.suggestion-btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .jrn-wrap { padding: calc(var(--nav-h) + 16px) 16px 60px; gap: 18px; }
  .jrn-controls { flex-direction: column; align-items: stretch; }
  .jrn-input-wrap { min-width: 100%; }
  .btn { width: 100%; justify-content: center; }
  .jrn-canvas-footer { flex-direction: column; align-items: flex-start; gap: 4px; }
}
