/* Shared interactive soundboard, quiz, and flashcard lab theme for Culture courses */

.culture-interactive-box {
  margin: 1rem 0 1.6rem;
  padding: 1.05rem 1.15rem;
  background: #faf7f2;
  border: 1px solid #e5dec9;
  border-radius: 14px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.04);
}
html[data-theme="dark"] .culture-interactive-box {
  background: #1a1612;
  border-color: #3d332a;
}

.c-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.c-tab-btn,
.c-ctrl-btn,
.audio-pill-btn {
  appearance: none;
  border: 1px solid #d4c8ae;
  background: #fffdf8;
  color: #3a2c20;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.1s ease;
}

.c-tab-btn:hover,
.c-ctrl-btn:hover,
.audio-pill-btn:hover {
  border-color: #b5451d;
  transform: translateY(-1px);
}

.c-tab-btn.is-active,
.c-ctrl-btn.primary {
  background: #b5451d;
  border-color: #b5451d;
  color: #fff;
}

html[data-theme="dark"] .c-tab-btn,
html[data-theme="dark"] .c-ctrl-btn,
html[data-theme="dark"] .audio-pill-btn {
  background: #241e18;
  border-color: #4b3f33;
  color: #f3e6d4;
}

html[data-theme="dark"] .c-tab-btn:hover,
html[data-theme="dark"] .c-ctrl-btn:hover,
html[data-theme="dark"] .audio-pill-btn:hover {
  border-color: #f0b48a;
}

html[data-theme="dark"] .c-tab-btn.is-active,
html[data-theme="dark"] .c-ctrl-btn.primary {
  background: #c8582b;
  border-color: #c8582b;
  color: #fff;
}

.audio-pill-btn.is-playing {
  background: #b5451d;
  border-color: #b5451d;
  color: #fff;
  transform: scale(0.98);
}

html[data-theme="dark"] .audio-pill-btn.is-playing {
  background: #c8582b;
  border-color: #f0b48a;
  color: #fff;
  transform: scale(0.98);
}

.soundboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0 0.5rem;
}

.sound-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.8rem 0.9rem;
  background: #fffdf8;
  border: 1px solid #e5dec9;
  border-radius: 11px;
}
html[data-theme="dark"] .sound-card {
  background: #231d17;
  border-color: #3d332a;
}

.sound-meta {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #8a3414;
  margin-bottom: 0.2rem;
}
html[data-theme="dark"] .sound-meta {
  color: #f0b48a;
}

.sound-deva {
  font-size: 1.18rem;
  font-weight: 700;
  color: #2c221a;
  margin: 0.1rem 0;
}
html[data-theme="dark"] .sound-deva {
  color: #f6ead4;
}

.sound-iast {
  font-size: 0.88rem;
  font-style: italic;
  color: #5c4636;
  margin-bottom: 0.3rem;
}
html[data-theme="dark"] .sound-iast {
  color: #ddcbb8;
}

.sound-note {
  font-size: 0.86rem;
  line-height: 1.45;
  color: #4b392b;
  margin: 0 0 0.55rem;
}
html[data-theme="dark"] .sound-note {
  color: #d6c3af;
}

.c-quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #6b523d;
  margin-bottom: 0.65rem;
}
html[data-theme="dark"] .c-quiz-meta {
  color: #ddcbb8;
}

.c-quiz-q {
  font-size: 1.04rem;
  font-weight: 650;
  line-height: 1.5;
  margin: 0 0 0.8rem;
}

