:root {
  color: #172534;
  background: #fbf8f1;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #172534;
  --ink-soft: rgba(23, 37, 52, 0.68);
  --ink-muted: rgba(23, 37, 52, 0.52);
  --line: rgba(23, 37, 52, 0.12);
  --surface: rgba(255, 255, 255, 0.78);
  --teal: #168f90;
  --page-bg: #fbf8f1;
  --shadow: 0 18px 50px rgba(42, 48, 56, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--page-bg);
}

button,
a,
input,
textarea,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.timeline-home {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(75, 155, 105, 0.14), transparent 28%),
    radial-gradient(circle at 86% 6%, rgba(72, 121, 184, 0.12), transparent 30%),
    linear-gradient(180deg, #fffdf8 0%, #fbf8f1 100%);
}

.timeline-home[data-editor-mode="edit"] {
  padding-right: 0;
}

.journey-back-link {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 30;
  color: rgba(23, 37, 52, 0.58);
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  padding: 9px 12px;
  border: 1px solid rgba(23, 37, 52, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 28px rgba(42, 48, 56, 0.08);
  backdrop-filter: blur(12px);
}

.journey-back-link:hover,
.journey-back-link:focus-visible {
  color: var(--ink);
  border-color: rgba(23, 37, 52, 0.18);
}

.timeline-hero {
  position: relative;
  min-height: 340px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  padding: 56px 24px 42px;
  overflow: hidden;
}

.timeline-hero::before {
  content: "";
  position: absolute;
  inset: 34px 7% auto;
  height: 150px;
  border: 1px solid rgba(23, 37, 52, 0.06);
  border-top: 0;
  border-radius: 0 0 999px 999px;
  opacity: 0.78;
  pointer-events: none;
}

.timeline-hero__copy {
  position: relative;
  width: min(100%, 900px);
  text-align: center;
  text-wrap: balance;
  animation: hero-in 520ms ease-out both;
}

.timeline-eyebrow {
  margin: 0 0 16px;
  color: var(--teal);
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 750;
}

.timeline-hero h1,
.private-panel h1 {
  margin: 0;
  color: var(--ink);
  font-weight: 720;
  line-height: 1.04;
  letter-spacing: 0;
}

.timeline-hero h1 {
  font-size: clamp(42px, 6vw, 80px);
}

.timeline-hero__actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.timeline-floating-controls {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 35;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: calc(100vw - 180px);
  pointer-events: none;
}

.timeline-view-switch {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(23, 37, 52, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 34px rgba(42, 48, 56, 0.08);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.timeline-view-switch button,
.editor-toggle {
  min-width: 112px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  font-weight: 720;
}

.editor-toggle {
  pointer-events: auto;
}

.timeline-view-switch button {
  color: var(--ink-soft);
  background: transparent;
}

.timeline-view-switch button[aria-pressed="true"],
.editor-toggle {
  color: #ffffff;
  background: var(--ink);
  box-shadow: 0 8px 20px rgba(23, 37, 52, 0.16);
}

.journey-map,
.journey-areas {
  position: relative;
}

.journey-editor-layout {
  min-height: 100vh;
}

.journey-editor-workspace {
  min-width: 0;
}

.timeline-home[data-editor-mode="edit"][data-focus-mode="false"] .journey-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 16px;
}

.timeline-home[data-editor-mode="edit"][data-focus-mode="false"][data-editor-sidebar-collapsed="true"] .journey-editor-layout {
  grid-template-columns: minmax(0, 1fr) 44px;
}

.journey-map {
  min-height: 100vh;
  padding-top: 0;
}

.journey-area {
  position: relative;
  min-height: var(--area-height);
  padding: 48px clamp(22px, 6vw, 84px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.64), transparent 54%),
    linear-gradient(180deg, var(--area-color-a) 0%, var(--area-color-b) 100%);
}

.journey-canvas {
  position: relative;
  min-height: var(--canvas-height, 2400px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.64), transparent 54%),
    linear-gradient(180deg, var(--area-color-a) 0%, var(--area-color-b) 100%);
}

.journey-canvas-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.journey-area-background,
.journey-area-background-gradient,
.journey-area-background-image,
.journey-area-background-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.journey-area-background {
  z-index: 0;
  overflow: hidden;
}

.journey-area-background-gradient {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.64), transparent 54%),
    linear-gradient(180deg, var(--area-color-a) 0%, var(--area-color-b) 100%);
}

.journey-area-background-image {
  display: block;
  max-width: none;
  object-fit: cover;
}

.journey-area-background-overlay {
  z-index: 2;
}

.timeline-hero {
  min-height: var(--hero-height, 340px);
  background:
    linear-gradient(180deg, var(--hero-color-a, transparent), var(--hero-color-b, transparent));
}

.timeline-home[data-editor-mode="edit"] .timeline-hero:hover {
  outline: 2px solid rgba(22, 143, 144, 0.18);
  outline-offset: -2px;
}

.timeline-hero__copy[data-align="left"] {
  justify-self: start;
  text-align: left;
}

.journey-area[data-selected="true"] {
  outline: 2px solid rgba(22, 143, 144, 0.26);
  outline-offset: -2px;
}

.timeline-home[data-editor-mode="edit"] .journey-canvas {
  outline: 2px solid rgba(22, 143, 144, 0.2);
  outline-offset: -2px;
}

.journey-area::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: clamp(28px, 9vw, 150px);
  bottom: 42px;
  width: clamp(120px, 20vw, 280px);
  height: clamp(70px, 12vw, 150px);
  border: 1px solid rgba(23, 37, 52, 0.06);
  border-radius: 999px 999px 18px 18px;
  background: rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.pattern-soft-hills::before,
.pattern-soft-skyline::before,
.pattern-soft-waves::before,
.pattern-soft-abstract::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: auto 0 0;
  height: 44%;
  opacity: 0.45;
  pointer-events: none;
}

.pattern-soft-hills::before {
  background:
    radial-gradient(70% 80% at 20% 100%, rgba(255, 255, 255, 0.58), transparent 62%),
    radial-gradient(70% 80% at 78% 100%, rgba(23, 37, 52, 0.06), transparent 62%);
}

.pattern-soft-skyline::before {
  background:
    linear-gradient(90deg, transparent 0 10%, rgba(255, 255, 255, 0.34) 10% 17%, transparent 17% 24%, rgba(255, 255, 255, 0.32) 24% 31%, transparent 31% 100%);
}

.pattern-soft-waves::before {
  background:
    radial-gradient(70% 40% at 28% 100%, rgba(255, 255, 255, 0.45), transparent 70%),
    radial-gradient(70% 40% at 78% 100%, rgba(255, 255, 255, 0.32), transparent 70%);
}

.pattern-soft-abstract::before {
  background:
    radial-gradient(circle at 30% 55%, rgba(255, 255, 255, 0.5), transparent 28%),
    radial-gradient(circle at 68% 28%, rgba(23, 37, 52, 0.06), transparent 24%);
}

.journey-area__copy {
  position: relative;
  z-index: 3;
  width: min(360px, 74vw);
  margin-left: var(--area-copy-offset);
  padding-top: 16px;
  pointer-events: none;
}

