/* Campaign Atlas — styles */
:root {
  --bg: #f6f7f9;
  --paper: #ffffff;
  --paper-2: #f2f4f7;
  --paper-3: #e4e8ee;
  --ink: #1c2333;
  --ink-2: #3b4456;
  --muted: #5d6677;
  --line: #dde1e8;
  --side-a: #2b5797;
  --side-b: #9b3030;
  --civilian: #6f6a3a;
  --draw: #6b7280;
  --accent: #0b7a75;
  --accent-dark: #075e5a;
  --accent-soft: #e4f3f1;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --quote: 'Lora', Georgia, 'Times New Roman', serif;
  --serif: var(--sans);      /* body text; the name is historical */
  --display: var(--sans);
  --panel-w: 440px;
  --r: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .07);
  --shadow-lg: 0 10px 28px rgba(16, 24, 40, .16);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--serif);
  color: var(--ink);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  line-height: 1.55;
}
a { color: var(--accent); }
img { max-width: 100%; display: block; }

/* Header */
.site-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.15;
}
.brand small {
  display: block;
  font: italic 400 .78rem/1.3 var(--serif);
  color: var(--muted);
}
.site-header nav a {
  margin-left: 18px;
  color: var(--ink);
  text-decoration: none;
  font-size: .95rem;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.site-header nav a.active, .site-header nav a:hover { border-color: var(--accent); }

/* Layout */
.atlas {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--panel-w);
  grid-template-rows: minmax(0, 1fr) auto;
}
#map { grid-column: 1; grid-row: 1; background: #e8ecf1; }
#panel {
  grid-column: 2;
  grid-row: 1 / 3;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--paper);
  scroll-behavior: smooth;
}
.timeline {
  position: relative;
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  flex-wrap: wrap;
}

/* Map styling */
.leaflet-tile-pane { filter: none; }
.base-relief .leaflet-tile-pane { filter: sepia(.2) saturate(.9); }
.base-atlas .leaflet-tile-pane { filter: none; }
.blend-multiply { mix-blend-mode: multiply; }
.leaflet-container { font-family: var(--serif); }
.leaflet-control-zoom a { color: var(--ink); }
.leaflet-tooltip {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--serif);
  font-size: .85rem;
  box-shadow: var(--shadow);
}
.leaflet-tooltip-top:before { border-top-color: var(--line); }
.battle-marker { cursor: pointer; transition: fill-opacity .3s; }
.battle-marker.is-active { animation: pulse 1.6s ease-out infinite; }
.battle-marker.is-selected { stroke: var(--ink); stroke-width: 3; }
@keyframes pulse {
  0%   { stroke-opacity: .9; stroke-width: 2; }
  70%  { stroke-opacity: 0; stroke-width: 18; }
  100% { stroke-opacity: 0; stroke-width: 18; }
}
.army-head-wrap { background: none; border: none; }
.army-head {
  position: absolute;
  transform: translate(-50%, calc(-100% - 12px));
  white-space: nowrap;
  font: 600 11px/1 var(--serif);
  letter-spacing: .03em;
  color: #fff;
  padding: 4px 7px 4px 6px;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.army-head::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,.35);
}
.army-head::after {
  content: '';
  position: absolute;
  left: 50%; top: 100%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom: 0;
  border-top-color: inherit;
}
.army-head.side-a { background: var(--side-a); border-color: var(--side-a); }
.army-head.side-b { background: var(--side-b); border-color: var(--side-b); transform: translate(-50%, 12px); }
.army-head.side-b::after { top: auto; bottom: 100%; border-top: 0; border-bottom: 6px solid; border-bottom-color: inherit; }
.route { cursor: pointer; }
.waypoint { cursor: pointer; }

