:root {
  --sol-bg: #efe7d4;
  --sol-glass: rgba(252, 247, 236, 0.90);
  --sol-glass-strong: rgba(253, 249, 239, 0.96);
  --sol-surface: #fdf9ef;
  --sol-surface-alt: #f2e8d4;
  --sol-border: rgba(164, 142, 108, 0.78);
  --sol-ink: #3b2e20;
  --sol-muted: #6e5d48;
  --sol-green: #587f4d;
  --sol-green-dark: #426339;
  --sol-amber: #c68024;
  --sol-blue: #4c8ca8;
  --sol-shadow: 0 6px 22px rgba(52, 38, 22, 0.14);
  --sol-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

html,
body.solitude-body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--sol-bg);
  color: var(--sol-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overscroll-behavior: none;
}

/* Hide global site social footer on the full-viewport map */
body.solitude-body > .social {
  display: none !important;
}

.d-none {
  display: none !important;
}

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

/* Full-viewport map stage */
.solitude-viewport {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

#solitude-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ==========================================================================
   Minimalist Floating Top Bar
   ========================================================================== */
.solitude-topbar {
  position: fixed;
  top: max(10px, env(safe-area-inset-top, 10px));
  left: max(10px, env(safe-area-inset-left, 10px));
  right: max(10px, env(safe-area-inset-right, 10px));
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.topbar-main-pill {
  pointer-events: auto;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 9px;
  padding: 5px 7px 5px 12px;
  background: var(--sol-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--sol-border);
  border-radius: 999px;
  box-shadow: var(--sol-shadow);
  max-width: calc(100vw - 140px);
}

.hud-left-capsule,
.hud-weather-group,
.hud-turn-group {
  display: contents;
}

.solitude-wordmark {
  order: 1;
  font-family: var(--sol-serif);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  color: var(--sol-ink);
  margin-right: 2px;
}

.season-chip {
  order: 2;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.season-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sol-ink);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.1;
  white-space: nowrap;
}

.season-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.season-spring { background: #74a957; }
.season-summer { background: #dda235; }
.season-autumn { background: #c96f32; }
.season-winter { background: #6aa2c2; }

.hud-today-weather {
  font-size: 0.86rem;
}

.season-track {
  width: 100%;
  min-width: 68px;
  height: 3px;
  background: rgba(188, 170, 138, 0.38);
  border-radius: 999px;
  overflow: hidden;
}

.season-fill {
  height: 100%;
  width: 4%;
  background: linear-gradient(90deg, #74a957 0%, #dda235 45%, #c96f32 75%, #6aa2c2 100%);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.hud-sep {
  width: 1px;
  height: 15px;
  background: rgba(186, 168, 136, 0.55);
  flex-shrink: 0;
}

.hud-sep-after-weather {
  order: 4;
}

.hud-sep-after-ap {
  order: 6;
}

.ap-chip {
  order: 5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ap-pips {
  display: inline-flex;
  gap: 3.5px;
  align-items: center;
  min-width: 66px;
}

.ap-pip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #bda782;
  background: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ap-pip.filled {
  background: var(--sol-green);
  border-color: var(--sol-green-dark);
}

.ap-pip.bonus {
  border-color: #d4942a;
}

.ap-pip.filled.bonus {
  background: #e5a835;
  border-color: #a66c12;
  box-shadow: 0 0 0 1px rgba(229, 168, 53, 0.28);
}

.ap-num {
  display: none;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--sol-green-dark);
}

.ap-num.bonus {
  color: #9e6210;
}

.forecast-inline {
  order: 3;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.forecast-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.75);
  border: 1px solid rgba(208, 193, 164, 0.85);
  line-height: 1.25;
  white-space: nowrap;
}

.forecast-chip.weather-gale {
  background: #fcebd8;
  border-color: #dfae77;
  color: #8c4814;
  font-weight: 700;
}

.forecast-chip.weather-thaw {
  background: #fdf4d4;
  border-color: #dfb452;
  color: #8c5c0c;
  font-weight: 700;
}

.supplies-inline {
  order: 7;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.supply-item {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  font-size: 0.8rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.score-item-btn {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 1px 5px;
  margin: -1px -5px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.14s ease;
}

.score-item-btn:hover {
  background: rgba(198, 128, 36, 0.16);
}

.satchel-slots-btn {
  position: relative;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3.5px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  color: #7c4d0f;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  font: inherit;
  transition: background-color 0.14s ease, border-color 0.14s ease, opacity 0.14s ease;
}

.satchel-slots-btn:hover,
.satchel-slots-btn.active {
  background: rgba(255, 247, 230, 0.92);
  border-color: #c59b57;
}

.satchel-slots-btn.empty {
  opacity: 0.72;
}

.satchel-slots-btn.empty:hover,
.satchel-slots-btn.empty.active {
  opacity: 1;
}

.satchel-slots-btn.has-items {
  background: transparent;
  border-color: transparent;
  opacity: 1;
}

.satchel-slots-btn.has-items:hover,
.satchel-slots-btn.has-items.active {
  background: #fbf0db;
  border-color: #dfb46f;
}

.satchel-slots-btn.full {
  background: #fce3cf;
  border-color: #d48348;
  color: #8b380b;
}

.satchel-slots-btn.overloaded {
  background: #fadbd5;
  border-color: #c85c48;
  color: #8c2315;
}

.satchel-slots-btn.overloaded::after {
  content: attr(data-extra);
  position: absolute;
  top: -6px;
  right: -6px;
  padding: 0 4px;
  min-width: 14px;
  height: 13px;
  line-height: 13px;
  border-radius: 999px;
  background: #c1442e;
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 1px 2px rgba(42, 32, 20, 0.28);
  pointer-events: none;
}

.satchel-bag-ico {
  font-size: 0.72rem;
  line-height: 1;
}

.satchel-slots {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
}

.satchel-slot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-sizing: border-box;
  border: 1.5px solid #bfa882;
  background: transparent;
  display: inline-block;
}

.satchel-slot.wood {
  background: #8b5a2b;
  border-color: #69401a;
}

.satchel-slot.food {
  background: #cf4b3f;
  border-color: #9e2d24;
}

.score-item {
  color: #7d5b1f;
}

.end-day-btn {
  order: 8;
  position: relative;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 26px;
  padding: 0 8px;
  flex-shrink: 0;
  background: rgba(242, 232, 212, 0.92);
  color: var(--sol-ink);
  border: 1px solid #c4b28f;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.end-day-btn:hover {
  background: #eadbc0;
}

.end-day-btn.at-hearth:not(.ready) {
  background: #f6e7c9;
  border-color: #d49647;
}

.end-day-btn.at-hearth::after {
  content: "🔥";
  position: absolute;
  top: -6px;
  right: -4px;
  font-size: 0.68rem;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(42, 32, 20, 0.25));
}

.end-day-btn.ready {
  background: var(--sol-green);
  color: #ffffff;
  border-color: var(--sol-green-dark);
  box-shadow: 0 2px 9px rgba(88, 127, 77, 0.34);
}

.end-day-btn.ready:hover {
  background: var(--sol-green-dark);
}

.end-day-btn.rough-warning:not(.ready) {
  border-color: #d69c56;
}

/* Top-right Journal & Menu controls */
.topbar-right-pills {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.floating-pill-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  background: var(--sol-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--sol-border);
  border-radius: 999px;
  box-shadow: var(--sol-shadow);
  color: var(--sol-ink);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.floating-pill-btn:hover,
.floating-pill-btn.active {
  background: var(--sol-glass-strong);
  border-color: #9e8a66;
}

.journal-pill-badge {
  min-width: 34px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 0.71rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(88, 127, 77, 0.14);
  color: var(--sol-green-dark);
}

.menu-anchor {
  position: relative;
}

.floating-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--sol-border);
  background: var(--sol-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--sol-shadow);
  color: var(--sol-ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.floating-icon-btn:hover,
.floating-icon-btn.active {
  background: var(--sol-glass-strong);
  border-color: #9e8a66;
}

.stage-menu-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: max-content;
  min-width: 212px;
  max-width: calc(100vw - 20px);
  background: var(--sol-glass-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--sol-border);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(42, 32, 20, 0.18);
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 45;
}

.menu-item-btn {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--sol-ink);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  white-space: nowrap;
}

.menu-item-btn:hover,
.menu-item-btn.active {
  background: rgba(226, 214, 190, 0.65);
  color: var(--sol-ink);
}

.menu-sep {
  height: 1px;
  background: rgba(196, 179, 148, 0.55);
  margin: 3px 4px;
}

.sound-toggle-btn {
  font-size: 0.92rem;
}

.sound-toggle-btn.muted {
  opacity: 0.72;
}

.undo-btn {
  color: var(--sol-ink);
}

.undo-btn:disabled {
  opacity: 0.38;
  cursor: default;
  pointer-events: none;
}

.undo-btn.has-undo {
  border-color: rgba(198, 128, 36, 0.72);
  color: #6f4510;
}

.undo-btn.has-undo:hover {
  background: #fff9ec;
  border-color: var(--sol-amber);
}

.key-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  padding: 0 3.5px;
  margin-right: 4px;
  border-radius: 4px;
  background: rgba(92, 76, 52, 0.11);
  border: 1px solid rgba(118, 98, 68, 0.28);
  color: var(--sol-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.63rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

@media (pointer: coarse) {
  .key-hint {
    display: none;
  }
}

/* ==========================================================================
   Floating Collapsible Season Journal Drawer
   ========================================================================== */
.solitude-journal-drawer {
  position: fixed;
  top: calc(var(--sol-topbar-bottom, 54px) + 8px);
  right: max(10px, env(safe-area-inset-right, 10px));
  width: 304px;
  max-height: calc(100dvh - var(--sol-topbar-bottom, 54px) - 82px);
  overflow-y: auto;
  z-index: 28;
  background: var(--sol-glass-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--sol-border);
  border-radius: 15px;
  padding: 10px 11px 12px;
  box-shadow: var(--sol-shadow);
}

.journal-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.journal-head-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.journal-heading {
  font-family: var(--sol-serif);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--sol-ink);
}

.journal-score-btn {
  display: none;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(198, 128, 36, 0.35);
  background: rgba(251, 240, 219, 0.85);
  color: #7d5b1f;
  font: inherit;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.journal-score-btn:hover {
  background: #fff7e6;
  border-color: var(--sol-amber);
}

.palette-close-btn {
  border: none;
  background: transparent;
  color: var(--sol-muted);
  font-size: 1.1rem;
  line-height: 1;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.palette-close-btn:hover {
  background: rgba(186, 168, 132, 0.3);
  color: var(--sol-ink);
}

.journal-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  background: rgba(236, 226, 206, 0.8);
  border: 1px solid rgba(204, 189, 160, 0.8);
  border-radius: 9px;
  padding: 2.5px;
  margin-bottom: 8px;
}

.journal-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--sol-muted);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 3px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3.5px;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.journal-tab.active {
  background: #fffdf8;
  color: var(--sol-ink);
  box-shadow: 0 1px 3px rgba(56, 46, 34, 0.1);
}

.journal-tab.locked {
  opacity: 0.62;
}

.journal-tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.journal-chapter-banner {
  background: rgba(242, 232, 212, 0.72);
  border: 1px solid rgba(208, 194, 166, 0.75);
  border-radius: 10px;
  padding: 6px 9px;
  margin-bottom: 8px;
}

.journal-chapter-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.journal-chapter-title {
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--sol-ink);
}

.journal-chapter-badge {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e8f1e1;
  border: 1px solid #b8d2a9;
  color: var(--sol-green-dark);
  white-space: nowrap;
}

.journal-chapter-badge.preview {
  background: #f6efe0;
  border-color: #dcd0b6;
  color: var(--sol-muted);
}

.journal-chapter-sub {
  font-size: 0.71rem;
  color: var(--sol-muted);
  line-height: 1.3;
}

.survey-lens-card {
  margin-top: 7px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.94);
  border: 1px solid #cbbd9f;
  font-size: 0.69rem;
  line-height: 1.35;
  color: var(--sol-ink);
}

.survey-lens-card.status-feasible,
.survey-lens-card.status-complete {
  border-color: #9ec08e;
  background: rgba(242, 249, 237, 0.96);
}

.survey-lens-card.status-relaxed {
  border-color: #d9a45b;
  background: rgba(254, 247, 232, 0.96);
}

.survey-lens-card.status-conflict {
  border-color: #82b4d0;
  background: rgba(238, 247, 253, 0.96);
}

.survey-lens-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.survey-refresh-btn {
  border: none;
  background: transparent;
  color: var(--sol-green-dark);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  cursor: pointer;
}

.survey-refresh-btn:hover {
  background: rgba(124, 163, 107, 0.16);
}

.survey-lens-body {
  color: var(--sol-muted);
}

.survey-lens-foot {
  margin-top: 3px;
}

.survey-rem-tag {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--sol-green-dark);
}

.journal-goal-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.journal-goal-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.journal-goal {
  width: 100%;
  text-align: left;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid #dbd0b8;
  border-radius: 10px;
  padding: 7px 9px;
  cursor: pointer;
  color: var(--sol-ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.journal-goal:hover {
  border-color: var(--sol-green);
  background: #ffffff;
}

.journal-goal.done {
  background: rgba(242, 248, 236, 0.92);
  border-color: #c3d6b7;
}

.journal-goal.locked {
  opacity: 0.74;
}

.journal-goal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.journal-goal-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.journal-goal-title {
  font-size: 0.77rem;
  font-weight: 700;
}

.journal-goal.done .journal-goal-title {
  color: var(--sol-green-dark);
}

.journal-goal-count {
  font-size: 0.69rem;
  font-weight: 700;
  color: var(--sol-muted);
  white-space: nowrap;
}

.journal-goal-desc {
  font-size: 0.71rem;
  color: var(--sol-muted);
  line-height: 1.26;
}

.journal-goal-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.journal-bar {
  flex: 1;
  height: 4px;
  background: #e8dec9;
  border-radius: 999px;
  overflow: hidden;
}

.journal-bar-fill {
  height: 100%;
  background: var(--sol-green);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.journal-reward {
  font-size: 0.67rem;
  font-weight: 700;
  color: #7a5b21;
  white-space: nowrap;
}

/* ==========================================================================
   Compact Floating Action Palette (Groups Expand on Selection)
   ========================================================================== */
.solitude-action-palette {
  position: fixed;
  left: max(12px, env(safe-area-inset-left, 12px));
  bottom: max(12px, env(safe-area-inset-bottom, 12px));
  z-index: 26;
  max-width: min(500px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.palette-bar {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  padding: 7px 11px;
  background: var(--sol-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--sol-border);
  border-radius: 14px;
  box-shadow: var(--sol-shadow);
}

.selected-tile-header {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 6px;
  font-size: 0.8rem;
  color: var(--sol-ink);
  line-height: 1.25;
  min-width: 0;
}

.tile-sub {
  color: var(--sol-muted);
  font-weight: 500;
  font-size: 0.74rem;
}

.smart-preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1.5px 7px;
  border-radius: 999px;
  border: 1px solid rgba(154, 134, 98, 0.55);
  background: rgba(246, 239, 224, 0.92);
  color: #5c4b32;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.smart-preview-chip:hover {
  background: #ffffff;
  border-color: var(--sol-amber);
  color: var(--sol-ink);
}

.smart-preview-chip.is-compound {
  background: #fcf4e4;
  border-color: #dfb46f;
  color: #7c4d0f;
}

.smart-preview-chip.is-menu {
  background: rgba(239, 232, 218, 0.82);
  border-style: dashed;
  color: var(--sol-muted);
}

.action-group-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.group-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #cbb996;
  background: rgba(255, 253, 248, 0.92);
  color: var(--sol-ink);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.13s ease;
}

.group-pill-btn:hover {
  border-color: var(--sol-green);
  background: #ffffff;
}

.group-pill-btn.active {
  background: var(--sol-ink);
  color: #fffdf8;
  border-color: var(--sol-ink);
}

.group-pill-btn.cat-move.active {
  background: var(--sol-blue);
  border-color: #396c84;
}

.group-pill-btn.cat-gather.active {
  background: var(--sol-amber);
  border-color: #9e6215;
}

.group-pill-btn.cat-build.active {
  background: var(--sol-green);
  border-color: var(--sol-green-dark);
}

.group-pill-btn.cat-remove {
  color: #8a432b;
  border-color: #d6b2a2;
  background: rgba(253, 245, 241, 0.92);
}

.group-pill-btn.cat-remove:hover {
  border-color: #b55738;
  background: #ffffff;
}

.group-pill-btn.cat-remove.active {
  background: #a84d31;
  color: #fffdf8;
  border-color: #8a3b22;
}

.group-pill-count {
  font-size: 0.68rem;
  opacity: 0.85;
}

/* Direct 1-click action button (used whenever only 1 action exists, clearly showing immediate execution + cost) */
.direct-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--sol-green);
  background: #f3f8ee;
  color: var(--sol-ink);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(56, 46, 34, 0.08);
  transition: transform 0.1s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.direct-action-btn.direct-cat-move {
  border-color: var(--sol-blue);
  background: #eef5f8;
}

.direct-action-btn.direct-cat-gather {
  border-color: var(--sol-amber);
  background: #fcf4e6;
}

.direct-action-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #ffffff;
}

.direct-action-btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  border-color: #c8bba2;
  background: #f3ede0;
  box-shadow: none;
}

.direct-action-verb {
  white-space: nowrap;
}

.direct-action-cost {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(56, 46, 34, 0.09);
  color: var(--sol-ink);
  white-space: nowrap;
}

.direct-cat-move:not(:disabled) .direct-action-cost {
  background: rgba(74, 131, 158, 0.16);
  color: #2f5e75;
}

.direct-cat-gather:not(:disabled) .direct-action-cost {
  background: rgba(198, 128, 36, 0.18);
  color: #7c4b0b;
}

.direct-cat-build:not(:disabled) .direct-action-cost {
  background: rgba(88, 127, 77, 0.18);
  color: var(--sol-green-dark);
}

.direct-action-btn.direct-cat-remove {
  border-color: #bd6346;
  background: #fcf1ec;
  color: #7c331c;
}

.direct-cat-remove:not(:disabled) .direct-action-cost {
  background: rgba(189, 99, 70, 0.18);
  color: #7c331c;
}

.action-btn.action-cat-remove {
  border-color: #dec0b3;
  background: #fdf6f3;
}

.action-btn.action-cat-remove:hover:not(:disabled) {
  border-color: #b55738;
  background: #ffffff;
}

.action-btn.action-cat-remove .action-btn-cost {
  color: #8a3b22;
}

.palette-hint-inline {
  font-size: 0.73rem;
  color: var(--sol-muted);
}

/* Expanded drawer above the compact group pills */
.action-dock {
  pointer-events: auto;
  background: var(--sol-glass-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--sol-border);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--sol-shadow);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 6px;
  max-height: min(44dvh, 290px);
  overflow-y: auto;
  animation: popDrawerUp 0.14s ease-out;
}

