/* Start screen (landing). Result first: the finished card and the hero motion lead, the two
   actions sit right under the headline. Only the landing entry uses it; invitation, camera
   preparation and the live views keep their own layouts. Colours come from the Habitus tokens, so
   the dark theme follows automatically; the example cards are printed artefacts and stay paper. */
.start-link,
.start-copy,
.start-visual { display: none; }
.start-actions { display: contents; }
#start-language { display: none; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #start-language {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; margin-left: auto; padding: 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer;
}
#start-language:hover { background: hsl(var(--muted) / .6); }
#start-language:focus-visible { outline: 3px solid hsl(var(--ring)); outline-offset: 2px; }
html[data-embed="planner"] #start-language { display: none !important; }
/* The trail entry sits beside the primary action (맵톡) and keeps its plain text look; it lives in .start-actions, which
   the invitation and live views also show, so it appears on the landing start screen only. */
#start-trails { display: none; }
html[data-entry="landing"]:not([data-embed="planner"]) body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #start-trails { display: inline-flex; flex: none; align-items: center; gap: 10px; min-height: 64px; padding: 0 8px 0 22px; margin: 0; border: 0; background: none; color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; }
#start-trails svg { color: #778d2c; }
#start-trails path { stroke-dasharray: 70; animation: trail-path 1.2s .6s both; }
html[data-intro="pending"] #start-trails path, html[data-intro="playing"] #start-trails path { animation: none; }
#start-trails:focus-visible { outline: 3px solid hsl(var(--ring)); outline-offset: 3px; border-radius: 8px; }
#trail-picker { width: min(460px, calc(100% - 24px)); max-width: none; max-height: 90dvh; margin: auto; padding: 24px; border: 1px solid hsl(var(--border)); border-radius: 20px; color: var(--ink); background: hsl(var(--background)); overflow-y: auto; }
#trail-picker:not([open]) { display: none; }
#trail-picker::backdrop { background: rgb(0 0 0 / .6); }
.trail-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.trail-picker-head h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.trail-close { flex: none; width: 44px; height: 44px; border: 1px solid hsl(var(--border)); border-radius: 50%; background: transparent; color: inherit; font-size: 25px; cursor: pointer; }
.trail-picker-intro { font-size: 14px; color: var(--muted-ink); margin: 10px 0 20px; }
.trail-choice { display: block; width: 100%; padding: 0; margin-top: 12px; text-align: left; border: 1px solid hsl(var(--border)); border-radius: 14px; overflow: hidden; background: hsl(var(--card)); color: var(--ink); cursor: pointer; }
.trail-art { display: block; height: 66px; padding: 15px; font-size: 11px; letter-spacing: .12em; background: #e4e9d9; color: #405735; border-bottom: 1px solid hsl(var(--border)); }
.trail-camino .trail-art { background: #eee5d4; color: #745b30; }
.trail-choice-body { display: grid; gap: 5px; padding: 15px; }
.trail-choice-body strong { font-size: 21px; }
.trail-choice-body small, .trail-choice-body > span { color: var(--muted-ink); font-size: 13px; }
.trail-choice-body em { font-style: normal; font-size: 12px; margin-top: 4px; }
.trail-back { min-height: 44px; padding: 10px 14px; border: 1px solid hsl(var(--border)); border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
#trail-picker button:focus-visible { outline: 3px solid hsl(var(--ring)); outline-offset: -3px; }
.trail-detail p { font-size: 15px; line-height: 1.7; }
.trail-entry-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.trail-entry-actions button { min-height: 44px; margin: 0; padding: 10px; font-size: 14px; white-space: nowrap; }
.trail-route-map { position: relative; min-height: 0; overflow: hidden; border-radius: 10px; background: #edf0e7; }
.trail-route-map canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.trail-route-map > p, .trail-route-map > button { position: absolute; top: 8px; left: 8px; padding: 6px; background: #fff; color: #152a23; }
.trail-route-map > button { top: 44px; }
.trail-section-link { display: block; min-height: 44px; padding: 10px 0; color: inherit; border-bottom: 1px solid #80808055; }
.trail-public-dialog { width: min(540px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 16px; }
.trail-public-dialog header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.trail-public-dialog h2 { font-size: 20px; }
.trail-public-dialog button { min-height: 44px; min-width: 44px; margin: 4px; }
.trail-public-dialog img { width: 100%; max-height: 300px; object-fit: contain; }
.trail-public-dialog label { display: block; margin: 12px 0; }
.trail-public-dialog input:not([type=checkbox]) { width: 100%; min-height: 44px; box-sizing: border-box; }
.trail-public-dialog p { font-size: 14px; line-height: 1.5; }
.trail-public-dialog { box-sizing: border-box; color: var(--ink); background: hsl(var(--background)); border: 1px solid hsl(var(--border)); border-radius: 18px; }
.trail-public-dialog summary, .trail-public-dialog a { min-height: 44px; display: flex; align-items: center; }
.trail-review-body { overflow-y: auto; min-height: 0; flex: 1; padding: 0 3px; }
.trail-review-body > img { height: 132px; width: 100%; }
.trail-explore-map { height: min(42dvh, 340px); min-height: 180px; position: relative; overflow: hidden; border-radius: 12px; }
.trail-explore-map canvas { width: 100%; height: 100%; touch-action: none; }
.trail-public-dialog [hidden] { display: none !important; }
.trail-icon { width: 21px; height: 21px; flex: none; pointer-events: none; }
.trail-icon-label { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.trail-public-dialog .trail-icon-only { width: 44px; height: 44px; min-width: 44px; padding: 10px; box-sizing: border-box; }
.trail-public-dialog summary.trail-icon-label { justify-content: flex-start; cursor: pointer; }
.trail-public-dialog summary.trail-icon-only { justify-content: center; list-style: none; border-radius: 10px; }
.trail-public-dialog summary.trail-icon-only::-webkit-details-marker { display: none; }
.trail-public-dialog summary:focus-visible, .trail-public-dialog button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.trail-state { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid hsl(var(--border)); border-radius: 20px; font-size: 12px; }
.trail-map-toolbar { display: flex; align-items: flex-start; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.trail-map-toolbar > small { margin-right: auto; align-self: center; }
.trail-explore[open] { display: flex; flex-direction: column; height: min(780px, calc(100dvh - 24px)); overflow: hidden; }
.trail-map-zoom { position: absolute; right: 8px; bottom: 8px; display: flex; flex-direction: column; }
.trail-map-zoom button { margin: 0; border: 1px solid hsl(var(--border)); }
.trail-posting-map { height: 240px; position: relative; }
.trail-posting-map canvas { width: 100%; height: 100%; touch-action: none; }
.trail-crosshair { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #a10000; background: white; font-size: 24px; pointer-events: none; }
body:has(#trail-picker[open]) { overflow: hidden; }
@keyframes trail-path { from { stroke-dashoffset: 70; } to { stroke-dashoffset: 0; } }
@media (prefers-color-scheme: dark) { #start-trails svg { color: #a3bf4a; } .trail-art { background: #283426; color: #c2d6a3; } .trail-camino .trail-art { background: #3b3427; color: #e0c590; } }
@media (max-width: 639px) { #trail-picker { margin: auto auto 0; border-radius: 22px 22px 0 0; padding: 20px; } }
@media (max-height: 650px) { .trail-art { height: 42px; padding: 10px 15px; } .trail-choice-body { padding: 12px; } }
@media (prefers-reduced-motion: reduce) { #start-trails path { animation: none; } }

html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .shell { max-width: 1240px; padding: 0 clamp(20px, 5vw, 64px); }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .masthead { height: 76px; border-bottom: 0; gap: 12px; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .brand { font-size: 26px; letter-spacing: -0.05em; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink);
  font-size: 15px; font-weight: 600; cursor: pointer;
}
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-link:hover { background: hsl(var(--muted) / 0.6); }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-link:focus-visible { outline: 3px solid hsl(var(--ring)); outline-offset: 2px; }
/* The way to Waymark: Mongdor alone (the model sheet's sticker), no words, in the same 44 px target as the language button.
   A thin paper outline keeps his stones apart from a dark page; its name is the link's label and tooltip. Not inside the
   planner's embed, like the trails. */
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .waymark-link { justify-content: center; width: 44px; height: 44px; padding: 0; text-decoration: none; }
.waymark-link img { display: block; width: 31px; height: 42px; filter: drop-shadow(1.5px 0 0 #fff) drop-shadow(-1.5px 0 0 #fff) drop-shadow(0 1.5px 0 #fff) drop-shadow(0 -1.5px 0 #fff); }
html[data-embed="planner"] .waymark-link { display: none !important; }
/* The notice sits at the end of the session column, below the fold here (and under the phone dock),
   so on the start screen it floats just under the masthead instead. */
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #notice:not([hidden]) {
  position: fixed; z-index: 30; top: calc(env(safe-area-inset-top, 0px) + 72px); left: 16px; right: 16px;
  width: auto; max-width: 420px; margin: 0 auto; border-radius: 12px; font-size: 14px; text-align: center;
  box-shadow: 0 12px 32px -12px rgb(15 22 48 / .5);
}

html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: ". visual" "copy visual" "actions visual" ". visual";
  grid-template-rows: 1fr auto auto 1fr;
  column-gap: clamp(32px, 6vw, 88px);
  align-content: center;
  align-items: start;
  min-height: calc(100dvh - 76px);
  padding: 0 0 max(48px, env(safe-area-inset-bottom));
}

/* copy */
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-copy { display: block; grid-area: copy; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-title {
  margin: 0 0 18px; font-size: clamp(40px, 4.8vw, 64px); font-weight: 800; line-height: 1.06;
  letter-spacing: -0.06em; color: var(--ink);
}
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-title span { display: block; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel .start-lede {
  position: static; margin: 0 0 30px; max-width: 30em; color: var(--muted-ink);
  font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6;
}

/* actions: the existing buttons and their wiring, restyled */
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel #camera-empty {
  grid-area: actions; position: static; display: flex; flex-direction: column; align-items: flex-start;
  gap: 12px; min-height: 0; margin: 0; padding: 0; background: transparent;
}
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; width: 100%; }
/* The camera button: round and wordless, like the shutter it leads to (the camera screen offers more than MapTalk, so it is not
   named after one of them). Its name, 「카메라 열기」, is for screen readers and the tooltip. */
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel #scene-mode {
  display: grid; place-items: center; flex: none; width: 64px; height: 64px; min-height: 64px; padding: 0; border-radius: 50%;
  order: 0; margin: 0; transition: background-color 150ms, filter 150ms, transform 150ms;
  box-shadow: 0 0 0 4px hsl(var(--background)), 0 0 0 6px hsl(var(--primary) / .45);
}
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel #scene-mode { border: 1px solid transparent; background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel #scene-mode:hover:not(:disabled) { filter: brightness(1.12); }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel #scene-mode:active:not(:disabled) { transform: translateY(1px); }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel #scene-mode:focus-visible { outline: 3px solid hsl(var(--ring)); outline-offset: 3px; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-ico { flex: none; }
/* The start screen offers no call of its own (2026-11-09: its header link became the way to Waymark); the button stays for the call flow. */
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel #create-room { display: none; }
/* The invitation options (host name) belong to the call flow; on the start screen only their "초대 옵션" summary would show, as a dead line under the cards. */
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel #invite-options { display: none; }

/* visual: hero motion panel + finished cards */
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-visual { display: block; grid-area: visual; align-self: center; min-width: 0; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-hero {
  padding: 28px 24px 20px; border: 1px solid hsl(var(--border)); border-radius: 20px;
  background: hsl(var(--card));
}
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-hero .hero-motion { max-width: none; margin: 0; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-cards { position: relative; aspect-ratio: 540 / 330; margin-top: 18px; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-dots { display: none; }

/* example cards: paper, always light */
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc {
  position: absolute; overflow: hidden; container-type: inline-size; border-radius: 10px;
  background: #fff; color: #1c2a4a; box-shadow: 0 16px 40px rgb(20 26 44 / 0.22);
  font-family: inherit; letter-spacing: -0.02em;
}
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc svg { display: block; width: 100%; height: 100%; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-basic { left: 2%; top: 12%; width: 30%; aspect-ratio: 160 / 250; transform: rotate(-5deg); }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-stamp { left: 33%; top: 4%; width: 35%; aspect-ratio: 190 / 270; transform: rotate(2deg); z-index: 2; border-radius: 4px; background: #f3ede2; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-story { left: 71%; top: 8%; width: 26%; aspect-ratio: 140 / 250; transform: rotate(5deg); }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-photo { position: relative; overflow: hidden; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-chip {
  position: absolute; padding: 1.6cqw 4cqw; border-radius: 99px; background: rgb(20 26 44 / 0.66); color: #fff;
  font-size: 6.4cqw; font-weight: 600; line-height: 1.2; white-space: nowrap;
}
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-basic .sc-photo { position: absolute; inset: 0 0 auto 0; height: 38%; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-basic .sc-chip { left: 6cqw; top: 6cqw; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-basic .sc-map { position: absolute; inset: 38% 0 auto 0; height: 48%; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-foot {
  position: absolute; inset: auto 0 0 0; height: 14%; display: flex; align-items: center; justify-content: space-between;
  padding: 0 6cqw; background: #f4f1ea; font-size: 5.6cqw;
}
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-polaroid { position: absolute; inset: 5% 6% auto 6%; height: 56%; padding: 4cqw 4cqw 0; background: #fff; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-polaroid .sc-photo { height: 74%; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-caption { margin-top: 3cqw; color: #3b3226; font: 500 6.6cqw/1.2 Georgia, "Times New Roman", serif; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-ticket {
  position: absolute; left: 9%; bottom: 6%; width: 36%; aspect-ratio: 1; overflow: hidden; background: #fff;
  border: 2px dashed #c9bda6; border-radius: 6px;
}
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-ring {
  position: absolute; right: 6%; bottom: 4%; width: 42%; aspect-ratio: 1; display: grid; place-items: center;
  border: 3px solid #b5412f; border-radius: 50%; color: #b5412f; font-size: 5.2cqw; font-weight: 700;
  line-height: 1.25; text-align: center; transform: rotate(12deg);
}
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-ring::before { content: ""; position: absolute; inset: 4%; border: 1.5px solid #b5412f; border-radius: 50%; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-full { position: absolute; inset: 0; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-chip-top { left: 7cqw; top: 14cqw; font-size: 6.2cqw; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-chip-live { left: 7cqw; bottom: 9cqw; background: #fff; color: #1c2a4a; font-size: 5cqw; }
html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc-sticker {
  position: absolute; right: 7cqw; bottom: 20cqw; width: 38%; aspect-ratio: 1; overflow: hidden;
  border: 1.4cqw solid #fff; border-radius: 7%; transform: rotate(3deg);
}
@media (prefers-color-scheme: dark) {
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc { box-shadow: 0 16px 40px rgb(0 0 0 / 0.55); outline: 1px solid rgb(255 255 255 / 0.08); }
}

/* tablet: one centred column */
@media (max-width: 1023px) {
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "visual" "actions";
    grid-template-rows: none;
    justify-items: center; row-gap: 28px; min-height: 0; text-align: center;
  }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-copy { max-width: 640px; }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel .start-lede { margin-inline: auto; }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-title { font-size: clamp(40px, 7.4vw, 58px); }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-visual { width: min(100%, 640px); }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-hero { padding: 34px 30px 24px; }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel #camera-empty { align-items: center; width: min(100%, 640px); }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-actions { flex-wrap: nowrap; }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel #scene-mode { flex: none; }
}

/* phone: swipeable cards, the primary action pinned to the bottom edge */
@media (max-width: 639px) {
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel { justify-items: stretch; row-gap: 20px; text-align: left; padding-bottom: calc(132px + env(safe-area-inset-bottom)); }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-title { font-size: clamp(32px, 9.4vw, 38px); margin-bottom: 8px; }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel .start-lede { margin: 0; font-size: 15px; }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-visual { width: 100%; }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-hero { padding: 18px 14px 12px; border-radius: 18px; }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-cards {
    display: flex; gap: 12px; height: 268px; aspect-ratio: auto; margin: 16px calc(-1 * clamp(20px, 5vw, 64px)) 0;
    padding: 6px clamp(20px, 5vw, 64px) 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-cards::-webkit-scrollbar { display: none; }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .sc { position: relative; inset: auto; flex: none; width: auto; height: 100%; transform: none; scroll-snap-align: center; }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-dots { display: flex; justify-content: center; gap: 6px; margin-top: 4px; }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-dots i { display: block; width: 7px; height: 7px; border-radius: 50%; background: hsl(var(--border)); transition: width 200ms, background-color 200ms; }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-dots i.on { width: 20px; border-radius: 4px; background: var(--ink); }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel #camera-empty { align-items: stretch; width: 100%; }
  /* The dock: the camera button and the trails side by side, the pair centred (a centred camera left the trails a squeezed third). */
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-actions {
    display: flex; align-items: center; justify-content: center;
    position: fixed; inset: auto 0 0 0; z-index: 20; flex-wrap: nowrap; gap: 12px; width: auto;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid hsl(var(--border));
    background: hsl(var(--background));
  }
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel #scene-mode { flex: none; }
  html[data-entry="landing"]:not([data-embed="planner"]) body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #start-trails { flex: none; min-height: 54px; padding: 0 10px; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) #entry-panel #scene-mode,
  html[data-entry="landing"] body:not([data-entry-kind="invitation"]):not(.session-active):not(.session-ended) .start-dots i { transition: none; }
}
/* Trail UI diet: fixed short labels, state by colour/icon, explanations in an info sheet. */
.trail-icon-label > span { white-space: nowrap; }
.trail-entry-actions .trail-primary, .trail-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: hsl(var(--primary)); font-weight: 600; }
.trail-entry-actions .trail-primary { grid-column: 1 / -1; min-height: 48px; }
.trail-entry-actions button { min-width: 0; }
.trail-state.trail-due { color: #9f1239; border-color: #e3b8c4; }
.trail-entry-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trail-entry-actions button:not(.trail-primary) { flex-direction: column; gap: 4px; min-height: 64px; padding: 8px 4px; font-size: 13px; font-weight: 600; }
/* Stage 2: one-row save bar + route hero. */
.trail-hero { grid-column: 1 / -1; height: 150px; border-radius: 14px; overflow: hidden; background: #e9ecdf; border: 1px solid hsl(var(--border)); }
.trail-hero canvas { display: block; width: 100%; height: 100%; }
/* Stage 3: summary rows, location screen, card grid, manage sheet. */
.trail-locate[open] { display: flex; flex-direction: column; height: min(640px, calc(100dvh - 24px)); overflow: hidden; }
.trail-locate .trail-locate-map { flex: 1; height: auto; min-height: 240px; border-radius: 12px; overflow: hidden; }
.trail-map-hint { position: absolute; left: 10px; top: 10px; background: hsl(var(--card)); }
.trail-attrib { position: absolute; left: 6px; bottom: 4px; padding: 0 4px; border-radius: 4px; font-size: 10px; background: rgb(255 255 255 / .85); color: #222; }
.trail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0; }
.trail-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.trail-manage-img img { max-height: 200px; display: block; margin: 0 auto; }
/* Explore: map fills the dialog, controls float above it. */
.trail-explore.trail-public-dialog { padding: 0; overflow: hidden; --sb: env(safe-area-inset-bottom, 0px); --st: env(safe-area-inset-top, 0px); }
.trail-explore[open] { display: block; position: fixed; }
@media (max-width: 600px) { .trail-explore.trail-public-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; } }
.trail-explore .trail-explore-map { position: absolute; inset: 0; height: auto; min-height: 0; border-radius: 0; }
.trail-glass { background: rgb(18 18 22 / .74); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgb(255 255 255 / .14); color: #efece4; }
.trail-explore-top { position: absolute; z-index: 6; left: 10px; right: 10px; top: calc(10px + var(--st)); display: flex; align-items: center; gap: 8px; }
.trail-explore-title { flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 20px; }
.trail-explore-title h2 { margin: 0; flex: 0 1 auto; min-width: 0; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trail-explore-title .trail-state { flex: none; padding: 0; border: 0; color: #b9b5aa; font-size: 12px; white-space: nowrap; gap: 6px; }
.trail-explore-title .trail-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3fc59d; }
.trail-explore-title .trail-state.trail-bad::before { background: #e0707f; }
.trail-explore-top .trail-circ { width: 40px; height: 40px; min-width: 40px; min-height: 40px; margin: 0; padding: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; list-style: none; cursor: pointer; }
.trail-explore-top .trail-circ { appearance: none; }
/* Floating map controls carry no outline ring: a soft shadow lifts them off the tiles instead. */
.trail-explore-top .trail-glass, .trail-explore .trail-locate-btn, .trail-explore .trail-map-zoom { border-color: transparent; box-shadow: 0 2px 10px -2px rgb(0 0 0 / .4); }
.trail-explore .trail-map-zoom { right: 10px; bottom: calc(92px + var(--sb)); z-index: 6; border-radius: 12px; overflow: hidden; flex-direction: column; }
.trail-explore .trail-map-zoom button { width: 40px; height: 40px; min-width: 40px; min-height: 40px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font-size: 20px; }
.trail-explore .trail-map-zoom button + button { border-top: 1px solid rgb(255 255 255 / .14); }
.trail-explore .trail-attrib { z-index: 6; left: 8px; bottom: calc(2px + var(--sb)); font-size: 10px; line-height: 16px; }
.trail-explore .trail-attrib a { display: inline; min-height: 0; color: inherit; text-decoration: underline; }
.trail-explore-toast { position: absolute; z-index: 7; left: 50%; transform: translateX(-50%); bottom: calc(92px + var(--sb)); max-width: calc(100% - 76px); display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px 0 14px; border-radius: 20px; font-size: 13px; white-space: nowrap; }
.trail-explore-toast button { margin: 0; min-height: 30px; min-width: 0; padding: 0 12px; border: 0; border-radius: 15px; background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); font-size: 13px; }
.trail-explore .trail-locate-btn { position: absolute; z-index: 6; right: 10px; bottom: calc(180px + var(--sb)); width: 40px; height: 40px; min-width: 40px; min-height: 40px; margin: 0; padding: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.trail-locate-btn[aria-busy="true"] { opacity: .6; }

/* Trail entry: one strong button, the rest quiet. Four kinds of button only: main (lime), secondary (outline), icon, text link. */
.trail-back { border: 0; background: none; border-radius: 0; padding: 0 4px; min-height: 44px; justify-self: start; text-align: left; font-size: 14px; color: var(--muted-ink); }
.trail-back[hidden] { display: none; }
.trail-stats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.trail-stat { padding: 4px 12px; border-radius: 999px; background: hsl(var(--border) / .35); font-size: 13px; color: var(--muted-ink); }
.trail-stat b { color: var(--ink); font-weight: 700; }
.trail-entry-actions .trail-primary { background: #c6f24a; color: #14201a; border: 0; min-height: 56px; border-radius: 16px; font-size: 17px; font-weight: 700; }
.trail-entry-actions .trail-primary .trail-icon { width: 22px; height: 22px; }
.trail-entry-actions details.trail-sections { grid-column: 1 / -1; }
.trail-entry-actions details.trail-sections > summary { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1.5px solid hsl(var(--border)); border-radius: 14px; font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; }
.trail-entry-actions details.trail-sections > summary::-webkit-details-marker { display: none; }
.trail-entry-actions details.trail-sections[open] > summary { margin-bottom: 8px; }

/* Section ribbon: the whole trail as one strip, one cell per official section, width by distance. */
.trail-sections { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.trail-sections[hidden] { display: none; }
.section-ribbon-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; color: var(--muted-ink); }
.section-ribbon-head span:first-child { font-weight: 600; }
.section-ribbon { display: flex; flex-direction: column; gap: 6px; }
.section-ribbon-strip { display: flex; gap: 2px; box-sizing: border-box; height: 44px; padding: 10px 0; margin: -10px 0; } /* 44px touch band around a 24px strip */
#trail-picker .section-ribbon-cell, .trail-explore .section-ribbon-cell, .section-ribbon-cell { flex: 1 1 0; min-width: 0; width: auto; height: 24px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 3px; font-size: 0; line-height: 0; background: #2f8f74; cursor: pointer; transition: transform .12s; }
.section-ribbon-cell.is-approx { background: repeating-linear-gradient(45deg, #2f8f74 0 3px, #1b4f40 3px 6px); }
.section-ribbon-cell.is-none { background: #2f8f74; opacity: .35; }
.section-ribbon-cell.is-missing, .section-ribbon-cell.is-pending { background: hsl(var(--border) / .5); box-shadow: inset 0 0 0 1.5px hsl(var(--border)); }
.section-ribbon-cell.is-selected { background: #c6f24a; opacity: 1; box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 3.5px #c6f24a; transform: scaleY(1.12); }
.section-ribbon-cell:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
/* the walker's own section: a blue dot above the cell, the same blue as the position dot on the map */
.section-ribbon-cell.is-here { position: relative; overflow: visible; }
.section-ribbon-cell.is-here::after { content: ""; position: absolute; left: 50%; top: -9px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #3b82f6; border: 2px solid #fff; box-sizing: border-box; }
.section-ribbon-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted-ink); }
.trail-section-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid hsl(var(--border)); border-radius: 16px; }
.trail-section-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trail-section-card-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.trail-section-card-text strong { font-size: 16px; }
.trail-section-card-text span { font-size: 14px; color: var(--muted-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trail-section-nav { display: flex; gap: 4px; flex: none; }
.trail-section-nav button { width: 36px; height: 36px; min-width: 36px; min-height: 36px; margin: 0; padding: 0; border: 1px solid hsl(var(--border)); border-radius: 10px; background: transparent; color: inherit; display: grid; place-items: center; }
.trail-section-nav button:disabled { opacity: .35; }
.trail-section-nav .trail-icon { width: 18px; height: 18px; }
.trail-section-actions { display: flex; gap: 8px; align-items: stretch; }
.trail-section-actions .trail-secondary { flex: 1 1 auto; min-height: 44px; margin: 0; border: 0; border-radius: 12px; background: var(--ink); color: hsl(var(--background)); font-size: 15px; font-weight: 700; }
.trail-section-actions .trail-secondary:disabled { background: hsl(var(--border) / .5); color: var(--muted-ink); }
.trail-section-official { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid hsl(var(--border)); border-radius: 12px; color: inherit; font-size: 14px; font-weight: 600; text-decoration: none; }
.trail-section-official[hidden] { display: none; }
.trail-section-state { font-size: 11px; color: var(--muted-ink); }

/* Explore: the section sheet sits on the map's bottom edge; everything floating moves up by its height. */
.trail-explore { --sheet: 0px; }
.trail-explore .trail-sheet { position: absolute; z-index: 7; left: 0; right: 0; bottom: 0; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; padding: 4px 16px calc(16px + var(--sb)); border-radius: 22px 22px 0 0; border-width: 1px 0 0; background: rgb(18 18 22 / .88); }
.trail-explore .trail-sheet.is-open { top: 30%; }
.trail-explore .trail-sheet-handle { align-self: stretch; height: 28px; min-height: 0; margin: 0 -16px -6px; padding: 0; border: 0; background: transparent; display: grid; place-items: center; touch-action: none; cursor: grab; }
.trail-explore .trail-sheet-handle:active { cursor: grabbing; }
/* Folded: the map comes first; the strip stays so "where am I along the whole trail" never leaves the screen. */
.trail-explore .trail-sheet.is-folded { gap: 6px; padding-bottom: calc(10px + var(--sb)); }
.trail-explore .trail-sheet.is-folded .section-ribbon-head, .trail-explore .trail-sheet.is-folded .section-ribbon-ticks, .trail-explore .trail-sheet.is-folded .trail-section-card { display: none; }
.trail-explore .trail-sheet.is-folded .section-ribbon-strip { height: 32px; padding: 8px 0; margin: -8px 0; }
.trail-explore .trail-sheet.is-folded .section-ribbon-cell { height: 16px; }
.trail-explore .trail-sheet-handle span { width: 36px; height: 4px; border-radius: 2px; background: #5d5d66; }
.trail-explore .trail-sheet .section-ribbon-head { color: #b9b5aa; }
.trail-explore .trail-sheet .section-ribbon-ticks { color: #8a867c; }
.trail-explore .trail-sheet .section-ribbon-cell.is-missing, .trail-explore .trail-sheet .section-ribbon-cell.is-pending { background: #34343b; box-shadow: none; }
.trail-explore .trail-sheet .section-ribbon-cell.is-selected { box-shadow: 0 0 0 2px #121216, 0 0 0 3.5px #c6f24a; }
/* Featured section video (creator campaign). The cell mark is a shape in the ink colour, not a new colour: lime stays "selected". */
.section-ribbon-cell.has-featured { position: relative; overflow: visible; }
.section-ribbon-cell.has-featured::after { content: ""; position: absolute; left: 50%; top: -8px; transform: translateX(-30%); border-left: 6px solid currentColor; border-top: 3px solid transparent; border-bottom: 3px solid transparent; pointer-events: none; }
.trail-explore .trail-sheet .section-ribbon-cell.has-featured::after { border-left-color: #efece4; }
.trail-section-featured { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; align-items: center; color: inherit; text-decoration: none; border-radius: 10px; }
.trail-section-featured[hidden] { display: none; }
.trail-section-featured img { width: 84px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 7px; background: hsl(var(--border) / .5); }
.trail-section-featured span { display: grid; gap: 1px; min-width: 0; }
.trail-section-featured strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trail-section-featured small { font-size: 12px; color: var(--muted-ink); }
.trail-explore .trail-sheet .trail-section-featured small { color: #d8d4ca; }
.trail-section-featured:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
.trail-explore .trail-sheet .trail-section-card { padding: 0; border: 0; }
.trail-explore .trail-sheet .trail-section-card-text strong { font-size: 17px; }
.trail-explore .trail-sheet .trail-section-card-text span { color: #d8d4ca; }
.trail-explore .trail-sheet .trail-section-nav button { border-color: rgb(255 255 255 / .18); color: #efece4; width: 40px; height: 40px; min-width: 40px; min-height: 40px; border-radius: 12px; }
.trail-explore .trail-sheet .trail-section-actions .trail-primary { flex: 1 1 auto; min-height: 48px; margin: 0; border: 0; border-radius: 14px; background: #c6f24a; color: #14201a; font-size: 16px; font-weight: 800; }
.trail-explore .trail-sheet .trail-section-actions .trail-primary:disabled { background: #34343b; color: #8a867c; }
.trail-explore .trail-sheet .trail-section-whole { width: 48px; height: 48px; min-width: 48px; min-height: 48px; margin: 0; padding: 0; border: 1px solid rgb(255 255 255 / .18); border-radius: 14px; background: transparent; color: #efece4; display: grid; place-items: center; }
.trail-explore .trail-sheet .trail-section-official { min-height: 48px; border-color: rgb(255 255 255 / .18); border-radius: 14px; color: #efece4; }
.trail-explore .trail-sheet .trail-section-state { color: #8a867c; }
.trail-explore .trail-section-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -16px; border-top: 1px solid rgb(255 255 255 / .08); }
.trail-section-row { display: flex; align-items: center; gap: 4px; min-height: 56px; padding: 0 8px 0 16px; border-bottom: 1px solid rgb(255 255 255 / .08); }
.trail-section-row.is-selected { background: rgb(198 242 74 / .1); }
.trail-section-row > button { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 56px; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; font-size: 15px; }
.trail-section-num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: #2f8f74; color: #efece4; }
.trail-section-row.is-approx .trail-section-num { background: repeating-linear-gradient(45deg, #2f8f74 0 3px, #1b4f40 3px 6px); }
.trail-section-row.is-none .trail-section-num { background: #2f8f74; opacity: .45; }
.trail-section-row.is-missing .trail-section-num { background: transparent; border: 1.5px dashed #5d5d66; color: #8a867c; }
.trail-section-row.is-selected .trail-section-num { background: #c6f24a; color: #14201a; opacity: 1; }
.trail-section-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trail-section-row-text > span { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trail-section-row-text small { font-size: 12px; color: #b9b5aa; }
.trail-section-row.is-missing .trail-section-row-text > span { color: #8a867c; font-weight: 500; }
.trail-section-row-link { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #b9b5aa; }
.trail-section-row-link[hidden] { display: none; }
.trail-explore.has-sheet .trail-map-zoom { bottom: calc(var(--sheet) + 70px + var(--sb)); }
.trail-explore.has-sheet .trail-locate-btn { bottom: calc(var(--sheet) + 158px + var(--sb)); }
.trail-explore.has-sheet .trail-explore-toast { bottom: calc(var(--sheet) + 70px + var(--sb)); }
.trail-explore.has-sheet .trail-attrib { bottom: calc(var(--sheet) + 2px); }
/* Short screens (phone landscape): the sheet keeps the ribbon and the name; a tap on the ribbon zooms by itself. */
@media (max-height: 520px) {
  .trail-explore .trail-sheet { gap: 6px; padding-top: 0; }
  .trail-explore .trail-sheet .trail-sheet-handle { height: 18px; }
  .trail-explore .trail-sheet .section-ribbon-head, .trail-explore .trail-sheet .section-ribbon-ticks, .trail-explore .trail-sheet .trail-section-actions, .trail-explore .trail-sheet .trail-section-state { display: none; }
  .trail-explore .trail-sheet .section-ribbon-strip { height: 36px; padding: 10px 0; margin: -10px 0; }
  .trail-explore .trail-sheet .section-ribbon-cell { height: 16px; }
  .trail-explore .trail-sheet .trail-section-card-text strong { font-size: 14px; }
  .trail-explore .trail-sheet .trail-section-card-text span { font-size: 12px; }
  .trail-explore .trail-sheet .trail-section-nav button { width: 32px; height: 32px; min-width: 32px; min-height: 32px; }
  .trail-explore .trail-sheet.is-open { top: 12%; }
  .trail-explore .trail-sheet.is-open .trail-section-actions { display: flex; }
}
/* Wide screens: the sheet becomes a card near the bottom instead of a full-width edge. */
@media (min-width: 700px) {
  .trail-explore .trail-sheet { left: 50%; right: auto; width: min(560px, calc(100% - 24px)); bottom: 24px; transform: translateX(-50%); border-radius: 22px; border-width: 1px; }
  .trail-explore .trail-sheet.is-open { top: 20%; }
  .trail-explore.has-sheet .trail-attrib { bottom: calc(2px + var(--sb)); }
}

/* Guardian entry at the top right of the trail picker (next to close), and its view inside the same dialog
   (docs/mockups/2026-10-27-mapcall-guardian-entry.html §B). The card keeps the .trail-choice shell; words stay few. */
.trail-picker-head { flex-wrap: nowrap; }
.trail-picker-head h2 { flex: 1 1 auto; min-width: 0; word-break: keep-all; }
.guardian-entry { flex: none; position: relative; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #c6f24a; color: #14201a; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px -8px rgb(198 242 74 / .9); }
.guardian-entry::before, .guardian-entry::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #c6f24a; opacity: 0; pointer-events: none; }
.guardian-entry:hover { filter: brightness(1.04); }
.guardian-entry:focus-visible { outline: 3px solid hsl(var(--ring)); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .guardian-entry::before, .guardian-avatar::before { animation: guardian-ring 2.8s ease-out infinite; }
  .guardian-entry::after, .guardian-avatar::after { animation: guardian-ring 2.8s ease-out .5s infinite; }
  .guardian-entry svg, .guardian-avatar svg { animation: guardian-wiggle 2.8s ease-in-out infinite; transform-origin: 50% 60%; }
}
@keyframes guardian-ring { 0% { transform: scale(1); opacity: .7; } 60%, 100% { transform: scale(1.9); opacity: 0; } }
@keyframes guardian-wiggle { 0%, 70%, 100% { transform: rotate(0); } 74% { transform: rotate(-12deg); } 78% { transform: rotate(10deg); } 82% { transform: rotate(-8deg); } 86% { transform: rotate(6deg); } 90% { transform: rotate(0); } }
.guardian-view { margin-top: 4px; }
.guardian-card { border: 1px solid hsl(var(--border)); border-radius: 14px; overflow: hidden; background: hsl(var(--card)); color: var(--ink); }
/* the stage: the call screen, or the 9:16 film while it plays */
.guardian-stage { position: relative; aspect-ratio: 16 / 12; background: #0e1630; color: #eef2ff; overflow: hidden; }
.guardian-stage[data-film="1"] { aspect-ratio: 9 / 16; }
.guardian-video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #0e1630; object-fit: contain; }
.guardian-scene { position: absolute; inset: 0; display: grid; place-items: center; padding-top: 30px; box-sizing: border-box; }
.guardian-scene::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 70% at 50% 45%, rgb(198 242 74 / .14), transparent 70%); }
.guardian-topo { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .18; }
.guardian-signals { position: absolute; left: 10px; top: 10px; display: flex; gap: 5px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.guardian-signals li { font: 600 10.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .06em; padding: 5px 7px; border-radius: 999px; background: rgb(0 0 0 / .35); border: 1px solid rgb(255 255 255 / .14); color: #cfd6ee; }
.guardian-signals li[data-on="1"] { background: hsl(var(--hl-risk, 343 80% 55%)); border-color: transparent; color: #fff; }
.guardian-call { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; }
.guardian-avatar { position: relative; width: 52px; height: 52px; border-radius: 50%; background: #c6f24a; color: #14201a; display: grid; place-items: center; }
.guardian-avatar::before, .guardian-avatar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #c6f24a; opacity: 0; }
.guardian-from { display: grid; gap: 2px; margin: 0; }
.guardian-from b { font-size: 19px; letter-spacing: -.03em; }
.guardian-from small { font: 600 11px/1.4 ui-monospace, Menlo, monospace; letter-spacing: .1em; text-transform: uppercase; color: #c6f24a; }
.guardian-why { margin: 2px 0 0; padding: 7px 12px; border-radius: 999px; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .12); font-size: 13px; font-weight: 600; }
.guardian-why::before { content: "●"; color: hsl(var(--hl-risk, 343 80% 55%)); margin-right: 6px; }
.guardian-replay { position: absolute; right: 10px; top: 10px; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid rgb(255 255 255 / .18); background: rgb(0 0 0 / .35); color: #eef2ff; display: grid; place-items: center; cursor: pointer; }
.guardian-replay:focus-visible, .guardian-go:focus-visible, .guardian-skip:focus-visible, .guardian-wish-open:focus-visible { outline: 3px solid hsl(var(--ring)); outline-offset: 2px; }
/* done: the stage folds to one row */
.guardian-card[data-state="done"] .guardian-stage { aspect-ratio: auto; height: 76px; }
.guardian-card[data-state="done"] .guardian-scene { padding: 0; }
.guardian-card[data-state="done"] .guardian-signals, .guardian-card[data-state="done"] .guardian-why, .guardian-card[data-state="done"] .guardian-replay { display: none; }
.guardian-card[data-state="done"] .guardian-call { grid-auto-flow: column; align-items: center; gap: 12px; text-align: left; }
.guardian-card[data-state="done"] .guardian-avatar { width: 40px; height: 40px; }
.guardian-card[data-state="done"] .guardian-avatar svg { width: 20px; height: 20px; }
/* the ask and the done */
.guardian-form, .guardian-done { display: grid; gap: 10px; padding: 16px 15px 15px; }
.guardian-line { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.03em; line-height: 1.3; }
.guardian-sub { display: block; margin-top: 4px; font-size: 13px; font-weight: 500; color: var(--muted-ink); letter-spacing: -.01em; }
.guardian-soon { display: inline-block; vertical-align: 1px; padding: 3px 8px; border-radius: 999px; background: #c6f24a; color: #14201a; font: 700 11px/1.6 ui-monospace, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
.guardian-skip { justify-self: start; min-height: 40px; margin: 8px 15px 2px; padding: 0; border: 0; background: none; color: var(--muted-ink); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.guardian-form label { display: block; }
.guardian-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#trail-picker .guardian-form input[type="email"], #trail-picker .guardian-form textarea { width: 100%; box-sizing: border-box; min-height: 48px; margin: 0; padding: 12px 14px; border: 1px solid hsl(var(--border)); border-radius: 12px; background: hsl(var(--background)); color: var(--ink); font-size: 15px; font-family: inherit; }
#trail-picker .guardian-form textarea { min-height: 84px; resize: vertical; }
.guardian-trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.guardian-go { min-height: 48px; border: 0; border-radius: 12px; background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); font-size: 15px; font-weight: 700; cursor: pointer; }
.guardian-go:disabled { opacity: .6; cursor: default; }
.guardian-wish-open { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0; border: 0; background: none; color: var(--muted-ink); font-size: 13px; font-family: inherit; cursor: pointer; }
.guardian-wish-open b { width: 18px; height: 18px; border-radius: 50%; border: 1px solid hsl(var(--border)); display: grid; place-items: center; font-size: 14px; line-height: 1; font-weight: 600; }
.guardian-status { margin: 0; min-height: 1em; font-size: 13px; }
.guardian-status:empty { display: none; }
.guardian-status[data-kind="error"] { color: hsl(var(--hl-risk, 343 80% 35%)); }
/* the consent line shows only while the email field has focus */
.guardian-consent { display: none; margin: -4px 0 0; font-size: 11.5px; color: var(--muted-ink); }
.guardian-form:focus-within .guardian-consent { display: block; }
.guardian-done { justify-items: center; text-align: center; padding-top: 22px; }
.guardian-check { width: 56px; height: 56px; border-radius: 50%; background: #c6f24a; color: #14201a; display: grid; place-items: center; outline: none; }
@media (prefers-reduced-motion: no-preference) { .guardian-done:not([hidden]) .guardian-check { animation: guardian-drop 420ms cubic-bezier(.22, 1, .36, 1) 1; } }
@keyframes guardian-drop { from { transform: translateY(-14px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.guardian-echo { margin: 0; padding: 10px 12px; border: 1px dashed hsl(var(--border)); border-radius: 12px; font-size: 13px; color: var(--muted-ink); }
.guardian-done .guardian-skip { justify-self: center; margin: 0; }
.trail-explore-title .trail-state[hidden] { display: none; }
