:root {
  color-scheme: dark;
  --bg-color: #121212;
  --surface-color: #1e1e1e;
  --surface-raised: #262626;
  --text-color: #f2f2f2;       /* also the "white" role: H1, general field borders */
  --muted-color: #d6d6d6;
  --accent-green: #4ade80;     /* pass-through badge, Play From Start border */
  --accent-pink: #f472b6;      /* ending badge, New Scene / New Choice buttons */
  --focus-color: #fdfd96;      /* focus rings (site-wide, never themed per-project) + H2 section headings */
  --border-color: #9a9a9a;     /* light-gray: scene/accordion container borders, neutral chrome */
  --ending-color: #f472b6;
  --accent-color: #7dd3fc;     /* legacy - kept only because game-data.html (dormant, deferred phase) still uses it. Not used anywhere in the active Scenes/Map pages. */
  --on-accent: #000000;        /* text color for things sitting on an accent-colored background, e.g. the selected theme toggle */
  --error-color: #f87171;      /* light red - validation errors specifically, distinct from the pink used for endings/danger elsewhere */
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg-color: #f5f5f5;
  --surface-color: #e8e8e8;
  --surface-raised: #f0f0f0;
  --text-color: #121212;
  --muted-color: #3d3d3d;
  --accent-green: #097732;
  --accent-pink: #800d48;
  --focus-color: #6b6000;
  --border-color: #5a5a5a;
  --ending-color: #800d48;
  --accent-color: #0369a1;
  --on-accent: #ffffff;
  --error-color: #b91c1c;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

*:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--focus-color);
  color: var(--on-accent);
  padding: 12px 20px;
  font-weight: bold;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

/* --- Persistent top header, present on every page --- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background-color: var(--surface-color);
  border-bottom: 2px solid var(--divider-color);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: bold;
  color: var(--text-color);
  text-decoration: none;
}
.site-title:hover,
.site-title:focus-visible {
  color: var(--text-color);
}
.book-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.site-title .accent-pink {
  color: var(--accent-pink);
}
.header-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.header-link {
  background: transparent;
  color: var(--text-color);
  font-weight: bold;
  font-size: 14px;
  font-family: inherit;
  text-decoration: none;
  border: 2px solid var(--accent-pink);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
#save-story-btn {
  border-color: var(--focus-color);
}
.header-link.play {
  border-color: var(--accent-green);
  background-color: color-mix(in srgb, var(--accent-green) 15%, var(--surface-raised));
}
.header-link.play:hover,
.header-link.play:focus-visible {
  background-color: color-mix(in srgb, var(--accent-green) 28%, var(--surface-raised));
}
.header-link:hover,
.header-link:focus-visible {
  background-color: color-mix(in srgb, var(--accent-pink) 15%, transparent);
}

.theme-toggle-group {
  display: flex;
  gap: 4px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 3px;
}
.theme-toggle-btn {
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--muted-color);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}
.theme-toggle-btn[aria-checked="true"] {
  background-color: var(--accent-pink);
  color: var(--on-accent);
}
.theme-toggle-btn:hover,
.theme-toggle-btn:focus-visible {
  color: var(--text-color);
}

/* The Settings dialog's own Theme section is a duplicate of the header's
   inline toggle, only meant to be reachable on narrow viewports where the
   header hides its copy (see the max-width: 960px block below) - hidden
   here by default so desktop doesn't show the same control twice. */
.settings-group-theme { display: none; }
.settings-group-theme h3 {
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted-color);
  margin: 0 0 6px;
}
@media (max-width: 960px) {
  .header-controls > .theme-toggle-group {
    display: none;
  }
  .settings-group-theme { display: block; }
}