@keyframes popDrawerUp {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #d5c7ab;
  background: #fffdf8;
  color: var(--sol-ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.action-btn:hover:not(:disabled) {
  border-color: var(--sol-green);
  background: #ffffff;
}

.action-btn.action-cat-move:hover:not(:disabled) {
  border-color: var(--sol-blue);
}

.action-btn.action-cat-gather:hover:not(:disabled) {
  border-color: var(--sol-amber);
}

.action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f4eee1;
}

.action-btn-top {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.action-btn-label {
  font-size: 0.79rem;
  font-weight: 700;
}

.action-btn-cost {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--sol-green-dark);
  white-space: nowrap;
}

.action-btn-detail {
  font-size: 0.7rem;
  color: var(--sol-muted);
  line-height: 1.24;
}

/* ==========================================================================
   Floating Toast Bar (Top-anchored so it NEVER blocks actions on mobile/desktop)
   ========================================================================== */
.solitude-toast-region {
  position: fixed;
  top: calc(var(--sol-toast-top, var(--sol-topbar-bottom, 54px)) + 8px);
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  z-index: 34;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  max-width: min(440px, calc(100vw - 24px));
  width: max-content;
}

.solitude-toast {
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
  background: rgba(46, 38, 28, 0.91);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fdf9f0;
  border: 1px solid rgba(220, 202, 168, 0.38);
  border-radius: 13px;
  padding: 6px 9px 9px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  box-shadow: 0 5px 18px rgba(24, 18, 10, 0.24);
  max-width: min(440px, calc(100vw - 24px));
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.24s ease, transform 0.24s ease, border-color 0.2s ease;
  animation: toastSlideIn 0.16s ease-out;
}

.solitude-toast.toast-goal {
  background: rgba(54, 82, 45, 0.94);
  border-color: rgba(196, 226, 178, 0.55);
}

.solitude-toast.toast-paused {
  border-color: rgba(240, 215, 154, 0.78);
}

.solitude-toast.toast-fading {
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
}

.toast-pause-badge {
  font-size: 0.62rem;
  font-weight: 800;
  color: #f6df9e;
  letter-spacing: 0.02em;
  padding: 0 3px;
  flex-shrink: 0;
}

.toast-body-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.toast-text {
  flex: 1;
  min-width: 0;
}

.toast-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.toast-ctrl-btn {
  border: 1px solid rgba(255, 248, 232, 0.24);
  background: rgba(255, 248, 232, 0.1);
  color: #f6efe2;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  padding: 3px 7px;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.toast-ctrl-btn:hover {
  background: rgba(255, 248, 232, 0.22);
  border-color: rgba(255, 248, 232, 0.5);
}

.toast-log-btn {
  text-decoration: underline;
  text-underline-offset: 2px;
  background: transparent;
  border-color: transparent;
  color: #f0dfba;
  padding: 3px 5px;
}

.toast-log-btn:hover {
  background: rgba(255, 248, 232, 0.14);
  border-color: rgba(255, 248, 232, 0.28);
  color: #ffffff;
}

.toast-close-btn {
  font-size: 0.92rem;
  padding: 1px 6px 2px;
}

.toast-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.toast-progress-fill {
  height: 100%;
  width: 100%;
  background: rgba(214, 232, 184, 0.78);
  transition: background-color 0.2s ease;
}

.solitude-toast.toast-paused .toast-progress-fill {
  background: #f0d79a;
}

.solitude-toast.toast-low .toast-progress-fill {
  background: #e9b468;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Floating Camera Controls
   ========================================================================== */
.stage-camera-pill {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom, 12px));
  right: max(12px, env(safe-area-inset-right, 12px));
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 7px;
  background: var(--sol-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--sol-border);
  border-radius: 999px;
  box-shadow: var(--sol-shadow);
}