.legend {
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: .78rem;
  line-height: 1.4;
  box-shadow: var(--shadow);
  max-width: 215px;
}
.legend h4 { margin: 0 0 4px; font: 700 .8rem var(--display); }
.legend .row { display: flex; align-items: center; gap: 7px; margin: 2px 0; }
.legend .line { width: 22px; height: 3px; border-radius: 2px; }
.legend .dot { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.legend .sizes { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.legend .sizes span { border-radius: 50%; background: var(--draw); opacity: .6; display: inline-block; }

/* Timeline controls */
.play {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.play:hover { background: var(--accent-dark); }
.play .ico-pause { display: none; }
.play.is-playing .ico-play { display: none; }
.play.is-playing .ico-pause { display: block; }
.slider-wrap { flex: 1 1 260px; position: relative; padding-bottom: 16px; }
input[type=range] {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.ticks { position: absolute; left: 8px; right: 8px; bottom: 0; height: 14px; }
.ticks span {
  position: absolute;
  transform: translateX(-50%);
  font-size: .68rem;
  color: var(--muted);
  border-left: 1px solid var(--muted);
  padding-left: 3px;
  line-height: 1;
  top: 0;
}
.date {
  font: 600 1rem var(--display);
  min-width: 165px;
  text-align: center;
  white-space: nowrap;
}
.speed { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.speed select, .options summary {
  font-family: var(--serif);
  font-size: .85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 4px 6px;
  color: var(--ink);
}
.options { position: static; }
.options summary { cursor: pointer; list-style: none; }
.options summary::-webkit-details-marker { display: none; }
.options summary::after { content: ' ▾'; font-size: .75em; }
.options-menu {
  position: absolute;
  left: 16px; bottom: calc(100% + 8px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 10px 12px;
  width: 300px;
  z-index: 1000;
  font-size: .85rem;
}
.options-menu label { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.swatch { display: inline-block; width: 18px; height: 4px; border-radius: 2px; }
.menu-head { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.base-menu label { align-items: baseline; padding: 3px 0; }
.base-menu small { color: var(--muted); font-size: .76rem; }
.menu-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.menu-key .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.swatch.side-a { background: var(--side-a); }
.swatch.side-b { background: var(--side-b); }

/* Panel */
.panel-inner { padding: 18px 20px 40px; }
.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.btn {
  font-family: var(--serif);
  font-size: .82rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
}
.btn:hover { background: var(--paper-3); }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.primary:hover { background: var(--accent-dark); }
.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  color: #fff;
  background: var(--draw);
}
.badge.side-a { background: var(--side-a); }
.badge.side-b { background: var(--side-b); }
.badge.side-n { background: var(--draw); }
.badge.civilian { background: var(--civilian); }
#panel h2 {
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1.15;
  margin: 8px 0 4px;
}
#panel h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  margin: 22px 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.dates { color: var(--muted); font-style: italic; margin: 0 0 12px; font-size: .95rem; }
figure { margin: 0 0 14px; }
figure img {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper-2);
  box-shadow: var(--shadow);
}
figcaption { font-size: .78rem; color: var(--muted); margin-top: 6px; line-height: 1.4; }
figcaption .credit { display: block; font-style: italic; }
.summary { font-size: .97rem; margin: 0 0 12px; }
.significance {
  background: var(--paper-2);
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  font-size: .9rem;
  margin: 0 0 14px;
}
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: .88rem; margin: 0; }
.facts dt { color: var(--muted); font-style: italic; }
.facts dd { margin: 0; }
.cas { margin-top: 12px; font-size: .85rem; }
.cas .bar { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.cas .bar b { width: 118px; font-weight: 600; }
.cas .bar i {
  height: 12px;
  border-radius: 2px;
  display: block;
  min-width: 2px;
}
.cas .bar.side-a i { background: var(--side-a); }
.cas .bar.side-b i { background: var(--side-b); }
.cas .bar span { color: var(--muted); }
.cas .note { color: var(--muted); font-size: .8rem; margin: 4px 0 0; font-style: italic; }

/* Journal entries */
.entry {
  position: relative;
  margin: 0 0 18px;
  padding: 12px 14px 12px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--draw);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset;
}
.entry.side-a { border-left-color: var(--side-a); }
.entry.side-b { border-left-color: var(--side-b); }
.entry.civilian { border-left-color: var(--civilian); }
.entry blockquote {
  margin: 0 0 10px;
  font-size: .95rem;
  font-style: italic;
  line-height: 1.6;
}
.entry blockquote::before { content: '“'; font-family: var(--display); font-size: 1.6em; line-height: 0; color: var(--accent); margin-right: 2px; }
.entry blockquote::after { content: '”'; font-family: var(--display); font-size: 1.6em; line-height: 0; color: var(--accent); margin-left: 2px; }
.entry .who { display: flex; align-items: center; gap: 10px; font-size: .82rem; }
.entry .who img {
  width: 44px; height: 44px;
  object-fit: cover; object-position: top;
  border-radius: 50%;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}
.entry .who b { display: block; font-weight: 600; }
.entry .who span { color: var(--muted); display: block; line-height: 1.35; }
.entry .src { font-size: .75rem; color: var(--muted); margin-top: 8px; font-style: italic; }

.gallery { display: grid; gap: 14px; }
.prevnext { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }
.prevnext .btn { flex: 1; text-align: center; }

/* Home panel */
.intro { font-size: .93rem; }
.intro p { margin: 0 0 10px; }
.dispatch-list { list-style: none; padding: 0; margin: 0; }
.dispatch-list li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
  align-items: start;
}
.dispatch-list time { color: var(--muted); font-size: .8rem; padding-top: 2px; }
.dispatch-list button {
  background: none; border: none; padding: 0;
  font: inherit; color: var(--ink);
  text-align: left; cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.dispatch-list button:hover { text-decoration-color: var(--accent); }
.dispatch-list .ev { color: var(--muted); }
.dispatch-list .dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-right: 6px; vertical-align: 1px;
}
.dot.side-a { background: var(--side-a); }
.dot.side-b { background: var(--side-b); }
.dot.side-n { background: var(--draw); }
.campaign-list { list-style: none; padding: 0; margin: 0; }
.campaign-list li { padding: 6px 0; font-size: .88rem; }
.campaign-list button {
  background: none; border: none; padding: 0; font: inherit; color: var(--ink);
  cursor: pointer; text-align: left; display: flex; gap: 8px; align-items: baseline;
}
.campaign-list button:hover { color: var(--accent); }
.campaign-list .swatch { flex: 0 0 auto; position: relative; top: -3px; }
.empty { color: var(--muted); font-style: italic; font-size: .88rem; }
.waypoints { list-style: none; padding: 0; margin: 0; }
.waypoints li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 5px 0; font-size: .86rem; border-bottom: 1px solid var(--line); }
.waypoints time { color: var(--muted); font-size: .8rem; }
.waypoints button { background: none; border: none; padding: 0; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.waypoints button:hover { color: var(--accent); }
.waypoints li.reached button { font-weight: 600; }
.kbd { font-size: .78rem; color: var(--muted); margin-top: 16px; }
kbd { font-family: inherit; border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; background: var(--paper-2); }

/* Static pages */
.page { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; }
.page > .page-inner, .page > .sheet { flex: 1 0 auto; width: 100%; }
.page-inner { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }
.page h1 { font-family: var(--display); font-size: 2rem; margin: 0 0 6px; }
.page .lede { font-size: 1.05rem; color: var(--muted); font-style: italic; margin: 0 0 24px; }
.page h2 { font-family: var(--display); font-size: 1.35rem; margin: 32px 0 12px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters .btn.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s;
}
.card:hover { transform: translateY(-2px); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.card h3 { font-family: var(--display); font-size: 1.1rem; margin: 0; line-height: 1.2; }
.card .meta { font-size: .8rem; color: var(--muted); }
.card .cas-line { font-size: .8rem; }
.card .quote { font-size: .84rem; font-style: italic; color: var(--ink-2); margin: 4px 0 0; border-top: 1px solid var(--line); padding-top: 6px; }
.source-list { padding-left: 1.2em; }
.source-list li { margin: 6px 0; }
.credits { font-size: .85rem; }
.credits li { margin: 4px 0; }
.site-footer { padding: 14px 20px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); text-align: center; background: var(--paper-2); }

/* Responsive */
@media (max-width: 960px) {
  :root { --panel-w: 360px; }
  .date { min-width: 140px; font-size: .9rem; }
}
@media (max-width: 760px) {
  body { height: auto; min-height: 100dvh; }
  .site-header { flex-direction: column; align-items: flex-start; gap: 6px; }
  .site-header nav a { margin: 0 16px 0 0; }
  .atlas {
    grid-template-columns: 1fr;
    grid-template-rows: 58vh auto auto;
  }
  #map { grid-row: 1; }
  .timeline { grid-row: 2; padding: 8px 12px; gap: 10px; }
  #panel { grid-column: 1; grid-row: 3; border-left: none; border-top: 1px solid var(--line); overflow: visible; max-height: none; }
  .slider-wrap { flex-basis: 100%; order: 5; }
  .date { min-width: 0; text-align: left; }
  .options-menu { width: min(300px, calc(100vw - 24px)); left: 12px; }
  .legend { display: none; }
  .panel-inner { padding: 16px; }
}

/* ---------- Platform additions ---------- */
.site-header nav a.all { color: var(--muted); font-size: .85rem; border-left: 1px solid var(--line); padding-left: 16px; }
.verified { color: #1f7a3d; font-style: normal; font-weight: 600; margin-left: 4px; white-space: nowrap; }
a.verified { text-decoration: underline dotted; text-underline-offset: 3px; }
a.verified:hover { text-decoration-style: solid; }
.classroom { margin: 20px 0 0; }
a.btn { text-decoration: none; display: inline-block; }

/* Guided tours in the map panel */
.tour-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tour-list button {
  width: 100%; text-align: left; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  padding: 9px 12px; font: inherit; color: var(--ink);
  display: grid; gap: 2px;
}
.tour-list button:hover { background: var(--paper-2); }
.tour-list span { font-size: .86rem; font-style: italic; color: var(--ink-2); }
.tour-list small { font-size: .75rem; color: var(--muted); }
.tour-badge { background: var(--accent); }
.tour-name { margin: 0; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.tour-progress { display: flex; gap: 4px; margin: 8px 0 4px; }
.tour-progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--paper-3); }
.tour-progress i.done { background: var(--accent); opacity: .5; }
.tour-progress i.now { background: var(--accent); }
.discuss { background: var(--paper-2); border: 1px solid var(--line); padding: 4px 14px 10px; margin: 16px 0; }
.discuss h3 { border: none !important; margin: 10px 0 4px !important; }
.discuss ol { margin: 0; padding-left: 1.2em; font-size: .95rem; }
.discuss li { margin: 6px 0; }

/* Home page */
.hero { padding: 18px 0 8px; }
.hero h1 { font-size: 2.6rem; }
.cards.wars { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card.war img { aspect-ratio: 16 / 9; }
.card.war p { font-size: .92rem; margin: 0; }
.card.war .go { color: var(--accent); font-weight: 600; font-size: .9rem; margin-top: 4px; }
.teacher-links { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.features > div { background: var(--paper); border: 1px solid var(--line); padding: 12px 14px; }
.features h3 { font-family: var(--display); font-size: 1.02rem; margin: 0 0 4px; }
.features p { margin: 0; font-size: .9rem; }
.planned { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; }
.planned li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.planned span { color: var(--muted); font-size: .85rem; }

/* Teacher guide */
.glance { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.glance > div { background: var(--paper); border: 1px solid var(--line); padding: 10px 16px; min-width: 130px; }
.glance b { display: block; font: 700 1.6rem var(--display); }
.glance span { font-size: .82rem; color: var(--muted); }
.tour-card { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 14px 16px; margin-bottom: 14px; }
.tour-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.tour-card h3 { font-family: var(--display); font-size: 1.2rem; margin: 0; }
.tour-card .meta, .stops .meta { font-size: .82rem; color: var(--muted); margin: 2px 0 0; }
.tour-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tour-card p { margin: 8px 0; font-size: .95rem; }
.cq { font-style: italic; }
.tour-card summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .9rem; }
.stops { font-size: .92rem; padding-left: 1.3em; }
.stops > li { margin: 10px 0; }
.stops p { margin: 4px 0; }
.stops ul { margin: 4px 0; padding-left: 1.2em; color: var(--ink-2); }
.stop-link { font-size: .8rem; margin-left: 6px; }
.ws-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ws-table th { text-align: left; font-weight: 600; border-bottom: 1px solid var(--line); padding: 6px 8px; }
.ws-table td { border-bottom: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
.ws-table a { color: var(--ink); }
.ws-links { white-space: nowrap; }
.ws-links a { color: var(--accent); }
.vocab { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .93rem; }
.vocab dt { font-weight: 600; }
.vocab dd { margin: 0; }
.advisory li { margin: 6px 0; font-size: .95rem; }

/* Worksheets */
.sheet { max-width: 820px; margin: 24px auto 60px; padding: 36px 44px; background: #fff; color: #111; border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 11.5pt; line-height: 1.45; }
.toolbar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.ws-name { display: flex; align-items: flex-end; gap: 8px; font-size: 10.5pt; margin-bottom: 14px; }
.ws-name i { flex: 3; border-bottom: 1px solid #555; height: 1.2em; }
.ws-name i.short { flex: 1; }
.key-banner { background: #111; color: #fff; display: inline-block; padding: 2px 10px; font-size: 10pt; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
.sheet h1 { font-family: var(--display); font-size: 20pt; margin: 0 0 2px; }
.sheet h2 { font-family: var(--display); font-size: 13pt; margin: 18px 0 6px; border-bottom: 1px solid #999; padding-bottom: 2px; }
.ws-meta { color: #555; font-style: italic; margin: 0 0 6px; }
.sheet blockquote { margin: 8px 0; padding: 8px 14px; border-left: 3px solid #777; background: #f4f5f7; font-style: italic; }
.sheet .attr { font-size: 10pt; color: #444; margin: 4px 0 8px; }
.ws-q { padding-left: 1.3em; margin: 6px 0; }
.ws-q > li { margin: 8px 0; }
.lines i { display: block; border-bottom: 1px solid #aaa; height: 1.9em; }
.answer { margin: 6px 0; padding: 6px 10px; background: #eef3e6; border: 1px solid #b7c7a0; font-size: 10pt; }
.ws-source { break-inside: avoid; }
.ws-image figure { margin: 6px 0; }
.ws-image img { max-height: 3.4in; width: auto; max-width: 100%; margin: 0 auto; box-shadow: none; }
.ws-image figcaption { text-align: center; color: #444; }
.orq { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.orq > div { border: 1px solid #999; padding: 6px 8px; }
.orq p { margin: 2px 0 0; font-size: 9.5pt; color: #444; }
.ws-foot { margin-top: 20px; font-size: 9pt; color: #777; text-align: center; }

@media (max-width: 760px) {
  .site-header nav { display: flex; flex-wrap: wrap; gap: 4px 0; }
  .site-header nav a.all { border-left: none; padding-left: 0; }
  .hero h1 { font-size: 2rem; }
  .sheet { padding: 20px 16px; margin: 0; border: none; }
  .orq { grid-template-columns: 1fr; }
  .vocab { grid-template-columns: 1fr; gap: 0; }
  .vocab dd { margin-bottom: 8px; }
  .ws-table.standards thead { display: none; }
  .ws-table.standards td { display: block; border: none; padding: 2px 0; }
  .ws-table.standards tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
}
@media print {
  @page { margin: 0.6in; }
  html, body { height: auto !important; background: #fff !important; display: block !important; }
  .no-print { display: none !important; }
  .page { overflow: visible !important; }
  .sheet { border: none; box-shadow: none; margin: 0; padding: 0; max-width: none; }
  .sheet blockquote, .answer { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Battlefield view ---------- */
.atlas.tactical-on .timeline { display: none; }
.atlas.tactical-on .legend { display: none; }
.atlas.tactical-on { grid-template-rows: minmax(0, 1fr); }
.atlas.tactical-on #panel { grid-row: 1; }
.unit-line { cursor: default; filter: drop-shadow(0 0 2px rgba(255,255,255,.9)) drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.unit-label {
  position: absolute; transform: translate(-50%, -150%); white-space: nowrap;
  font: 600 10.5px/1 var(--serif); letter-spacing: .02em; color: #fff;
  padding: 3px 6px; border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.45);
  background: var(--draw); pointer-events: none;
}
.unit-label.side-a { background: var(--side-a); }
.unit-label.side-b { background: var(--side-b); }
.place-label {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font: italic 600 11.5px/1 var(--serif); color: var(--ink);
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 5px #fff, 0 0 5px #fff; pointer-events: none;
}
.btn.watch { width: 100%; padding: 9px 12px; font-size: .92rem; }
.unit-key { margin: 16px 0 0; }
.unit-key dt { font-style: normal; color: var(--ink); font-weight: 600; white-space: nowrap; }
.unit-key .swatch { margin-right: 6px; vertical-align: middle; height: 6px; }
.phase-list { list-style: none; padding: 0; margin: 0; counter-reset: ph; }
.phase-list li { border-bottom: 1px solid var(--line); }
.phase-list button { width: 100%; background: none; border: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; padding: 6px 4px; display: grid; grid-template-columns: 118px 1fr; gap: 10px; font-size: .88rem; }
.phase-list time { color: var(--muted); font-size: .8rem; }
.phase-list li.now button { font-weight: 600; background: var(--paper-2); }
.phase-list button:hover { color: var(--accent); }
.tactical .prevnext { margin-top: 14px; }
@media (max-width: 760px) {
  .atlas.tactical-on { grid-template-rows: 58vh auto; }
  .atlas.tactical-on #panel { grid-row: 2; }
}

/* ---- 3D objects ------------------------------------------------------ */
.obj-card { font: inherit; color: inherit; text-align: left; padding: 0; cursor: pointer; display: flex; flex-direction: column; }
.obj-card .body { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.obj-thumb { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; background: #2b2620; border-bottom: 1px solid var(--line); overflow: hidden; }
.obj-thumb img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; border: 0; display: block; background: #2b2620; }
.obj-cube { position: absolute; right: 8px; bottom: 8px; font-family: var(--display); font-weight: 700; font-size: .78rem; letter-spacing: .06em; color: #fff; background: rgba(20, 16, 12, .72); border: 1px solid rgba(255, 255, 255, .5); border-radius: 3px; padding: 2px 7px; }
.obj-title { font-family: var(--display); font-size: 1.08rem; line-height: 1.2; }
.obj-holder { font-size: .8rem; color: var(--muted); font-style: italic; }
.badge.obj-real { background: #3d5a3a; }
.badge.obj-model { background: #6b5c48; }
.obj-note { font-size: .85rem; color: var(--muted); margin-top: 22px; }
.obj-dialog { width: min(1180px, 96vw); height: min(760px, 92vh); max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); overflow: hidden; }
.obj-dialog[open] { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); }
.obj-dialog::backdrop { background: rgba(24, 18, 12, .72); }
.obj-stage { background: #1d1a16; min-height: 0; }
.obj-stage { position: relative; }
.obj-stage iframe, .obj-stage model-viewer { width: 100%; height: 100%; border: 0; display: block; }
.obj-stage model-viewer { background: radial-gradient(circle at 50% 40%, #4a443c, #1d1a16 75%); --progress-bar-color: #c9a35a; }
.obj-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #d8cdb8; font-style: italic; }
.obj-hd { position: absolute; left: 12px; bottom: 12px; }
.obj-info { padding: 16px 20px 20px; overflow-y: auto; min-height: 0; }
.obj-info h2 { font-family: var(--display); font-size: 1.45rem; line-height: 1.2; margin: 12px 0 4px; }
.obj-info h3 { font-family: var(--display); font-size: 1rem; margin: 16px 0 6px; }
.obj-info .meta { font-size: .85rem; color: var(--muted); margin: 0; }
.obj-info .obj-holder { margin: 2px 0 12px; }
.obj-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.obj-look { margin: 0; padding-left: 20px; }
.obj-look li { margin-bottom: 7px; }
.obj-credit, .obj-help { font-size: .8rem; color: var(--muted); }
.obj-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
@media (max-width: 820px) {
  .obj-dialog { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .obj-dialog[open] { grid-template-columns: 1fr; grid-template-rows: 46dvh minmax(0, 1fr); }
}

.obj-links { font-size: .9rem; }
.obj-list { columns: 2 280px; padding-left: 20px; }
.obj-list li { margin-bottom: 5px; break-inside: avoid; }
.obj-list .meta { font-size: .8rem; color: var(--muted); }


/* ================= Modern theme =================
   Clean surfaces, one sans-serif for the interface, serif kept for historical quotations. */
body { background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { letter-spacing: -.015em; }
a { color: var(--accent-dark); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid rgba(11, 122, 117, .45); outline-offset: 2px; border-radius: 4px; }

/* Header */
.site-header { padding: 0 24px; min-height: 64px; position: relative; z-index: 5; }
.brand { display: grid; grid-template-columns: auto 1fr; column-gap: 11px; align-items: center; font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; padding: 10px 0; }
.brand::before { content: ''; grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 10px; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 2.5l2.6 6.9 6.9 2.6-6.9 2.6-2.6 6.9-2.6-6.9L2.5 12l6.9-2.6z'/%3E%3C/svg%3E") center / 22px no-repeat; }
.brand small { font: 500 .76rem/1.3 var(--sans); color: var(--muted); letter-spacing: 0; }
.site-header nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-header nav a { margin: 0; padding: 8px 12px; border-radius: 8px; border-bottom: 0; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.site-header nav a:hover { background: var(--paper-2); }
.site-header nav a.active { background: var(--accent-soft); color: var(--accent-dark); }
.site-header nav a.all { border-left: 0; margin-left: 8px; padding-left: 12px; font-size: .88rem; font-weight: 500; color: var(--muted); }

/* Buttons, badges */
.btn { font: 600 .86rem/1.2 var(--sans); background: var(--paper); border: 1px solid var(--line); border-bottom-width: 2px; color: var(--ink); padding: 8px 14px; border-radius: 8px; transition: background .12s, border-color .12s, transform .05s; }
.btn:hover { background: var(--paper-2); border-color: #c9cfd9; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent-dark); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.filters .btn { border-radius: 999px; }
.filters .btn.on { background: var(--accent); border-color: var(--accent-dark); color: #fff; }
.badge { border-radius: 999px; padding: 4px 10px; font-size: .68rem; font-weight: 700; letter-spacing: .05em; }

/* Pages */
.page-inner { max-width: 1140px; padding: 36px 24px 72px; }
.page h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 10px; }
.page .lede { font-style: normal; font-size: 1.1rem; color: var(--muted); max-width: 72ch; }
.page h2 { font-size: 1.4rem; font-weight: 700; border-bottom: 0; margin: 44px 0 14px; padding: 0; }
.cards { gap: 20px; }
.card { border-radius: var(--r); overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #cdd3dd; }
.card .body { padding: 14px 16px 16px; }
.card h3 { font-weight: 700; font-size: 1.08rem; }
.card .quote { font-family: var(--quote); }
.card.war h3 { font-size: 1.25rem; }
.card.war .go { color: var(--accent-dark); font-weight: 700; }
.site-footer { background: var(--paper); padding: 20px 24px; font-size: .82rem; }

/* Home */
.hero { margin: 0 0 28px; padding: 46px 42px; border-radius: 18px; color: #fff; background: radial-gradient(900px 300px at 85% -10%, rgba(255, 255, 255, .18), transparent 60%), linear-gradient(120deg, #0b7a75 0%, #0d5a8c 100%); }
.hero h1 { font-size: 2.9rem; color: #fff; margin-bottom: 12px; }
.hero .lede { color: rgba(255, 255, 255, .92); margin: 0; font-size: 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero .btn { padding: 11px 18px; font-size: .95rem; }
.hero .btn.primary { background: #fff; color: var(--accent-dark); border-color: rgba(0, 0, 0, .14); }
.hero .btn.primary:hover { background: #f0f7f6; }
.hero .btn.ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .5); }
.hero .btn.ghost:hover { background: rgba(255, 255, 255, .2); }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; padding: 0; list-style: none; font-size: .9rem; color: rgba(255, 255, 255, .9); font-weight: 500; }
.hero-points li::before { content: '✓'; margin-right: 7px; font-weight: 800; }
.features { gap: 16px; }
.features > div { border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.features h3 { font-weight: 700; font-size: 1.02rem; margin-bottom: 6px; display: flex; align-items: center; gap: 9px; }
.features h3::before { content: ''; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.features p { color: var(--ink-2); }
.planned li { padding: 10px 0; }

/* Teacher guide */
.glance > div { border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 20px; }
.glance b { font: 800 1.8rem/1.1 var(--sans); color: var(--accent-dark); letter-spacing: -.02em; }
.tour-card { border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; }
.tour-card h3 { font-weight: 700; }
.tour-card summary { color: var(--accent-dark); }
.ws-table { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.ws-table th { background: var(--paper-2); border-bottom: 1px solid var(--line); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 14px; }
.ws-table td { padding: 10px 14px; }
.ws-table tr:last-child td { border-bottom: 0; }
.ws-links a { color: var(--accent-dark); font-weight: 600; }

/* Map page */
#panel h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
#panel h3 { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 0; margin: 28px 0 10px; padding: 0; }
.dates { font-style: normal; }
figure img { border-radius: 8px; box-shadow: none; }
figcaption .credit, .entry .src, .empty, .cas .note, .facts dt, .tour-list span, .obj-holder, .cq { font-style: normal; }
.facts dt { font-weight: 600; font-size: .82rem; }
.significance { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; padding: 10px 14px; }
.cas .bar i { height: 10px; border-radius: 5px; }
.entry { border-radius: var(--r); border-left-width: 4px; box-shadow: var(--shadow); padding: 14px 16px; }
.entry blockquote { font-family: var(--quote); font-size: 1rem; }
.entry blockquote::before, .entry blockquote::after { font-family: var(--quote); }
.tour-list { gap: 10px; }
.tour-list button { border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 14px; transition: border-color .12s, box-shadow .12s; }
.tour-list button:hover { background: var(--paper); box-shadow: var(--shadow-lg); }
.tour-name { color: var(--accent-dark); font-size: .74rem; font-weight: 700; }
.tour-progress i { height: 5px; border-radius: 3px; }
.discuss { border-radius: var(--r); padding: 8px 16px 12px; }
.discuss h3 { color: var(--ink) !important; }
kbd { border-radius: 5px; font-size: .9em; }
.timeline { padding: 12px 18px; }
.play { width: 44px; height: 44px; background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(11, 122, 117, .35); }
.play:hover { background: var(--accent-dark); }
.date { font-weight: 700; }
.speed select, .options summary { border-radius: 8px; padding: 6px 10px; font-weight: 600; }
.options-menu, .legend { border-radius: var(--r); }
.leaflet-tooltip { border-radius: 8px; font-weight: 500; }
.legend h4 { font-weight: 700; }
.army-head, .unit-label { border-radius: 5px; font-weight: 700; }
.place-label { font-style: normal; font-weight: 700; }
.phase-list li.now button { border-radius: 6px; }

/* Worksheets stay print-first */
.sheet { border-radius: 6px; }
.sheet blockquote { font-family: var(--quote); }
.ws-meta { font-style: normal; }

/* 3D objects */
.obj-title { font-weight: 700; }
.obj-dialog { border: 0; border-radius: 16px; box-shadow: var(--shadow-lg); }
.obj-info h2 { font-weight: 800; letter-spacing: -.02em; }
.obj-info h3 { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

@media (max-width: 760px) {
  .site-header { padding: 8px 16px 10px; min-height: 0; }
  .brand { padding: 4px 0; }
  .site-header nav a { margin: 0; padding: 7px 10px; }
  .site-header nav a.all { margin-left: 0; padding-left: 10px; }
  .page-inner { padding: 24px 16px 56px; }
  .page h1 { font-size: 1.8rem; }
  .hero { padding: 30px 22px; border-radius: 14px; }
  .hero h1 { font-size: 2.1rem; }
  .obj-dialog { border-radius: 0; }
}
@media print { body { background: #fff; } }
.card .badge { align-self: flex-start; }

/* ---- Period map, name labels, and finding things on the map ------------- */
.base-period .leaflet-tile-pane { filter: sepia(.12) saturate(.9) brightness(1.04); }
.mode-switch { display: flex; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; box-shadow: var(--shadow); }
.mode-switch button { border: 0; background: none; font: 600 .78rem var(--sans); color: var(--ink-2); padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.mode-switch button:hover { background: var(--paper-2); }
.mode-switch button[aria-pressed="true"] { background: var(--accent); color: #fff; }

.map-label-wrap { background: none; border: 0; }
.map-label { display: block; width: 100%; text-align: center; white-space: nowrap; line-height: 14px; font: 500 11px var(--sans); color: var(--ink);
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff, 0 0 4px #fff; pointer-events: none; }
.map-label.battle { font: 700 11.5px var(--sans); line-height: 15px; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 999px;
  text-shadow: none; box-shadow: 0 1px 2px rgba(20, 30, 50, .12); pointer-events: auto; cursor: pointer; }
.map-label.battle:hover { border-color: var(--accent); color: var(--accent-dark); }
.map-label.battle.future { font-weight: 600; color: var(--muted); background: rgba(255, 255, 255, .8); }
.map-label.area, .map-label.region { font: 600 10px var(--sans); line-height: 14px; letter-spacing: .1em; color: rgba(45, 55, 75, .72); }
.map-label.nation { font: italic 600 11px var(--quote); line-height: 14px; color: #6b5a2e; }
.map-label.water { font: italic 500 11px var(--quote); line-height: 14px; color: #3b6c93; }

.map-cta { position: absolute; z-index: 800; left: 50%; top: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 5px 16px 5px 5px; box-shadow: var(--shadow-lg); white-space: nowrap; }
.map-cta[hidden] { display: none; }
.map-cta .btn { border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.map-cta span { font-size: .82rem; color: var(--muted); }
.narrow .map-cta { top: 56px; padding: 4px; }
.narrow .map-cta span { display: none; }

.legend { max-width: 240px; max-height: calc(100vh - 250px); overflow-y: auto; }
.legend summary { font: 700 .8rem var(--sans); cursor: pointer; }
.legend details[open] summary { margin-bottom: 4px; }
.legend .box { width: 14px; height: 11px; border-radius: 2px; opacity: .55; border: 1px solid rgba(0, 0, 0, .35); flex: none; }
.period-key { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); }
.period-key .row { align-items: flex-start; }
.period-key .row .box { margin-top: 3px; }
.period-key details { margin-top: 5px; }
.period-key details summary { font: 600 .72rem var(--sans); color: var(--accent-dark); margin: 0; }
.period-key p { margin: 4px 0 0; font-size: .72rem; line-height: 1.4; color: var(--muted); }

.all-list { margin: 8px 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.all-list summary { padding: 9px 12px; font-weight: 600; font-size: .9rem; cursor: pointer; }
.all-list[open] summary { border-bottom: 1px solid var(--line); }
.all-list ul { margin: 0; padding: 6px 12px 10px; max-height: 320px; overflow-y: auto; }
.dot.side-future { background: #fff; box-shadow: inset 0 0 0 1.5px #5d6677; }
@media (max-width: 760px) {
  .map-cta span { display: none; }
  .map-cta { padding: 4px; top: 56px; }
  .mode-switch button { padding: 5px 9px; font-size: .72rem; }
}

/* Battlefield animations: shortcuts from the map and the opening panel */
.map-label.battle.has-tac, .map-label.battle.has-tac.future { background: var(--accent); border-color: var(--accent-dark); color: #fff; font-weight: 700; }
.map-label.battle.has-tac:hover { background: var(--accent-dark); color: #fff; }
.tac-intro { margin: 0 0 8px; font-size: .88rem; color: var(--muted); }
.tac-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.tac-list button { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; background: var(--accent-soft); border: 1px solid transparent; border-radius: var(--r); cursor: pointer; font: inherit; color: var(--ink); }
.tac-list button:hover { border-color: var(--accent); }
.tac-list strong { display: block; }
.tac-list small { color: var(--ink-2); font-size: .8rem; }
.tac-play { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: .8rem; padding-left: 2px; }
.tac-tag { margin-left: 6px; font-size: .7rem; font-weight: 700; color: var(--accent-dark); background: var(--accent-soft); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }

/* Newspaper clippings and newsreels */
.media-note { margin: -2px 0 10px; font-size: .86rem; color: var(--muted); }
.paper { margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--paper); }
.paper a { display: block; max-height: 420px; overflow: hidden; background: #efe9dc; }
.paper.wide a { max-height: none; }
.paper img { display: block; width: 100%; height: auto; }
.paper figcaption { padding: 9px 12px 10px; font-size: .86rem; line-height: 1.4; border-top: 1px solid var(--line); }
.paper figcaption a { display: inline; max-height: none; background: none; }
.paper-tag { display: inline-block; margin-left: 4px; font-size: .7rem; font-weight: 700; color: var(--accent-dark); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.reel { margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--paper); }
.reel-play { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; padding: 0; background: #111; cursor: pointer; }
.reel-play img { width: 100%; height: 100%; object-fit: cover; opacity: .8; display: block; }
.reel-play .tac-play { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; font-size: 1.1rem; box-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.reel-play:hover img { opacity: 1; }
.reel-frame { display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; background: #000; }
.reel-text { padding: 10px 12px 11px; }
.reel-text strong { display: block; }
.reel-text small { color: var(--muted); font-size: .8rem; }
.reel-text p { margin: 6px 0; font-size: .9rem; line-height: 1.45; }
.paper .credit, .reel .credit { display: block; margin-top: 3px; font-size: .76rem; color: var(--muted); }

/* At fractional zoom, Leaflet's own seam fix (mix-blend-mode: plus-lighter) draws bright lines where tiles
   overlap by a fraction of a pixel. Overlap the tiles slightly and paint them normally instead. */
.leaflet-container .leaflet-tile-container img.leaflet-tile { width: 257px !important; height: 257px !important; mix-blend-mode: normal; }