.tab-nav {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 24px;
}
.tab-nav a {
  display: inline-block;
  padding: 10px 20px;
  color: var(--muted-color);
  text-decoration: none;
  font-weight: bold;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.tab-nav a:hover,
.tab-nav a:focus-visible {
  color: var(--text-color);
}
.tab-nav a[aria-current="page"] {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 4px;
}
.stat-grid .field { margin-top: 0; }

.explainer {
  background-color: var(--surface-raised);
  border-left: 4px solid var(--accent-pink);
  border-radius: 6px;
  padding: 12px 16px;
  margin-top: 14px;
  color: var(--muted-color);
  font-size: 14px;
}
.explainer strong { color: var(--text-color); }

.editor-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* --- Display Settings: text size scales the whole page uniformly
   (layout included, not just glyphs - browser zoom does the same thing
   and reads as more useful than font-size alone). Content width only
   takes effect on pages whose <body> opts in via .width-scoped
   (Scenes editor + Story Map) - elsewhere the attribute is set but has
   no matching selector, so it's inert by construction. --- */
html[data-font-size="small"] { zoom: 0.9; }
html[data-font-size="large"] { zoom: 1.15; }
html[data-content-width="medium"] body.width-scoped .editor-shell {
  max-width: 760px;
}
html[data-content-width="narrow"] body.width-scoped .editor-shell {
  max-width: 640px;
}

/* --- Text size (editing): a real font-size change, not a page zoom -
   scoped to .chapter-groups (everything below the Chapter heading: group
   headings, scene titles, labels, edit fields, dropdowns). Medium = the
   sizes already declared elsewhere in this file, so only small/large/xlarge
   need overrides here. --- */
html[data-edit-text-size="small"] .chapter-groups .field label,
html[data-edit-text-size="small"] .chapter-groups .choices-fieldset legend { font-size: 11px; }
html[data-edit-text-size="small"] .chapter-groups .field input[type="text"],
html[data-edit-text-size="small"] .chapter-groups .field textarea,
html[data-edit-text-size="small"] .chapter-groups .field select,
html[data-edit-text-size="small"] .chapter-groups .passthrough-note { font-size: 13px; }
html[data-edit-text-size="small"] .chapter-groups .scene summary h3 { font-size: 15px; }

html[data-edit-text-size="large"] .chapter-groups .field label,
html[data-edit-text-size="large"] .chapter-groups .choices-fieldset legend { font-size: 16px; }
html[data-edit-text-size="large"] .chapter-groups .field input[type="text"],
html[data-edit-text-size="large"] .chapter-groups .field textarea,
html[data-edit-text-size="large"] .chapter-groups .field select,
html[data-edit-text-size="large"] .chapter-groups .passthrough-note { font-size: 20px; }
html[data-edit-text-size="large"] .chapter-groups .scene summary h3 { font-size: 24px; }

html[data-edit-text-size="xlarge"] .chapter-groups .field label,
html[data-edit-text-size="xlarge"] .chapter-groups .choices-fieldset legend { font-size: 19px; }
html[data-edit-text-size="xlarge"] .chapter-groups .field input[type="text"],
html[data-edit-text-size="xlarge"] .chapter-groups .field textarea,
html[data-edit-text-size="xlarge"] .chapter-groups .field select,
html[data-edit-text-size="xlarge"] .chapter-groups .passthrough-note { font-size: 25px; }
html[data-edit-text-size="xlarge"] .chapter-groups .scene summary h3 { font-size: 30px; }

/* --- Exit link back to the parent CoA Apps site, only present on
   projects.html (the entry point when arriving from there) --- */
.back-to-coa-apps {
  display: inline-block;
  color: var(--accent-green);
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  margin: 4px 0 18px;
}
.back-to-coa-apps:hover,
.back-to-coa-apps:focus-visible {
  color: var(--focus-color);
  text-decoration: underline;
}

/* --- Footer, matching the shape of the parent CoA Apps site's own
   .site-footer, restyled with this tool's own variables since it
   doesn't load the root site's stylesheet. --- */
.site-footer {
  max-width: 900px;
  margin: 40px auto 0;
  padding: 20px 24px 40px;
  border-top: 2px solid var(--divider-color);
  color: var(--muted-color);
  font-size: 13px;
  text-align: center;
}
.site-footer p {
  margin: 6px 0;
}
.site-footer a {
  color: var(--focus-color);
  text-decoration: underline;
}
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--text-color);
}

/* --- Story name: static heading + inline "Edit Name" toggle --- */
#all-projects-link {
  display: inline-block;
  margin-bottom: 16px;
}
.story-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 4px 0 4px;
}
.story-header h1 {
  font-size: 28px;
  margin: 0;
  color: var(--text-color);
}
.edit-name-btn {
  background: transparent;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--muted-color);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}
.edit-name-btn:hover,
.edit-name-btn:focus-visible {
  color: var(--text-color);
  border-color: var(--text-color);
}
.story-description {
  color: var(--muted-color);
  margin: 6px 0 0;
  max-width: 600px;
}

.page-intro {
  color: var(--muted-color);
  margin-top: 0;
}
/* Only on the Scenes page, where this sits right under the story's own
   description - needs to read as a separate tool tip, not a continuation
   of that description, since editing "Description" doesn't touch this. */
.story-description + .page-intro {
  font-size: 13px;
  font-style: italic;
  max-width: 600px;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 2px solid var(--border-color);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 20px 0 36px;
}

.toolbar button,
.toolbar-link,
.add-group-btn,
.search-btn,
.chapter-nav button,
.chapter-groups-header button,
#chapter-edit-btn,
#chapter-prev-btn,
#chapter-next-btn {
  background-color: var(--surface-raised);
  color: var(--text-color);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  /* Fixed height (not padding-derived) so a button with a larger icon glyph
     inside it (the plus-icon span, an emoji) can't end up taller than its
     plain-text neighbors - every toolbar button/link is forced to match. */
  height: 44px;
  padding: 0 16px;
  font-weight: bold;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.plus-icon {
  font-size: 1.35em;
  display: inline-block;
  line-height: 1;
}
/* The toolbar's "+ New Scene" button is display:inline-flex, where
   vertical-align has no effect at all - needs transform instead. The other
   two buttons (Add Choice, Add New Scene) are plain inline content, where
   vertical-align already lines up correctly and transform overshot it. */