.cam-btn {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--sol-ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.cam-btn:hover {
  background: rgba(186, 168, 132, 0.3);
}

.zoom-readout {
  font-size: 0.71rem;
  font-weight: 700;
  color: var(--sol-muted);
  min-width: 35px;
  text-align: center;
  user-select: none;
}

.cam-sep {
  width: 1px;
  height: 13px;
  background: #d4c5a8;
  margin: 0 2px;
}

/* ==========================================================================
   Mobile & Small-Screen Real-Estate Optimizations
   ========================================================================== */
.season-name-short {
  display: none;
}

@media (max-width: 440px) {
  .season-name-full {
    display: none;
  }

  .season-name-short {
    display: inline;
  }
}

@media (max-width: 768px) {
  .solitude-wordmark,
  .sound-toggle-btn,
  .score-item-btn {
    display: none;
  }

  .journal-score-btn {
    display: inline-flex;
  }

  .solitude-topbar {
    top: max(8px, env(safe-area-inset-top, 8px));
    left: max(8px, env(safe-area-inset-left, 8px));
    right: max(8px, env(safe-area-inset-right, 8px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .topbar-main-pill {
    display: contents;
  }

  .hud-left-capsule {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: calc(100vw - 122px);
    height: 30px;
    box-sizing: border-box;
    padding: 3px 8px;
    background: var(--sol-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--sol-border);
    border-radius: 999px;
    box-shadow: var(--sol-shadow);
  }

  .hud-weather-group {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    flex-shrink: 0;
  }

  .season-label {
    font-size: 0.74rem;
    gap: 4px;
  }

  .hud-today-weather {
    font-size: 0.78rem;
  }

  .season-track {
    min-width: 44px;
  }

  .forecast-inline {
    order: 0;
    gap: 2px;
  }

  .forecast-inline .forecast-chip {
    display: none;
  }

  .forecast-inline .forecast-chip:first-child.weather-gale,
  .forecast-inline .forecast-chip:first-child.weather-thaw {
    display: inline-flex;
    padding: 0 4px;
    font-size: 0.68rem;
  }

  .forecast-inline:not(:has(.forecast-chip:first-child.weather-gale, .forecast-chip:first-child.weather-thaw)) {
    display: none;
  }

  .hud-sep {
    display: none;
  }

  .hud-sep-after-weather {
    order: 0;
    display: inline-block;
    height: 13px;
  }

  .supplies-inline {
    order: 0;
    flex-shrink: 0;
    min-width: 0;
    gap: 6px;
  }

  .supply-item {
    font-size: 0.74rem;
    gap: 2px;
  }

  .satchel-slots-btn {
    height: 20px;
    padding: 0 3px;
    gap: 2.5px;
  }

  .satchel-bag-ico {
    font-size: 0.66rem;
  }

  .satchel-slot {
    width: 6px;
    height: 6px;
  }

  .smart-preview-chip {
    font-size: 0.64rem;
    padding: 1px 6px;
  }

  /* Bottom-right thumb zone: AP + End Day fixed pill + Undo beside it */
  .hud-turn-group {
    position: fixed;
    right: max(8px, env(safe-area-inset-right, 8px));
    bottom: calc(max(10px, env(safe-area-inset-bottom, 10px)) + var(--sol-palette-height, 0px));
    z-index: 26;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 128px;
    height: 30px;
    box-sizing: border-box;
    padding: 2px 3px 2px 10px;
    background: var(--sol-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--sol-border);
    border-radius: 999px;
    box-shadow: var(--sol-shadow);
  }

  .hud-turn-group:has(#end-day-btn.d-none) {
    width: auto;
    padding: 3px 10px;
  }

  .ap-chip {
    order: 1;
    flex-shrink: 0;
    min-width: 32px;
    justify-content: flex-start;
  }

  .ap-num {
    display: inline;
    font-size: 0.74rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .end-day-btn {
    order: 2;
    width: 74px;
    height: 24px;
    padding: 0 6px;
    font-size: 0.72rem;
  }

  .topbar-right-pills {
    gap: 4px;
  }

  .floating-icon-btn {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }

  .floating-icon-btn.undo-btn {
    position: fixed;
    right: calc(max(8px, env(safe-area-inset-right, 8px)) + 134px);
    bottom: calc(max(10px, env(safe-area-inset-bottom, 10px)) + var(--sol-palette-height, 0px));
    z-index: 26;
    width: 30px;
    height: 30px;
  }

  .floating-pill-btn {
    padding: 4px 8px;
    gap: 3px;
    height: 28px;
    box-sizing: border-box;
    font-size: 0.73rem;
  }

  .journal-pill-badge {
    background: transparent;
    padding: 0;
    min-width: 28px;
    font-size: 0.72rem;
  }

  .ap-pips {
    display: none;
  }

  .floating-pill-btn > span:first-child {
    display: none;
  }

  .floating-pill-btn::before {
    content: "📖";
    font-size: 0.82rem;
  }

  /* Full-width compact action bar docked cleanly at bottom on phones */
  .solitude-action-palette {
    left: max(8px, env(safe-area-inset-left, 8px));
    right: max(8px, env(safe-area-inset-right, 8px));
    bottom: max(8px, env(safe-area-inset-bottom, 8px));
    max-width: none;
  }

  .action-dock {
    grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
    max-height: 36dvh;
  }

  /* Keep toasts dynamically positioned below measured HUD height — never overlapping topbar or bottom palette! */
  .solitude-toast-region {
    top: calc(var(--sol-toast-top, var(--sol-topbar-bottom, 40px)) + 8px);
    bottom: auto;
    max-width: calc(100vw - 16px);
  }

  .solitude-toast {
    font-size: 0.74rem;
    padding: 5px 8px 8px 10px;
    border-radius: 12px;
    max-width: calc(100vw - 16px);
  }

  /* Minimal camera pill tucked bottom-left across from Undo + End Day */
  .cam-zoom-only {
    display: none !important;
  }

  .stage-camera-pill {
    left: max(8px, env(safe-area-inset-left, 8px));
    right: auto;
    height: 30px;
    box-sizing: border-box;
    bottom: calc(max(10px, env(safe-area-inset-bottom, 10px)) + var(--sol-palette-height, 0px));
    padding: 3px 5px;
  }

  .solitude-journal-drawer {
    top: calc(var(--sol-topbar-bottom, 40px) + 8px);
    left: max(8px, env(safe-area-inset-left, 8px));
    right: max(8px, env(safe-area-inset-right, 8px));
    width: auto;
    max-height: calc(100dvh - var(--sol-topbar-bottom, 40px) - var(--sol-palette-height, 0px) - 56px);
  }
}

/* ==========================================================================
   Year-End Sanctuary Report Modal
   ========================================================================== */
.report-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 34, 24, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.report-card {
  width: 100%;
  max-width: 440px;
  background: var(--sol-surface);
  border: 1px solid var(--sol-border);
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: 0 18px 42px rgba(34, 26, 16, 0.28);
  text-align: center;
}

.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.report-title {
  margin: 0;
  font-size: 1.2rem;
  color: var(--sol-muted);
  font-weight: 600;
}

.report-minimize-btn {
  border: 1px solid #c9ba9a;
  background: var(--sol-surface-alt);
  color: var(--sol-ink);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.report-minimize-btn:hover {
  background: #ffffff;
  border-color: var(--sol-green);
}

.report-rank {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--sol-ink);
}

.report-total {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--sol-green-dark);
  margin: 4px 0 2px;
}

.report-total span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--sol-muted);
}

.report-best {
  font-size: 0.8rem;
  color: var(--sol-muted);
  margin-bottom: 12px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin-bottom: 12px;
}

.report-stat {
  background: var(--sol-surface-alt);
  border: 1px solid var(--sol-border);
  border-radius: 10px;
  padding: 7px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.report-stat-wide {
  grid-column: 1 / -1;
}

.report-highlights {
  list-style: none;
  margin: 0 0 14px;
  font-size: 0.78rem;
  color: var(--sol-muted);
  text-align: left;
  background: #fffdf7;
  border: 1px solid var(--sol-border);
  border-radius: 10px;
  padding: 8px 12px;
  max-height: 140px;
  overflow-y: auto;
}

.report-highlights li + li {
  margin-top: 3px;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.report-btn {
  background: var(--sol-surface-alt);
  color: var(--sol-ink);
  border: 1px solid #c5b492;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.report-btn:hover {
  background: #e9dcc2;
}

.report-btn.primary {
  background: var(--sol-green);
  color: #ffffff;
  border-color: var(--sol-green-dark);
}

.report-btn.primary:hover {
  background: var(--sol-green-dark);
}

/* ==========================================================================
   Keyboard Shortcuts Modal (?)
   ========================================================================== */
.shortcuts-toggle-btn {
  font-weight: 800;
  font-size: 0.88rem;
}

.shortcuts-card {
  max-width: 470px;
  text-align: left;
  padding: 18px 20px 18px;
}

.shortcuts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dfd3ba;
}

.shortcuts-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--sol-ink);
}

.shortcuts-sections {
  display: flex;
  flex-direction: column;
  gap: 11px;
  max-height: 72dvh;
  overflow-y: auto;
}

.shortcuts-group h3 {
  margin: 0 0 5px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sol-green-dark);
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  font-size: 0.79rem;
  color: var(--sol-ink);
  border-bottom: 1px dashed rgba(196, 178, 146, 0.42);
}

