/* 0.29: tooltips, keyword colours, Legendary red, Heroes tab, Nexus rules, Codex, boss badge, act complete. */
.kw{font-weight:600;cursor:help;border-bottom:1px dotted currentColor;text-decoration:none}
.tooltip{position:fixed;z-index:1000;max-width:320px;padding:10px 12px;border-radius:10px;background:#0b1420f2;border:1px solid #4d6a80;box-shadow:0 10px 30px #000a;color:#e7f0f4;font-size:13px;line-height:1.45;pointer-events:none}
.tooltip .kw{border-bottom:0;cursor:inherit}
[data-tip]{cursor:help}
/* Legendary = red, like Rare = blue */
.legendary-name,.legendary-badge{color:#ff8a8a!important}
.legendary-badge{border:1px solid #d94b4b;background:#4a1717}
.rarity-legendary{border-color:#e05555!important;box-shadow:inset 0 0 0 1px #e0555544,0 0 18px #e0555530}
.rarity-legendary .slot-art,.rarity-legendary>svg{color:#ff8a8a}
.rarity-legendary .slot-button>span,.rarity-legendary.collection-item>span{color:#ffa0a0}
/* Defeat banner */
#battle-result.defeat{background:#3a1c22;border:1px solid #8a3f4b;border-radius:13px;padding:26px;margin-bottom:20px}
/* Heroes tab */
.management-tabs .info-tab .confirmation-dot.info{background:#22384a;color:#a1b7c6}
.heroes-layout{display:grid;grid-template-columns:minmax(220px,300px) 1fr;gap:18px;margin-top:16px}
.hero-sheet .hero-title{display:flex;gap:12px;align-items:center}
.hero-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0}
.hero-stats div{display:flex;justify-content:space-between;padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:#0f1d2b}
.skill-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.skill-card{padding:14px}
.skill-card.equipped{border-color:#3d806b}
.skill-card-head{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.skill-card-head h3{margin:0}
.equipped-badge{background:#17392f;border-color:#3d806b;color:#9be7cb}
.synergy{margin:8px 0 0;padding:8px 10px;border-radius:8px;background:#172a3a;font-size:13px}
.synergy b{display:block;color:var(--accent);font-size:11px;letter-spacing:.08em;text-transform:uppercase}
/* Protocol: presets on top, other abilities */
.preset-strip{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin:14px 0;padding:12px 14px;border:1px solid #3d806b;border-radius:12px;background:#122a28}
.preset-strip>div:first-child{display:flex;flex-direction:column}
.preset-strip .preset-grid{margin:0}
.other-abilities .ability-chips{display:flex;flex-wrap:wrap;gap:10px}
.ability-chip{display:flex;flex-direction:column;padding:8px 12px;border:1px dashed var(--line);border-radius:10px;background:#0f1d2b}
.ability-chip small{color:var(--muted)}
/* Nexus page with rules on the right */
.nexus-page{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start}
.nexus-rules{position:sticky;top:12px;font-size:13px}
.nexus-rules .sub-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}
.nexus-rules .rule-line{padding:6px 0;border-top:1px solid #31485a66}
.nexus-rules .rule-line p{margin:2px 0 0;color:var(--muted)}
.rules-list{padding-left:18px;margin:10px 0 0}
.rules-list li{margin:4px 0}
/* Codex */
.codex-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px;margin-bottom:16px}
.codex-entry{display:flex;gap:12px;padding:12px;opacity:.78;justify-content:flex-start;align-items:flex-start;text-align:left}
.codex-entry.owned{opacity:1}
.codex-entry h4{margin:0 0 4px}
.codex-entry p{margin:6px 0 0;font-size:13px}
.codex-entry .nexus-emblem{font-size:28px;min-width:36px;text-align:center}
#open-codex{white-space:nowrap}
/* Boss badge on the map (top right) */
.section-heading .boss-badge{display:flex;gap:10px;align-items:center;max-width:340px;padding:8px 12px;border:1px solid #8a3f4b;border-radius:12px;background:#2a161b;text-align:left}
.boss-badge .portrait{width:44px;height:44px;flex:none}
.boss-badge>span{display:flex;flex-direction:column}
.boss-badge small{color:#ff9a9a;letter-spacing:.1em;font-size:10px}
.boss-badge em{font-style:normal;color:var(--muted);font-size:12px}
.boss-card{display:flex;gap:14px;padding:12px 0;border-top:1px solid #31485a66}
.boss-card .portrait{width:56px;height:56px;flex:none}
/* Act complete */
.act-complete{padding:28px;text-align:center}
.act-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;margin:18px 0}
.act-stats div{display:flex;flex-direction:column;padding:10px;border:1px solid var(--line);border-radius:10px;background:#0f1d2b}
.act-stats span{color:var(--muted);font-size:12px}
.act-complete .party-line{display:flex;justify-content:center;gap:28px;margin:18px 0}
/* Combat log filter */
.log-filter{display:flex;gap:8px;align-items:center;margin:8px 0;font-size:13px}
@media (max-width:900px){.heroes-layout,.nexus-page{grid-template-columns:1fr}.nexus-rules{position:static}.skill-grid{grid-template-columns:1fr}.section-heading .boss-badge{max-width:none;width:100%}}
.codex-entry .nexus-emblem{flex:0 0 40px;width:40px;height:auto;margin:0;display:block}
.codex-entry>div:last-child{flex:1;min-width:0}
.detail-modal:has(.codex-grid){max-width:920px}
.detail-modal:has(.boss-card){max-width:640px}
/* 0.32 sound test */
.sfx-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px;margin-top:12px}
.music-controls #sfx-toggle{margin-left:12px}
.music-controls{flex-wrap:wrap}