.toolbar .plus-icon,
.chapter-nav .plus-icon,
.chapter-groups-header .plus-icon {
  transform: translateY(-0.12em);
}
.add-scene-btn .plus-icon,
.add-choice-btn .plus-icon {
  vertical-align: -0.04em;
}
.toolbar button:hover,
.toolbar button:focus-visible,
.toolbar-link:hover,
.toolbar-link:focus-visible {
  border-color: var(--text-color);
}
.toolbar button.primary,
.chapter-nav button.primary {
  border-color: var(--accent-pink);
  background-color: color-mix(in srgb, var(--accent-pink) 15%, var(--surface-raised));
}
.toolbar button.primary:hover,
.toolbar button.primary:focus-visible,
.chapter-nav button.primary:hover,
.chapter-nav button.primary:focus-visible {
  background-color: color-mix(in srgb, var(--accent-pink) 28%, var(--surface-raised));
}
/* Distinct third toolbar-button treatment (alongside plain and .primary) -
   a yellow border cues "this creates a group," without competing with the
   pink .primary reserved for creating a chapter. */
.yellow-outline {
  border-color: var(--focus-color) !important;
  background-color: color-mix(in srgb, var(--focus-color) 15%, var(--surface-raised));
}
.yellow-outline:hover,
.yellow-outline:focus-visible {
  background-color: color-mix(in srgb, var(--focus-color) 28%, var(--surface-raised));
}
/* Plain pink outline (border only, no tinted fill) - distinct from
   .primary's pink-with-tint look, which is reserved for creating a
   chapter. Matches the look .header-link already has by default. */
.search-btn {
  border-color: var(--accent-pink) !important;
}
.search-btn:hover,
.search-btn:focus-visible {
  background-color: color-mix(in srgb, var(--accent-pink) 15%, var(--surface-raised));
}

.save-status {
  color: var(--muted-color);
  font-size: 13px;
  align-self: center;
}
.save-status.is-saved {
  font-style: italic;
  font-weight: bold;
  color: var(--accent-green);
}
.save-status.is-saved::before {
  content: "✓ ";
  font-style: normal;
}
.save-status.not-saved {
  font-weight: bold;
  color: var(--error-color);
}
.save-status.not-saved::before {
  content: "⚠ ";
}

.section-heading {
  font-size: 20px;
  color: var(--focus-color);
  margin: 40px 0 16px;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px 16px 14px 18px;
  background-color: var(--surface-raised);
  border: 2px solid var(--accent-green);
  border-radius: 10px;
  color: var(--text-color);
}
#export-toast-message {
  font-weight: bold;
  font-size: 15px;
}
#export-toast-message::before {
  content: "✓ ";
  color: var(--accent-green);
}
.toast-dismiss {
  flex-shrink: 0;
  background: none;
  border: 2px solid transparent;
  color: var(--text-color);
  font-size: 20px;
  line-height: 1;
  padding: 2px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.toast-dismiss:hover {
  background-color: var(--surface-color);
}
.toast-dismiss:focus-visible {
  outline: none;
  border-color: var(--focus-color);
}

/* --- Story Variables (Game Data phase only - dormant, not linked from anywhere yet) --- */
.variables-panel {
  background-color: var(--surface-color);
  border: 2px solid var(--accent-color);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 12px;
}

.variable-row {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr auto;
  gap: 10px;
  align-items: end;
  padding: 10px 0;
  border-bottom: 1px solid var(--divider-color);
}
.variable-row:last-of-type {
  border-bottom: none;
}
.variable-row .field { margin-top: 0; }

.starting-stats {
  margin-top: 4px;
  color: var(--muted-color);
  font-size: 14px;
}
.starting-stats strong {
  color: var(--accent-color);
}

/* --- Structured condition/effect pickers (Game Data phase only) --- */
.logic-block {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
}
.logic-block.requires {
  border: 2px solid var(--accent-pink);
  background-color: color-mix(in srgb, var(--accent-pink) 8%, var(--surface-raised));
}
.logic-block.effects {
  border: 2px solid var(--accent-color);
  background-color: color-mix(in srgb, var(--accent-color) 8%, var(--surface-raised));
}
.logic-block > .logic-label {
  display: block;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}
.logic-block.requires > .logic-label { color: var(--accent-pink); }
.logic-block.effects > .logic-label { color: var(--accent-color); }

.logic-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.logic-row:last-child { margin-bottom: 0; }
.logic-row select,
.logic-row input {
  background-color: var(--bg-color);
  color: var(--text-color);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
  font-family: inherit;
}
.logic-row input[type="number"] {
  width: 70px;
}
.logic-row .remove-btn {
  background: transparent;
  color: var(--muted-color);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  font-size: 14px;
  cursor: pointer;
  margin-left: auto;
}

.add-logic-btn {
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  padding: 4px 0;
}
.logic-block.requires .add-logic-btn { color: var(--accent-pink); }
.logic-block.effects .add-logic-btn { color: var(--accent-color); }

/* --- Scene list (outline, not a canvas) --- */
.scene {
  background-color: var(--surface-color);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 14px;
}
/* "Selected" = currently expanded - a slight gray tint marks which one. */
.scene[open] {
  background-color: color-mix(in srgb, var(--border-color) 6%, var(--surface-color));
}

.scene summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-weight: bold;
  font-size: 17px;
  border-radius: 8px;
}
.scene[open] summary {
  border-radius: 8px 8px 0 0;
}
.scene[open] summary h3 {
  color: var(--focus-color);
}
.scene summary::-webkit-details-marker { display: none; }