.shortcut-row:last-child {
  border-bottom: none;
}

.shortcut-keys {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.shortcut-keys kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  background: #f5ecda;
  border: 1px solid #cbb996;
  box-shadow: 0 1px 0 #bda982;
  color: var(--sol-ink);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
}

@media (max-width: 768px) {
  .shortcuts-toggle-btn {
    display: none;
  }
}

/* ==========================================================================
   Charter Progress Color Coding (Orange = Not Started, Yellow = Progress, Green = Done)
   ========================================================================== */
.journal-pill-badge.progress-not-started {
  background: rgba(224, 109, 27, 0.16);
  border: 1px solid rgba(224, 109, 27, 0.42);
  color: #a84908;
}

.journal-pill-badge.progress-in-progress {
  background: rgba(223, 176, 20, 0.24);
  border: 1px solid rgba(204, 155, 10, 0.52);
  color: #7d5900;
}

.journal-pill-badge.progress-done {
  background: rgba(67, 150, 57, 0.18);
  border: 1px solid rgba(67, 150, 57, 0.48);
  color: #2c6824;
}

@media (max-width: 768px) {
  .floating-pill-btn .journal-pill-badge.progress-not-started,
  .floating-pill-btn .journal-pill-badge.progress-in-progress,
  .floating-pill-btn .journal-pill-badge.progress-done {
    background: transparent;
    border-color: transparent;
    padding: 0;
  }
}

