
/* Full-viewport learning map, divided only while a step is open. */
html:has(.route-page) { scrollbar-gutter: auto; }
.route-page {
  --map-ink: #242924;
  --map-muted: #566259;
  --map-line: #dedfd5;
  --map-paper: #fffefa;
  --map-bg: #fcfcfa;
  background: var(--map-bg);
  color: var(--map-ink);
}
.route-field {
  --route-active: #a7352a;
  height: calc(100svh - var(--header));
  min-height: 500px;
  background: radial-gradient(ellipse at 53% 52%, #f9f9f4 24%, #fcfcfa 82%);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.route-view, .route-marks { position: absolute; inset: 0; }
.route-view { touch-action: none; cursor: grab; user-select: none; }
.route-view.is-panning { cursor: grabbing; }
.route-view canvas { width: 100%; height: 100%; display: block; }
.route-view:focus-visible { outline-offset: -5px; }
.route-marks { z-index: 2; pointer-events: none; }
.route-heading {
  position: absolute;
  top: 32px;
  left: clamp(25px, 4.3vw, 75px);
  z-index: 3;
  pointer-events: none;
  transition: opacity .24s ease;
}
.route-heading h1 { font-size: clamp(31px, 3.2vw, 52px); font-weight: 720; line-height: 1.24; }
.route-heading p { margin-top: 10px; color: var(--map-muted); font-size: 14px; max-width: 28em; }
.route-actions { display: flex; align-items: center; gap: 16px; margin-top: 20px; pointer-events: auto; }
.route-actions.is-overview [data-discover] { padding-left: 0; }
.route-primary, .route-secondary {
  min-height: 42px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 620;
  padding: 8px 13px;
  border: 0;
  transition: color .2s, background-color .2s, transform .2s;
}
.route-primary { background: #a83228; color: #fff; display: inline-flex; align-items: center; gap: 14px; }
.route-primary:hover { background: #861e18; transform: translateY(-2px); }
.route-secondary { color: #7d342d; border: 1px solid #cecbc0; background: #fffefa; }
.route-secondary:hover { background: #f7eeea; }
.route-field.panel-open .route-heading { opacity: 0; pointer-events: none; }
.route-field.panel-open .route-actions { visibility: hidden; }

.world-mark {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate3d(var(--mark-x,0px),var(--mark-y,0px),0) translate(-50%,-100%);
  padding: 0;
  pointer-events: auto;
  white-space: nowrap;
  color: #28312b;
}
.world-mark:hover, .world-mark[aria-current="step"] { color: var(--mark-color); }
.world-step, .world-goal, .world-family, .world-branch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 5px 10px 5px 6px;
  border: 1px solid #d6d7c9;
  background: #fffefa;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 690;
  box-shadow: 0 3px 8px #44463414;
  transition: background .18s, border-color .18s;
}
.world-step::after, .world-goal::after, .world-family::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  height: 10px;
  width: 1px;
  background: #75786a;
}
.mark-number, .legend-circle {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--mark-color, #a83228);
  color: white;
  font-size: 12px;
  font-weight: 690;
}
.world-goal { border-color: var(--mark-color); }
.world-goal .mark-number { border-radius: 4px; }
.world-step[aria-current="step"], .world-goal[aria-current="step"] {
  border-color: var(--mark-color);
  box-shadow: 0 6px 16px #533f302b;
  background: #fff8ed;
}
.world-mark.world-course {
  display: grid;
  place-items: center;
  width: 30px;
  height: 29px;
  background: #eef3e9;
  border: 1px solid #849578;
  border-radius: 5px;
  color: #3f573c;
  transition: background .18s, color .18s;
}
.world-mark.world-course:hover { background: #476342; color: #fff; }
.world-family { padding-left: 10px; min-height: 39px; font-size: 14px; }
.world-family i { width: 7px; height: 7px; background: var(--mark-color); border-radius: 2px; }
.world-branch {
  min-height: 30px;
  padding: 4px 8px;
  font-size: 11px;
  border-style: dashed;
  color: #536055;
  font-weight: 560;
  box-shadow: none;
}
.world-branch:hover { background: #fff; border-color: var(--mark-color); }
.route-dock {
  pointer-events: none;
  position: absolute;
  inset: auto clamp(18px, 3.2vw, 54px) 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 4;
  gap: 16px;
}
.route-field.is-overview .route-dock { bottom: 28px; }
.route-legends, .route-tools { display: flex; align-items: center; gap: 8px; }
.route-legends span {
  display: inline-flex; align-items: center; gap: 6px;
  color: #4e584d; font-size: 11px; white-space: nowrap;
}
.route-legends { gap: 13px; }
.legend-circle { width: 15px; height: 15px; font-size: 9px; }
.legend-course, .legend-goal { width: 13px; height: 11px; border-radius: 2px; }
.legend-course { background: #edf2e7; border: 1px solid #758a6b; }
.legend-goal { background: #a83228; border: 1px solid #a83228; }
.route-tools button {
  pointer-events: auto;
  min-height: 40px;
  min-width: 43px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #d7d9ce;
  background: #fffefa;
  color: #3d493f;
  font-size: 12px;
  font-weight: 630;
}
.route-tools button:hover { color: #a83228; background: #fff; border-color: #c0b39d; }
.route-tools .route-icon-button { min-width: 34px; font-size: 19px; padding: 4px; line-height: 1; }
#route-help { font-size: 11px; color: #566259; text-align: center; }
.route-ribbon {
  position: absolute;
  z-index: 4;
  bottom: 18px;
  left: clamp(18px, 3.2vw, 54px);
  right: clamp(18px, 3.2vw, 54px);
  min-height: 52px;
  display: flex;
  align-items: stretch;
  padding: 4px;
  border: 1px solid #deded3;
  border-radius: 11px;
  background: #fffefa;
}
.route-ribbon button {
  min-height: 43px;
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  white-space: nowrap;
  color: #505a50;
  font-size: 12px;
}
.route-ribbon button + button { position: relative; }
.route-ribbon button + button::before { content: ""; position: absolute; height: 18px; width: 1px; background: #e4e3d9; top: 50%; left: 0; transform: translateY(-50%); }
.route-ribbon button span {
  display: inline-grid; place-items: center; width: 19px; height: 19px; flex: none; border-radius: 50%;
  color: #766a51; background: #f0ede2; font-size: 11px; font-weight: 630;
}
.route-ribbon button:hover { color: var(--route-active); background: #f5f0e9; }
.route-ribbon button[aria-current="step"] { background: #f4ebe2; color: var(--route-active); }
.route-ribbon button[aria-current="step"] span { background: var(--route-active); color: white; }
.route-ribbon button [class] { font-size: 12px; }
.route-field.panel-open .route-dock { bottom: 86px; }
.route-field.panel-open.is-overview .route-dock { bottom: 24px; }

.route-panel {
  position: absolute;
  top: 18px;
  right: clamp(18px, 2.5vw, 42px);
  bottom: 142px;
  z-index: 5;
  width: min(450px, 39vw);
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--map-paper);
  border: 1px solid #dfded2;
  border-radius: 13px;
  box-shadow: 0 13px 37px #3a3b311d;
  overflow: hidden;
  animation: route-in .28s cubic-bezier(.16,1,.3,1) both;
}
.route-field.is-overview .route-panel { bottom: 83px; }
@keyframes route-in { from { opacity: .5; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.route-panel-bar {
  padding: 6px 10px 1px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.route-back, .route-close {
  border: 0; background: transparent; color: #515952;
  min-height: 40px; padding: 4px; border-radius: 6px; font-size: 13px;
}
.route-close { min-width: 40px; font-size: 26px; line-height: 1; }
.route-back:hover, .route-close:hover { color: #a83228; background: #f4eee7; }
.route-panel-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 4px 24px 22px; scrollbar-color: #c8c6b9 transparent;
}
.route-panel-body h2 { font-size: clamp(22px, 2.3vw, 33px); font-weight: 705; line-height: 1.3; margin: 4px 0 9px; }
.route-panel-body h2:focus { outline: none; }
.route-lead { color: #475449; font-size: 14px; line-height: 1.76; margin: 9px 0 15px; }
.route-breadcrumb { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #586157; font-size: 11px; }
.route-breadcrumb button { border: 0; padding: 3px 0; min-height: 27px; text-decoration: underline; text-underline-offset: 4px; }
.step-diagram { margin: 14px 0 12px; border: 1px solid #e3e1d5; background: #f6f5ee; padding: 11px 12px; border-radius: 7px; overflow: hidden; }
.step-diagram figcaption { color: #536052; font-size: 11px; line-height: 1.55; margin-top: 8px; }
.diagram-header { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--route-active); font-weight: 650; }
.diagram-parts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 9px 0 2px; list-style: none; counter-reset: visual-item; }
.diagram-parts li { padding: 5px 8px; background: #fffdf7; border: 1px solid #e6e2d7; border-radius: 4px; font-size: 12px; }
.diagram-script .diagram-parts li::before { counter-increment: visual-item; content: counter(visual-item); margin-right: 5px; color: #a83228; }
.story-frames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.story-frames div { min-width: 0; }
.story-frames img { width: 100%; height: clamp(70px, 12vh, 124px); object-fit: cover; object-position: center 61%; border-radius: 3px; }
.story-frames span { display: block; font-size: 10.5px; margin-top: 3px; color: #4c584d; }
.step-finish img { width: 100%; height: clamp(85px, 14vh, 146px); object-fit: cover; object-position: 50% 60%; border-radius: 4px; }
.asset-set { display: grid; grid-template-columns: 1fr 1fr 41px; gap: 6px; }
.asset-set img { width: 100%; height: 97px; object-fit: cover; object-position: 50% 61%; border-radius: 4px; }
.swatches { display: grid; grid-auto-rows: 1fr; gap: 5px; }
.swatches i { display: block; border-radius: 3px; background: #943928; }
.swatches i:nth-child(2) { background: #d9c8ab; }
.swatches i:nth-child(3) { background: #5c5d5a; }
.route-output { display: flex; align-items: start; gap: 10px; background: #eef1e9; padding: 9px 10px; border-radius: 5px; font-size: 13px; }
.route-output strong { flex: none; color: #354736; }
.route-output span { color: #445443; }
.route-trial { margin: 14px 0; font-size: 13px; color: #47564c; line-height: 1.75; }
.route-trial strong { color: #823a2f; margin-right: 4px; }
.route-details { padding: 0 0 3px; border-top: 1px solid var(--map-line); margin-top: 12px; }
.route-details > summary { min-height: 43px; padding: 10px 0; font-size: 14px; font-weight: 630; }
.route-details > summary::marker { color: #a83228; }
.route-details.related-course { border: 1px solid #d1dbca; padding: 0 11px; border-radius: 6px; background: #f6f8f2; margin: 14px 0 1px; }
.related-course > summary { display: flex; align-items: center; gap: 8px; color: #405738; list-style: none; }
.related-course > summary::after { content: "+"; margin-left: auto; line-height: 1; font-size: 19px; }
.related-course[open] > summary::after { content: "−"; }
.course-group { padding: 7px 1px 8px; }
.course-group + .course-group { border-top: 1px solid #dce2d6; }
.course-flag { display: inline-flex; align-items: center; gap: 6px; min-height: 27px; padding: 1px 7px; font-weight: 640; font-size: 11px; border-radius: 3px; background: #e5eee0; color: #365039; }
.course-flag.red { background: #f2e4df; color: #80352b; }
.course-flag.blue { background: #e5edf3; color: #3b5a6e; }
.route-row {
  width: 100%; min-height: 45px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 2px; background: transparent; border: 0; border-bottom: 1px solid #e5e4d9;
  font-size: 14px; color: #333d34; text-align: left; font-weight: 620;
}
.route-row small { display: block; margin-top: 3px; font-size: 12px; font-weight: 440; color: #586258; }
.route-row > span:last-child { color: #a83228; }
.route-row:hover { color: #a83228; }
.route-proof { padding-top: 5px; }
.route-proof h3, .route-result-block h3, .route-directory-group h3 { margin: 10px 0 5px; color: #28352c; font-size: 15px; }
.route-proof .route-observe, .route-result-block p { font-size: 13px; color: #4d584e; line-height: 1.75; }
.route-directory-group h3 { margin-top: 20px; }
.route-search {
  width: 100%; min-height: 44px; padding: 9px 11px; color: var(--map-ink);
  border: 1px solid #d8dbd0; border-radius: 6px; background: #f8f8f2; font-size: 14px;
}
.route-search::placeholder { color: #586158; }
.route-panel-footer { display: flex; justify-content: space-between; gap: 10px; padding: 8px 15px; border-top: 1px solid #e4e2d8; background: var(--map-paper); }
.route-panel-footer button {
  min-height: 42px; padding: 5px 10px; border: 1px solid #d9dace; border-radius: 6px;
  background: #fffefa; color: #515b51; font-size: 12px; font-weight: 650; text-align: left;
}
.route-panel-footer button:last-child { color: #fff; background: #a83228; border-color: #a83228; }
.route-panel-footer button:last-child:hover { background: #81251d; }
.route-panel-footer button:disabled { opacity: .43; }
.route-noscript { position: absolute; bottom: 70px; left: 28px; }
.route-page .header-consult { white-space: nowrap; }
@media (max-width: 900px) {
  #route-help { display: none; }
  .route-branch { font-size: 11px; }
}
@media (max-width: 699px) {
  .route-field { min-height: 460px; }
  .route-heading { top: 21px; left: 20px; }
  .route-heading h1 { font-size: 29px; }
  .route-heading p { margin-top: 5px; font-size: 12px; max-width: 22em; }
  .route-actions { gap: 9px; margin-top: 12px; }
  .route-primary, .route-secondary { min-height: 38px; font-size: 11px; padding: 6px 10px; }
  .route-dock { flex-wrap: wrap; justify-content: space-between; gap: 7px; inset: auto 12px 77px; }
  .route-legends { gap: 7px; }
  .route-legends span { font-size: 10px; gap: 4px; }
  .route-tools { gap: 4px; }
  .route-tools button { min-height: 39px; min-width: 39px; padding: 5px 7px; font-size: 11px; }
  .route-tools .route-icon-button { min-width: 31px; }
  .route-field.panel-open .route-dock { visibility: hidden; }
  .route-ribbon { bottom: 13px; left: 12px; right: 12px; min-height: 51px; border-radius: 8px; overflow-x: auto; scrollbar-width: thin; }
  .route-ribbon button { min-width: 70px; gap: 4px; flex-direction: column; padding: 3px 6px; font-size: 10px; }
  .route-ribbon button span { width: 16px; height: 16px; font-size: 9.5px; }
  .route-field.panel-open .route-ribbon { visibility: hidden; }
  .world-family, .world-step, .world-goal { min-height: 34px; font-size: 11px; gap: 4px; padding: 4px 7px 4px 4px; }
  .mark-number { width: 21px; height: 21px; font-size: 10px; }
  .world-family { padding-left: 8px; }
  .world-branch { min-height: 35px; }
  .route-field .route-panel {
    top: auto; bottom: 10px; left: 10px; right: 10px; width: auto;
    height: min(60%, 465px);
    animation-name: route-sheet;
  }
  .route-panel-body { padding: 2px 17px 14px; }
  .route-panel-body h2 { font-size: 23px; }
  .route-panel-bar { padding: 4px 8px 0 13px; }
  .route-panel-body .route-lead { font-size: 13px; }
  .route-panel-footer { padding: 6px 10px; }
  .route-panel-footer button { min-height: 39px; }
}
@keyframes route-sheet { from { opacity: .6; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media(prefers-reduced-motion:reduce) {
  .route-panel { animation: none; }
  .route-heading, .route-primary, .route-secondary, .world-mark { transition: none; }
}

.route-ribbon button[data-completed] { color:var(--route-active); }
.route-ribbon button[data-completed] span { outline:1px solid var(--route-active); color:var(--route-active); }
.step-script dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:0; }
.step-script dl > div { padding:9px 0; border-top:1px solid #a8322877; }
.step-script dt { color:#595245; font-size:11px; }
.step-script dd { margin:3px 0 0; font-weight:650; font-size:14px; line-height:1.45; }
.movement-sequence { display:grid; gap:9px; margin:2px 0 9px; }
.movement-sequence div { display:grid; grid-template-columns:5em 1fr; gap:10px; align-items:center; font-size:12px; }
.movement-sequence i { position:relative; display:block; height:7px; border-radius:9px; background:#e6dfd0; }
.movement-sequence i::after { content:""; display:block; width:calc(72% - var(--move)*12%); height:100%; margin-left:calc(var(--move)*12%); border-radius:9px; background:var(--route-active); opacity:calc(.62 + var(--move)*.13); }
.movement-sequence div:last-child i::after { background:repeating-linear-gradient(90deg,var(--route-active),var(--route-active) 2px,transparent 2px,transparent 5px); }
.timeline-ruler,.timeline-clips,.timeline-audio { display:flex; gap:3px; margin-bottom:5px; }
.timeline-ruler { justify-content:space-between; color:#635d50; font-size:10px; }
.timeline-clips > div { min-width:0; flex:var(--length); border-radius:3px; overflow:hidden; background:#49392c; color:#fff8ec; font-size:11px; }
.timeline-clips img { width:100%; height:48px; display:block; object-fit:cover; object-position:50% 45%; }
.timeline-clips span { padding:5px 4px; display:block; }
.timeline-audio span { flex:1; min-width:0; padding:4px; border-radius:3px; background:#e8ede4; color:#3e5748; font-size:10px; }

.world-mark.world-course.course-aigc { color:#83403a; border-color:#be8e80; background:#f9ece4; }
.world-mark.world-course.course-codex { color:#324e63; border-color:#819caa; background:#e9eff2; }
.world-mark.world-course:hover { color:#fff; background:var(--mark-color); }
@media(max-width:699px) {
  .world-mark.world-course { width:32px; height:31px; }
  .world-mark.world-branch { font-size:10px; min-height:32px; }
}

.route-project { margin:0; }
.route-project div { padding:9px 0; border-top:1px solid var(--line); }
.route-project dt { color:var(--route-active); font-size:12px; font-weight:670; }
.route-project dd { margin:4px 0 0; color:#475149; font-size:13px; line-height:1.68; }
.route-legends .legend-course { background:#f7efdf; border-color:#887465; }

/* Map navigation stays in view while visitors change scale or open a stop. */
.route-field { --directions-height:55px; --variants-height:0px; --deck-height:calc(var(--directions-height) + var(--variants-height)); background:#fcfbf7; }
.route-field.has-variants { --variants-height:43px; }
.route-heading { top:32px; }
.route-heading h1 { font-size:clamp(34px,3.4vw,52px); font-weight:648; letter-spacing:-.04em; }
.route-heading p { color:#514d3c; text-wrap:pretty; max-width:25em; }
.route-field.is-overview .route-actions { display:none; }
.route-deck {
  position:absolute; z-index:7; inset:auto 0 0; height:var(--deck-height);
  background:#fffefa; border-top:1px solid #ddd5c7;
}
.route-directions,.route-variants {
  display:flex; align-items:center; justify-content:center; padding-inline:clamp(16px,3.6vw,58px);
  gap:clamp(6px,1.3vw,20px);
}
.route-directions { height:var(--directions-height); }
.route-variants { height:var(--variants-height); background:#f8f5ed; border-bottom:1px solid #e9e1d1; }
.route-direction-caption,.route-variant-caption { flex:none; color:#605642; font-size:11px; margin-right:4px; }
.route-directions button,.route-variants button {
  border:0; background:transparent; color:#424634; padding:7px 12px; min-height:34px; font-size:13px; white-space:nowrap;
  border-radius:5px; font-weight:560; transition:background .18s,color .18s;
}
.route-directions button:hover,.route-variants button:hover { background:#eee4d2; color:#823026; }
.route-directions button[aria-current],.route-variants button[aria-current] { background:#eee3d0; color:#812a22; font-weight:660; }
.route-field .route-dock,.route-field.is-overview .route-dock { bottom:calc(var(--deck-height) + 14px); }
.route-field.has-route .route-dock { bottom:calc(var(--deck-height) + 72px); }
.route-field:not(.has-route) .route-legends { display:none; }
.route-field:not(.has-route) #route-help { margin-left:auto; margin-right:auto; }
.route-tools button { background:#fffdf6; border-color:#dfd6be; }
.route-field .route-ribbon { bottom:calc(var(--deck-height) + 11px); background:#fffdf6; border-color:#dfd5bb; }
.route-field .route-panel,.route-field.is-overview .route-panel { bottom:calc(var(--deck-height) + 69px); background:#fffdf7; border-color:#e0d4bd; }
.route-field.has-route .route-panel { bottom:calc(var(--deck-height) + 120px); }
.route-field.panel-open .route-dock { visibility:hidden; }
.world-family,.world-step,.world-goal,.world-branch { background:#fffdf7; border-color:#ded4c0; color:#262f25; box-shadow:0 3px 9px #463d2017; }
.world-family { min-height:39px; font-weight:650; }
.world-family i { border-radius:50%; }
.world-branch { border-style:solid; color:#484b3b; font-weight:560; }
.world-hub {
  display:grid; justify-items:center; gap:2px; padding:8px 18px 9px; min-width:148px; min-height:58px;
  color:#fff9e8; background:#9f3025; border:1px solid #79251d; border-radius:9px;
  font-size:15px; font-weight:680; line-height:1.2; z-index:2; box-shadow:0 5px 13px #762c2628;
  transition:background .18s,box-shadow .18s;
}
.world-hub strong { letter-spacing:-.015em; }
.world-hub small { font-size:11px; font-weight:480; color:#fff0d8; }
.world-hub:hover,.world-hub:focus-visible { color:#fff9e8; background:#b33a2a; box-shadow:0 8px 22px #762c2645; }
.world-hub::after { content:""; width:10px; height:10px; position:absolute; left:calc(50% - 5px); bottom:calc(100% - 4px); background:inherit; transform:rotate(45deg); }
@media(max-width:699px) {
  .route-field { --directions-height:82px; }
  .route-field.has-variants { --variants-height:43px; }
  .route-heading { top:18px; left:18px; }
  .route-heading h1 { font-size:31px; }
  .route-heading p { max-width:23em; }
  .route-field .route-panel,.route-field.is-overview .route-panel,.route-field.has-route .route-panel {
    bottom:calc(var(--deck-height) + 8px); height:min(64%,460px);
  }
  .route-directions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:4px 8px; gap:1px 2px; }
  .route-direction-caption { margin:0; text-align:center; }
  .route-directions button,.route-variants button { min-height:36px; padding:5px 6px; font-size:11.5px; }
  .route-variants { justify-content:flex-start; gap:3px; padding-inline:9px; overflow:auto; scrollbar-width:thin; }
  .route-variant-caption { margin-right:1px; }
  .route-field.has-route .route-dock { bottom:calc(var(--deck-height) + 66px); }
  .route-field.has-route .route-ribbon { bottom:calc(var(--deck-height) + 7px); }
  .route-field #route-help { display:none; }
  .route-field:not(.has-route) .route-dock { justify-content:flex-end; }
  .world-hub { min-width:124px; min-height:51px; padding:8px 12px; font-size:14px; }
  .world-hub small { font-size:10px; }
  .world-family { min-height:35px; }
}
@media(prefers-reduced-motion:reduce) {
  .world-hub,.route-directions button,.route-variants button { transition:none; }
}

.route-field:not(.is-overview)::after {
  content:""; position:absolute; z-index:1; inset:0 0 auto; height:164px; pointer-events:none;
  background:linear-gradient(180deg,#fcfbf7 0%,#fcfbf7ed 22%,#fcfbf700 100%);
}
.route-field.panel-open::after { opacity:.22; }
.world-family:hover { border-color:var(--mark-color); background:#fffefa; }
.world-family:focus-visible,.world-step:focus-visible,.world-course:focus-visible,.world-branch:focus-visible,.world-hub:focus-visible { outline:2px solid #722e25; outline-offset:3px; }
.route-page :is(.route-directions,.route-variants) button:focus-visible { outline:2px solid #8b392a; outline-offset:2px; }
.route-variants button[aria-current] { box-shadow:inset 0 -2px #96382c; }
@media(max-width:699px) {
  .route-field:not(.is-overview)::after { height:150px; }
  .route-panel-bar .route-back { min-width:52px; }
}

/* Map controls share the site type scale. */
.poster-site.route-page { background:#edf1f2; }
.poster-site .route-field { background:radial-gradient(ellipse at 64% 38%,#dbe8ec 0%,#edf1f2 60%,#f4f5f1 100%); }
.poster-site .route-field:not(.is-overview)::after {
  height:151px; background:linear-gradient(180deg,#edf2f3 0%,#edf2f3ed 18%,#edf2f300 100%);
}
.poster-site .route-heading {
  z-index:3; color:#172b33; top:28px; left:clamp(21px,4.8vw,78px);
}
.poster-site .route-heading h1 { color:#162831; font-weight:740; font-size:clamp(34px,4.5vw,63px); letter-spacing:-.05em; line-height:1.12; }
.poster-site .route-heading p { color:#3f565e; font-size:15px; line-height:1.68; max-width:21em; margin-top:12px; }
.poster-site .route-primary { background:#19343c; color:#f5fbfb; }
.poster-site .route-primary:hover { background:#255b64; }
.poster-site .world-family,.poster-site .world-branch,.poster-site .world-step,.poster-site .world-goal {
  color:#173039; border-color:#98aeb7; background:#f5fafbef;
  box-shadow:0 3px 12px #102a3525;
  border-radius:6px; font-size:12px; font-weight:630;
}
.poster-site .world-family { padding-inline:9px; gap:6px; min-height:34px; }
.poster-site .world-family:hover,.poster-site .world-branch:hover { background:#fff; border-color:#387581; }
.poster-site .world-family i { width:5px; height:5px; border-radius:2px; }
.poster-site .world-step[aria-current],.poster-site .world-goal[aria-current] { background:#e7f9f8; border-color:#3f7c83; }
.poster-site .world-hub {
  display:flex; align-items:center; gap:9px; justify-content:center;
  min-width:130px; min-height:37px; padding:6px 11px; font-weight:680; font-size:13px;
  color:#fffaf5; background:#a6342b; border:1px solid #853126; border-radius:5px;
  box-shadow:0 3px 10px #1b262338;
}
.poster-site .world-hub:hover { background:#be493c; }
.poster-site .world-hub::after { content:""; width:7px; height:7px; left:calc(50% - 4px); bottom:calc(100% - 3px); }
.poster-site .world-bot {
  display:grid; place-items:center; width:40px; height:40px; background:transparent;
  border:1px solid transparent; border-radius:50%; z-index:3; padding:0;
}
.poster-site .world-bot:hover,.poster-site .world-bot:focus-visible { background:#dbf8ff32; border-color:#d6fffa; outline:1px solid #467f8a; outline-offset:2px; }
.world-bot span {
  position:absolute; bottom:calc(100% + 5px); left:50%; transform:translateX(-50%);
  background:#15333d; color:#edfbf8; padding:4px 7px; border-radius:4px;
  font-size:11px; white-space:nowrap; opacity:0; pointer-events:none;
  transition:opacity .18s;
}
.world-bot:hover span,.world-bot:focus-visible span { opacity:1; }
.poster-site .route-deck { background:#f4f8f7; border-color:#cdd9db; }
.poster-site .route-variants { background:#e6efee; border-color:#d1dede; }
.poster-site .route-directions button,.poster-site .route-variants button { color:#334f58; }
.poster-site .route-directions button[aria-current],.poster-site .route-variants button[aria-current] { background:#d3e7e6; color:#173f4b; box-shadow:inset 0 -2px #42737b; }
.poster-site .route-tools button,.poster-site .route-field .route-ribbon { color:#274953; background:#f5f9f8; border-color:#c8d4d8; }
.poster-site .route-tools button:hover { border-color:#6c9aa3; color:#183b45; background:#e5efee; }
.poster-site .route-tools button[data-agent-list] { background:#19343c; border-color:#19343c; color:#f4fbfb; }
.poster-site .route-field .route-panel { background:#f7faf9; border-color:#c3d1d3; box-shadow:0 14px 42px #132c4130; }
.poster-site .route-panel-body h2 { color:#173039; font-weight:700; }
.poster-site .route-panel .route-lead,.poster-site .route-skill-requires { color:#415961; }
.route-skill-source { color:#275864; font-weight:630; font-size:13px; margin-block:10px; }
.route-skill-requires { font-size:14px; line-height:1.7; margin-block:8px 15px; }
.route-skill-actions { display:flex; flex-wrap:wrap; gap:9px 15px; align-items:center; margin:18px 0 14px; }
.route-resource-source,.route-more-skills { font-size:13px; font-weight:630; color:#295c65; }
.route-more-skills { min-height:42px; padding:5px 0; background:none; border:0; }
.map-fx { position:absolute; z-index:9; inset:0; pointer-events:none; overflow:hidden; }
.map-touch-signal {
  display:block; position:absolute; top:var(--fx-y); left:var(--fx-x);
  width:22px; height:22px; border:1.5px solid #b6ffff; border-radius:50%;
  outline:1px solid #f4ffffb5; outline-offset:5px;
  box-shadow:0 0 19px #4cb4d87a,inset 0 0 11px #abedee88;
  transform:translate(-50%,-50%) scale(.36); opacity:0;
  animation:map-click-light .65s cubic-bezier(.16,.64,.32,1) both;
}
@keyframes map-click-light {
  0% { transform:translate(-50%,-50%) scale(.40); opacity:.93; }
  30% { opacity:.72; }
  100% { transform:translate(-50%,-50%) scale(5.8); opacity:0; }
}
@media (min-width:1090px) {
  .poster-site .route-field.is-overview .route-heading { top:34%; max-width:25vw; }
  .poster-site .route-field.is-overview.panel-open .route-heading { top:28px; }
}
@media (max-width:699px) {
  .poster-site .route-heading { top:18px; left:18px; max-width:calc(100% - 36px); }
  .poster-site .route-heading h1 { font-size:clamp(28px,8.5vw,38px); }
  .poster-site .route-heading p { max-width:24em; font-size:12.5px; margin-top:5px; }
  .poster-site .world-family,.poster-site .world-step,.poster-site .world-branch,.poster-site .world-goal { font-size:11px; min-height:30px; }
  .poster-site .world-hub { min-width:112px; min-height:35px; font-size:12px; }
  .poster-site .world-bot { width:42px; height:42px; }
  .poster-site .route-field.has-route .route-legends { display:none; }
  .poster-site .route-field .route-dock { justify-content:flex-end; }
}
@media(prefers-reduced-motion:reduce){.map-fx{display:none}.world-bot span{transition:none}}

.poster-site .world-bot { z-index:0; }
.poster-site .world-bot:focus-visible { z-index:3; }

/* Muted model surfaces, engraved connections and warm paper controls. */
.ref-map.route-page {
  --map-base: #eeece4;
  --map-label: #faf9f4;
  --map-edge: #d3cfc1;
  --map-ink: #242f2a;
  --map-muted: #4b5750;
  --map-accent: #9a3a30;
  background: var(--map-base);
}
.ref-map .route-field {
  background: radial-gradient(ellipse at 66% 42%, #dedfd3 0%, var(--map-base) 59%, #f7f5ef 100%);
}
.ref-map .route-field:not(.is-overview)::after {
  height: 126px;
  background: linear-gradient(180deg, #f8f6efec 0%, #f8f6efb0 45%, transparent 100%);
}
.ref-map .route-heading { color: var(--map-ink); }
.ref-map .route-heading h1 {
  width: fit-content;
  color: var(--map-ink);
  font-weight: 750;
  font-size: clamp(36px, 4.3vw, 60px);
  letter-spacing: -.038em;
  box-shadow: none;
}
.ref-map .route-heading p { color: var(--map-muted); max-width: 25em; }
.ref-map :is(.world-family,.world-branch,.world-step,.world-goal,.world-agent-pad) {
  color: var(--map-ink);
  border: 1px solid var(--map-edge);
  background: var(--map-label);
  box-shadow: 0 2px 6px #332d1a16;
  border-radius: 5px;
  font-weight: 670;
}
.ref-map :is(.world-family,.world-step,.world-goal)::after { height: 7px; background: #575f57a6; }
.ref-map .world-family i { width: 6px; height: 6px; border-radius: 50%; }
.ref-map .world-branch::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mark-color);
}
.ref-map :is(.world-family,.world-branch,.world-step,.world-goal,.world-agent-pad):hover {
  color: var(--map-ink);
  border-color: var(--mark-color);
  background: #fffdf7;
}
.ref-map :is(.world-step,.world-goal)[aria-current] { background: #f7e9dd; border-color: var(--mark-color); }
.ref-map .world-hub {
  color: #fffaf5;
  background: var(--map-accent);
  border-color: #833227;
  box-shadow: 0 4px 10px #42312c37;
}
.ref-map .world-hub:hover { background: #ac4b3d; }
.ref-map .world-agent-pad { border-color: #bfbba9; color: #3a4d42; min-height: 36px; padding-inline: 10px; display: inline-flex; align-items: center; gap: 8px; }
.ref-map .route-deck { background: #f8f6ef; border-color: var(--map-edge); }
.ref-map .route-variants { background: #eeece3; border-color: var(--map-edge); }
.ref-map :is(.route-directions,.route-variants) button { color: #3f4c43; }
.ref-map :is(.route-directions,.route-variants) button:hover { background: #eae5d9; }
.ref-map :is(.route-directions,.route-variants) button[aria-current] {
  color: #8c3027;
  background: #f3e4d8;
  box-shadow: inset 0 -2px #a64738;
}
.ref-map [data-map-help] { background: #f8f6ecd9; border-radius: 3px; padding: 3px 7px; }
.ref-map .route-tools button,.ref-map .route-field .route-ribbon {
  color: var(--map-ink);
  background: var(--map-label);
  border-color: var(--map-edge);
}
.ref-map .route-tools button[data-agent-list],.ref-map .route-primary { color: #fffaf5; background: #33463d; border-color: #33463d; }
.ref-map .route-tools button[data-agent-list]:hover,.ref-map .route-primary:hover { background: #4c6155; }
.ref-map .route-field .route-panel { background: var(--map-label); border-color: var(--map-edge); box-shadow: 0 14px 38px #292d2640; }
.ref-map .route-panel-body h2 { color: var(--map-ink); }
.ref-map .route-panel .route-lead,.ref-map .route-skill-requires { color: var(--map-muted); }
.ref-map .route-panel .route-row:hover { background: #f0ede0; }
.ref-map .route-skill-source,.ref-map .route-more-skills,.ref-map .route-resource-source { color: #355b51; }
.ref-map :is(.world-mark,.route-tools button,.route-directions button):focus-visible { outline-color: #8c382d; }
@media (max-width:699px) {
  .ref-map .world-agent-pad { min-height:31px; font-size:11px; padding-inline:8px; }
  .ref-map .route-heading h1 { font-size:clamp(28px,8.5vw,38px); }
}

.ref-map .world-node-skill {
  display:grid; place-items:center; width:29px; height:29px; border:1px solid #347a9a92;
  border-radius:7px; color:#256185; background:#f6fbff; box-shadow:0 2px 8px #203d602a;
  transition:background .15s,color .15s,border-color .15s;
}
.ref-map .world-node-skill:hover,.ref-map .world-node-skill:focus-visible { border-color:#2c7296; background:#d8f0ff; color:#16405e; }
.route-skill-control { border-color:#4388a7; background:#eef6fd; transform:rotate(45deg) scale(.76); }
.route-node-skills { margin:13px 0 10px; }
.route-node-skills h3 { margin-bottom:3px; color:#243e57; font-size:13px; }
.route-node-skills .route-row { font-size:12px; }
.route-skill-star { margin:8px 0; font-size:12px; color:#486982; }
.route-skill-star a { text-underline-offset:3px; }
.route-agent-card { margin-top:12px; }
.route-agent-meta { display:block; color:#426284; font-size:12px; }
.route-agent-shortcut {
  min-height:37px; color:#24465f; padding:6px 10px; background:#ecf5fc;
  border:1px solid #adcbdf; border-radius:6px; cursor:pointer; font-size:12px; font-weight:650;
}
.route-agent-shortcut:hover { background:#ddebfa; }
.route-agent-connect code {
  display:block; overflow-wrap:anywhere; padding:10px 11px; margin-bottom:10px;
  background:#edf5fc; color:#20445f; border:1px solid #c1d6e8; border-radius:6px; font-size:11px;
}
.route-agent-return { margin-top:13px; }
@media(max-width:699px) {
  .ref-map .world-node-skill { width:32px; height:32px; }
}
@media(prefers-reduced-motion:reduce) {
  .ref-map .world-node-skill { transition:none; }
}

.route-agent-form {
  display: grid;
  gap: 8px;
  margin-top: 21px;
  padding-top: 17px;
  border-top: 1px solid var(--map-edge);
}
.route-agent-form label { color: var(--map-ink); font-size: 14px; font-weight: 690; }
.route-agent-hint { margin: 0; color: var(--map-muted); font-size: 12px; line-height: 1.55; }
.route-agent-form textarea {
  display: block;
  width: 100%;
  min-height: 110px;
  padding: 10px 12px;
  resize: vertical;
  border: 1px solid #c9d5dc;
  border-radius: 9px;
  background: #fff;
  color: var(--map-ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
}
.route-agent-form textarea:focus-visible { outline: 2px solid #537e9f; outline-offset: 2px; }
.route-agent-form-actions, .route-agent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  align-items: center;
}
.route-agent-form-actions { justify-content: space-between; }
.route-agent-form-actions .route-primary { min-width: 100px; margin: 0; }
.route-agent-form-actions [data-agent-example], .route-agent-actions button {
  padding: 6px 9px;
  min-height: 40px;
  border: 1px solid #cbd9df;
  border-radius: 7px;
  background: #fff;
  color: var(--map-ink);
  font: inherit;
  font-size: 12px;
}
.route-agent-form-actions [data-agent-example]:hover, .route-agent-actions button:hover {
  border-color: #93b2c4;
  background: #f1f8fc;
}
.route-agent-form-actions button:disabled { opacity: .6; cursor: progress; }
.route-agent-reply:not(:empty) { margin-top: 15px; }
.route-agent-status { margin: 0; color: var(--map-muted); font-size: 13px; }
.route-agent-status.is-error { color: #a83228; }
.route-agent-output { padding: 13px 14px; border: 1px solid #d6e1e7; border-radius: 10px; background: #fff; }
.route-agent-result-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 9px; color: var(--map-ink); }
.route-agent-result-head span { color: var(--map-muted); font-size: 11px; }
.route-agent-answer {
  margin: 8px 0 11px;
  color: var(--map-ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.65;
}
.route-agent-preview { margin: 8px 0 12px; }
.route-agent-preview summary { padding-block: 6px; font-size: 13px; cursor: pointer; color: var(--map-ink); }
.route-agent-preview iframe { display: block; width: 100%; height: 310px; border: 1px solid #d9e0e4; border-radius: 7px; }
