/* Navigation and responsive shell: separate from database components. */
.stage-drop-card { border: 1px solid var(--line); border-radius: 10px; margin: 16px 0; overflow: hidden; }
.drop-card-heading { background: var(--panel); padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.drop-card-heading h3 { margin: 0; color: var(--ink); }
.drop-card-heading strong { color: var(--gold); font-size: 1.2rem; }
.drop-pool { padding: 18px 20px; border-top: 1px solid var(--line); }
.drop-pool-heading { display: flex; flex-wrap: wrap; gap: 6px 24px; color: var(--muted); font-size: .85rem; margin-bottom: 12px; }
.drop-pool-heading b { color: var(--ink); }
.stage-drop-item { display: grid; grid-template-columns: minmax(0,1fr) 65px 140px; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.drop-item-name .item-chip { border: 0; background: transparent; padding: 0; margin: 0; }
.drop-item-name .item-chip span { overflow-wrap: anywhere; }
.drop-item-name .chip-icon { width: 40px; height: 40px; flex-shrink: 0; }
.drop-item-value { display: grid; gap: 4px; font-variant-numeric: tabular-nums; }
.drop-item-value small { font-size: .75rem; }
.drop-source { font-size: .8rem; color: var(--muted); }
.drop-pool { margin-top: 0; }
.drop-pool > summary { margin-bottom: 0; cursor: pointer; list-style: none; }
.drop-pool > summary::before { content: '+'; color: var(--gold); font-size: 1.1rem; }
.drop-pool[open] > summary::before { content: '−'; }
.drop-pool[open] > summary { margin-bottom: 14px; }
.drop-item-name > small { display: block; margin: 5px 0 0 48px; }
@media (max-width: 1150px) {
  .stage-drop-item { grid-template-columns: 1fr 1fr; }
  .drop-item-name { grid-column: 1 / -1; }
}
#sidebar { overflow-y: auto; overscroll-behavior: contain; }
#close-menu { display: none; }
.page-tools { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.page-tools button { border:1px solid var(--line); background:var(--panel); color:var(--muted); border-radius:6px; padding:8px 12px; cursor:pointer; }
.page-tools button:hover { border-color:var(--gold); color:var(--gold); }
#back-top { position:fixed; right:22px; bottom:22px; z-index:30; width:42px; height:42px; border:1px solid var(--line); border-radius:50%; background:var(--panel); color:var(--gold); font-size:1.2rem; opacity:0; pointer-events:none; transition:opacity .2s,transform .2s; }
#back-top.visible { opacity:1; pointer-events:auto; }
#navigation { gap: 20px; margin-bottom: 24px; }
.nav-group { display: grid; gap: 2px; }
.nav-group h2 { color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: 0 12px 6px; }
#navigation a { padding: 7px 12px; }
.button, button, select, input { min-height: 40px; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sidebar-foot { flex-shrink: 0; }
.stage-chips { max-height: 360px; overflow-y: auto; }
.stage-content, .stage-panel, .calc-col { min-width: 0; }
.calc-col select { max-width: 100%; }
.ab-list li { flex-wrap: wrap; overflow-wrap: anywhere; }
.mon-grid { grid-template-columns: repeat(auto-fill,minmax(min(260px,100%),1fr)); }
.stat-strip { grid-template-columns: repeat(auto-fit,minmax(125px,1fr)); }
.stat-strip a { padding: 16px; border-bottom: 1px solid var(--line); }
.stat-strip a:first-child { padding-left: 16px; }
.skip { position: fixed; left: 16px; }
footer { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.ad-slot-wrap { width:100%; margin:-8px 0 32px; overflow:hidden; text-align:center; }
.ad-label { display:block; margin-bottom:6px; color:var(--muted); font-size:.68rem; letter-spacing:.08em; text-transform:uppercase; }
.ad-slot-wrap .adsbygoogle { min-height:90px; }
.ad-slot-wrap:has(.adsbygoogle[data-ad-status="unfilled"]) { display:none; }
@media (max-width: 1150px) {
  header { gap: 12px; }
  #search-launch { min-width: 0; }
  .language > span { display: none; }
}
@media (max-width: 800px) {
  #close-menu { display: block; align-self: end; margin-bottom: 16px; }
  header { display: grid; grid-template-columns: auto 1fr auto; padding: 12px 16px; }
  #menu { grid-column: 1; grid-row: 1; }
  .language { grid-column: 3; grid-row: 1; justify-self: end; }
  #search-launch { grid-column: 1 / 3; grid-row: 2; width: 100%; margin: 0; }
  .donate-header { grid-column: 3; grid-row: 2; margin: 0; text-align: center; }
  #sidebar.open { top: 0; z-index: 40; width: min(300px,80vw); box-shadow: 0 0 0 100vmax #0009; }
  #navigation a { padding: 10px 12px; }
  #back-top { right: 14px; bottom: 14px; }
  .stage-panel { grid-template-columns: minmax(80px,130px) minmax(0,1fr); }
  .stage-panel .nav-pair { grid-column: 1 / -1; }
  .bottom-nav { display: flex !important; }
  main#content { padding-bottom: 76px; }
  #back-top { bottom: 74px; }
  .ad-slot-wrap { margin:-8px 0 24px; }
}

/* Combat Benchmark Card */
.combat-benchmark-card { background: linear-gradient(145deg, #1b222c, #141a21); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: 18px 20px; margin: 16px 0 24px; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.benchmark-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.benchmark-head h3 { margin: 0; color: var(--gold); font-size: 1.15rem; }
.benchmark-btn { background: var(--gold); color: #11161c !important; font-weight: 600; border: none; border-radius: 6px; padding: 8px 16px; font-size: .88rem; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: opacity .2s; }
.benchmark-btn:hover { opacity: .9; }
.benchmark-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.bm-stat { background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.bm-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.bm-val { font-size: 1.25rem; color: #fff; font-family: monospace; }
.bm-stat small { font-size: .75rem; color: #94a3b8; line-height: 1.35; }
.bm-stat .val-high { color: #f59e0b; }

/* Enhanced Monster Mini Card */
.mini-combat-stats { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .78rem; color: var(--muted); margin-top: 4px; }
.mini-combat-stats b { color: #cbd5e1; font-family: monospace; }
.req-hit-badge { background: rgba(223,190,131,0.15); color: var(--gold); border: 1px solid rgba(223,190,131,0.35); border-radius: 4px; padding: 1px 6px; font-size: .72rem; }
.req-hit-badge b { color: #fff; }
.tag-boss { background: #dc2626 !important; color: #fff !important; font-weight: bold; border-radius: 4px; padding: 2px 6px; font-size: .7rem; }

/* Calculator Upgrades & DPS Meter */
.calc-toolbar { margin-bottom: 20px; }
.calc-tools-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.calc-tools-group label { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; }
.button-outline { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 6px; padding: 8px 14px; cursor: pointer; }
.button-outline:hover { border-color: var(--gold); color: var(--gold); }
.file-label { cursor: pointer; }
.calc-toast { background: #10b981; color: #fff; border-radius: 4px; padding: 4px 10px; font-size: .8rem; font-weight: 500; animation: fadeIn .2s; }
.dps-benchmark-meter { border-radius: 8px; padding: 14px 18px; margin: 16px 0 24px; border: 1px solid var(--line); }
.meter-pass { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.3); }
.meter-warn { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.3); }
.meter-info { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.meter-pass .meter-info span:last-child { color: #10b981; font-weight: bold; }
.meter-warn .meter-info span:last-child { color: #ef4444; font-weight: bold; }
.meter-track { height: 8px; background: rgba(0,0,0,0.3); border-radius: 4px; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 4px; transition: width .3s ease; }
.meter-pass .meter-fill { background: #10b981; }
.meter-warn .meter-fill { background: #ef4444; }

/* Collapsible Navigation */
.nav-group summary { list-style: none; cursor: pointer; user-select: none; display: flex; align-items: center; justify-content: space-between; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: '▾'; color: var(--muted); font-size: .75rem; padding-right: 12px; transition: transform .2s; }
.nav-group:not([open]) summary::after { transform: rotate(-90deg); }
.nav-items { display: grid; gap: 2px; }

/* Mobile Bottom Navigation */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; height: 58px; background: #13181f; border-top: 1px solid var(--line); z-index: 50; justify-content: space-around; align-items: center; box-shadow: 0 -2px 10px rgba(0,0,0,0.5); }
.bottom-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 48px; min-height: 48px; color: var(--muted); text-decoration: none; font-size: .68rem; border: none; background: transparent; cursor: pointer; padding: 4px 8px; }
.bottom-nav-item .b-icon { font-size: 1.1rem; line-height: 1; }
.bottom-nav-item.active, .bottom-nav-item:hover { color: var(--gold); }

/* Search Dialog Tabs & Highlight */
.search-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.search-tab { background: rgba(255,255,255,0.05); border: 1px solid var(--line); color: var(--muted); border-radius: 20px; padding: 4px 12px; font-size: .78rem; cursor: pointer; }
.search-tab.active, .search-tab:hover { background: var(--gold); color: #11161c; border-color: var(--gold); font-weight: 600; }
mark.hl { background: rgba(223,190,131,0.3); color: #fff; border-radius: 2px; padding: 0 2px; font-weight: bold; }

/* Compare View */
.compare-container { margin-top: 14px; }
.compare-toolbar { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.compare-toolbar label { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: var(--muted); min-width: 200px; }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.cmp-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.cmp-card-head { display: flex; gap: 14px; align-items: center; }
.cmp-card-head h3 { margin: 0; font-size: 1.1rem; }
.cmp-card-head p { margin: 4px 0 0; font-size: .85rem; color: var(--muted); }
.cmp-table th, .cmp-table td { padding: 10px 14px; text-align: center; }
.cmp-table th:first-child, .cmp-table td:first-child { text-align: left; }
.diff-col { font-weight: bold; font-family: monospace; font-size: .95rem; }
.diff-plus { color: #10b981; }
.diff-minus { color: #ef4444; }
.diff-same { color: var(--muted); }
@media (max-width: 600px) {
  .cmp-grid { grid-template-columns: 1fr; }
}