.journal-tab.progress-not-started {
  background: rgba(252, 232, 214, 0.65);
  border-color: rgba(224, 115, 40, 0.36);
  color: #8f3e07;
}

.journal-tab.progress-in-progress {
  background: rgba(254, 245, 201, 0.82);
  border-color: rgba(214, 168, 18, 0.50);
  color: #705000;
}

.journal-tab.progress-done {
  background: rgba(224, 244, 219, 0.88);
  border-color: rgba(74, 154, 64, 0.52);
  color: #275e20;
}

.journal-tab.active.progress-not-started {
  background: #fff4ea;
  border-color: #df6d1b;
  color: #7c3303;
  box-shadow: 0 1px 4px rgba(223, 109, 27, 0.22);
}

.journal-tab.active.progress-in-progress {
  background: #fffbe0;
  border-color: #cf9e0c;
  color: #5e4200;
  box-shadow: 0 1px 4px rgba(207, 158, 12, 0.24);
}

.journal-tab.active.progress-done {
  background: #effae9;
  border-color: #45923b;
  color: #1f5219;
  box-shadow: 0 1px 4px rgba(69, 146, 59, 0.22);
}

.journal-tab-dot.progress-not-started {
  background: #e06d1b;
  box-shadow: 0 0 0 1px rgba(168, 73, 8, 0.28);
}

.journal-tab-dot.progress-in-progress {
  background: #e2b010;
  box-shadow: 0 0 0 1px rgba(154, 114, 0, 0.30);
}

.journal-tab-dot.progress-done {
  background: #439639;
  box-shadow: 0 0 0 1px rgba(44, 104, 36, 0.30);
}

.journal-goal.progress-not-started {
  border-left: 3.5px solid #e06d1b;
}

.journal-goal.progress-in-progress {
  border-left: 3.5px solid #dfb014;
  background: rgba(255, 252, 238, 0.94);
}

.journal-goal.done {
  border-left: 3.5px solid #439639;
}

.journal-goal.progress-in-progress .journal-bar-fill {
  background: #dfb014;
}

.journal-goal.progress-not-started .journal-goal-count {
  color: #a64a0a;
}

.journal-goal.progress-in-progress .journal-goal-count {
  color: #7c5800;
}

.journal-goal.done .journal-goal-count {
  color: #2c6824;
}

/* ==========================================================================
   Icon-Only Lightbulb (💡) Idea Controls
   ========================================================================== */
.journal-chapter-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.survey-bulb-btn,
.goal-draft-chip {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 250, 235, 0.95);
  border: 1px solid #cbb992;
  color: var(--sol-ink);
  font-size: 0.82rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s ease, background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.goal-draft-chip {
  width: 22px;
  height: 22px;
  font-size: 0.76rem;
}

.survey-bulb-btn:hover,
.goal-draft-chip:hover {
  transform: scale(1.07);
  background: #fffbe6;
  border-color: #cf9e12;
}

.survey-bulb-btn.active,
.goal-draft-chip.active {
  background: #fff3b8;
  border-color: #cc9408;
  box-shadow: 0 0 0 2px rgba(230, 178, 22, 0.28);
}

.survey-lens-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.survey-close-btn {
  border: none;
  background: transparent;
  color: var(--sol-muted);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  padding: 1px 4px;
  border-radius: 4px;
  cursor: pointer;
}

.survey-close-btn:hover {
  background: rgba(164, 142, 108, 0.22);
  color: var(--sol-ink);
}

/* ==========================================================================
   Right-Click Tile Follow-Up Context Popup
   ========================================================================== */
.hex-context-popup {
  position: fixed;
  z-index: 42;
  width: 242px;
  max-width: calc(100vw - 20px);
  background: var(--sol-glass-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid #bda67e;
  border-radius: 13px;
  padding: 7px;
  box-shadow: 0 12px 30px rgba(38, 28, 16, 0.24);
  pointer-events: auto;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  animation: popContextIn 0.11s ease-out;
}

@keyframes popContextIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(3px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hex-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 4px 5px;
  border-bottom: 1px solid rgba(196, 179, 148, 0.55);
  margin-bottom: 5px;
}

.hex-popup-title-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hex-popup-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--sol-ink);
  line-height: 1.2;
}

.hex-popup-sub {
  font-size: 0.67rem;
  color: var(--sol-muted);
  line-height: 1.2;
}

.hex-popup-back-btn {
  border: 1px solid #cbb996;
  background: #faf3e3;
  color: var(--sol-ink);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  cursor: pointer;
}

.hex-popup-back-btn:hover {
  background: #ffffff;
  border-color: var(--sol-green);
}

.hex-popup-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: min(50dvh, 300px);
  overflow-y: auto;
}

.hex-popup-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5px;
  text-align: left;
  padding: 5px 8px;
  border-radius: 9px;
  border: 1px solid #d7cab0;
  background: #fffdf8;
  color: var(--sol-ink);
  cursor: pointer;
  transition: background-color 0.11s ease, border-color 0.11s ease;
}

.hex-popup-item:hover:not(:disabled) {
  background: #ffffff;
  border-color: var(--sol-green);
}

.hex-popup-item.cat-move {
  border-color: rgba(76, 140, 168, 0.55);
  background: #f2f8fb;
}

.hex-popup-item.cat-move:hover:not(:disabled) {
  background: #ffffff;
  border-color: var(--sol-blue);
}

.hex-popup-item.cat-gather {
  border-color: rgba(198, 128, 36, 0.48);
  background: #fdf6ea;
}

.hex-popup-item.cat-gather:hover:not(:disabled) {
  background: #ffffff;
  border-color: var(--sol-amber);
}

.hex-popup-item.cat-remove {
  border-color: rgba(189, 99, 70, 0.45);
  background: #fdf4f0;
}

.hex-popup-item.cat-remove:hover:not(:disabled) {
  background: #ffffff;
  border-color: #b55738;
}

.hex-popup-item:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  background: #f4eee1;
  border-color: #d4c8b0;
}

.hex-popup-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.hex-popup-label {
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.hex-popup-cost {
  font-size: 0.67rem;
  font-weight: 800;
  color: var(--sol-green-dark);
  white-space: nowrap;
}

.hex-popup-item.cat-move .hex-popup-cost {
  color: #2f5e75;
}

.hex-popup-item.cat-gather .hex-popup-cost {
  color: #7c4b0b;
}

.hex-popup-item.cat-remove .hex-popup-cost {
  color: #8a3b22;
}

.hex-popup-detail {
  font-size: 0.66rem;
  color: var(--sol-muted);
  line-height: 1.22;
}

.hex-popup-empty {
  padding: 5px 6px;
  font-size: 0.72rem;
  color: var(--sol-muted);
}

/* ==========================================================================
   High-Value Hint Lamp Attention Cues (Visible & Hidden Lamp)
   ========================================================================== */
@keyframes lampWarmPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(235, 175, 22, 0.58);
    background: #fff5be;
    border-color: #d49a0a;
  }
  50% {
    transform: scale(1.13);
    box-shadow: 0 0 0 5px rgba(235, 175, 22, 0);
    background: #ffe878;
    border-color: #b87e00;
  }
}