.scene summary h3 {
  font-size: 1.15em;
  font-weight: inherit;
  margin: 0;
  display: inline;
}

/* A real, aria-hidden element instead of CSS-generated content - a
   screen reader should never encounter this glyph at all. The <summary>
   element already announces "expanded"/"collapsed" on its own natively,
   so nothing needs to describe the arrow itself, decorative or not. */
.scene-arrow {
  display: inline-block;
  color: var(--focus-color);
  font-size: 32px;
  line-height: 1;
  transition: transform 120ms ease;
  flex-shrink: 0;
}
.scene[open] > summary .scene-arrow {
  transform: rotate(90deg);
}
.scene summary:hover,
.scene summary:focus-visible {
  color: var(--text-color);
  background-color: color-mix(in srgb, var(--border-color) 18%, transparent);
}

.scene-id {
  color: var(--muted-color);
  font-weight: normal;
  font-size: 14px;
}

.badge {
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 2px solid currentColor;
}
.badge.ending { color: var(--ending-color); }
.badge.passthrough { color: var(--muted-color); }
.badge.branch { color: var(--accent-green); }

/* Author-only note (not a real ARIA alert - popping up all at once for
   every scene on page load would be a flood, not a heads-up) flagging
   choices with nothing picked in "Leads to" yet. Doesn't block saving,
   just makes the gap visible without opening every scene to check. */
/* Wraps the three alerts below so they're one flex item in .scene
   summary, not three - they flow and wrap together as one run of text
   ("alert | alert | alert") instead of each getting squeezed into its
   own narrow, independently-wrapping column. */
.scene-alerts {
  display: inline;
}
.unlinked-choices-alert,
.no-scene-text-alert,
.unreachable-scene-alert {
  color: var(--accent-pink);
  font-size: 12px;
  font-weight: bold;
}
/* A " | " before every one of these alerts except whichever is first
   among the ones actually showing - :not([hidden]) on both sides means
   this only fires between two alerts that are both visible, so hiding
   any one of the three never leaves a dangling separator behind. */
:is(.unlinked-choices-alert, .no-scene-text-alert, .unreachable-scene-alert):not([hidden]) ~
:is(.unlinked-choices-alert, .no-scene-text-alert, .unreachable-scene-alert):not([hidden])::before {
  content: " | ";
  color: var(--muted-color);
  font-weight: normal;
}

/* --- Scene Group: an H2-level, bigger version of a .scene accordion.
   Groups scenes belong to exactly one of; visually distinct from a scene
   card via a thick yellow underline (not a full yellow border) and a
   white (not yellow) arrow, so the two accordion levels never get
   confused at a glance even without reading the text. --- */
.scene-group {
  background-color: var(--surface-color);
  border: 2px solid var(--focus-color);
  border-radius: 12px;
  margin-bottom: 36px;
}
.scene-group > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 4px solid var(--focus-color);
}
.scene-group > summary::-webkit-details-marker { display: none; }
.scene-group > summary h2 {
  font-size: 22px;
  font-weight: bold;
  color: var(--focus-color);
  margin: 0;
  display: inline;
}
.scene-group > summary .scene-arrow {
  color: var(--text-color);
}
.scene-group[open] > summary .scene-arrow {
  transform: rotate(90deg);
}
.scene-group > summary:hover,
.scene-group > summary:focus-visible {
  background-color: color-mix(in srgb, var(--border-color) 18%, transparent);
}
.scene-group-body {
  padding: 22px 24px 28px;
}
/* Same horizontal padding as .group-scene-list below, deliberately - the
   action buttons and the scene accordions they act on should share one
   left edge, not read as two different indentation levels. */
.scene-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 20px;
  margin-bottom: 28px;
}
.group-scene-list {
  padding: 0 20px;
}
/* Up/down variants of the same accordion arrow glyph+mechanism, colored
   to match the action they trigger rather than the neutral group/scene
   arrow colors. Sized down from the 32px default (right for a big
   section heading, not a small button label) and nudged to sit on the
   text baseline instead of the glyph's own oversized line box. */
