/* Neon Hollow 4 – Legacy update styles */
.legends { display: none; }
aside[data-view="legends"] .legends { display: block; }
aside[data-view="legends"] .civilisation,
aside[data-view="legends"] .brain,
aside[data-view="legends"] .journal,
aside[data-view="legends"] .world-info { display: none; }
aside[data-view="world"] .legends,
aside[data-view="civilisation"] .legends,
aside[data-view="mind"] .legends,
aside[data-view="history"] .legends { display: none; }

.era-chip { display: block; color: #e9c46a; font-size: 11px; letter-spacing: .4px; margin-top: 2px; }
.spark-pill { color: #ffe9a8; border-color: #6d5a2a; background: #241d0d; font-size: 14px; min-width: 64px; }
#clip-btn.recording { color: #ff9fae; border-color: #9a3a4a; animation: nh-pulse 1.4s ease-in-out infinite; }
@keyframes nh-pulse { 50% { box-shadow: 0 0 0 4px #ff6b8133; } }

.legacy-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.legacy-actions { display: grid; gap: 6px; margin-top: 8px; }
.legacy-actions button, .legacy-row button { font-size: 13px; padding: 8px 10px; text-align: left; }
button.mini { font-size: 12px; padding: 4px 8px; }
.pill { font-size: 11px; padding: 3px 8px; border-radius: 99px; border: 1px solid #3b4767; }
.pill.sick { color: #b7f0a3; border-color: #3f6a37; }
.pill.warn { color: #f3c98b; border-color: #6a5233; }
.warn-text { color: #f3c98b; }
.sick-text { color: #b7f0a3; }
.ruin-banner { margin: 12px 0; padding: 10px 12px; border: 1px dashed #59627a; border-radius: 10px; color: #b7c0d3; background: #121827; font-size: 13px; }
.hero-title { color: #ffd86b; font-size: 15px; margin: 4px 0 8px; }
.seasonal-note { color: #ffb86b; }

.power-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0 4px; }
.power-grid button { text-align: left; padding: 8px; font-size: 12px; line-height: 1.3; }
.power-grid button b { display: block; color: #ffe9a8; font-weight: 600; font-size: 13px; }
.power-grid button small { color: #a8b8cf; font-size: 11px; }
.power-grid button:disabled { opacity: .45; }
.prayer { padding: 10px 12px; margin: 8px 0; border-radius: 10px; background: #15203a; border: 1px solid #2c3d63; }
.prayer p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; color: #dce9ff; font-style: italic; }
.prayer small { color: #8fa3c2; font-size: 11px; }
.quest { margin: 10px 0; }
.quest small { font-size: 11px; color: #c9b27a; }
.threat { margin: 8px 0; }
.hero-chip { font-size: 12px; padding: 5px 8px; margin: 3px 4px 3px 0; color: #ffe9a8; }
.ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 8px 0 14px; }
.ach { font-size: 11px; padding: 5px 6px; border-radius: 6px; background: #121a2e; color: #66758f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ach.got { color: #ffe9a8; background: #2a2412; }
.pack { margin: 10px 0; }
.price { color: #e9c46a; font-size: 12px; }
.pack-choice { display: grid; gap: 8px; margin: 14px 0; max-width: 460px; }
.pack-choice label { display: block; padding: 8px 10px; border: 1px solid #33415f; border-radius: 10px; font-size: 14px; cursor: pointer; }
.pack-choice small { color: #9fb0c8; font-size: 12px; }

.legacy-dialog { width: 520px; max-height: 86vh; overflow: auto; }
.legacy-dialog input, .legacy-dialog textarea { width: 100%; margin: 8px 0; padding: 10px; border-radius: 8px; border: 1px solid #3b4a68; background: #0d1426; color: #eff8ff; font: 14px system-ui; }
.legacy-dialog textarea { font: 12px ui-monospace, monospace; resize: vertical; }
.welcome-dialog { width: 640px; }
.welcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.welcome-grid div { padding: 10px 12px; background: #101a30; border-radius: 10px; border: 1px solid #2a3858; }
.welcome-grid h3 { margin: 0 0 6px; font-size: 14px; color: #7ff0e2; }
.welcome-grid p { margin: 0; font-size: 13px; line-height: 1.55; color: #c9d6ea; }
.herald-dialog { width: 640px; background: #f3ecdc; color: #1d1a14; border-color: #b9ab8b; }
.herald-dialog .dialog-close { color: #1d1a14; background: #e6dcc5; border-color: #b9ab8b; }
.herald .masthead { font: 700 34px Georgia, serif; text-align: center; letter-spacing: 2px; border-bottom: 3px double #3a3326; padding-bottom: 6px; }
.herald .herald-date { text-align: center; font-size: 12px; letter-spacing: 1px; margin: 6px 0 14px; color: #5d5440; }
.herald .lead { font: 700 26px Georgia, serif; margin: 8px 0; }
.herald .lead-text { font: 16px Georgia, serif; line-height: 1.5; }
.herald-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.herald .story { border-top: 1px solid #b9ab8b; padding-top: 6px; font: 14px Georgia, serif; }
.herald .story p { margin: 4px 0 0; line-height: 1.45; }
.herald-stats { font-size: 13px; padding: 8px 0; border-top: 1px solid #b9ab8b; border-bottom: 1px solid #b9ab8b; text-align: center; }
.herald h3 { font: 700 15px Georgia, serif; margin: 14px 0 4px; color: #1d1a14; }
.herald .civic-note { color: #3a3326; font-family: Georgia, serif; }
.herald .civic-note small { color: #7a6e55; }
@media (max-width: 720px) {
  .power-grid, .ach-grid, .welcome-grid, .herald-cols { grid-template-columns: 1fr; }
}

/* Minds layer */
.goal-name { font-size: 17px; color: #ffe9a8; margin: 4px 0; }
.plan { list-style: none; padding: 0; margin: 8px 0; font-size: 13px; line-height: 1.8; color: #8fa3c2; }
.plan .done { color: #7fe0c4; }
.plan .now { color: #ffffff; font-weight: 600; }
.why { font-size: 13px; line-height: 1.5; padding: 8px 10px; border-left: 3px solid #69f3e2; background: #121b30; border-radius: 0 8px 8px 0; color: #cfe0f4; }
.grief { color: #b7c6ff; }
.bond { margin: 6px 0; font-size: 12px; }
.bond-kind { font-size: 11px; padding: 2px 6px; border-radius: 99px; background: #1b2540; color: #a8b8cf; }
.bond-kind.partner { color: #ffb3dd; } .bond-kind.family { color: #ffe9a8; } .bond-kind.mentor, .bond-kind.pupil { color: #b4a2ff; } .bond-kind.rival { color: #ff9a9a; }
.bond-bars { display: grid; gap: 2px; margin-top: 4px; }
.bond-bars i, .legend-note i { display: block; height: 4px; border-radius: 2px; }
.legend-note { font-size: 11px; color: #7f8ea8; } .legend-note i { display: inline-block; width: 14px; margin: 0 3px 0 8px; }
i.trust { background: #69f3e2; } i.love { background: #ff8fc8; } i.grudge { background: #ff6b6b; }
.vote-accepted { color: #7fe0c4; } .vote-rejected { color: #ff9a9a; } .vote-changed { color: #ffd27a; }
.story-dialog { width: 600px; }
.story { padding-left: 18px; font-size: 14px; line-height: 1.55; }
.story li { margin: 6px 0; }
.story small { color: #7f8ea8; margin-right: 6px; }
.story-why { color: #9fb0c8; font-size: 12px; font-style: italic; }
.welcome-grid .wide { grid-column: 1 / -1; border-color: #6d5a2a; }

/* Autonomy layer */
button.fav.on { color: #ffe9a8; border-color: #6d5a2a; }
.idea { margin: 10px 0; padding: 8px 10px; border-radius: 8px; background: #19213a; border: 1px solid #3a4a72; font-size: 13px; line-height: 1.5; }
.idea small { color: #a8b8cf; }
.fav-row { display: flex; gap: 6px; align-items: center; margin: 6px 0; font-size: 13px; flex-wrap: wrap; }
.fav-row .picked { color: #ffe9a8; border-color: #6d5a2a; }
#fav-box { padding: 0 22px; }
.compare-dialog { width: 900px; max-width: 95vw; }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; }
.cmp-col h2 { margin: 0 0 8px; }
.cmp-col h3 { font-size: 13px; color: #bfe1e7; margin: 14px 0 4px; }
.cmp-trait { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 6px; font-size: 11px; color: #a8b8cf; margin: 2px 0; }
.cmp-trait i { display: block; height: 5px; border-radius: 3px; background: #69f3e2; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp-table th, .cmp-table td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid #2a3858; }
.cmp-table small { color: #9fb0c8; }
@media (max-width: 720px) { .cmp-grid { grid-template-columns: 1fr; } }

/* Discovery layer */
.know { margin: 2px 0; }
.know small { color: #7f8ea8; }
.inq { margin: 6px 0; font-size: 12px; color: #c9d6ea; }
.town-know h3 { font-size: 12px; color: #bfe1e7; margin: 12px 0 4px; }
.know-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.know-grid span { font-size: 11px; padding: 3px 7px; border-radius: 99px; background: #15203a; color: #c9d6ea; }
.know-grid span.fragile { background: #3a1820; color: #ffb3b3; }

/* Life layer */
.spark-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #a8b8cf; margin: 2px 0; }
.spark-row span { width: 40px; }

/* ---------- polish layer: clearer world view, troubles, guide, moments ---------- */
.world-label{background:#080e1fcc;padding:8px 12px;border-radius:10px;backdrop-filter:blur(4px)}
.weather-strip{background:#080e1fcc;padding:4px 12px;border-radius:8px}
.legend{background:#080e1fcc;padding:4px 10px;border-radius:8px}
.spark-pill.spend{animation:fl-pulse 1.6s ease-in-out infinite;border-color:#ffd27a}
@keyframes fl-pulse{50%{box-shadow:0 0 14px #ffd27a99}}
.fl-card{position:absolute;left:50%;transform:translateX(-50%);top:62px;width:min(440px,calc(100% - 32px));background:#0b1226f2;border:1px solid #69f3e255;border-radius:14px;padding:14px 16px;color:#e6f1ff;z-index:6;box-shadow:0 10px 34px #0009}
.fl-card h3{margin:0 0 4px;font-size:16px;color:#9ff5e6}
.fl-card p{margin:0 0 10px;font-size:13.5px;line-height:1.4;color:#c6d4ea}
.fl-card .fl-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.fl-card button{background:#16304a;color:#e6f1ff;border:1px solid #69f3e266;border-radius:9px;padding:6px 11px;font-size:13px;cursor:pointer}
.fl-card button:hover{background:#1e4263}
.fl-card button.fl-quiet{background:transparent;border-color:#ffffff22;color:#9fb0c9}
.fl-card button:disabled{opacity:.45;cursor:default}
.fl-trouble{border-color:#ffb27a88}
.fl-trouble h3{color:#ffc99a}
.fl-bar{height:4px;border-radius:3px;background:#ffffff14;margin:0 0 10px;overflow:hidden}
.fl-bar i{display:block;height:100%;background:#ffb27a}
.fl-moment{position:absolute;left:16px;bottom:88px;max-width:320px;background:#0b1226ee;border-left:3px solid #69f3e2;border-radius:8px;padding:9px 12px;font-size:13px;line-height:1.35;color:#e6f1ff;z-index:5;cursor:pointer;opacity:0;transition:opacity .4s}
.fl-moment.on{opacity:1}
.fl-moment small{display:block;color:#8fa6c4;font-size:11px;margin-bottom:2px}
.fl-glow{outline:2px solid #ffd27a;outline-offset:2px;animation:fl-pulse 1.4s ease-in-out infinite}
.journal-filter{display:flex;gap:6px;margin:0 0 10px}
.journal-filter button{flex:1;font-size:12px;padding:5px 6px;border-radius:8px;background:transparent;border:1px solid #ffffff22;color:#9fb0c9;cursor:pointer}
.journal-filter button.active{background:#16304a;color:#e6f1ff;border-color:#69f3e266}
.story-dialog h2{margin-top:0}
.story-dialog p{line-height:1.5}
.story-beats{list-style:none;margin:10px 0;padding:0}
.story-beats li{padding:6px 0;border-top:1px solid #ffffff12;font-size:14px;line-height:1.4}
.story-beats small{color:#8fa6c4;margin-right:6px}
.world:has(#fl-card.fl-card) #toast{top:236px}
.fl-moment:not(.on){pointer-events:none}