.journey-area__index {
  margin: 0 0 10px;
  color: var(--major-node-color);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.journey-area h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.journey-area p:last-child {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
}

.area-path,
.journey-events {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.area-path {
  overflow: visible;
}

.journey-events {
  z-index: 4;
}

.journey-sticker-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.journey-sticker {
  position: absolute;
  display: block;
  max-width: 80%;
  height: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform-origin: center;
  user-select: none;
  pointer-events: none;
}

.timeline-home[data-editor-mode="edit"] .journey-sticker {
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
}

.timeline-home[data-editor-mode="edit"] .journey-sticker.is-selected {
  outline: 2px solid rgba(22, 143, 144, 0.82);
  outline-offset: 6px;
  filter: drop-shadow(0 10px 18px rgba(23, 37, 52, 0.18));
}

.timeline-home[data-editor-mode="edit"] .journey-sticker.is-locked {
  cursor: not-allowed;
  opacity: 0.72;
}

.journey-text-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.journey-text-item {
  position: absolute;
  display: block;
  max-width: 90%;
  min-width: 32px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  transform-origin: center;
  user-select: none;
  pointer-events: none;
}

.timeline-home[data-editor-mode="edit"] .journey-text-item {
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
}

.timeline-home[data-editor-mode="edit"] .journey-text-item.is-selected {
  outline: 2px solid rgba(22, 143, 144, 0.82);
  outline-offset: 5px;
  box-shadow: 0 14px 32px rgba(23, 37, 52, 0.12);
}

.timeline-home[data-editor-mode="edit"] .journey-text-item.is-locked {
  cursor: not-allowed;
  opacity: 0.72;
}

.timeline-home[data-route-strokes-enabled="true"] .area-path__shadow,
.timeline-home[data-route-strokes-enabled="true"] .area-path__main {
  display: none;
}

.journey-route-patch-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  pointer-events: none;
  overflow: visible;
}

.journey-canvas-routes {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.area-path__shadow,
.area-path__main,
.journey-canvas-route__shadow,
.journey-canvas-route__main,
.journey-route-stroke__shadow,
.journey-route-stroke__main,
.journey-route-patch__shadow,
.journey-route-patch__main {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.area-path__shadow,
.journey-canvas-route__shadow,
.journey-route-stroke__shadow,
.journey-route-patch__shadow {
  transform: translateY(3px);
}

.journey-canvas-route__main.is-selected {
  filter: drop-shadow(0 0 10px rgba(22, 143, 144, 0.3));
}

.journey-route-strokes-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  pointer-events: none;
  overflow: visible;
}

.journey-route-stroke-endpoint {
  fill: #62a9e8;
  stroke: #ffffff;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.journey-route-stroke-preview {
  fill: none;
  stroke: rgba(47, 128, 237, 0.76);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 12 10;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.journey-route-stroke-snap {
  fill: rgba(47, 128, 237, 0.08);
  stroke: rgba(47, 128, 237, 0.72);
  stroke-width: 2;
  stroke-dasharray: 7 7;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.journey-route-redraw-preview {
  fill: none;
  stroke: rgba(22, 143, 144, 0.72);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 12 10;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.journey-route-redraw-marker {
  fill: #ffffff;
  stroke: #168f90;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.journey-route-redraw-marker--end {
  stroke: #d27b34;
}

.journey-events {
  pointer-events: none;
}

.journey-event {
  --event-x: 50%;
  --event-y: 50%;
  --event-offset-x: 0px;
  --event-offset-y: 0px;
  position: absolute;
  left: var(--event-x);
  top: var(--event-y);
  z-index: 4;
  width: var(--event-dot-size);
  height: var(--event-dot-size);
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.journey-event[data-selected="true"] .journey-event__dot {
  outline: 4px solid rgba(22, 143, 144, 0.28);
  outline-offset: 5px;
}

.journey-event__button {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
}

.journey-event__dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--event-dot-size);
  height: var(--event-dot-size);
  border: 5px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  background: var(--event-accent);
  box-shadow: 0 10px 22px rgba(23, 37, 52, 0.16);
  transform: translate(-50%, -50%);
}

.journey-event__card {
  position: absolute;
  display: none;
  gap: 10px;
  min-height: var(--event-card-min-height);
  margin-left: var(--card-nudge);
  padding: var(--event-card-padding);
  border: 1px solid rgba(23, 37, 52, 0.11);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.journey-event__button:hover .journey-event__card,
.journey-event__button:focus-visible .journey-event__card {
  display: grid;
  left: 50%;
  top: 50%;
  width: min(280px, 78vw);
  min-height: 0;
  margin-left: 0;
  transform: translate(22px, -50%);
  pointer-events: none;
}

.journey-event__button:hover .journey-event__dot,
.journey-event__button:focus-visible .journey-event__dot {
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.62), 0 18px 34px rgba(23, 37, 52, 0.22);
}

.journey-event--major {
  --event-card-width: 286px;
  --event-card-padding: 16px;
  --event-card-min-height: 226px;
  --event-dot-size: 34px;
  --card-nudge: 54px;
}

.journey-event--major[data-side="left"] {
  --card-nudge: -340px;
}

.journey-event--minor {
  --event-card-width: 190px;
  --event-card-padding: 12px;
  --event-card-min-height: 0;
  --event-dot-size: 18px;
  --card-nudge: 34px;
}

.journey-event--minor[data-side="left"] {
  --card-nudge: -224px;
}

.timeline-home[data-editor-mode="edit"] .journey-event {
  cursor: grab;
}

.timeline-home[data-editor-mode="preview"] .journey-event__card {
  display: none;
}

.timeline-home[data-editor-mode="edit"][data-active-tool="freehand"] .journey-canvas {
  cursor: crosshair;
}

.timeline-home[data-editor-mode="edit"][data-active-tool="add-node"] .journey-canvas {
  cursor: copy;
}

.timeline-home[data-editor-mode="edit"] .journey-event:active {
  cursor: grabbing;
}

.placeholder-image {
  display: grid;
  place-items: center;
  min-height: 86px;
  border: 1px solid rgba(23, 37, 52, 0.08);
  border-radius: 6px;
  color: rgba(23, 37, 52, 0.46);
  background:
    radial-gradient(circle at 74% 30%, rgba(255, 255, 255, 0.72), transparent 24%),
    linear-gradient(135deg, rgba(22, 143, 144, 0.12), rgba(139, 114, 183, 0.12));
  font-size: 13px;
  font-weight: 750;
}

.journey-event__meta {
  margin: 0;
  color: var(--event-accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.journey-event__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.18;
}

.journey-event--minor .journey-event__title {
  font-size: 15px;
}

.journey-event__description {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

.journey-event--minor .journey-event__description,
.journey-event--minor .placeholder-image {
  display: none;
}

.curve-control-line {
  stroke: rgba(23, 37, 52, 0.32);
  stroke-width: 2;
  stroke-dasharray: 8 8;
  vector-effect: non-scaling-stroke;
}

.curve-control-line,
.curve-handle {
  display: none;
}

.curve-handle {
  fill: #ffffff;
  stroke: #168f90;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  cursor: grab;
  pointer-events: auto;
}

.curve-handle--cpIn,
.curve-handle--cpOut {
  fill: #dff2f2;
  stroke: #315f9d;
}

.curve-handle.is-selected {
  fill: #172534;
  stroke: #ffffff;
}

.freehand-preview-path {
  fill: none;
  stroke: #168f90;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 14 10;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.curve-debug__raw,
.curve-debug__final-samples {
  fill: none;
  pointer-events: none;
}

.curve-debug__raw {
  stroke: rgba(35, 66, 96, 0.5);
  stroke-width: 3;
  stroke-dasharray: 9 10;
}

.curve-debug__final-samples {
  stroke: rgba(30, 143, 92, 0.72);
  stroke-width: 4;
}

.curve-debug__filtered {
  fill: rgba(36, 109, 170, 0.72);
}

.curve-debug__resampled {
  fill: rgba(245, 157, 65, 0.76);
}

.curve-debug__control-point {
  fill: #ffffff;
  stroke: #1f6f56;
  stroke-width: 3;
}


.curve-debug__tangent {
  stroke: rgba(125, 73, 196, 0.76);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 12 8;
  pointer-events: none;
}

.timeline-home[data-editor-mode="preview"] .curve-control-line,
.timeline-home[data-editor-mode="preview"] .curve-handle,
.timeline-home[data-editor-mode="preview"] .freehand-preview-path,
.timeline-home[data-editor-mode="preview"] [class^="curve-debug__"] {
  display: none;
}

.homepage-editor[hidden],
.timeline-event-popover[hidden] {
  display: none;
}

.homepage-editor {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  padding: 18px;
  overflow: auto;
  border-left: 1px solid rgba(23, 37, 52, 0.12);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: -18px 0 50px rgba(23, 37, 52, 0.12);
}

.homepage-editor__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.homepage-editor__eyebrow,
.homepage-editor__note,
.homepage-editor__status,
.homepage-editor__mobile-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.homepage-editor__eyebrow {
  color: var(--teal);
  font-weight: 800;
}

.homepage-editor h2 {
  margin: 0;
  font-size: 26px;
}

.homepage-editor__close,
.editor-section button {
  min-height: 34px;
  border: 1px solid rgba(23, 37, 52, 0.14);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 700;
}

.homepage-editor__status {
  margin-top: 8px;
  color: var(--teal);
  font-weight: 800;
}

.homepage-editor__status[data-error="true"] {
  color: #ad3c2d;
}

.editor-help {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.editor-section {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(23, 37, 52, 0.1);
}

.editor-section h3 {
  margin: 0;
  font-size: 16px;
}

.editor-section label {
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.editor-section input,
.editor-section textarea,
.editor-section select {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(23, 37, 52, 0.16);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
}

.editor-section textarea {
  min-height: 72px;
  resize: vertical;
}

.editor-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-section button {
  padding: 7px 10px;
}

.homepage-editor__tool {
  border-color: rgba(22, 143, 144, 0.28);
  color: var(--teal);
  background: rgba(22, 143, 144, 0.08);
}

.editor-section .danger-button {
  color: #ad3c2d;
  border-color: rgba(173, 60, 45, 0.22);
}

.editor-json {
  min-height: 128px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.editor-empty {
  margin: 0;
  color: var(--ink-muted);
}

.context-editor-root {
  position: relative;
  z-index: 60;
  min-width: 0;
}

.timeline-home[data-editor-mode="edit"] .context-editor-root {
  align-self: start;
  padding: 76px 16px 32px 0;
}

.timeline-home[data-focus-mode="true"] .context-editor-root {
  padding: 0;
}

.journey-editor-sidebar {
  position: sticky;
  top: 76px;
  width: 100%;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid rgba(23, 37, 52, 0.14);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.97);
  box-shadow: 0 18px 54px rgba(23, 37, 52, 0.14);
  backdrop-filter: blur(16px);
}

.journey-editor-sidebar[hidden],
.journey-editor-sidebar-rail[hidden],
.journey-editor-sidebar-backdrop[hidden] {
  display: none;
}

.journey-editor-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.journey-editor-sidebar__header h2 {
  margin: 0;
  font-size: 18px;
}

.journey-editor-sidebar__eyebrow {
  margin: 0 0 3px;
  color: rgba(23, 37, 52, 0.52);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journey-editor-sidebar-collapse,
.journey-editor-sidebar-expand {
  min-height: 34px;
  cursor: pointer;
  border: 1px solid rgba(23, 37, 52, 0.14);
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.journey-editor-sidebar-collapse {
  padding: 7px 11px;
  white-space: nowrap;
}

.journey-editor-sidebar-rail {
  position: sticky;
  top: 76px;
  display: grid;
  place-items: start center;
  min-height: 156px;
  padding: 0;
}

.journey-editor-sidebar-expand {
  min-width: 44px;
  min-height: 132px;
  padding: 10px 8px;
  writing-mode: vertical-rl;
  letter-spacing: 0.06em;
  box-shadow: 0 14px 34px rgba(23, 37, 52, 0.12);
}

.journey-editor-sidebar-backdrop {
  display: none;
}

.journey-editor-sidebar-collapse:focus-visible,
.journey-editor-sidebar-expand:focus-visible {
  outline: 3px solid rgba(22, 143, 144, 0.32);
  outline-offset: 3px;
}

.context-toolbar {
  position: fixed;
  z-index: 70;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100vw - 28px);
  padding: 7px;
  border: 1px solid rgba(23, 37, 52, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 18px 48px rgba(23, 37, 52, 0.14);
  backdrop-filter: blur(16px);
}

.context-toolbar button,
.context-menu button,
.context-popover button {
  min-height: 34px;
  border: 1px solid rgba(23, 37, 52, 0.14);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 750;
}

.context-toolbar button {
  padding: 7px 11px;
  border-radius: 999px;
}

.context-toolbar button[aria-pressed="true"] {
  color: #ffffff;
  border-color: var(--ink);
  background: var(--ink);
}

.context-toolbar__status {
  padding: 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.local-redraw-panel {
  position: fixed;
  z-index: 69;
  top: 68px;
  right: 14px;
  width: min(360px, calc(100vw - 28px));
  padding: 14px;
  border: 1px solid rgba(23, 37, 52, 0.12);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 18px 48px rgba(23, 37, 52, 0.13);
  backdrop-filter: blur(16px);
}

.local-redraw-panel h2 {
  margin: 0 0 8px;
  font-size: 15px;
}

.local-redraw-panel p {
  margin: 6px 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.local-redraw-panel__error {
  color: #ad3c2d;
}

.local-redraw-panel dl {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.local-redraw-panel dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.local-redraw-panel dt {
  color: var(--ink-soft);
}

.local-redraw-panel dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.local-redraw-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.local-redraw-panel button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(23, 37, 52, 0.14);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 750;
}

.local-redraw-panel button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.stroke-topology-panel {
  position: fixed;
  z-index: 69;
  top: 68px;
  right: 14px;
  width: min(390px, calc(100vw - 28px));
  max-height: calc(100vh - 92px);
  padding: 14px;
  overflow: auto;
  border: 1px solid rgba(23, 37, 52, 0.12);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 18px 48px rgba(23, 37, 52, 0.13);
  backdrop-filter: blur(16px);
}

.stroke-topology-panel h2 {
  margin: 0 0 8px;
  font-size: 15px;
}

.stroke-topology-panel p {
  margin: 7px 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.stroke-topology-panel__toggle,
.stroke-topology-panel__slider {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.stroke-topology-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 9px 0;
}

.stroke-topology-panel button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(23, 37, 52, 0.14);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 750;
}

.stroke-topology-panel button[aria-pressed="true"] {
  color: #ffffff;
  border-color: var(--ink);
  background: var(--ink);
}

.stroke-topology-panel button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.journey-visual-panel {
  position: fixed;
  z-index: 68;
  top: 68px;
  left: 14px;
  width: min(390px, calc(100vw - 28px));
  max-height: calc(100vh - 92px);
  padding: 14px;
  overflow: auto;
  border: 1px solid rgba(23, 37, 52, 0.12);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.95);
  box-shadow: 0 18px 48px rgba(23, 37, 52, 0.13);
  backdrop-filter: blur(16px);
}

.journey-editor-panel-shell.is-collapsed {
  width: auto;
  max-height: none;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.journey-editor-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.journey-editor-panel-header + h2 {
  display: none;
}

.journey-editor-panel-toggle,
.journey-editor-panel-collapsed-tab {
  cursor: pointer;
}

.journey-editor-panel-collapsed-tab {
  min-width: 44px;
  min-height: 92px;
  padding: 10px 8px;
  writing-mode: vertical-rl;
  letter-spacing: 0.06em;
  border: 1px solid rgba(23, 37, 52, 0.14);
  border-radius: 0 12px 12px 0;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 14px 34px rgba(23, 37, 52, 0.14);
  backdrop-filter: blur(14px);
}

.journey-visual-panel h2,
.journey-visual-panel h3,
.journey-visual-panel h4 {
  margin: 0;
}

.journey-visual-panel h2 {
  font-size: 15px;
}

.journey-visual-panel h3 {
  font-size: 14px;
}

.journey-visual-panel h4 {
  font-size: 13px;
}

.journey-visual-note,
.journey-image-drop-help,
.journey-image-drop-warning {
  margin: 7px 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.journey-image-drop-warning {
  color: #8a6232;
}

.journey-background-control-panel,
.journey-sticker-control-panel,
.journey-text-control-panel,
.journey-selected-sticker-controls {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(23, 37, 52, 0.1);
}

.journey-visual-row,
.journey-image-drop-zone label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.journey-visual-row input,
.journey-visual-row select,
.journey-visual-row textarea,
.journey-image-drop-zone input {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(23, 37, 52, 0.16);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
}

.journey-visual-row textarea {
  min-height: 92px;
  padding: 8px;
  resize: vertical;
  line-height: 1.45;
}

.journey-image-drop-zone {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px dashed rgba(22, 143, 144, 0.38);
  border-radius: 10px;
  background: rgba(22, 143, 144, 0.06);
}

.journey-image-drop-zone.is-drag-over {
  border-color: var(--teal);
  background: rgba(22, 143, 144, 0.14);
}

.journey-visual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.journey-visual-panel button,
.journey-file-button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(23, 37, 52, 0.14);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-size: 12px;
  font-weight: 750;
}

.journey-file-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.journey-file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.journey-sticker-list {
  display: grid;
  gap: 7px;
}

.journey-sticker-list__item,
.journey-text-list__item {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
}

.journey-sticker-list__item[aria-pressed="true"],
.journey-text-list__item[aria-pressed="true"] {
  color: #ffffff;
  border-color: var(--ink);
  background: var(--ink);
}

.journey-sticker-list__item small,
.journey-text-list__item small {
  overflow: hidden;
  color: inherit;
  font-size: 11px;
  opacity: 0.75;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-text-list {
  display: grid;
  gap: 7px;
}

.journey-selected-text-controls {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(23, 37, 52, 0.1);
}

.journey-visual-panel .danger-button {
  color: #ad3c2d;
  border-color: rgba(173, 60, 45, 0.25);
}

.context-popover,
.context-menu,
.node-hover-preview {
  position: fixed;
  z-index: 80;
  width: min(330px, calc(100vw - 24px));
  border: 1px solid rgba(23, 37, 52, 0.12);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 22px 60px rgba(23, 37, 52, 0.18);
}

.context-popover {
  display: grid;
  gap: 10px;
  max-height: min(720px, calc(100vh - 96px));
  padding: 14px;
  overflow: auto;
}

.context-popover[data-popover-type="curve"] {
  width: min(520px, calc(100vw - 24px));
}

.context-popover__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.context-popover__header h2 {
  margin: 0;
  font-size: 18px;
}

.context-popover label {
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 750;
}

.context-popover input,
.context-popover textarea,
.context-popover select,
.context-json {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(23, 37, 52, 0.16);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
}

.context-popover textarea {
  min-height: 70px;
  resize: vertical;
}

.context-json {
  min-height: 120px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.curve-debug-json {
  min-height: 150px;
}

.journey-tuning-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(23, 37, 52, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.journey-tuning-scope {
  display: grid;
  gap: 6px;
}

.journey-tuning-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.journey-tuning-grid {
  display: grid;
  gap: 10px;
}

.journey-tuning-row {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) minmax(120px, 1.6fr) auto;
  align-items: center;
  gap: 8px;
}

.journey-tuning-label {
  color: var(--ink);
  font-weight: 800;
}

.journey-tuning-slider {
  accent-color: var(--teal);
}

.journey-tuning-slider:disabled,
.journey-tuning-scope select:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.journey-tuning-row:has(.journey-tuning-slider:disabled) {
  opacity: 0.72;
}

.journey-tuning-value {
  min-width: 52px;
  padding: 4px 7px;
  border: 1px solid rgba(23, 37, 52, 0.12);
  border-radius: 999px;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.journey-tuning-row small {
  grid-column: 1 / -1;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.35;
}

.journey-tuning-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.journey-tuning-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  padding: 6px 8px;
  border: 1px solid rgba(23, 37, 52, 0.08);
  border-radius: 8px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.54);
  font-size: 12px;
}

.journey-tuning-metric strong {
  color: var(--ink);
}

.journey-tuning-status {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(22, 143, 144, 0.18);
  border-radius: 8px;
  color: var(--teal);
  background: rgba(22, 143, 144, 0.08);
  font-size: 12px;
  line-height: 1.45;
}

.journey-tuning-status--warning {
  color: #9a5a19;
  border-color: rgba(154, 90, 25, 0.22);
  background: rgba(214, 155, 76, 0.12);
}

.context-note,
.context-status {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.context-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.context-popover .danger-button,
.context-menu .danger-button {
  color: #ad3c2d;
  border-color: rgba(173, 60, 45, 0.22);
}

.context-menu {
  display: grid;
  gap: 4px;
  width: 230px;
  padding: 6px;
}

.context-menu button {
  justify-content: flex-start;
  width: 100%;
  padding: 8px 10px;
  text-align: left;
}

.node-hover-preview {
  display: grid;
  gap: 7px;
  width: min(280px, calc(100vw - 24px));
  padding: 12px;
  pointer-events: none;
}

.node-hover-preview .placeholder-image {
  min-height: 62px;
}

.node-hover-preview p,
.node-hover-preview strong {
  margin: 0;
}

.node-hover-preview__type,
.node-hover-preview__date {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.area-resize-handle {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 8px;
  width: min(240px, 46vw);
  height: 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(23, 37, 52, 0.16);
  transform: translateX(-50%);
  cursor: ns-resize;
}

.area-resize-handle::before {
  content: "";
  position: absolute;
  inset: 5px 34px;
  border-top: 2px solid rgba(255, 255, 255, 0.72);
}

.area-edit-badge {
  position: absolute;
  z-index: 8;
  top: 14px;
  left: 14px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(23, 37, 52, 0.12);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 24px rgba(23, 37, 52, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.timeline-event-popover {
  position: fixed;
  z-index: 70;
  left: var(--popover-left, 50%);
  top: var(--popover-top, 50%);
  width: min(340px, calc(100vw - 36px));
  pointer-events: auto;
}

.timeline-event-popover__panel {
  position: relative;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(139, 140, 246, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 64px rgba(23, 37, 52, 0.2);
  backdrop-filter: blur(18px);
}

.timeline-event-popover__panel::before {
  position: absolute;
  top: 34px;
  left: -9px;
  width: 18px;
  height: 18px;
  content: "";
  border-left: 1px solid rgba(139, 140, 246, 0.16);
  border-bottom: 1px solid rgba(139, 140, 246, 0.16);
  background: rgba(255, 255, 255, 0.96);
  transform: rotate(45deg);
}

.timeline-event-popover[data-side="left"] .timeline-event-popover__panel::before {
  right: -9px;
  left: auto;
  border: 0;
  border-top: 1px solid rgba(139, 140, 246, 0.16);
  border-right: 1px solid rgba(139, 140, 246, 0.16);
}

.timeline-event-popover__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.timeline-event-popover__type {
  margin: 0 0 6px;
  color: #6d6feb;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timeline-event-popover h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.14;
}

.timeline-event-popover__close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(23, 37, 52, 0.14);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-size: 20px;
  line-height: 1;
}

.timeline-event-popover__body {
  display: grid;
  gap: 10px;
}

.timeline-event-popover__body p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.58;
}

.timeline-event-popover__date {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

.timeline-event-popover__image-wrap,
.timeline-event-popover__empty-image {
  position: relative;
  display: grid;
  min-height: 180px;
  overflow: hidden;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(139, 140, 246, 0.12), rgba(6, 182, 212, 0.08));
}

.timeline-event-popover__image-wrap img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.timeline-event-popover__empty-image span {
  color: rgba(23, 37, 52, 0.56);
  font-size: 13px;
  font-weight: 800;
}

.timeline-event-popover__arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  border: 1px solid rgba(23, 37, 52, 0.12);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 22px rgba(23, 37, 52, 0.16);
  font-size: 24px;
  transform: translateY(-50%);
}

.timeline-event-popover__arrow[data-gallery-action="prev"] {
  left: 8px;
}

.timeline-event-popover__arrow[data-gallery-action="next"] {
  right: 8px;
}

.timeline-event-popover__caption,
.timeline-event-popover__counter {
  margin: 7px 0 0;
  color: rgba(23, 37, 52, 0.64);
  font-size: 12px;
  font-weight: 750;
}

.timeline-event-popover__thumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
}

.timeline-event-popover__thumbs button {
  width: 48px;
  height: 38px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #ffffff;
}

.timeline-event-popover__thumbs button[aria-pressed="true"] {
  border-color: #8b8cf6;
}

.timeline-event-popover__thumbs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-event-popover__more {
  min-width: 34px;
  padding: 6px 8px;
  border-radius: 999px;
  color: #6d6feb;
  background: rgba(139, 140, 246, 0.12);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.hidden-entrance {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  opacity: 0.045;
  background: var(--teal);
  text-decoration: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.hidden-entrance:hover,
.hidden-entrance:focus-visible {
  opacity: 0.28;
  transform: translateY(-1px);
}

.hidden-entrance:focus-visible,
.timeline-view-switch button:focus-visible,
.editor-toggle:focus-visible,
.homepage-editor button:focus-visible {
  outline: 2px solid rgba(22, 143, 144, 0.48);
  outline-offset: 3px;
}

.site-footer {
  position: fixed;
  z-index: 2;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 12px;
  width: min(92vw, 720px);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.site-footer__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: rgba(24, 42, 58, 0.46);
  text-decoration: none;
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
  color: rgba(24, 42, 58, 0.72);
  text-decoration: underline;
}

.site-footer__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.private-page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
  background:
    radial-gradient(circle at 50% 24%, rgba(21, 156, 165, 0.08), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f6fbfc 52%, #eef7f8 100%);
}

.private-panel {
  width: min(100%, 820px);
  padding: clamp(28px, 6vw, 52px);
  border: 1px solid rgba(24, 42, 58, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 20px 70px rgba(24, 42, 58, 0.08);
}

.entrance-panel {
  max-width: 680px;
}

.private-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border: 1px solid rgba(24, 42, 58, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 18px;
  padding: 4px 10px;
  border: 1px solid rgba(22, 143, 144, 0.18);
  border-radius: 999px;
  color: var(--teal);
  background: rgba(22, 143, 144, 0.07);
  font-size: 13px;
  font-weight: 700;
}

.private-panel h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 82px);
}

.private-copy,
.safety-note,
.app-card p {
  color: var(--ink-soft);
  line-height: 1.7;
}

.private-copy {
  max-width: 620px;
  margin: 0;
  font-size: clamp(17px, 2vw, 21px);
}

.safety-note {
  max-width: 620px;
  margin: 18px 0 0;
  padding-left: 14px;
  border-left: 2px solid rgba(22, 143, 144, 0.28);
  font-size: 15px;
}

.private-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-action,
.secondary-action,
.card-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.primary-action {
  color: #ffffff;
  background: var(--ink);
}

.secondary-action,
.card-link {
  color: var(--ink);
  border: 1px solid rgba(24, 42, 58, 0.14);
  background: rgba(255, 255, 255, 0.52);
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.app-card {
  min-height: 164px;
  padding: 18px;
  border: 1px solid rgba(24, 42, 58, 0.12);
  border-radius: 8px;
  background: rgba(246, 251, 252, 0.66);
}

.card-status {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

.app-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.app-card p:last-child {
  margin: 0;
  font-size: 15px;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.journey-sketch-canvas {
  position: relative;
  width: 100%;
  height: max(100vh, var(--canvas-height, 2400px));
  min-height: 100vh;
  margin: 0 0 84px;
  overflow: hidden;
  touch-action: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
}

.timeline-home[data-editor-mode="edit"] .journey-sketch-canvas {
  transform: scale(var(--editor-zoom, 1));
  transform-origin: top left;
  transition: transform 160ms ease;
}

.timeline-home[data-focus-mode="true"] .timeline-floating-controls,
.timeline-home[data-focus-mode="true"] .journey-back-link {
  display: none;
}

.timeline-home[data-focus-mode="true"] {
  min-height: 100vh;
  background: #eef1f4;
}

.journey-focus-viewport {
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 88px);
  padding: 28px 24px 96px;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(238, 241, 244, 0.98), rgba(231, 235, 239, 0.98));
}

.journey-focus-stage {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 auto;
  overflow: visible;
  border: 2px solid rgba(30, 45, 65, 0.25);
  border-radius: 10px;
  background: #fffdf8;
  box-shadow:
    0 18px 48px rgba(23, 37, 52, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.7);
}

.journey-focus-stage .journey-sketch-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--canvas-width) * 1px);
  max-width: none;
  height: var(--canvas-height, 2400px);
  min-height: 0;
  margin: 0;
  transition: none;
}

.journey-sketch-background,
.journey-sketch-stickers,
.journey-sketch-strokes,
.journey-sketch-nodes,
.journey-sketch-interaction {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.timeline-home .journey-sketch-interaction {
  pointer-events: none;
}

.journey-sketch-background {
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.journey-sketch-strokes {
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}

.journey-sketch-stroke-shadow {
  fill: none;
  stroke: rgba(139, 140, 246, 0.22);
  stroke-width: 9px;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
  filter: drop-shadow(0 5px 14px rgba(139, 140, 246, 0.16));
}

.journey-sketch-stroke-main {
  fill: none;
  stroke: #8b8cf6;
  stroke-width: 4px;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 5px rgba(83, 90, 190, 0.18));
}

.journey-sketch-preview-line {
  fill: none;
  stroke: rgba(22, 143, 144, 0.72);
  stroke-width: 4px;
  stroke-dasharray: 10 8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.journey-sketch-snap-hint,
.journey-sketch-endpoint,
.journey-sketch-sample {
  fill: #ffffff;
  stroke: rgba(22, 143, 144, 0.58);
  stroke-width: 1.5px;
}

.journey-sketch-endpoint {
  opacity: 0.42;
}

.journey-sketch-sample {
  fill: rgba(22, 143, 144, 0.82);
  stroke: #ffffff;
  opacity: 0.82;
}

.journey-sketch-eraser-preview {
  fill: rgba(173, 60, 45, 0.12);
  stroke: rgba(173, 60, 45, 0.58);
  stroke-width: 2px;
  stroke-dasharray: 5 5;
}

.journey-sketch-stickers {
  z-index: 1;
  pointer-events: none;
}

.journey-sketch-sticker {
  position: absolute;
  left: calc(var(--sticker-x) * 1%);
  top: calc(var(--sticker-y) * 1%);
  width: calc(var(--sticker-width) * 1%);
  aspect-ratio: var(--sticker-aspect-ratio, 1);
  transform: translate(-50%, -50%) rotate(calc(var(--sticker-rotation) * 1deg));
  transform-origin: center;
  pointer-events: none;
}

.timeline-home[data-editor-mode="edit"][data-active-tool="select"] .journey-sketch-sticker {
  pointer-events: auto;
  cursor: grab;
}

.journey-sketch-sticker img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(23, 37, 52, 0.16);
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.timeline-home[data-editor-mode="edit"][data-active-tool="select"] .journey-sketch-sticker.is-selected img {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}

.journey-sticker-resize,
.journey-sticker-rotate,
.journey-sticker-delete {
  position: absolute;
  display: none;
}

.timeline-home[data-editor-mode="edit"][data-active-tool="select"] .journey-sketch-sticker.is-selected .journey-sticker-resize,
.timeline-home[data-editor-mode="edit"][data-active-tool="select"] .journey-sketch-sticker.is-selected .journey-sticker-rotate,
.timeline-home[data-editor-mode="edit"][data-active-tool="select"] .journey-sketch-sticker.is-selected .journey-sticker-delete {
  display: block;
  pointer-events: auto;
}

.journey-sticker-resize {
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 5px 12px rgba(23, 37, 52, 0.2);
}

.journey-sticker-resize--nw {
  left: -12px;
  top: -12px;
  cursor: nwse-resize;
}

.journey-sticker-resize--ne {
  right: -12px;
  top: -12px;
  cursor: nesw-resize;
}

.journey-sticker-resize--sw {
  left: -12px;
  bottom: -12px;
  cursor: nesw-resize;
}

.journey-sticker-resize--se {
  right: -12px;
  bottom: -12px;
  cursor: nwse-resize;
}

.journey-sticker-rotate {
  left: 50%;
  top: -30px;
  width: 18px;
  height: 18px;
  cursor: grab;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #d9a441;
  box-shadow: 0 5px 12px rgba(23, 37, 52, 0.2);
}

.journey-sticker-delete {
  right: -10px;
  top: -42px;
  min-height: 24px;
  padding: 2px 7px;
  cursor: pointer;
  border: 1px solid rgba(173, 60, 45, 0.28);
  border-radius: 999px;
  color: #ad3c2d;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.journey-sketch-nodes {
  z-index: 3;
  pointer-events: none;
}

.journey-sketch-node {
  position: absolute;
  left: calc(var(--node-x) * 1%);
  top: calc(var(--node-y) * 1%);
  display: grid;
  width: var(--node-size, 34px);
  height: var(--node-size, 34px);
  place-items: center;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  border: 5px solid #ffffff;
  border-radius: 999px;
  color: var(--ink);
  background: var(--node-color, #8b8cf6);
  box-shadow:
    0 10px 20px rgba(23, 37, 52, 0.14),
    0 3px 7px rgba(23, 37, 52, 0.1),
    inset 0 0 0 3px color-mix(in srgb, #ffffff 24%, transparent);
  font-size: 12px;
  font-weight: 900;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.journey-sketch-node::before {
  position: absolute;
  inset: -12px;
  content: "";
  border-radius: inherit;
  background: var(--node-color, #8b8cf6);
  opacity: 0;
  filter: blur(8px);
  transform: scale(0.82);
  transition: opacity 160ms ease, transform 160ms ease;
}

.journey-sketch-node::after {
  position: absolute;
  inset: 6px;
  content: "";
  border-radius: inherit;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.95) 0 14%, transparent 15%),
    radial-gradient(circle, #ffffff 0 45%, rgba(255, 255, 255, 0.88) 46% 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.82),
    inset 0 -2px 5px rgba(83, 90, 190, 0.1);
}

.timeline-home[data-editor-mode="edit"] .journey-sketch-node {
  cursor: grab;
}

.journey-sketch-node.is-selected {
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.92),
    0 0 0 12px color-mix(in srgb, var(--node-color, #8b8cf6) 22%, transparent),
    0 18px 38px rgba(23, 37, 52, 0.18);
}

.journey-sketch-node:hover,
.journey-sketch-node:focus-visible {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.94),
    0 0 0 14px color-mix(in srgb, var(--node-color, #8b8cf6) 18%, transparent),
    0 18px 38px rgba(23, 37, 52, 0.18);
}

.journey-sketch-node.is-selected::before,
.journey-sketch-node:hover::before,
.journey-sketch-node:focus-visible::before {
  opacity: 0.26;
  transform: scale(1);
}

.journey-sketch-node__dot {
  position: relative;
  z-index: 1;
  width: 40%;
  height: 40%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.88),
    0 1px 3px rgba(23, 37, 52, 0.12);
}

.journey-sketch-node__label {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  max-width: 128px;
  padding: 3px 8px;
  border: 1px solid rgba(23, 37, 52, 0.08);
  border-radius: 999px;
  color: rgba(23, 37, 52, 0.82);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 18px rgba(23, 37, 52, 0.07);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  transform: translateX(-50%);
}

.journey-sketch-interaction {
  z-index: 4;
  pointer-events: none;
}

.journey-sketch-interaction.is-drag-over {
  background: rgba(22, 143, 144, 0.08);
}

.journey-sketch-toolbar {
  position: static;
  z-index: auto;
  width: auto;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: auto;
}

.journey-sketch-toolbar button,
.journey-sketch-toolbar input,
.journey-sketch-toolbar summary,
.journey-sketch-toolbar label,
.journey-sketch-toolbar details {
  pointer-events: auto;
}

.journey-sketch-toolbar__row,
.journey-sketch-height,
.journey-sketch-setting {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.journey-sketch-toolbar__row {
  margin-bottom: 10px;
}

.journey-sketch-save-hint {
  margin: 4px 0 10px;
  color: rgba(23, 37, 52, 0.62);
  font-size: 13px;
  line-height: 1.55;
}

.journey-sketch-sticker-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 9px;
  border: 1px solid rgba(22, 143, 144, 0.18);
  border-radius: 12px;
  background: rgba(22, 143, 144, 0.08);
}

.journey-sketch-sticker-actions[hidden] {
  display: none;
}

.journey-sketch-sticker-actions__hint {
  flex-basis: 100%;
  margin: 0;
  color: rgba(23, 37, 52, 0.66);
  font-size: 12px;
  line-height: 1.45;
}

.journey-sketch-toolbar button,
.journey-sketch-node-panel button {
  min-height: 34px;
  padding: 7px 11px;
  cursor: pointer;
  border: 1px solid rgba(23, 37, 52, 0.14);
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 800;
}

.journey-sketch-toolbar button[aria-pressed="true"] {
  color: #ffffff;
  border-color: var(--ink);
  background: var(--ink);
}

.journey-focus-controls {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: min(680px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid rgba(23, 37, 52, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 18px 54px rgba(23, 37, 52, 0.16);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.journey-focus-controls__status {
  padding: 0 6px;
  color: rgba(23, 37, 52, 0.7);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.journey-focus-controls button {
  min-height: 32px;
  padding: 6px 10px;
  cursor: pointer;
  border: 1px solid rgba(23, 37, 52, 0.14);
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.journey-focus-controls button[aria-pressed="true"] {
  color: #ffffff;
  border-color: var(--ink);
  background: var(--ink);
}

.journey-focus-controls button:focus-visible {
  outline: 3px solid rgba(22, 143, 144, 0.32);
  outline-offset: 3px;
}

.journey-sketch-toolbar button:focus-visible,
.journey-sketch-node:focus-visible,
.journey-sketch-node-panel input:focus-visible {
  outline: 3px solid rgba(22, 143, 144, 0.32);
  outline-offset: 3px;
}

.journey-sketch-height {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.journey-sketch-height input[type="range"] {
  width: min(260px, 48vw);
}

.journey-sketch-height input[type="number"] {
  width: 92px;
}

.journey-sketch-curve-settings {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(23, 37, 52, 0.1);
}

.journey-route-style-settings {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(139, 140, 246, 0.16);
  border-radius: 12px;
  background: rgba(139, 140, 246, 0.07);
}

.journey-sketch-curve-settings summary {
  cursor: pointer;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
}

.journey-route-style-settings summary {
  cursor: pointer;
  color: #6d6feb;
  font-size: 13px;
  font-weight: 900;
}

.journey-route-style-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.journey-sketch-setting {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 750;
}

.journey-sketch-setting span {
  min-width: 86px;
}

.journey-sketch-setting input {
  width: min(240px, 48vw);
}

.journey-sketch-setting strong {
  min-width: 36px;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(22, 143, 144, 0.1);
  text-align: center;
}

.journey-sketch-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 750;
}

.journey-sketch-node-panel {
  color: var(--ink-soft);
  font-size: 13px;
}

.journey-sketch-node-panel--floating {
  position: static;
  z-index: auto;
  width: auto;
  max-height: none;
  margin-top: 12px;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(139, 140, 246, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
  backdrop-filter: none;
}

.journey-sketch-node-panel label {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.journey-sketch-node-panel input {
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(23, 37, 52, 0.16);
  border-radius: 8px;
}

.journey-sketch-node-panel textarea {
  min-height: 58px;
  padding: 7px 9px;
  border: 1px solid rgba(23, 37, 52, 0.16);
  border-radius: 8px;
  resize: vertical;
}

.journey-node-style-controls,
.journey-node-gallery-editor {
  margin-top: 10px;
  padding: 9px;
  border: 1px solid rgba(139, 140, 246, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.journey-node-style-controls p,
.journey-node-gallery-editor p {
  margin: 0 0 7px;
  color: var(--ink);
  font-weight: 900;
}

.journey-node-color-grid,
.journey-node-style-actions,
.journey-node-gallery-add {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.journey-node-color-swatch {
  width: 26px;
  min-height: 26px;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--swatch-color);
  box-shadow: 0 4px 10px rgba(23, 37, 52, 0.16);
}

.journey-node-color-swatch[aria-pressed="true"] {
  outline: 3px solid rgba(139, 140, 246, 0.34);
  outline-offset: 2px;
}

.journey-node-gallery-add input[type="number"] {
  width: 92px;
}

.journey-node-gallery-add input[type="text"] {
  min-width: 180px;
  flex: 1 1 180px;
}

.journey-node-gallery-help {
  margin: 7px 0 0;
  color: rgba(23, 37, 52, 0.6);
  font-size: 12px;
  line-height: 1.45;
}

.journey-node-gallery-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.journey-node-gallery-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 9px;
  background: rgba(139, 140, 246, 0.08);
}

.journey-node-gallery-list img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 2px solid #ffffff;
  border-radius: 10px;
  background: rgba(23, 37, 52, 0.08);
  object-fit: cover;
  box-shadow: 0 5px 12px rgba(23, 37, 52, 0.12);
}

.journey-node-gallery-list__body {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 4px;
}

.journey-node-gallery-list__body strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-node-gallery-list__body input {
  width: 100%;
  min-height: 30px;
}

.journey-node-gallery-list__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.journey-node-gallery-empty {
  color: rgba(23, 37, 52, 0.58);
  font-size: 12px;
}

.journey-sketch-node-panel dl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 10px 0;
}

.journey-sketch-node-panel dl div {
  display: flex;
  gap: 5px;
}

.journey-sketch-node-panel dt {
  color: var(--ink-soft);
}

.journey-sketch-node-panel dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.journey-sketch-node-panel .danger-button {
  color: #ad3c2d;
  border-color: rgba(173, 60, 45, 0.22);
}

.journey-sketch-status {
  margin: 8px 0 0;
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
}

.journey-sketch-remote-status {
  margin: 8px 0 0;
  color: rgba(23, 37, 52, 0.68);
  font-size: 12px;
  font-weight: 750;
}

.journey-sketch-remote-status[data-error="true"] {
  color: #ad3c2d;
}

.journey-curve-import-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 37, 52, 0.34);
  backdrop-filter: blur(8px);
}

.journey-curve-import-panel {
  width: min(920px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(23, 37, 52, 0.14);
  border-radius: 14px;
  background: #fffdf8;
  box-shadow: 0 22px 72px rgba(23, 37, 52, 0.26);
}

.journey-curve-import-header,
.journey-curve-import-actions,
.journey-curve-import-controls,
.journey-curve-import-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.journey-curve-import-header {
  justify-content: space-between;
  margin-bottom: 12px;
}

.journey-curve-import-header h2 {
  margin: 0;
  font-size: 20px;
}

.journey-curve-import-file {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.journey-curve-import-file input {
  width: min(100%, 420px);
}

.journey-curve-import-panel button,
.journey-curve-import-panel select,
.journey-curve-import-panel input {
  min-height: 34px;
}

.journey-curve-import-panel button {
  padding: 7px 11px;
  cursor: pointer;
  border: 1px solid rgba(23, 37, 52, 0.16);
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.journey-curve-import-panel button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.journey-curve-import-panel button:focus-visible,
.journey-curve-import-panel select:focus-visible,
.journey-curve-import-panel input:focus-visible {
  outline: 3px solid rgba(22, 143, 144, 0.32);
  outline-offset: 3px;
}

.journey-curve-import-meta {
  margin: 0 0 12px;
}

.journey-curve-import-meta div,
.journey-curve-import-details div {
  display: grid;
  gap: 3px;
  min-width: 140px;
}

.journey-curve-import-meta dt,
.journey-curve-import-details dt {
  color: rgba(23, 37, 52, 0.52);
  font-size: 11px;
  font-weight: 850;
}

.journey-curve-import-meta dd,
.journey-curve-import-details dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.journey-curve-import-warning,
.journey-curve-import-status {
  margin: 10px 0;
  color: rgba(23, 37, 52, 0.68);
  font-size: 13px;
  font-weight: 780;
  line-height: 1.5;
}

.journey-curve-import-warning {
  color: #9a5b00;
}

.journey-curve-import-status[data-error="true"] {
  color: #a33b2f;
}

.journey-curve-import-controls {
  align-items: end;
  margin: 10px 0;
}

.journey-curve-import-controls label {
  display: grid;
  gap: 5px;
  min-width: 180px;
  font-size: 12px;
  font-weight: 850;
}

.journey-curve-import-check {
  display: inline-flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-width: auto !important;
}

.journey-curve-import-preview-wrap {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin: 14px 0;
  border: 1px dashed rgba(23, 37, 52, 0.18);
  border-radius: 12px;
  background: repeating-conic-gradient(#f4f7f8 0% 25%, #ffffff 0% 50%) 50% / 24px 24px;
}

.journey-curve-import-preview {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: var(--source-aspect, 1);
  overflow: hidden;
  border: 1px solid rgba(23, 37, 52, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.journey-curve-import-preview img,
.journey-curve-import-preview svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.journey-curve-import-preview img {
  object-fit: fill;
}

.journey-curve-import-preview-line {
  fill: none;
  stroke: rgba(22, 143, 144, 0.9);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.journey-curve-import-preview-start {
  fill: #22c55e;
  stroke: #ffffff;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.journey-curve-import-preview-end {
  fill: #ef4444;
  stroke: #ffffff;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.journey-curve-import-actions {
  margin-top: 12px;
}

.journey-curve-import-details {
  margin-top: 12px;
  color: rgba(23, 37, 52, 0.72);
  font-size: 12px;
}

.journey-curve-import-details dl {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 0;
}

@media (max-width: 900px) {
  .timeline-home[data-editor-mode="edit"] {
    padding-right: 0;
  }

  .timeline-home[data-editor-mode="edit"][data-focus-mode="false"] .journey-editor-layout,
  .timeline-home[data-editor-mode="edit"][data-focus-mode="false"][data-editor-sidebar-collapsed="true"] .journey-editor-layout,
  .timeline-home[data-editor-mode="edit"][data-focus-mode="false"][data-editor-sidebar-collapsed="false"] .journey-editor-layout {
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 0;
    max-width: 100vw;
    overflow-x: clip;
  }

  .timeline-home[data-focus-mode="true"] .journey-editor-layout {
    display: block;
  }

  .timeline-home[data-editor-mode="edit"] .context-editor-root {
    padding: 74px 8px 24px 0;
  }

  .journey-editor-sidebar {
    position: fixed;
    z-index: 112;
    top: 16px;
    right: 16px;
    bottom: 16px;
    width: min(360px, calc(100vw - 32px));
    max-height: none;
    overflow-y: auto;
  }

  .journey-editor-sidebar-rail {
    position: sticky;
    top: 74px;
    min-height: 132px;
  }

  .journey-editor-sidebar-backdrop {
    position: fixed;
    z-index: 111;
    inset: 0;
    display: block;
    padding: 0;
    cursor: pointer;
    border: 0;
    background: rgba(23, 37, 52, 0.28);
    backdrop-filter: blur(3px);
  }

  .context-toolbar {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    justify-content: center;
    overflow-x: auto;
    border-radius: 14px;
  }

  .journey-visual-panel {
    top: 56px;
    left: 10px;
    width: min(360px, calc(100vw - 20px));
    max-height: calc(100vh - 128px);
  }

  .journey-editor-panel-shell.is-collapsed {
    width: auto;
  }

  .journey-area__copy {
    margin-left: 0;
  }

  .journey-event--major {
    --event-card-width: 250px;
    --card-nudge: 36px;
  }

  .journey-event--major[data-side="left"] {
    --card-nudge: -286px;
  }

  .journey-event--minor {
    --event-card-width: 168px;
    --card-nudge: 30px;
  }

  .journey-event--minor[data-side="left"] {
    --card-nudge: -198px;
  }

  .hub-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .journey-back-link {
    top: 10px;
    left: 10px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .timeline-floating-controls {
    top: 10px;
    right: 10px;
    max-width: calc(100vw - 128px);
    gap: 6px;
  }

  .timeline-view-switch {
    width: auto;
  }

  .timeline-view-switch button,
  .editor-toggle {
    flex: 1;
    min-width: 0;
    min-height: 34px;
    padding: 7px 9px;
    font-size: 12px;
  }

  .editor-toggle {
    width: auto;
  }

  .journey-area {
    min-height: var(--area-mobile-height);
    padding: 36px 18px;
  }

  .journey-area::after {
    right: -54px;
    width: 190px;
    opacity: 0.7;
  }

  .area-path__main {
    stroke-width: 18;
  }

  .journey-event {
    width: min(var(--event-card-width), 92vw);
  }

  .journey-event--major,
  .journey-event--major[data-side="left"] {
    --event-card-width: 86vw;
    --event-card-padding: 14px;
    --event-dot-size: 28px;
    --card-nudge: 0px;
  }

  .journey-event--minor,
  .journey-event--minor[data-side="left"] {
    --event-card-width: 68vw;
    --event-card-padding: 11px;
    --event-dot-size: 16px;
    --card-nudge: 0px;
  }

  .journey-event__dot {
    left: 12px;
    top: 12px;
  }

  .placeholder-image {
    min-height: 72px;
  }

  .hidden-entrance {
    right: 18px;
    bottom: 18px;
  }

  .private-page {
    padding: 28px 16px;
  }

  .private-panel {
    padding: 26px 20px;
    border-radius: 16px;
  }

  .private-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-action,
  .secondary-action,
  .card-link {
    justify-content: center;
    text-align: center;
  }

  .journey-tuning-row,
  .journey-tuning-metrics {
    grid-template-columns: 1fr;
  }

  .journey-tuning-value {
    justify-self: start;
  }

  .journey-sketch-canvas {
    width: 100%;
    height: max(100vh, var(--canvas-height, 2400px));
    margin-left: 0;
    margin-bottom: 84px;
    border-radius: 0;
  }

  .journey-sketch-toolbar {
    padding: 10px;
  }

  .journey-sketch-node-panel--floating {
    padding: 10px;
  }

  .journey-sketch-toolbar__row {
    gap: 6px;
  }

  .journey-sketch-toolbar button,
  .journey-sketch-node-panel button {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 12px;
  }

  .journey-sketch-height input[type="range"],
  .journey-sketch-setting input {
    width: 100%;
  }

  .journey-sketch-setting {
    align-items: stretch;
  }

  .journey-focus-controls {
    bottom: 10px;
    width: calc(100vw - 16px);
    border-radius: 16px;
  }

  .journey-focus-viewport {
    min-height: calc(100vh - 108px);
    padding: 18px 12px 124px;
  }

  .journey-focus-controls__status {
    flex-basis: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