.goal-draft-chip.lamp-attention,
.survey-bulb-btn.lamp-attention {
  animation: lampWarmPulse 1.5s ease-in-out infinite;
}

.journal-tab-lamp-cue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  line-height: 1;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff3b4;
  border: 1px solid #d49a0a;
  animation: lampWarmPulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

.journal-lamp-cue {
  position: absolute;
  top: -6px;
  right: -5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff3b4;
  border: 1px solid #d49a0a;
  font-size: 0.68rem;
  line-height: 1;
  pointer-events: none;
  animation: lampWarmPulse 1.5s ease-in-out infinite;
}

@media (max-width: 768px) {
  .floating-pill-btn .journal-lamp-cue:not(.d-none) {
    display: inline-flex;
  }
}

/* ==========================================================================
   Island Message Log Modal (L)
   ========================================================================== */
.log-card {
  max-width: 520px;
  text-align: left;
  padding: 18px 20px 18px;
}

.log-entry-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 68dvh;
  overflow-y: auto;
  padding-right: 2px;
}

.log-entry {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #fffdf7;
  border: 1px solid #e1d5bc;
  font-size: 0.79rem;
  line-height: 1.35;
  color: var(--sol-ink);
}

.log-entry.log-entry-goal {
  background: rgba(235, 246, 228, 0.92);
  border-color: #b4d1a3;
  color: #254d20;
  font-weight: 600;
}

.log-entry-day {
  font-size: 0.67rem;
  font-weight: 800;
  color: var(--sol-muted);
  background: #f3ead6;
  border: 1px solid #dcd0b4;
  border-radius: 999px;
  padding: 1px 7px;
  white-space: nowrap;
  flex-shrink: 0;
}

.log-entry.log-entry-goal .log-entry-day {
  background: #dff0d4;
  border-color: #a9cb96;
  color: #285722;
}

.log-entry-text {
  flex: 1;
  min-width: 0;
}

.log-empty {
  text-align: center;
  padding: 18px 8px;
  font-size: 0.82rem;
  color: var(--sol-muted);
}

/* ==========================================================================
   Year-End Reference Benchmarks, Replay & Paused Bars
   ========================================================================== */
.report-card-wide {
  max-width: 680px;
  max-height: 92dvh;
  overflow-y: auto;
}

.report-benchmarks {
  margin: 12px 0 14px;
  text-align: left;
}

.report-benchmarks-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.report-benchmarks-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sol-green-dark);
}

.report-benchmarks-note {
  font-size: 0.69rem;
  color: var(--sol-muted);
}

.report-bench-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.bench-card {
  background: #fffdf8;
  border: 1px solid #d9ccb0;
  border-radius: 12px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

@media (max-width: 640px) {
  .report-card-wide {
    padding: 16px 14px 14px;
  }

  .report-bench-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .bench-card {
    padding: 8px 9px;
  }

  .bench-card.bench-loading-card,
  .bench-card.bench-error-card {
    grid-column: auto;
  }
}

.bench-card.bench-player {
  background: #f4faef;
  border-color: #9ec08d;
}

.bench-card.bench-strategist {
  background: #fdfaf1;
  border-color: #d6c294;
}

.bench-card.bench-oracle {
  background: #f5f7fc;
  border-color: #aebfd9;
}

.bench-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.bench-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--sol-ink);
}

.bench-score {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--sol-green-dark);
  white-space: nowrap;
}

.bench-card.bench-oracle .bench-score {
  color: #2f4f7f;
}

.bench-sub {
  font-size: 0.66rem;
  color: var(--sol-muted);
  line-height: 1.25;
}

.bench-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--sol-ink);
}

.bench-tag {
  background: rgba(235, 224, 198, 0.72);
  border-radius: 999px;
  padding: 1px 6px;
}

.bench-card.bench-oracle .bench-tag {
  background: rgba(214, 226, 245, 0.72);
}

.bench-card.bench-player .bench-tag {
  background: rgba(211, 232, 199, 0.72);
}

.bench-milestones {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  font-size: 0.67rem;
  color: var(--sol-muted);
  line-height: 1.3;
  flex: 1;
}

.bench-milestones li + li {
  margin-top: 2px;
}

.bench-btn-row {
  margin-top: 4px;
  display: flex;
  gap: 5px;
}

.bench-peek-btn {
  flex: 1 1 0;
  border: 1px solid #c4b493;
  background: rgba(255, 252, 244, 0.95);
  color: var(--sol-ink);
  border-radius: 8px;
  padding: 5px 6px;
  font-size: 0.71rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.bench-peek-btn:hover {
  background: #ffffff;
  border-color: var(--sol-green);
}

.bench-peek-btn.primary {
  background: var(--sol-green);
  border-color: var(--sol-green-dark);
  color: #ffffff;
}

.bench-peek-btn.primary:hover {
  background: var(--sol-green-dark);
}

.bench-card.bench-oracle .bench-peek-btn:not(.primary) {
  border-color: #9cb2d4;
  color: #26426d;
}

.bench-card.bench-oracle .bench-peek-btn:not(.primary):hover {
  border-color: #4c73ad;
}

.bench-card.bench-oracle .bench-peek-btn.primary {
  background: #35598a;
  border-color: #28466e;
  color: #ffffff;
}

.bench-card.bench-oracle .bench-peek-btn.primary:hover {
  background: #28466e;
}

.report-benchmarks-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bench-spinner {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid rgba(63, 98, 60, 0.22);
  border-top-color: var(--sol-green);
  animation: benchSpin 0.8s linear infinite;
  flex-shrink: 0;
}

.bench-spinner-lg {
  width: 24px;
  height: 24px;
  border-width: 2.5px;
}

@keyframes benchSpin {
  to {
    transform: rotate(360deg);
  }
}

.bench-card.bench-loading-card {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fbf8ef;
  border-style: dashed;
  border-color: #cfc09e;
  padding: 14px 16px;
}

.bench-loading-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bench-card.bench-error-card {
  grid-column: span 2;
  justify-content: center;
  background: #fdf6f1;
  border-color: #d9b6a3;
  padding: 12px 14px;
}

.bench-retry-btn {
  flex: 0 0 auto;
  padding: 5px 12px;
}

/* Bottom-docked Year-End Paused Inspect Bar & Benchmark Replay Bar */
.year-paused-bar,
.benchmark-replay-bar {
  position: fixed;
  left: max(12px, env(safe-area-inset-left, 12px));
  bottom: max(12px, env(safe-area-inset-bottom, 12px));
  z-index: 36;
  background: rgba(34, 44, 58, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(182, 204, 236, 0.4);
  color: #f6f9ff;
  box-shadow: 0 10px 28px rgba(18, 24, 34, 0.34);
  overflow: hidden;
}

.year-paused-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px 7px 12px;
  border-radius: 14px;
  max-width: min(440px, calc(100vw - 210px));
}

.year-paused-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.year-paused-copy strong {
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.year-paused-pill {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(236, 186, 74, 0.24);
  border: 1px solid rgba(244, 204, 112, 0.55);
  color: #ffe299;
  flex-shrink: 0;
}

.benchmark-replay-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 10px 8px;
  border-radius: 14px;
  width: min(540px, calc(100vw - 210px));
}

.replay-progress-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 7px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.replay-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6ba45c, #9fd179);
  transition: width 0.08s linear;
  pointer-events: none;
}

.replay-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.replay-bar-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.replay-mode-badge {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(126, 166, 224, 0.24);
  border: 1px solid rgba(162, 196, 245, 0.5);
  color: #d6e7ff;
  flex-shrink: 0;
}