.group-collapse-all-btn .scene-arrow,
.group-expand-all-btn .scene-arrow,
.scene-collapse-btn .scene-arrow,
.group-collapse-bottom-btn .scene-arrow,
#groups-collapse-btn .scene-arrow,
#groups-expand-btn .scene-arrow {
  font-size: 15px;
  vertical-align: -2px;
  margin-right: 2px;
}
.group-collapse-all-btn .scene-arrow,
.scene-collapse-btn .scene-arrow,
.group-collapse-bottom-btn .scene-arrow,
#groups-collapse-btn .scene-arrow {
  color: var(--accent-pink);
  transform: rotate(-90deg);
}
.group-expand-all-btn .scene-arrow,
#groups-expand-btn .scene-arrow {
  color: var(--accent-green);
  transform: rotate(90deg);
}
/* Sits below Add New Scene, only for groups long enough that scrolling
   back up to the group's own summary arrow to collapse it would be a
   real chore - see updateGroupFooterCollapse(). */
.group-collapse-bottom-btn {
  margin-top: 10px;
}

/* --- Groups heading + actions, above the current chapter's groups --- */
.chapter-groups-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 0 0 36px;
}
.chapter-groups-header h2 {
  font-size: 20px;
  color: var(--focus-color);
  margin: 0;
}

/* --- Chapter header + navigation, above the groups --- */
.chapter-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 40px 0 16px;
}
.chapter-header h2 {
  font-size: 20px;
  color: var(--focus-color);
  margin: 0;
}
.chapter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chapter-nav-top {
  margin-bottom: 36px;
}
.chapter-nav-bottom {
  margin-top: 40px;
}
/* A sliver of padding, easy to miss, stops the last group's own
   margin-bottom from collapsing straight through this wrapper and
   disappearing - without it the "gap" above depends on margin collapse
   behavior instead of being a real, reliable gap. */
.chapter-groups {
  padding-bottom: 1px;
}
/* Big, bold, direction-colored arrows - a second, non-text cue for which
   way each button moves, echoing the pink/green treatment Collapse
   All/Expand All already use. */
.chapter-nav-arrow {
  font-size: 1.3em;
  font-weight: bold;
  line-height: 1;
  vertical-align: -2px;
}
.chapter-prev-btn .chapter-nav-arrow {
  color: var(--accent-pink);
}
.chapter-next-btn .chapter-nav-arrow {
  color: var(--accent-green);
}
.chapter-goto-label {
  font-weight: bold;
  font-size: 14px;
  color: var(--muted-color);
  align-self: center;
  margin-left: 4px;
}
/* --- Delete Group modal radio choice --- */
.delete-group-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
}
/* Same language as the custom checkbox (yellow border, transparent fill,
   yellow "on" mark, oversized) - just round instead of square, and a
   dot instead of a checkmark, so radio vs. checkbox stays visually
   distinguishable even though both mean "this option is chosen." */
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 26px;
  height: 26px;
  border: 2px solid var(--focus-color);
  border-radius: 50%;
  background-color: transparent;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  margin: 0;
  flex-shrink: 0;
}
input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background-color: var(--focus-color);
}
input[type="radio"]:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

/* Custom checkbox - transparent fill, yellow border, yellow checkmark,
   sized well above the browser default so it's easy to see/hit. */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 26px;
  height: 26px;
  border: 2px solid var(--focus-color);
  border-radius: 5px;
  background-color: transparent;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  margin: 0 8px 0 0;
  flex-shrink: 0;
}
input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--focus-color);
  font-size: 19px;
  font-weight: bold;
  line-height: 1;
}
input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

.scene-body {
  padding: 0 20px 22px;
  border-top: 2px solid var(--border-color);
}

.reached-from {
  margin: 18px 0 0;
  padding: 0;
  color: var(--text-color);
  font-size: 14px;
}
.reached-from-link {
  color: var(--focus-color);
  font-weight: bold;
}
.reached-from-link:hover,
.reached-from-link:focus-visible {
  color: var(--text-color);
  text-decoration: underline;
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.field-row .field {
  flex: 1;
  min-width: 160px;
}
.field {
  margin-top: 18px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted-color);
  margin-bottom: 6px;
}
.field input[type="text"],
.field textarea,
.field select,
.chapter-nav select {
  width: 100%;
  background-color: var(--bg-color);
  color: var(--text-color);
  border: 2px solid var(--accent-green);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
}
.field select,
.chapter-nav select {
  border-color: var(--accent-pink);
}
.field textarea {
  min-height: 70px;
  max-height: 50vh;
  overflow-y: auto;
  resize: vertical;
}
/* Distinct hover feedback: text fields tint green (reinforcing their own
   border color), dropdowns tint pink instead, so the two are never confused
   with each other or with the yellow focus-visible state. */
.field input[type="text"]:hover,
.field textarea:hover {
  background-color: color-mix(in srgb, var(--accent-green) 17%, var(--bg-color));
}
.field select:hover,
.chapter-nav select:hover {
  background-color: color-mix(in srgb, var(--accent-pink) 15%, var(--bg-color));
}