.c-quiz-opts {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.c-quiz-opt {
  text-align: left;
  padding: 0.62rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #d4c8ae;
  background: #fffdf8;
  color: #2c221a;
  font-size: 0.94rem;
  line-height: 1.45;
  cursor: pointer;
}
.c-quiz-opt:hover:not(:disabled) {
  border-color: #b5451d;
}
.c-quiz-opt.is-right {
  background: rgba(34, 139, 34, 0.12);
  border-color: #2e7d32;
}
.c-quiz-opt.is-wrong {
  background: rgba(183, 28, 28, 0.11);
  border-color: #c62828;
}

html[data-theme="dark"] .c-quiz-opt {
  background: #231d17;
  border-color: #4b3f33;
  color: #f6ead4;
}
html[data-theme="dark"] .c-quiz-opt.is-right {
  background: rgba(76, 175, 80, 0.18);
  border-color: #81c784;
}
html[data-theme="dark"] .c-quiz-opt.is-wrong {
  background: rgba(239, 83, 80, 0.18);
  border-color: #e57373;
}

.c-quiz-exp,
.c-flash-ans {
  margin: 0.65rem 0 0.85rem;
  padding: 0.72rem 0.9rem;
  background: rgba(181, 69, 29, 0.06);
  border-left: 3px solid #b5451d;
  border-radius: 0 8px 8px 0;
  font-size: 0.92rem;
  line-height: 1.5;
}
html[data-theme="dark"] .c-quiz-exp,
html[data-theme="dark"] .c-flash-ans {
  background: rgba(240, 180, 138, 0.09);
  border-left-color: #f0b48a;
}

.c-flash-term {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0.25rem 0 0.45rem;
}

.c-ctrl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

/* ==========================================================================
   Interactive Museum-Grade Exploration Widgets: Timeline & Elevation Scrubbers
   ========================================================================== */

.timeline-scrubber-app,
.elevation-scrubber-app {
  margin: 1.25rem 0 2rem;
  padding: 1.35rem 1.45rem;
  background: #faf7f2;
  border: 1px solid #e5dec9;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(44, 34, 26, 0.05);
}
html[data-theme="dark"] .timeline-scrubber-app,
html[data-theme="dark"] .elevation-scrubber-app {
  background: #171410;
  border-color: #3d332a;
}

.timeline-widget-header,
.elevation-widget-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(229, 222, 201, 0.7);
}
html[data-theme="dark"] .timeline-widget-header,
html[data-theme="dark"] .elevation-widget-header {
  border-bottom-color: rgba(61, 51, 42, 0.7);
}

.timeline-badge,
.elevation-badge {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  background: rgba(181, 69, 29, 0.1);
  color: #8a3414;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
html[data-theme="dark"] .timeline-badge,
html[data-theme="dark"] .elevation-badge {
  background: rgba(240, 180, 138, 0.12);
  color: #f0b48a;
}

.timeline-main-heading,
.elevation-main-heading {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.35;
  color: #2c221a;
}
html[data-theme="dark"] .timeline-main-heading,
html[data-theme="dark"] .elevation-main-heading {
  color: #f6ead4;
}

.timeline-nav-buttons {
  display: flex;
  gap: 0.5rem;
}

.timeline-btn {
  appearance: none;
  border: 1px solid #d4c8ae;
  background: #fffdf8;
  color: #2c221a;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
  transition: all 0.14s ease;
}
.timeline-btn:hover:not(:disabled) {
  border-color: #b5451d;
  background: #b5451d;
  color: #fff;
}
.timeline-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
html[data-theme="dark"] .timeline-btn {
  background: #241e18;
  border-color: #4b3f33;
  color: #f3e6d4;
}
html[data-theme="dark"] .timeline-btn:hover:not(:disabled) {
  background: #e4845a;
  border-color: #e4845a;
  color: #171410;
}

/* Range input styling */
.timeline-slider-track-wrap,
.elevation-slider-wrap {
  position: relative;
  margin: 1.1rem 0 0.9rem;
}

.timeline-range-input,
.elevation-range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: #e5dec9;
  outline: none;
  transition: background 0.15s ease;
  margin: 0;
  cursor: pointer;
}
html[data-theme="dark"] .timeline-range-input,
html[data-theme="dark"] .elevation-range-input {
  background: #3d332a;
}

.timeline-range-input::-webkit-slider-thumb,
.elevation-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #b5451d;
  border: 3px solid #fffdf8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: grab;
  transition: transform 0.12s ease, background 0.12s ease;
}
.timeline-range-input::-webkit-slider-thumb:hover,
.elevation-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #8a3414;
}
.timeline-range-input::-webkit-slider-thumb:active,
.elevation-range-input::-webkit-slider-thumb:active {
  cursor: grabbing;
}
html[data-theme="dark"] .timeline-range-input::-webkit-slider-thumb,
html[data-theme="dark"] .elevation-range-input::-webkit-slider-thumb {
  background: #e4845a;
  border-color: #1f1a15;
}

.timeline-ticks-row {
  display: flex;
  justify-content: space-between;
  padding: 0 6px;
  margin-top: 0.35rem;
}