.replay-mode-badge.is-strategist {
  background: rgba(224, 184, 108, 0.24);
  border-color: rgba(240, 206, 138, 0.5);
  color: #fce6b6;
}

.replay-caption {
  font-size: 0.76rem;
  font-weight: 600;
  color: #e9f1fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.replay-bar-nav {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.replay-btn {
  border: 1px solid rgba(214, 226, 246, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.71rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.replay-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.replay-btn.primary {
  background: #5b8c4e;
  border-color: #7eb270;
}

.replay-btn.primary:hover {
  background: #4b7840;
}

.replay-transport-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.replay-transport-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.replay-ctrl-btn {
  border: 1px solid rgba(214, 226, 246, 0.26);
  background: rgba(255, 255, 255, 0.1);
  color: #f4f8ff;
  border-radius: 8px;
  min-width: 28px;
  height: 27px;
  padding: 0 7px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: background-color 0.1s ease, opacity 0.1s ease;
}

.replay-ctrl-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
}

.replay-ctrl-btn:disabled {
  opacity: 0.38;
  cursor: default;
}

.replay-ctrl-btn.primary {
  background: #5b8c4e;
  border-color: #7eb270;
  min-width: 38px;
  color: #ffffff;
}

.replay-ctrl-btn.primary:hover:not(:disabled) {
  background: #4b7840;
}

.replay-ctrl-btn.active {
  background: rgba(159, 209, 121, 0.26);
  border-color: rgba(159, 209, 121, 0.65);
  color: #ddf7c8;
}

@media (max-width: 768px) {
  .year-paused-bar,
  .benchmark-replay-bar {
    left: max(8px, env(safe-area-inset-left, 8px));
    right: max(8px, env(safe-area-inset-right, 8px));
    bottom: max(8px, env(safe-area-inset-bottom, 8px));
    width: auto;
    max-width: none;
  }

  .benchmark-replay-bar {
    padding: 9px 8px 7px;
    gap: 5px;
  }

  .replay-caption {
    font-size: 0.72rem;
  }

  .replay-btn {
    padding: 3px 8px;
    font-size: 0.69rem;
  }

  .replay-ctrl-btn {
    min-width: 26px;
    height: 28px;
    padding: 0 6px;
    font-size: 0.7rem;
  }

  .replay-ctrl-btn.primary {
    min-width: 34px;
  }
}

/* ==========================================================================
   Daily Easy / Medium / Hard Island Selector (Topbar & Menu)
   ========================================================================== */
.daily-diff-bar {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2.5px;
  border-radius: 999px;
  background: var(--sol-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--sol-border);
  box-shadow: var(--sol-shadow);
}

.diff-pill-btn {
  border: none;
  background: transparent;
  color: var(--sol-muted);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.diff-pill-btn:hover {
  color: var(--sol-ink);
  background: rgba(206, 190, 158, 0.25);
}

.diff-pill-btn.active {
  background: var(--sol-green);
  color: #ffffff;
}

.diff-pill-btn .diff-progress-dot,
.menu-diff-btn .diff-progress-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #dfb014;
  flex-shrink: 0;
}

.diff-pill-btn.done .diff-progress-dot,
.menu-diff-btn.done .diff-progress-dot {
  background: #439639;
}

.diff-pill-btn.active .diff-progress-dot {
  background: #fff4b8;
}

.menu-diff-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 2px 4px 4px;
}

.menu-diff-label {
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sol-muted);
  white-space: nowrap;
}

.menu-diff-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.menu-diff-btn {
  border: 1px solid #d4c5a6;
  background: #faf4e6;
  color: var(--sol-ink);
  font-size: 0.73rem;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.menu-diff-btn:hover {
  background: #ffffff;
  border-color: var(--sol-green);
}

.menu-diff-btn.active {
  background: var(--sol-green);
  border-color: var(--sol-green-dark);
  color: #ffffff;
}

@media (max-width: 860px) {
  .daily-diff-bar {
    display: none;
  }
}

/* ==========================================================================
   Welcome / How to Play & Scoring Splash Modal
   ========================================================================== */
.welcome-card {
  max-width: 680px;
  max-height: 90dvh;
  overflow-y: auto;
  text-align: left;
  padding: 18px 20px 0;
}

.welcome-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.welcome-eyebrow {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sol-green-dark);
  background: rgba(88, 127, 77, 0.14);
  border: 1px solid rgba(88, 127, 77, 0.3);
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 4px;
}

.welcome-title {
  margin: 0;
  font-family: var(--sol-serif);
  font-size: 1.38rem;
  line-height: 1.15;
  color: var(--sol-ink);
}

.welcome-sub {
  margin: 3px 0 0;
  font-size: 0.82rem;
  color: var(--sol-muted);
  line-height: 1.3;
}

.welcome-live-score {
  margin: 0 0 10px;
  padding: 8px 11px;
  border-radius: 12px;
  background: #f4faef;
  border: 1px solid #9ec08d;
}

.welcome-score-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.welcome-score-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sol-green-dark);
}

.welcome-score-val {
  font-size: 0.92rem;
  color: var(--sol-ink);
}

.welcome-score-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 0.71rem;
  color: var(--sol-muted);
}

.welcome-score-pills > span {
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid #cddbbd;
  border-radius: 999px;
  padding: 2px 8px;
}

.welcome-score-pills strong {
  color: var(--sol-ink);
}

.welcome-score-highlights {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed rgba(130, 165, 114, 0.45);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 0.7rem;
  color: var(--sol-green-dark);
  font-weight: 600;
}

.welcome-section {
  margin-bottom: 8px;
}

.welcome-section h3 {
  margin: 0 0 5px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sol-green-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.welcome-score-note {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--sol-muted);
  background: rgba(226, 214, 190, 0.55);
  border-radius: 999px;
  padding: 1px 7px;
}

.welcome-pillars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.welcome-pillar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid #dfd3ba;
  border-radius: 10px;
  padding: 5px 9px;
}

.welcome-icon {
  font-size: 1rem;
  line-height: 1.25;
  flex-shrink: 0;
}

.welcome-pillar strong {
  display: block;
  font-size: 0.77rem;
  color: var(--sol-ink);
  margin-bottom: 1px;
}

.welcome-pillar p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.28;
  color: var(--sol-muted);
}

.welcome-scoring-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.welcome-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: start;
}

.welcome-ref-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.welcome-ref-item {
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid #e3d8c2;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.71rem;
  line-height: 1.28;
  color: var(--sol-muted);
}

.welcome-ref-item strong {
  display: block;
  font-size: 0.72rem;
  color: var(--sol-ink);
  margin-bottom: 0;
}

.welcome-score-row {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 8px;
  align-items: baseline;
  font-size: 0.72rem;
  line-height: 1.28;
  color: var(--sol-muted);
  background: rgba(255, 253, 248, 0.85);
  border: 1px solid #e3d8c2;
  border-radius: 8px;
  padding: 4px 9px;
}

.welcome-score-row-highlight {
  background: #fdf7e9;
  border-color: #dec089;
  color: var(--sol-ink);
}

.welcome-score-cat {
  font-weight: 800;
  color: var(--sol-ink);
  font-size: 0.72rem;
}

.welcome-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 0 16px;
  border-top: 1px solid #e2d6be;
  background: var(--sol-surface);
}

.welcome-tip {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--sol-muted);
}

.welcome-cta {
  flex-shrink: 0;
  padding: 8px 18px;
}

