/* Atelier Hamidi — journey layer. Shared chrome for the demo family:
   a slim rail on every page plus a full-screen journey map overlay.
   Self-contained, no libraries; reuses the family's design tokens with
   safe fallbacks so it also renders standalone. */

.jr-rail, .jr-map, .jr-map * { box-sizing: border-box; }

html.jr-on body { padding-top: 52px; }

/* ---- Rail ---- */
.jr-rail {
  position: fixed; top: 0; left: 0; right: 0; height: 44px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px;
  background: var(--paper, #ffffff);
  color: var(--ink, #0a0a0a);
  border-bottom: 1px solid var(--line, #e5e5e5);
  box-shadow: 0 6px 18px rgba(10, 10, 10, 0.08);
  font-family: var(--sans, "Manrope", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif);
  z-index: 9990;
}
.jr-rail .jr-brand {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  font: 700 11.5px/1 var(--sans, "Manrope", system-ui, sans-serif);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted, #5f5f5f);
  max-width: 26vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jr-rail .jr-brand i { width: 9px; height: 9px; border-radius: 50%; background: var(--brass, #d7b06a); flex: none; }
.jr-badge {
  flex: none; font: 800 12px/1 var(--sans, "Manrope", system-ui, sans-serif);
  letter-spacing: 0.08em; font-variant-numeric: tabular-nums;
  background: var(--ink, #0a0a0a); color: var(--brass, #d7b06a);
  border-radius: 999px; padding: 6px 11px;
}
.jr-badge span { color: rgba(255, 255, 255, 0.55); }
.jr-step { flex: 1 1 auto; min-width: 0; line-height: 1.15; }
.jr-step b {
  display: block; font: 700 13px/1.2 var(--sans, "Manrope", system-ui, sans-serif);
  color: var(--ink, #0a0a0a);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jr-step span {
  display: block; font: 600 10.5px/1.3 var(--sans, "Manrope", system-ui, sans-serif);
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted, #5f5f5f);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jr-ctl {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
}
.jr-btn {
  border: 1px solid var(--line, #e5e5e5); background: #fff; color: var(--ink, #0a0a0a);
  border-radius: 999px; min-height: 34px; padding: 0 12px;
  font: 700 12.5px/1 var(--sans, "Manrope", system-ui, sans-serif);
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.jr-btn:hover { border-color: var(--brass, #d7b06a); }
.jr-btn:active { transform: scale(0.97); }
.jr-btn:focus-visible { outline: 2px solid var(--brass, #d7b06a); outline-offset: 2px; }
.jr-btn[disabled] { opacity: 0.35; cursor: default; }
.jr-btn--nav { width: 34px; justify-content: center; padding: 0; font-size: 15px; }
.jr-btn--map { border-color: var(--brass, #d7b06a); background: var(--ink, #0a0a0a); color: #fff; }
.jr-lang { display: inline-flex; border: 1px solid var(--line, #e5e5e5); border-radius: 999px; overflow: hidden; flex: none; }
.jr-lang button {
  border: 0; background: #fff; color: var(--muted, #5f5f5f);
  font: 700 11.5px/1 var(--sans, "Manrope", system-ui, sans-serif); letter-spacing: 0.06em;
  min-height: 32px; padding: 0 10px; cursor: pointer;
}
.jr-lang button[aria-pressed="true"] { background: var(--brass, #d7b06a); color: #1c1503; }
.jr-lang button:focus-visible { outline: 2px solid var(--brass, #d7b06a); outline-offset: -2px; }

@media (max-width: 460px) {
  .jr-rail .jr-brand em { display: none; }
  .jr-rail { gap: 8px; padding: 0 10px; }
  .jr-btn--map .jr-maplbl { display: none; }
}

/* ---- Map overlay ---- */
.jr-map { position: fixed; inset: 0; z-index: 9995; }
.jr-map[hidden] { display: none; }
.jr-map .jr-scrim { position: absolute; inset: 0; background: rgba(10, 10, 10, 0.52); }
.jr-sheet {
  position: relative; margin: 4vh auto 0; width: calc(100% - 24px); max-width: 720px;
  max-height: 88vh; overflow: auto; background: var(--paper, #ffffff);
  border-radius: 10px; border: 1px solid var(--line, #e5e5e5);
  box-shadow: 0 30px 80px rgba(10, 10, 10, 0.35);
  padding: 22px 20px 26px;
  font-family: var(--sans, "Manrope", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif);
  color: var(--ink, #0a0a0a);
}
.jr-sheet header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.jr-sheet h2 {
  font-family: var(--serif, "Cormorant Garamond", Georgia, serif);
  font-weight: 500; font-size: clamp(26px, 6vw, 34px); line-height: 1.08;
}
.jr-close {
  border: 1px solid var(--line, #e5e5e5); background: #fff; color: var(--ink, #0a0a0a);
  border-radius: 999px; width: 36px; height: 36px; font-size: 16px; line-height: 1;
  cursor: pointer; flex: none;
}
.jr-close:focus-visible { outline: 2px solid var(--brass, #d7b06a); outline-offset: 2px; }
.jr-spine {
  margin-top: 10px; font: 600 12.5px/1.5 var(--sans, "Manrope", system-ui, sans-serif);
  color: var(--muted, #5f5f5f);
}
.jr-spine b { color: var(--brassink, #7d5f26); }
.jr-hint { margin-top: 14px; font: 600 11px/1.4 var(--sans, "Manrope", system-ui, sans-serif); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted, #5f5f5f); }

.jr-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.jr-steps li { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.jr-steps .jr-n {
  position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--ink, #0a0a0a); background: var(--paper, #ffffff); color: var(--ink, #0a0a0a);
  display: grid; place-items: center; font: 800 12.5px/1 var(--sans, "Manrope", system-ui, sans-serif);
  margin-top: 6px;
}
.jr-steps li:not(:last-child) .jr-n::after {
  content: ""; position: absolute; left: 13px; top: 30px; bottom: -14px; width: 2px;
  background: var(--line, #e5e5e5);
}
.jr-chip {
  width: 100%; text-align: left; border: 1px solid var(--line, #e5e5e5); border-radius: 8px;
  background: #fff; padding: 10px 14px; cursor: pointer;
  font-family: var(--sans, "Manrope", system-ui, sans-serif); color: var(--ink, #0a0a0a);
  display: grid; gap: 3px;
}
.jr-chip:hover { border-color: var(--brass, #d7b06a); }
.jr-chip:focus-visible { outline: 2px solid var(--brass, #d7b06a); outline-offset: 2px; }
.jr-chip b { font: 700 15px/1.25 var(--sans, "Manrope", system-ui, sans-serif); }
.jr-chip .jr-where { font: 600 11px/1.4 var(--sans, "Manrope", system-ui, sans-serif); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted, #5f5f5f); }
.jr-chip .jr-branch {
  font: 600 12px/1.4 var(--sans, "Manrope", system-ui, sans-serif); color: var(--brassink, #7d5f26);
  padding-left: 14px; position: relative; margin-top: 1px;
}
.jr-chip .jr-branch::before { content: ""; position: absolute; left: 0; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--brass, #d7b06a); }
.jr-steps li.done .jr-n { background: var(--ink, #0a0a0a); color: var(--brass, #d7b06a); border-color: var(--ink, #0a0a0a); }
.jr-steps li.now .jr-chip { border-color: var(--brass, #d7b06a); background: var(--brasswash, #f8f1e2); }
.jr-steps li.now .jr-n { background: var(--brass, #d7b06a); border-color: var(--brass, #d7b06a); color: #1c1503; }