/* Custom select chevron: native ones are small and can't be recolored
   consistently across browsers. Sized and positioned larger/more inset
   than default per feedback; mirrored in the light-theme override below. */
.field select,
.chapter-nav select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 22px 22px;
  padding-right: 48px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2f2f2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}
:root[data-theme="light"] .field select,
:root[data-theme="light"] .chapter-nav select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121212' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}
/* Unlike a .field's select (full-width, stacked), this one sits inline
   in a button row - width comes from content, not 100%. */
.chapter-nav select {
  width: auto;
  height: 44px;
  padding-top: 0;
  padding-bottom: 0;
}

.passthrough-note {
  margin-top: 18px;
  padding: 12px 14px;
  background-color: var(--surface-raised);
  border-radius: 8px;
  color: var(--muted-color);
  font-size: 14px;
}
.passthrough-note strong {
  color: var(--text-color);
}

/* --- Choices editor (repeatable rows, not drawn lines) - same boxed
   treatment reused for the per-scene image fieldset below. --- */
.choices-fieldset,
.image-fieldset {
  margin: 22px 0 0;
  padding: 16px;
  border: 2px dashed var(--border-color);
  border-radius: 10px;
}
.choices-fieldset legend,
.image-fieldset legend {
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted-color);
  padding: 0 6px;
}
.image-fieldset .field:first-child {
  margin-top: 0;
}

.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  background-color: var(--surface-raised);
  border-radius: 8px;
  margin-bottom: 10px;
}
.choice-row .field { margin-top: 0; }
.choice-row input[type="text"],
.choice-row select {
  height: 48px;
  padding: 0 12px;
}
.choice-row .remove-btn {
  background: transparent;
  color: var(--muted-color);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  width: 48px;
  height: 48px;
  font-size: 26px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
}
.choice-row .remove-btn:hover,
.choice-row .remove-btn:focus-visible {
  color: var(--ending-color);
  border-color: var(--ending-color);
}

.choice-condition {
  grid-column: 1 / -1;
}
.choice-condition label {
  display: inline;
  text-transform: none;
  font-weight: normal;
  font-size: 13px;
  color: var(--accent-pink);
}
.choice-condition input {
  width: auto;
  margin-right: 8px;
}

.add-choice-btn {
  background: transparent;
  color: var(--text-color);
  border: 2px dashed var(--focus-color);
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
}
.add-choice-btn:hover,
.add-choice-btn:focus-visible {
  background-color: color-mix(in srgb, var(--focus-color) 17%, transparent);
}

.add-scene-btn {
  background: transparent;
  color: var(--text-color);
  border: 2px dashed var(--accent-pink);
  border-radius: 10px;
  padding: 16px;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  width: 100%;
}
.add-scene-btn:hover,
.add-scene-btn:focus-visible {
  background-color: color-mix(in srgb, var(--accent-pink) 15%, transparent);
}

/* --- Modal dialog (New Project, and future dialogs) --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 100;
}
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 101;
  background-color: var(--surface-color);
  border: 2px solid var(--divider-color);
  border-radius: 12px;
  padding: 28px;
  width: 90%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
}
.modal h2 {
  margin: 0 0 8px;
  color: var(--text-color);
  font-size: 22px;
}
.modal-hint {
  color: var(--muted-color);
  font-size: 14px;
  margin: 0 0 4px;
}
.field-error {
  color: var(--error-color);
  font-weight: bold;
  font-size: 13px;
  margin-top: 4px;
  display: none;
}
.field-error.visible {
  display: block;
}
.input-error {
  border-color: var(--error-color) !important;
}
#reorder-scenes-dialog {
  max-width: 640px;
}
#search-dialog {
  max-width: 560px;
  /* Anchored nearer the top instead of dead-center - a search box that
     jumps to the vertical middle of a long page reads as misplaced, and
     this keeps the results list from fighting the viewport bottom. */
  top: 15%;
  transform: translate(-50%, 0);
}
#search-results-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  max-height: 50vh;
  overflow-y: auto;
  border-radius: 8px;
}
.search-result-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 14px;
  border: 2px solid var(--border-color);
  border-top: none;
  cursor: pointer;
}
#search-results-list li.search-result-item:first-child {
  border-top: 2px solid var(--border-color);
  border-radius: 8px 8px 0 0;
}
#search-results-list li.search-result-item:last-child {
  border-radius: 0 0 8px 8px;
}
#search-results-list li.search-result-item:only-child {
  border-radius: 8px;
}
.search-result-item.active,
.search-result-item:hover {
  background-color: color-mix(in srgb, var(--focus-color) 15%, var(--surface-color));
  border-color: var(--focus-color);
}
.search-result-type {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted-color);
  min-width: 62px;
}
.search-result-label {
  color: var(--text-color);
  font-weight: bold;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-no-results {
  color: var(--muted-color);
  font-style: italic;
  margin: 16px 0 0;
}
.reorder-scene-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-top: 2px solid var(--divider-color);
}
.reorder-scene-row:last-child {
  border-bottom: 2px solid var(--divider-color);
}
.reorder-scene-row.just-moved {
  outline: 2px solid var(--focus-color);
  border-radius: 8px;
  background-color: color-mix(in srgb, var(--focus-color) 10%, transparent);
}
.reorder-scene-info {
  flex: 1 1 240px;
  min-width: 0;
}
.reorder-scene-title {
  font-size: 16px;
  font-weight: bold;
  color: var(--text-color);
  margin: 0 0 4px;
}
.reorder-scene-type {
  font-weight: normal;
  color: var(--muted-color);
  font-size: 13px;
}
.reorder-scene-preview {
  color: var(--muted-color);
  font-size: 13px;
  font-style: italic;
  margin: 0 0 4px;
}
.reorder-scene-choices {
  color: var(--muted-color);
  font-size: 13px;
  margin: 0;
}
.reorder-scene-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.move-scene-btn.move-scene-up-btn,
.move-scene-btn.reorder-move-up {
  border-color: var(--accent-pink);
}
.move-scene-btn.move-scene-down-btn,
.move-scene-btn.reorder-move-down {
  border-color: var(--accent-green);
}

