/* Database V2 shell. Keep all calculator/table/tab geometry owned by legacy styles.css and site-ui.css. */
body.wik-database { background:var(--wik-bg); color:var(--wik-text-primary); }
.wik-database { --gold-2:#f3d27a; }
.wik-database .wik-database-main { margin-top:0; padding-top:.25rem; min-width:0; }
.wik-database .database-tabs { margin-top:1rem; }
.wik-database .database-panel { max-width:100%; min-width:0; }


/* ===== Survivor Database | V2 extension (scoped; no changes to existing calculators) ===== */
body.wik-survivors { background:var(--wik-bg); color:var(--wik-text-primary); }
.wik-survivors .wik-survivors-main { box-sizing:border-box; width:100%; max-width:668px; min-width:0; margin:0 auto; padding:6px 12px 25px; }
.wik-survivors .surv-db-controls { margin:4px 0 15px; padding:12px; border:1px solid rgba(242,242,242,.14); border-radius:14px; background:rgba(16,16,16,.8); }
.wik-survivors .surv-field-label { display:block; margin:0 0 7px; color:var(--wik-text-secondary); font-size:var(--type-small); line-height:1.35; }
.wik-survivors .surv-field-select { display:block; box-sizing:border-box; width:100%; height:44px; margin:0; padding:0 12px; border:1px solid rgba(242,242,242,.2); border-radius:9px; background:#1f201f; color:var(--wik-text-primary); font:inherit; font-size:13px; appearance:auto; }
.wik-survivors .surv-field-select:focus-visible,.wik-survivors .surv-rarity-tab:focus-visible,.wik-survivors .surv-role-tab:focus-visible,.wik-survivors .surv-person:focus-visible,.wik-survivors .surv-star-summary:focus-visible { outline:2px solid var(--wik-gold-highlight); outline-offset:2px; }
.wik-survivors .surv-selector-group + .surv-selector-group { margin-top:13px; }
.wik-survivors .surv-role-tabs { display:flex; flex-wrap:wrap; margin:0 -3px; }
.wik-survivors .surv-role-tab { flex:1 1 0; min-width:110px; min-height:44px; margin:0 3px 5px; padding:7px 8px; border:1px solid #43413d; border-radius:8px; background:#242321; color:#e6e6e6; font:inherit; font-size:12px; cursor:pointer; }
.wik-survivors .surv-role-tab[aria-pressed="true"] { border-color:var(--wik-gold-highlight); background:rgba(214,170,79,.19); color:var(--wik-gold-highlight); }
.wik-survivors .surv-rarity-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0 -3px; }
.wik-survivors .surv-rarity-tab { display:block; box-sizing:border-box; width:calc(100% - 6px); min-height:44px; margin:0 3px 6px; padding:6px 6px; border:1px solid rgba(242,242,242,.16); border-radius:8px; background:#242322; color:#e7e7e7; font:inherit; font-size:12px; font-weight:600; cursor:pointer; }
.wik-survivors .surv-rarity-tab[aria-pressed="true"] { border-color:var(--wik-gold-highlight); background:linear-gradient(180deg,#f3d27a,#bd8c39); color:#0c0b09; }
.wik-survivors .surv-rarity-tab:disabled { opacity:.32; cursor:default; }
.wik-survivors .surv-list-section { margin:12px 0 0; }
.wik-survivors .surv-section-title-row { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:11px; }
.wik-survivors .surv-section-heading { margin:0 0 12px; color:var(--wik-text-primary); font-size:var(--type-subheading); font-weight:600; line-height:1.4; }
.wik-survivors .surv-section-title-row .surv-section-heading { margin:0; }
.wik-survivors .surv-list-count { font-size:12px; color:var(--wik-text-secondary); font-variant-numeric:tabular-nums; }
.wik-survivors .surv-person-grid { display:grid; grid-template-columns:repeat(var(--surv-columns,4),minmax(0,1fr)); margin:0 -3px; }
.wik-survivors .surv-person { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; min-width:0; min-height:89px; margin:0 3px 8px; padding:7px 3px 5px; border:1px solid rgba(242,242,242,.15); border-radius:10px; background:rgba(25,25,24,.8); color:var(--wik-text-primary); cursor:pointer; -webkit-tap-highlight-color:transparent; }
.wik-survivors .surv-person[aria-pressed="true"] { border-color:var(--wik-gold-highlight); background:rgba(214,170,79,.11); }
.wik-survivors .surv-avatar { display:block; flex:0 0 auto; width:50px; height:50px; max-width:100%; margin:0 auto 5px; border-radius:8px; object-fit:contain; }
.wik-survivors .surv-avatar[hidden] { display:none; }
.wik-survivors .surv-person .surv-name { display:block; width:100%; color:var(--wik-text-primary); font-size:11px; font-weight:500; line-height:1.4; letter-spacing:-.025em; text-align:center; white-space:nowrap; }
.wik-survivors .surv-priority-mark { position:absolute; top:0; right:3px; color:var(--wik-gold-highlight); font-size:15px; text-shadow:0 1px 3px #0c0c0c; }
.wik-survivors .surv-vip-mark { position:absolute; top:2px; right:2px; padding:1px 3px; border-radius:3px; background:#5f4530; color:#ffe1a3; font-size:8px; line-height:1.2; }
.wik-survivors .surv-no-image { display:block; width:50px; height:50px; padding-top:13px; color:#a9a9a9; text-align:center; font-size:16px; }
.wik-survivors .surv-muted { margin:0 0 8px; color:var(--wik-text-secondary); font-size:12px; line-height:1.5; }
.wik-survivors .surv-detail { margin:12px 0 0; padding:13px; border:1px solid rgba(242,242,242,.17); border-radius:15px; background:rgba(16,16,15,.92); }
.wik-survivors .surv-person-heading { display:flex; align-items:center; min-width:0; margin-bottom:13px; }
.wik-survivors .surv-person-heading .surv-avatar { margin:0 10px 0 0; }
.wik-survivors .surv-heading-copy { flex:1 1 auto; min-width:0; }
.wik-survivors .surv-person-title { margin:0 0 3px; font-size:17px; font-weight:600; line-height:1.35; overflow-wrap:anywhere; }
.wik-survivors .surv-person-sub { margin:0; font-size:11px; line-height:1.4; color:var(--wik-text-secondary); }
.wik-survivors .surv-priority-info { margin:3px 0 14px; padding:10px; border-left:2px solid var(--wik-gold-highlight); background:rgba(214,170,79,.08); }
.wik-survivors .surv-priority-info strong { color:var(--wik-gold-highlight); font-size:12px; }
.wik-survivors .surv-priority-info p,.wik-survivors .surv-minor-note { margin:4px 0 0; color:var(--wik-text-secondary); font-size:11px; line-height:1.55; }
.wik-survivors .surv-vip-info { display:inline-block; margin-bottom:14px; padding:5px 10px; border:1px solid rgba(214,170,79,.4); border-radius:20px; color:var(--wik-gold-highlight); font-size:11px; }
.wik-survivors .surv-benefits { margin:0 0 14px; }
.wik-survivors .surv-buff-compare { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0 -4px; }
.wik-survivors .surv-buff-compare-col { min-width:0; margin:0 4px; padding:10px 8px; border:1px solid rgba(242,242,242,.13); border-radius:9px; background:#191a18; }
.wik-survivors .surv-buff-compare-col h4 { margin:0 0 9px; color:var(--wik-text-secondary); font-size:11px; font-weight:500; }
.wik-survivors .surv-bonus-list { min-width:0; }
.wik-survivors .surv-bonus-row { display:flex; flex-direction:column; min-width:0; margin-bottom:8px; }
.wik-survivors .surv-bonus-row:last-child { margin-bottom:0; }
.wik-survivors .surv-bonus-label { color:var(--wik-text-secondary); font-size:10px; line-height:1.4; overflow-wrap:anywhere; }
.wik-survivors .surv-bonus-value { margin-top:3px; color:var(--wik-gold-highlight); font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; line-height:1.2; overflow-wrap:anywhere; }
.wik-survivors .surv-total-costs { margin:0 0 11px; color:var(--wik-gold-highlight); font-size:11px; font-weight:500; line-height:1.55; }
.wik-survivors .surv-star-card { margin:0 0 9px; border:1px solid rgba(242,242,242,.16); border-radius:10px; background:rgba(31,31,30,.7); overflow:hidden; }
.wik-survivors .surv-star-summary { display:block; cursor:pointer; list-style:none; padding:11px; }
.wik-survivors .surv-star-summary::-webkit-details-marker { display:none; }
.wik-survivors .surv-star-summary::marker { content:''; }
.wik-survivors .surv-star-head { display:flex; align-items:baseline; flex-wrap:wrap; margin:0 0 9px; }
.wik-survivors .surv-star-title { display:block; width:52px; flex:0 0 52px; color:var(--wik-gold-highlight); font-size:18px; line-height:1.35; }
.wik-survivors .surv-star-costs { flex:1 1 0; min-width:0; color:var(--wik-text-primary); font-size:11px; line-height:1.6; }
.wik-survivors .surv-star-cost-label { color:var(--wik-text-secondary); }
.wik-survivors .surv-complete-buff { display:flex; flex-wrap:wrap; margin:0 -4px; }
.wik-survivors .surv-complete-buff .surv-bonus-row { flex:1 1 145px; margin:0 4px 5px; min-width:0; }
.wik-survivors .surv-complete-buff .surv-bonus-value { font-size:13px; }
.wik-survivors .surv-step-toggle { display:block; margin-top:5px; color:#cbb58f; font-size:10px; }
.wik-survivors .surv-star-card[open] .surv-step-toggle { color:var(--wik-gold-highlight); }
.wik-survivors .surv-steps { border-top:1px solid rgba(242,242,242,.12); padding:3px 11px 6px; }
.wik-survivors .surv-step { padding:9px 0; border-bottom:1px solid rgba(242,242,242,.09); }
.wik-survivors .surv-step:last-child { border:0; }
.wik-survivors .surv-step-top { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; margin-bottom:6px; }
.wik-survivors .surv-step-name { color:var(--wik-text-primary); font-size:11px; }
.wik-survivors .surv-step-items { color:var(--wik-text-secondary); font-size:10px; }
.wik-survivors .surv-step-buffs { display:flex; flex-wrap:wrap; margin:0 -5px; }
.wik-survivors .surv-step-buffs .surv-bonus-row { flex:1 1 135px; margin:0 5px 6px; }
.wik-survivors .surv-step-buffs .surv-bonus-value { font-size:11px; color:var(--wik-text-primary); }
.wik-survivors .surv-step-buffs .surv-bonus-label { font-size:10px; }
.wik-survivors .surv-data-note,.wik-survivors .surv-data-source { margin:13px 0 0; color:var(--wik-text-secondary); font-size:10px; line-height:1.65; overflow-wrap:anywhere; }
.wik-survivors .surv-data-source { text-align:right; opacity:.65; }
/* A link added to the existing Database hub; do not modify legacy category tab geometry. */
.wik-database .surv-hub-entry { display:flex; align-items:center; justify-content:space-between; min-height:52px; margin:14px 0 4px; padding:12px 14px; border:1px solid rgba(214,170,79,.35); border-radius:12px; background:rgba(214,170,79,.07); color:var(--wik-text-primary); font-size:13px; font-weight:600; line-height:1.4; text-decoration:none; }
.wik-database .surv-hub-entry::after { content:'›'; margin-left:10px; color:var(--wik-gold-highlight); font-size:22px; }
.wik-database .surv-hub-entry:focus-visible { outline:2px solid var(--wik-gold-highlight); outline-offset:2px; }
.wik-database .surv-hub-entry [data-surv-language] { display:none; }
html:lang(ja) .wik-database .surv-hub-entry [data-surv-language="ja"],html:lang(en) .wik-database .surv-hub-entry [data-surv-language="en"],html:lang(ru) .wik-database .surv-hub-entry [data-surv-language="ru"],html:lang(es) .wik-database .surv-hub-entry [data-surv-language="es"] { display:inline; }
@media (max-width:359px) { .wik-survivors .wik-survivors-main { padding-left:9px; padding-right:9px; } .wik-survivors .surv-avatar { width:46px; height:46px; } .wik-survivors .surv-person { min-height:86px; padding-left:2px; padding-right:2px; } .wik-survivors .surv-person .surv-name { font-size:10.5px; } .wik-survivors .surv-detail { padding:10px; } }
@media (prefers-reduced-motion:reduce) { .wik-survivors .surv-person,.wik-survivors .surv-rarity-tab { transition:none; } }
/* Researcher SSR→UR threshold guide. Derive values from existing WorkerStar data, not manual numbers. */
.wik-survivors .surv-swap-guide { margin:0 0 16px; padding:11px; border:1px solid rgba(214,170,79,.32); border-radius:11px; background:rgba(214,170,79,.055); }
.wik-survivors .surv-swap-heading { display:flex; flex-direction:column; cursor:pointer; list-style:none; padding:2px 1px 4px; }
.wik-survivors .surv-swap-heading::-webkit-details-marker { display:none; }
.wik-survivors .surv-swap-heading::marker { content:''; }
.wik-survivors .surv-swap-title { color:var(--wik-gold-highlight); font-size:13px; line-height:1.5; }
.wik-survivors .surv-swap-title::after { content:' ▾'; }
.wik-survivors .surv-swap-guide[open] .surv-swap-title::after { content:' ▴'; }
.wik-survivors .surv-swap-teaser { display:block; margin-top:3px; color:var(--wik-text-primary); font-size:12px; line-height:1.4; }
.wik-survivors .surv-swap-lead,.wik-survivors .surv-swap-note { margin:10px 0; color:var(--wik-text-secondary); font-size:11px; line-height:1.65; }
.wik-survivors .surv-swap-labels { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); margin:10px 0 2px; }
.wik-survivors .surv-swap-labels span { min-width:0; color:var(--wik-text-secondary); font-size:10px; font-weight:600; }
.wik-survivors .surv-swap-labels span:last-child { padding-left:9px; }
.wik-survivors .surv-swap-row { display:grid; grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr); padding:9px 0; border-bottom:1px solid rgba(242,242,242,.11); }
.wik-survivors .surv-swap-side { display:flex; flex-direction:column; min-width:0; }
.wik-survivors .surv-swap-state { color:var(--wik-text-primary); font-size:11px; line-height:1.45; overflow-wrap:anywhere; }
.wik-survivors .surv-swap-time { margin-top:3px; color:var(--wik-text-secondary); font-size:10px; font-variant-numeric:tabular-nums; }
.wik-survivors .surv-swap-arrow { align-self:center; color:var(--wik-gold-highlight); font-size:16px; text-align:center; }
.wik-survivors .surv-swap-row .surv-swap-side:last-child .surv-swap-state { color:var(--wik-gold-highlight); }

/* Rarity frames: backgrounds are the exact 50px portrait bounds, with no oversized cards. */
.wik-survivors .surv-avatar--ur { background:#E98A34; }
.wik-survivors .surv-avatar--ssr { background:#9765C7; }
.wik-survivors .surv-avatar--sr { background:#6DBDEA; }
.wik-survivors .surv-avatar--r { background:#B7D668; }
.wik-survivors .surv-avatar--common { background:#DCE0E3; }
/* Sanctuary contains only two UR survivors: show named portrait selectors, no rarity or one-person list. */
.wik-survivors .surv-selector-group[hidden],.wik-survivors .surv-list-section[hidden] { display:none; }
.wik-survivors .surv-role-tabs.is-sanctuary .surv-sanctuary-person { display:flex; flex:1 1 0; flex-direction:column; align-items:center; justify-content:center; min-width:0; min-height:92px; padding:8px 4px 7px; }
.wik-survivors .surv-sanctuary-person .surv-avatar { margin:0 0 5px; }
.wik-survivors .surv-sanctuary-name { display:block; max-width:100%; color:inherit; font-size:12px; font-weight:600; line-height:1.35; white-space:nowrap; text-align:center; }
