/* Story Panel — additive styles only, scoped to this page. Nothing here
   redefines a class host.html/play.html/reports.html rely on. */

:root {
  --thread-water: #147a74;
  --thread-lion: #a8681f;
  --thread-destruction: #9c3b2c;
  --thread-occupation: #5b4a80;
  --thread-ground: #63701f;
  --thread-engineers: #2f5a80;
}
@media (prefers-color-scheme: dark) {
  :root {
    --thread-water: #4fc3bd;
    --thread-lion: #dba15a;
    --thread-destruction: #d97a68;
    --thread-occupation: #a798d6;
    --thread-ground: #a3b95f;
    --thread-engineers: #7fa8cf;
  }
}

.wrap.wide { max-width: 960px; }

.review-banner {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* Three tags, one convention, used identically on every screen (Overview,
   Detail, Full Story, Story Map): solid = reaches a walker's phone, dashed
   = storyteller's live screen only, dotted = Story Panel review annotation,
   never sent anywhere live. */
.tag-host, .tag-walker, .tag-review {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 10px;
}
.tag-host { border: 1px dashed var(--accent-2); color: var(--accent-2); }
.tag-walker { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); }
.tag-review { border: 1px dotted var(--text-muted); color: var(--text-muted); }

.story-stop-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 8px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: var(--sans);
  color: var(--text);
}
.story-stop-row:hover { border-color: var(--accent-2); }
.story-stop-icon { font-size: 1.3rem; }
.story-stop-main { flex: 1; }
.story-stop-main h4 { margin: 0 0 2px; font-family: var(--serif); font-weight: 400; font-size: 1.05rem; }
.story-stop-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 6px 14px 12px 44px;
  margin-top: -6px;
  margin-bottom: 8px;
  border-left: 2px dashed var(--border);
  margin-left: 20px;
}

.param-block { margin-bottom: 16px; }
.param-editor-block {
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: 7px;
  background: var(--surface-2);
}
.param-editor-block input[type="text"], .param-editor-block textarea { margin-bottom: 8px; }
.param-editor-block select { width: auto; }
.param-block .cat-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}
.param-option {
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--surface-2);
  margin-bottom: 4px;
  font-size: 0.92rem;
}
.param-option.is-true { border: 1px solid var(--accent-2); }
.param-option .module-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent-2);
  margin-left: 8px;
}

.module-block { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.module-block:last-child { border-bottom: none; }

.story-stop-link-missing { font-style: italic; opacity: 0.6; }

/* Full Story's inter-stop connector — deliberately heavier than
   .story-stop-link above. That thin dashed-line treatment reads fine
   between Overview's compact list rows, but the same thin line gets lost
   between Full Story's full-size stop cards, so this gets its own boxed
   card, a left accent bar, and a small label naming which stop it leads
   into, so it still registers while scrolling past two much larger cards. */
.full-story-connector {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-2);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 4px 0 18px 20px;
}
.full-story-connector-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 4px;
}
.full-story-connector-text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text);
}
.full-story-connector-missing {
  border-left-color: var(--border);
}
.full-story-connector-missing .full-story-connector-text {
  font-style: italic;
  color: var(--text-muted);
}

/* Inline note widgets — one mount point per reviewable section, so a note
   can be added right where its content is being read, not in one big form
   at the bottom of the page. */
.note-mount, .citation-mount, .field-edit-mount { margin-top: 10px; }
.note-toggle, .citation-toggle, .field-toggle {
  background: none;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-family: var(--mono);
  cursor: pointer;
}
.note-toggle:hover, .citation-toggle:hover, .field-toggle:hover { border-color: var(--accent-2); color: var(--accent-2); }
.note-widget-body {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 7px;
  background: var(--surface-2);
}
.note-widget-body .team-list { margin-bottom: 8px; }
.note-widget-body .team-list:last-child { margin-bottom: 0; }
.note-add-form textarea { margin-bottom: 8px; }
.team-list li .check.cancelled { color: var(--text-muted); }
.full-story-stop { margin-bottom: 18px; }
.full-story-stop h4 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1rem;
  margin: 18px 0 6px;
}
.full-story-stop h4:first-of-type { margin-top: 10px; }
.full-story-stop ul { padding-left: 20px; margin: 0 0 8px; }

.note-author-input {
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 100%;
  margin-bottom: 8px;
}

/* Story Map screen */

.story-map-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 620px) {
  .story-map-legend { grid-template-columns: 1fr; }
}
.story-map-legend h3 { font-family: var(--serif); font-weight: 400; font-size: 1rem; margin: 0 0 10px; }
.story-map-legend .mech-item { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.story-map-legend .mech-item p { margin: 2px 0 0; font-size: 0.86rem; }
.thread-list { display: flex; flex-direction: column; gap: 8px; }
.thread-item { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; }
.thread-swatch {
  flex: 0 0 auto;
  width: 22px; height: 3px;
  border-radius: 2px;
  position: relative;
}
.thread-swatch::before, .thread-swatch::after {
  content: "";
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: inherit;
}
.thread-swatch::before { left: -1px; }
.thread-swatch::after { right: -1px; }
.thread-item .tname { color: var(--text-muted); }
.thread-item .tname strong { color: var(--text); }

.map-body { display: flex; align-items: stretch; gap: 4px; }
.lanes { position: relative; width: 64px; flex: 0 0 auto; }
@media (min-width: 640px) { .lanes { width: 88px; } }
.lanes svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.stops { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 22px; }

.stop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 18px 20px 16px;
}
.stop-top { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.stop-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent-2);
  border: 1px solid var(--accent-2);
  border-radius: 50%;
  width: 26px; height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transform: translateY(1px);
}
.stop-title-wrap { flex: 1 1 auto; min-width: 0; }
.stop-loc { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.stop-title { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; margin: 2px 0 0; }
.stop-hook { color: var(--text-muted); font-size: 0.92rem; margin: 8px 0 14px; max-width: 60ch; }
.stop-meta-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 12px; }

.story-map-params {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px 16px;
  font-size: 0.82rem;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.param-pair .param-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  display: block;
}
.param-pair .param-val { color: var(--text); }
.modular-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.thread-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.thread-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid var(--bg);
  box-shadow: 0 0 0 1px var(--border);
}