.modal-danger-zone {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid var(--divider-color);
}
.delete-project-btn,
.remove-scene-btn,
.group-delete-btn {
  background: transparent;
  color: var(--ending-color);
  border: 2px solid var(--ending-color);
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
}
.delete-project-btn:hover,
.delete-project-btn:focus-visible,
.remove-scene-btn:hover,
.remove-scene-btn:focus-visible,
.group-delete-btn:hover,
.group-delete-btn:focus-visible {
  background-color: color-mix(in srgb, var(--ending-color) 15%, transparent);
}
.scene-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.add-image-inline {
  display: flex;
  flex-basis: 100%;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 4px;
  cursor: pointer;
}
.move-scene-btn,
.group-reorder-btn,
.group-collapse-all-btn,
.group-expand-all-btn,
.group-collapse-bottom-btn,
.group-rename-btn {
  background: transparent;
  color: var(--text-color);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
}
.move-scene-btn:hover,
.move-scene-btn:focus-visible,
.group-reorder-btn:hover,
.group-reorder-btn:focus-visible,
.group-collapse-all-btn:hover,
.group-collapse-all-btn:focus-visible,
.group-expand-all-btn:hover,
.group-expand-all-btn:focus-visible,
.group-collapse-bottom-btn:hover,
.group-collapse-bottom-btn:focus-visible,
.group-rename-btn:hover,
.group-rename-btn:focus-visible {
  border-color: var(--text-color);
}
.move-scene-btn:disabled,
.chapter-nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.modal-actions-block button {
  width: 100%;
}
#export-zip-summary,
#export-zip-files-summary,
#export-ink-summary,
#export-json-summary {
  margin-top: 28px;
}
.btn-delete {
  border-color: var(--ending-color);
  background-color: color-mix(in srgb, var(--ending-color) 20%, var(--surface-raised));
}
.btn-delete:hover,
.btn-delete:focus-visible {
  background-color: color-mix(in srgb, var(--ending-color) 32%, var(--surface-raised));
}
.modal-actions button {
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  border: 2px solid var(--border-color);
  background-color: var(--surface-raised);
  color: var(--text-color);
}
.modal-actions .btn-cancel:hover,
.modal-actions .btn-cancel:focus-visible {
  border-color: var(--text-color);
}
.modal-actions .btn-create {
  border-color: var(--accent-pink);
  background-color: color-mix(in srgb, var(--accent-pink) 15%, var(--surface-raised));
}
.modal-actions .btn-create:hover,
.modal-actions .btn-create:focus-visible {
  background-color: color-mix(in srgb, var(--accent-pink) 25%, var(--surface-raised));
}

/* --- Projects landing page --- */
.project-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.projects-empty {
  color: var(--muted-color);
  background-color: var(--surface-color);
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
}
.project-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background-color: var(--surface-color);
  border: 2px solid var(--divider-color);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 14px;
}
.project-card-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 260px;
  min-width: 0;
}
.project-card-main h3 {
  margin: 0;
}

/* --- Game logo placeholder (Projects cards, Play start screen). No real
   upload->display pipeline yet since there's no per-project storage - this
   shows the intended layout the way CoA Apps' own placeholder-media pattern
   does for "screenshot coming soon." --- */
.project-logo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-color);
}
.project-logo svg {
  width: 60%;
  height: 60%;
}

/* --- Native file input's "Choose File" button --- */
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
  background: transparent;
  color: var(--text-color);
  border: 2px solid var(--accent-green);
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  margin-right: 10px;
}
input[type="file"]:hover::file-selector-button,
input[type="file"]:hover::-webkit-file-upload-button {
  background-color: color-mix(in srgb, var(--accent-green) 15%, transparent);
}