.timeline-tick {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c7bc9f;
  cursor: pointer;
  transition: all 0.15s ease;
}
.timeline-tick.is-active {
  background: #b5451d;
  transform: scale(1.4);
  box-shadow: 0 0 0 3px rgba(181, 69, 29, 0.25);
}
html[data-theme="dark"] .timeline-tick {
  background: #4b3f33;
}
html[data-theme="dark"] .timeline-tick.is-active {
  background: #e4845a;
  box-shadow: 0 0 0 3px rgba(228, 132, 90, 0.25);
}

.timeline-chips-scroller {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.5rem 0 0.8rem;
  scrollbar-width: thin;
}

.timeline-chip {
  appearance: none;
  border: 1px solid #e0d7c3;
  background: rgba(255, 253, 248, 0.7);
  color: #4b392b;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.12s ease;
}
.timeline-chip:hover {
  border-color: #b5451d;
  color: #b5451d;
}
.timeline-chip.is-active {
  background: #b5451d;
  border-color: #b5451d;
  color: #fff;
  box-shadow: 0 2px 8px rgba(181, 69, 29, 0.2);
}
html[data-theme="dark"] .timeline-chip {
  background: rgba(36, 30, 24, 0.7);
  border-color: #3d332a;
  color: #ddcbb8;
}
html[data-theme="dark"] .timeline-chip:hover {
  border-color: #e4845a;
  color: #e4845a;
}
html[data-theme="dark"] .timeline-chip.is-active {
  background: #e4845a;
  border-color: #e4845a;
  color: #171410;
}

/* Spotlight & Inspector Cards */
.timeline-spotlight-card,
.elevation-inspector-card {
  margin-top: 1rem;
  padding: 1.2rem 1.3rem;
  background: #fffdf8;
  border: 1px solid #e0d7c3;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
html[data-theme="dark"] .timeline-spotlight-card,
html[data-theme="dark"] .elevation-inspector-card {
  background: #1f1a15;
  border-color: #3d332a;
}

.spotlight-header,
.inspector-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px dashed #e0d7c3;
}
html[data-theme="dark"] .spotlight-header,
html[data-theme="dark"] .inspector-header {
  border-bottom-color: #3d332a;
}

.spotlight-phase-tag,
.inspector-zone-pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #8a3414;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
html[data-theme="dark"] .spotlight-phase-tag,
html[data-theme="dark"] .inspector-zone-pill {
  color: #f0b48a;
}

.spotlight-title,
.inspector-belt-title {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.35;
  color: #2c221a;
}
html[data-theme="dark"] .spotlight-title,
html[data-theme="dark"] .inspector-belt-title {
  color: #f6ead4;
}

.spotlight-chapter-btn,
.inspector-link-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.85rem;
  background: rgba(181, 69, 29, 0.09);
  border: 1px solid rgba(181, 69, 29, 0.25);
  color: #b5451d;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
  transition: all 0.12s ease;
}
.spotlight-chapter-btn:hover,
.inspector-link-btn:hover {
  background: #b5451d;
  color: #fff;
  border-color: #b5451d;
}
html[data-theme="dark"] .spotlight-chapter-btn,
html[data-theme="dark"] .inspector-link-btn {
  background: rgba(228, 132, 90, 0.12);
  border-color: rgba(228, 132, 90, 0.3);
  color: #f0b48a;
}
html[data-theme="dark"] .spotlight-chapter-btn:hover,
html[data-theme="dark"] .inspector-link-btn:hover {
  background: #e4845a;
  color: #171410;
  border-color: #e4845a;
}

.spotlight-grid,
.inspector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 0.9rem;
}

.spotlight-box,
.inspector-cell {
  padding: 0.8rem 0.95rem;
  background: #faf7f2;
  border: 1px solid #ede5d3;
  border-radius: 9px;
}
html[data-theme="dark"] .spotlight-box,
html[data-theme="dark"] .inspector-cell {
  background: #171410;
  border-color: #382e25;
}
.inspector-cell.full-width {
  grid-column: 1 / -1;
}

.spotlight-label,
.cell-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8a3414;
  margin-bottom: 0.3rem;
}
html[data-theme="dark"] .spotlight-label,
html[data-theme="dark"] .cell-label {
  color: #f0b48a;
}