@media (max-width: 600px) {
  .welcome-card {
    padding: 14px 14px 0;
  }

  .welcome-title {
    font-size: 1.25rem;
  }

  .welcome-two-col {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .welcome-score-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .welcome-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 9px 0 14px;
  }

  .welcome-cta {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================================
   Weather & Season Details Popover (Desktop Hover + Mobile Tap)
   ========================================================================== */
.season-chip-btn {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 2px 5px;
  margin: -2px -5px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.14s ease;
}

.season-chip-btn:hover,
.season-chip-btn.active {
  background: rgba(196, 179, 148, 0.28);
}

.forecast-clickable {
  cursor: pointer;
  border-radius: 999px;
  padding: 1px 2px;
  margin: -1px -2px;
  transition: background-color 0.14s ease;
}

.forecast-clickable:hover,
.forecast-clickable.active {
  background: rgba(196, 179, 148, 0.24);
}

.weather-popover {
  box-sizing: border-box;
  position: fixed;
  top: calc(var(--sol-topbar-bottom, 54px) + 6px);
  left: max(10px, env(safe-area-inset-left, 10px));
  width: min(330px, calc(100vw - 20px));
  background: var(--sol-glass-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--sol-border);
  border-radius: 13px;
  box-shadow: 0 10px 28px rgba(42, 32, 20, 0.2);
  padding: 10px 12px;
  z-index: 44;
  color: var(--sol-ink);
  font-size: 0.76rem;
  line-height: 1.35;
}

.weather-pop-today {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(196, 179, 148, 0.55);
}

.weather-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.weather-pop-season {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  font-size: 0.8rem;
}

.weather-pop-kind {
  font-weight: 700;
  font-size: 0.74rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(242, 232, 212, 0.9);
  border: 1px solid #d4c4a2;
  white-space: nowrap;
}

.weather-pop-kind.weather-gale,
.weather-pop-fc-badge.weather-gale {
  background: #fcebd8;
  border-color: #dfae77;
  color: #8c4814;
}

.weather-pop-kind.weather-rain,
.weather-pop-fc-badge.weather-rain {
  background: #e6f1f7;
  border-color: #9dc2d6;
  color: #255873;
}

.weather-pop-kind.weather-frost,
.weather-pop-fc-badge.weather-frost {
  background: #eaf1fb;
  border-color: #acc2e2;
  color: #2c4a75;
}

.weather-pop-kind.weather-thaw,
.weather-pop-fc-badge.weather-thaw {
  background: #fdf4d4;
  border-color: #dfb452;
  color: #8c5c0c;
}

.weather-pop-effect {
  margin: 0 0 4px;
  color: var(--sol-ink);
  font-weight: 500;
}

.weather-pop-season-desc {
  margin: 0;
  color: var(--sol-muted);
  font-size: 0.72rem;
}

.weather-pop-forecast {
  padding-top: 7px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.weather-pop-subhead {
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sol-green-dark);
}

.weather-pop-fc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 6px;
}

.weather-pop-fc-when {
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--sol-ink);
}

.weather-pop-fc-badge {
  font-size: 0.69rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(242, 232, 212, 0.85);
  border: 1px solid #d4c4a2;
}

.weather-pop-fc-desc {
  flex-basis: 100%;
  font-size: 0.71rem;
  color: var(--sol-muted);
}

.weather-pop-hint {
  font-size: 0.69rem;
  color: var(--sol-muted);
  font-style: italic;
  padding-top: 2px;
}

/* ==========================================================================
   Satchel & Tonight's Rest HUD Popovers
   ========================================================================== */
.satchel-popover,
.rest-popover {
  width: min(296px, calc(100vw - 20px));
}

.hud-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(196, 179, 148, 0.55);
}

.hud-pop-title {
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--sol-ink);
}

.satchel-pop-badge,
.rest-pop-badge {
  font-weight: 700;
  font-size: 0.71rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(242, 232, 212, 0.9);
  border: 1px solid #d4c4a2;
  color: var(--sol-ink);
  white-space: nowrap;
}

.satchel-pop-badge.full,
.rest-pop-badge.warn {
  background: #fcebd8;
  border-color: #dfae77;
  color: #8c4814;
}

.satchel-pop-badge.overloaded,
.rest-pop-badge.danger {
  background: #fadbd5;
  border-color: #cf6d5b;
  color: #8c2315;
}

.rest-pop-badge.ok {
  background: #e9f3e4;
  border-color: #9ec092;
  color: #2f5b28;
}

.satchel-pop-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 7px;
}

.satchel-pop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(247, 241, 229, 0.78);
  border: 1px solid rgba(212, 198, 170, 0.7);
}

.satchel-pop-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sol-muted);
}

.satchel-pop-vals {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.satchel-pop-muted {
  font-size: 0.71rem;
  color: var(--sol-muted);
}

.satchel-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 2px;
  vertical-align: middle;
}

.satchel-dot.wood {
  background: #8b5a2b;
}

.satchel-dot.food {
  background: #cf4b3f;
}

.rest-pop-unused {
  margin: 0 0 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #fdf3dc;
  border: 1px solid #e4c078;
  color: #7c4d0f;
  font-size: 0.74rem;
}

.rest-pop-cost,
.rest-pop-ap {
  margin: 0 0 5px;
  font-size: 0.75rem;
  color: var(--sol-ink);
}

.rest-pop-ap.warn {
  color: #8c2315;
}

.hud-pop-hint {
  margin: 0;
  font-size: 0.7rem;
  color: var(--sol-muted);
  line-height: 1.32;
}

.hud-pop-hint.warn {
  color: #8c2315;
  font-weight: 600;
}

.rest-pop-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px solid rgba(196, 179, 148, 0.55);
}

.rest-pop-btn {
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #c5b492;
  background: rgba(244, 236, 220, 0.92);
  color: var(--sol-ink);
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.rest-pop-btn:hover {
  background: #ffffff;
}

.rest-pop-btn.walk-home {
  flex: 1 1 100%;
  background: var(--sol-green);
  border-color: var(--sol-green-dark);
  color: #ffffff;
  text-align: center;
}

.rest-pop-btn.walk-home:hover {
  background: var(--sol-green-dark);
}

.rest-pop-btn.confirm {
  background: var(--sol-amber);
  border-color: #a36617;
  color: #ffffff;
}

.rest-pop-btn.confirm:hover {
  background: #b06f18;
}

.rest-pop-btn.confirm.secondary {
  background: rgba(246, 232, 207, 0.95);
  border-color: #cf9e57;
  color: #7c4d0f;
}

.rest-pop-btn.confirm.secondary:hover {
  background: #fff5e0;
}

.rest-pop-btn.confirm.warn {
  background: #b9442e;
  border-color: #8f2d1b;
  color: #ffffff;
}

.rest-pop-btn.confirm.warn:hover {
  background: #9f3521;
}

/* ==========================================================================
   Initial Asset Loading Screen
   ========================================================================== */
.solitude-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, #f8f2e2 0%, #efe7d4 58%, #e3d6bc 100%);
  opacity: 1;
  transition: opacity 240ms ease;
}

.solitude-loading-overlay.is-loaded {
  opacity: 0;
  pointer-events: none;
}

.loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(320px, 100%);
  padding: 26px 24px 24px;
  background: rgba(253, 249, 239, 0.88);
  border: 1px solid rgba(164, 142, 108, 0.58);
  border-radius: 20px;
  box-shadow: 0 12px 34px rgba(52, 38, 22, 0.12);
}

.loading-emblem {
  margin-bottom: 10px;
  animation: sol-loading-float 2.4s ease-in-out infinite;
}

@keyframes sol-loading-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.loading-title {
  margin: 0;
  font-family: var(--sol-serif);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--sol-ink);
  line-height: 1.15;
}

.loading-status {
  margin: 6px 0 16px;
  font-size: 0.88rem;
  color: var(--sol-muted);
  min-height: 1.25em;
}

.loading-status.is-error {
  color: #9f3521;
  font-weight: 500;
}

.loading-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(164, 142, 108, 0.24);
  overflow: hidden;
}

.loading-bar {
  width: 12%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #587f4d 0%, #759f5c 60%, #587f4d 100%);
  background-size: 200% 100%;
  transition: width 180ms ease-out;
  animation: sol-loading-shimmer 1.6s linear infinite;
}

@keyframes sol-loading-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: 0 0; }
}

.loading-retry-btn {
  margin-top: 16px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--sol-green-dark);
  background: var(--sol-green);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease;
}

.loading-retry-btn:hover {
  background: var(--sol-green-dark);
}

@media (prefers-reduced-motion: reduce) {
  .solitude-loading-overlay {
    transition: none;
  }
  .loading-emblem,
  .loading-bar {
    animation: none;
  }
}