/* --- Image upload preview (New Project logo, per-scene images) --- */
.image-preview {
  margin-top: 10px;
}
.image-preview img {
  max-width: 160px;
  max-height: 160px;
  border-radius: 8px;
  border: 2px solid var(--border-color);
  display: block;
}
.image-preview-title {
  display: block;
  font-weight: bold;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted-color);
  margin-bottom: 8px;
}
.remove-image-btn {
  display: block;
  margin-top: 10px;
  background: transparent;
  color: var(--text-color);
  border: 2px solid var(--ending-color);
  border-radius: 8px;
  padding: 6px 14px;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
}
.remove-image-btn:hover,
.remove-image-btn:focus-visible {
  background-color: color-mix(in srgb, var(--ending-color) 15%, transparent);
}
.field-required {
  text-transform: none;
  font-weight: bold;
  color: var(--ending-color);
}
.field-hint {
  color: var(--muted-color);
  font-size: 13px;
  margin: -2px 0 10px;
}
.color-preset-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.color-preset-field {
  flex: 1;
  min-width: 130px;
}
.color-preset-label {
  display: block;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted-color);
  margin-bottom: 6px;
}
.color-preset-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.color-preset-input-row select {
  flex: 1;
}
.color-swatch {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  order: -1;
}
.project-title {
  font-size: 19px;
  font-weight: bold;
  color: var(--accent-green);
  text-decoration: none;
}
.project-title:hover,
.project-title:focus-visible {
  color: var(--focus-color);
  text-decoration: underline;
}
.project-title-arrow {
  display: inline-block;
  font-size: 1.8em;
  font-weight: 900;
  margin-left: 4px;
  line-height: 1;
  transform: translateY(calc(0.05em + 1px));
  -webkit-text-stroke: 1px currentColor;
}
.project-description {
  color: var(--muted-color);
  font-size: 14px;
  margin: 6px 0 0;
  max-width: 480px;
}
.project-meta {
  color: var(--muted-color);
  font-size: 14px;
  margin: 6px 0 0;
}
.field-optional {
  text-transform: none;
  font-weight: normal;
  color: var(--muted-color);
}
.project-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}
.project-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  height: 44px;
  padding: 0 34px;
  font-weight: bold;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--border-color);
  background-color: var(--surface-raised);
  color: var(--text-color);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.project-action-btn.edit {
  border-color: var(--accent-pink);
  background-color: color-mix(in srgb, var(--accent-pink) 15%, var(--surface-raised));
}
.project-action-btn.edit:hover,
.project-action-btn.edit:focus-visible {
  background-color: color-mix(in srgb, var(--accent-pink) 25%, var(--surface-raised));
}
.project-action-btn.play {
  border-color: var(--accent-green);
  background-color: color-mix(in srgb, var(--accent-green) 15%, var(--surface-raised));
}
.project-action-btn.play:hover,
.project-action-btn.play:focus-visible {
  background-color: color-mix(in srgb, var(--accent-green) 25%, var(--surface-raised));
}
/* --- Story Map page: headings + jump-links (not a diagram), nested to
   match the real chapter > group > scene hierarchy - h3/h4/h5 under the
   page's own h1 (page title) and h2 ("Story Map" section label). --- */
.map-chapter-block {
  margin-bottom: 40px;
}
.map-chapter-block h3 {
  font-size: 22px;
  color: var(--focus-color);
  border-bottom: 4px solid var(--focus-color);
  padding-bottom: 10px;
  margin: 0 0 18px;
}
.map-chapter-intro {
  background-color: var(--surface-color);
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 22px;
}
.map-chapter-intro .map-meta:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  font-weight: bold;
}
.map-group-block {
  margin-bottom: 28px;
  padding-left: 18px;
  border-left: 3px solid var(--border-color);
}
.map-group-block h4 {
  font-size: 17px;
  color: var(--text-color);
  margin: 0 0 12px;
}
.map-scene-block {
  background-color: var(--surface-color);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 14px;
}
.map-scene-block h5 {
  margin: 0 0 8px;
  font-size: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.map-meta {
  color: var(--muted-color);
  font-size: 14px;
  margin: 4px 0;
}
.map-scene-text {
  color: var(--text-color);
  font-size: 14px;
  font-weight: bold;
  font-style: italic;
  line-height: 1.35;
  margin: 6px 0;
}
.map-meta a {
  color: var(--focus-color);
}
.map-leads-to {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.map-leads-to li {
  color: var(--muted-color);
  font-size: 14px;
  margin: 4px 0;
}
.map-leads-to a {
  color: var(--focus-color);
  font-weight: bold;
}
.map-meta a:hover,
.map-meta a:focus-visible,
.map-leads-to a:hover,
.map-leads-to a:focus-visible {
  color: var(--text-color);
}