.spotlight-val,
.cell-val {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.52;
  color: #3b2c21;
}
html[data-theme="dark"] .spotlight-val,
html[data-theme="dark"] .cell-val {
  color: #ddcbb8;
}

/* Elevation specific styling */
.elevation-digital-readout {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.digital-alt-val {
  font-size: 1.7rem;
  font-weight: 800;
  color: #b5451d;
  line-height: 1.1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
html[data-theme="dark"] .digital-alt-val {
  color: #f0b48a;
}
.digital-alt-sub {
  font-size: 0.85rem;
  font-weight: 600;
  color: #7a6552;
}
html[data-theme="dark"] .digital-alt-sub {
  color: #b5a494;
}

.elevation-visual-canvas {
  position: relative;
  margin: 0.8rem 0 1rem;
  padding: 0.6rem 0.4rem;
  background: rgba(181, 69, 29, 0.04);
  border: 1px solid #e5dec9;
  border-radius: 10px;
}
html[data-theme="dark"] .elevation-visual-canvas {
  background: rgba(240, 180, 138, 0.04);
  border-color: #3d332a;
}

.elevation-laser-beacon {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #b5451d;
  box-shadow: 0 0 8px rgba(181, 69, 29, 0.6);
  pointer-events: none;
  transition: left 0.1s linear;
}
html[data-theme="dark"] .elevation-laser-beacon {
  background: #f0b48a;
  box-shadow: 0 0 8px rgba(240, 180, 138, 0.7);
}

.elevation-preset-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.preset-pill-btn {
  appearance: none;
  border: 1px solid #d4c8ae;
  background: #fffdf8;
  color: #3a2c20;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}
.preset-pill-btn:hover {
  border-color: #b5451d;
  color: #b5451d;
}
.preset-pill-btn.is-active {
  background: #b5451d;
  border-color: #b5451d;
  color: #fff;
}
html[data-theme="dark"] .preset-pill-btn {
  background: #241e18;
  border-color: #4b3f33;
  color: #ddcbb8;
}
html[data-theme="dark"] .preset-pill-btn:hover {
  border-color: #f0b48a;
  color: #f0b48a;
}
html[data-theme="dark"] .preset-pill-btn.is-active {
  background: #e4845a;
  border-color: #e4845a;
  color: #171410;
}

.slider-endpoints {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 650;
  color: #6d5848;
  margin-bottom: 0.35rem;
}
html[data-theme="dark"] .slider-endpoints {
  color: #b5a494;
}

/* Interactive Nepal Unification Map Canvas (1743–1860 CE) */
.unification-map-stage {
  position: relative;
  margin: 0.75rem 0 0.85rem;
  padding: 0.55rem;
  background: #f5efe2;
  border: 1px solid #dfd4bc;
  border-radius: 12px;
  overflow: hidden;
}
html[data-theme="dark"] .unification-map-stage {
  background: #14110d;
  border-color: #3a3026;
}

.unification-svg {
  display: block;
  width: 100%;
  height: auto;
}

.u-nepal-outer-border path {
  fill: #e7dbc7;
  stroke: #3f2818;
  stroke-width: 4;
  stroke-linejoin: round;
  pointer-events: none;
}
html[data-theme="dark"] .u-nepal-outer-border path {
  fill: #262019;
  stroke: #f3dcc4;
}

.u-district {
  fill: #e7dbc7;
  stroke: #bda98f;
  stroke-width: 0.7;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.3s ease, opacity 0.25s ease, filter 0.15s ease;
}
.u-district:hover {
  filter: brightness(0.92);
  stroke: #3f2818;
  stroke-width: 1.25;
}
html[data-theme="dark"] .u-district {
  fill: #262019;
  stroke: #493d31;
}
html[data-theme="dark"] .u-district:hover {
  filter: brightness(1.18);
  stroke: #f3dcc4;
  stroke-width: 1.25;
}

.u-district.is-external-district {
  fill: rgba(231, 219, 199, 0.28);
  stroke: #b9a78e;
  stroke-width: 0.7;
  stroke-dasharray: 3 2;
}
html[data-theme="dark"] .u-district.is-external-district {
  fill: rgba(38, 32, 25, 0.35);
  stroke: #5c4e3f;
}

.u-district.is-ceded-ghost {
  fill: url(#u-ceded-hatch);
  fill-opacity: 0.35;
  stroke: #b91c1c;
  stroke-width: 0.65;
  stroke-dasharray: 3 2;
  opacity: 0.55;
}
html[data-theme="dark"] .u-district.is-ceded-ghost {
  stroke: #f87171;
  opacity: 0.5;
}

.u-district.is-unified {
  fill: #b5451d;
  stroke: rgba(255, 245, 232, 0.55);
  stroke-width: 0.75;
}
html[data-theme="dark"] .u-district.is-unified {
  fill: #c8582b;
  stroke: rgba(20, 17, 13, 0.6);
}

.u-district.is-current {
  fill: #d97706;
  stroke: #ffffff;
  stroke-width: 1.15;
}
html[data-theme="dark"] .u-district.is-current {
  fill: #f59e0b;
  stroke: #fff7ed;
}

.u-district.is-ceded {
  fill: url(#u-ceded-hatch);
  stroke: #b91c1c;
  stroke-width: 0.9;
  stroke-dasharray: 3 2;
}
html[data-theme="dark"] .u-district.is-ceded {
  stroke: #f87171;
}

.u-map-tooltip {
  position: absolute;
  z-index: 12;
  pointer-events: none;
  background: rgba(34, 24, 17, 0.95);
  color: #fff8ed;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 0.38rem 0.62rem;
  font-size: 0.78rem;
  line-height: 1.35;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  max-width: 14rem;
}
.u-map-tooltip span {
  color: #fcd34d;
  font-size: 0.72rem;
}

.u-district-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}
.u-chips-caption {
  font-size: 0.78rem;
  font-weight: 700;
  color: #7a5c44;
  margin-right: 0.15rem;
}
html[data-theme="dark"] .u-chips-caption {
  color: #cbb59f;
}
.u-dist-tag {
  display: inline-block;
  padding: 0.16rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: #fef3c7;
  color: #78350f;
  border: 1px solid #f59e0b;
  border-radius: 999px;
}
html[data-theme="dark"] .u-dist-tag {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.5);
}

.u-zone {
  fill: #e7dbc7;
  stroke: #b9a78e;
  stroke-width: 1.1;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.35s ease, opacity 0.35s ease, stroke 0.25s ease;
}
.u-zone:hover {
  filter: brightness(0.96);
}
html[data-theme="dark"] .u-zone {
  fill: #262019;
  stroke: #4b3f33;
}
html[data-theme="dark"] .u-zone:hover {
  filter: brightness(1.12);
}

.u-zone.is-imperial-wing {
  fill: transparent;
  stroke: #b9a78e;
  stroke-dasharray: 5 4;
  opacity: 0.25;
}
.u-zone.is-imperial-wing.is-wing-visible {
  opacity: 0.85;
}
html[data-theme="dark"] .u-zone.is-imperial-wing {
  stroke: #665747;
}

.u-zone.is-unified {
  fill: #b5451d;
  stroke: #fbf3e8;
  stroke-width: 1.2;
}
html[data-theme="dark"] .u-zone.is-unified {
  fill: #c8582b;
  stroke: #241c15;
}

.u-zone.is-current {
  fill: #d97706;
  stroke: #ffffff;
  stroke-width: 2.2;
  opacity: 1;
}
html[data-theme="dark"] .u-zone.is-current {
  fill: #f59e0b;
  stroke: #fff7ed;
}

.u-zone.is-ceded {
  fill: url(#u-ceded-hatch);
  stroke: #b91c1c;
  stroke-width: 1.4;
  stroke-dasharray: 4 3;
  opacity: 0.9;
}
html[data-theme="dark"] .u-zone.is-ceded {
  stroke: #f87171;
}

.u-modern-outline {
  fill: none;
  stroke: #3f2818;
  stroke-width: 2.1;
  stroke-linejoin: round;
  pointer-events: none;
}
html[data-theme="dark"] .u-modern-outline {
  stroke: #f3dcc4;
}

.u-river-line {
  fill: none;
  stroke: rgba(56, 132, 184, 0.35);
  stroke-width: 1.6;
  stroke-linecap: round;
  pointer-events: none;
}
html[data-theme="dark"] .u-river-line {
  stroke: rgba(96, 165, 250, 0.3);
}

.u-bg-label {
  font-size: 10.5px;
  font-weight: 600;
  fill: #8d7b67;
  text-anchor: middle;
  pointer-events: none;
  user-select: none;
}
html[data-theme="dark"] .u-bg-label {
  fill: #7d6d5c;
}

.u-river-label,
.u-compass-hint {
  font-size: 9.5px;
  font-weight: 600;
  fill: #6a5a4a;
  pointer-events: none;
  user-select: none;
}
html[data-theme="dark"] .u-river-label,
html[data-theme="dark"] .u-compass-hint {
  fill: #9b8a78;
}

.u-campaign-arrow {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.4;
  stroke-dasharray: 6 4;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
  pointer-events: none;
  animation: uArrowFlow 1.4s linear infinite;
}
@keyframes uArrowFlow {
  to {
    stroke-dashoffset: -20;
  }
}

.u-fort-pin-group {
  pointer-events: none;
}

.u-pin-pulse {
  fill: rgba(255, 255, 255, 0.32);
  stroke: #ffffff;
  stroke-width: 1.5;
  animation: uPinPulse 1.8s ease-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes uPinPulse {
  0% { transform: scale(0.75); opacity: 0.95; }
  100% { transform: scale(1.65); opacity: 0; }
}

.u-pin-core {
  fill: #ffffff;
  stroke: #7c2d12;
  stroke-width: 2.2;
}

.u-pin-pill {
  fill: #2a1d13;
  fill-opacity: 0.92;
  stroke: #f59e0b;
  stroke-width: 1.2;
}

.u-pin-text {
  fill: #fff8ed;
  font-size: 11px;
  font-weight: 700;
}

.unification-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  font-size: 0.8rem;
  color: #5c4939;
  margin-bottom: 0.85rem;
}
html[data-theme="dark"] .unification-legend {
  color: #cbbba9;
}

.u-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.u-swatch {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  border: 1px solid #9b8872;
}
.u-swatch-unclaimed { background: #e7dbc7; }
.u-swatch-unified { background: #b5451d; border-color: #b5451d; }
.u-swatch-current { background: #d97706; border-color: #d97706; }
.u-swatch-ceded { background: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(185, 28, 28, 0.45) 2px, rgba(185, 28, 28, 0.45) 4px); border-color: #b91c1c; }
.u-swatch-outline { background: transparent; border: 2px solid #3f2818; }
html[data-theme="dark"] .u-swatch-unclaimed { background: #262019; }
html[data-theme="dark"] .u-swatch-outline { border-color: #f3dcc4; }

.u-btn-play.is-playing {
  background: #b5451d;
  border-color: #b5451d;
  color: #ffffff;
}
html[data-theme="dark"] .u-btn-play.is-playing {
  background: #e4845a;
  border-color: #e4845a;
  color: #171410;
}

.unification-metrics-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.u-metric-pill {
  background: #f8f3eb;
  border: 1px solid #e7decb;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}
html[data-theme="dark"] .u-metric-pill {
  background: #171410;
  border-color: #382e25;
}

.u-metric-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: #3b2c21;
}
html[data-theme="dark"] .u-metric-val {
  color: #f4e6d6;
}

.u-tactical-box {
  border-left: 3px solid #d97706;
}
html[data-theme="dark"] .u-tactical-box {
  border-left-color: #f59e0b;
}

.u-confed-tabs {
  margin-bottom: 0.65rem;
}

.u-confed-pin {
  cursor: pointer;
}
.u-cpin-bg {
  fill: #2a1d13;
  stroke: #fbbf24;
  stroke-width: 1.5;
  transition: transform 0.14s ease, fill 0.14s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.u-confed-pin:hover .u-cpin-bg {
  fill: #b5451d;
  transform: scale(1.22);
}
.u-cpin-num {
  fill: #fff8ed;
  font-size: 9px;
  font-weight: 800;
  pointer-events: none;
  user-select: none;
}

.u-confed-table {
  font-size: 0.85rem;
}
.u-confed-row {
  cursor: pointer;
  transition: background 0.14s ease;
}
.u-confed-row:hover {
  background: rgba(217, 119, 6, 0.12);
}
html[data-theme="dark"] .u-confed-row:hover {
  background: rgba(245, 158, 11, 0.16);
}
