/* ===================================================================
   CubeCraft Skyblock — site theme
   Look: Minecraft GUI (beveled panels + inventory slots), smoothed
   corners, clean. Dark + light ("stone") mode.
   Re-skin the whole site from the tokens below.
   =================================================================== */

/* ---------- Tokens: DARK (default) ---------- */
:root {
  --bg:        #0c0f14;
  --bg-tex:    #11151b;
  --panel:     #1f262e;
  --panel-2:   #283039;
  --slot:      #0e1318;
  --edge:      #07090c;
  --text:      #e9edf2;
  --muted:     #98a3b2;
  --bev-hi:    rgba(255,255,255,.08);
  --bev-lo:    rgba(0,0,0,.55);

  --accent:    #3ba7ff;
  --accent-d:  #2b86d6;
  --accent-2:  #5ad16a;

  --rarity-common:    #c2ccd8;
  --rarity-uncommon:  #5ad16a;
  --rarity-rare:      #3ba7ff;
  --rarity-legendary: #f0a93b;
  --rarity-mythic:    #c777ff;

  --grass:  #6cbf4b; --grass-d: #54a23a;
  --dirt:   #7c5333; --dirt-d:  #5f3f27;

  --shadow:    0 14px 34px rgba(0,0,0,.5);
  --shadow-sm: 0 6px 16px rgba(0,0,0,.4);
  --radius:    10px;
  --radius-sm: 7px;
  --maxw:      1140px;
  --nav-h:     64px;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-pixel:'Press Start 2P', 'Inter', monospace;
}

/* ---------- Tokens: LIGHT (stone) ---------- */
[data-theme="light"] {
  --bg:        #d7dbe1;
  --bg-tex:    #cfd3da;
  --panel:     #cbcfd6;
  --panel-2:   #d9dce1;
  --slot:      #8f949c;
  --edge:      #4f545b;
  --text:      #171c24;
  --muted:     #545d6b;
  --bev-hi:    rgba(255,255,255,.85);
  --bev-lo:    rgba(0,0,0,.28);

  --accent:    #1f7fd6;
  --accent-d:  #1668b4;
  --accent-2:  #2f9e44;

  --rarity-common:    #4a5360;
  --rarity-uncommon:  #2f9e44;
  --rarity-rare:      #1f7fd6;
  --rarity-legendary: #b9760f;
  --rarity-mythic:    #8b3fce;

  --shadow:    0 14px 30px rgba(40,60,90,.18);
  --shadow-sm: 0 6px 14px rgba(40,60,90,.14);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.65;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--bg-tex) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-tex) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s, color .25s;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-d); }
img { max-width: 100%; display: block; }
h1,h2,h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.kicker {
  font-family: var(--font-pixel); font-size: .58rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); display: inline-block; margin-bottom: 14px;
}
.mc-head {
  font-family: var(--font-pixel); font-size: clamp(.9rem, 2vw, 1.15rem);
  letter-spacing: .02em; line-height: 1.5; margin: 0 0 22px;
}

/* ---------- Buttons (Minecraft beveled) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: .94rem; color: var(--text);
  padding: 12px 20px; border: 2px solid var(--edge); border-radius: var(--radius-sm);
  background: var(--panel-2);
  box-shadow: inset 2px 2px 0 var(--bev-hi), inset -2px -2px 0 var(--bev-lo);
  cursor: pointer; transition: transform .1s, filter .15s;
}
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: inset 2px 2px 0 var(--bev-lo), inset -2px -2px 0 var(--bev-hi); }
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--accent); color: #fff; border-color: var(--edge);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.28), inset -2px -2px 0 rgba(0,0,0,.32);
}
.btn-primary:hover { color: #fff; }

/* ---------- Navbar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--panel);
  border-bottom: 3px solid var(--edge);
  box-shadow: inset 0 2px 0 var(--bev-hi);
}
.nav { height: var(--nav-h); display: flex; align-items: center; gap: 16px; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand .cube { width: 30px; height: 30px; flex: none; image-rendering: pixelated; }
.brand .name { font-family: var(--font-pixel); font-size: .68rem; letter-spacing: .01em; line-height: 1.5; }
.brand .name small { display: block; font-family: var(--font-body); font-size: .8rem; font-weight: 700; color: var(--muted); margin-top: 4px; }

.nav-links { display: flex; align-items: center; gap: 3px; margin-left: auto; }
.nav-links a { color: var(--muted); font-weight: 700; font-size: .88rem; padding: 8px 12px; border-radius: 6px; border: 2px solid transparent; }
.nav-links a:hover { color: var(--text); background: var(--slot); }
.nav-links a.active {
  color: var(--accent); background: var(--slot); border-color: var(--edge);
  box-shadow: inset 1px 1px 0 var(--bev-lo);
}
.nav-tools { display: flex; align-items: center; gap: 8px; margin-left: 6px; }
.nav-search {
  display: flex; align-items: center; gap: 8px; color: var(--muted);
  background: var(--slot); border: 2px solid var(--edge); border-radius: 6px; padding: 7px 10px; margin-right: 6px;
  box-shadow: inset 2px 2px 0 var(--bev-lo), inset -2px -2px 0 var(--bev-hi);
}
.nav-search svg { width: 15px; height: 15px; flex: none; }
.nav-search input { border: 0; background: transparent; color: var(--text); outline: none; font-size: .85rem; width: 150px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; color: var(--text);
  background: var(--panel-2); border: 2px solid var(--edge); border-radius: 7px;
  box-shadow: inset 2px 2px 0 var(--bev-hi), inset -2px -2px 0 var(--bev-lo);
  cursor: pointer; transition: filter .15s, transform .1s;
}
.icon-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.icon-btn:active { transform: translateY(1px); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .moon { display: block; }
.hamburger { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 70px 0 0; }
.hero-panel {
  position: relative; max-width: 760px;
  background: var(--panel); border: 3px solid var(--edge); border-radius: var(--radius);
  box-shadow: inset 2px 2px 0 var(--bev-hi), inset -3px -3px 0 var(--bev-lo), var(--shadow);
  padding: 34px 34px 38px;
}
.hero-badge { width: 56px; height: 56px; margin-bottom: 18px; image-rendering: pixelated; }
.hero-title { font-family: var(--font-pixel); font-size: clamp(1.25rem, 4.2vw, 2.3rem); line-height: 1.45; margin: 0 0 14px; }
.hero-title span { color: var(--accent); }
.hero-sub { font-family: var(--font-pixel); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); margin: 0 0 16px; }
.hero-text { font-size: 1.08rem; color: var(--muted); max-width: 560px; margin: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.ground {
  height: 30px; margin-top: 46px;
  background-color: var(--dirt);
  background-image:
    linear-gradient(var(--grass) 0 7px, transparent 7px),
    repeating-linear-gradient(90deg, var(--dirt) 0 10px, var(--dirt-d) 10px 11px),
    repeating-linear-gradient(90deg, var(--grass) 0 10px, var(--grass-d) 10px 11px);
  background-size: 100% 100%, 100% 100%, 100% 7px;
  background-repeat: no-repeat;
  border-top: 3px solid var(--edge); border-bottom: 3px solid var(--edge);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.25);
}

/* ---------- Inventory grid (homepage sections) ---------- */
.inv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.slot-card {
  display: flex; flex-direction: column; gap: 4px; color: var(--text);
  background: var(--panel); border: 2px solid var(--edge); border-radius: var(--radius);
  box-shadow: inset 2px 2px 0 var(--bev-hi), inset -2px -2px 0 var(--bev-lo);
  padding: 18px 18px 20px; position: relative; overflow: hidden;
  transition: transform .12s, filter .15s;
}
.slot-card::before { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 100%; background: var(--ac, var(--accent)); opacity: .9; }
.slot-card:hover { transform: translateY(-3px); filter: brightness(1.07); color: var(--text); }
.slot-ico {
  width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 12px;
  background: var(--slot); border: 2px solid var(--edge); border-radius: var(--radius-sm);
  box-shadow: inset 2px 2px 0 var(--bev-lo), inset -2px -2px 0 var(--bev-hi);
  color: var(--ac, var(--accent));
}
.slot-ico svg { width: 30px; height: 30px; }
.slot-name { font-weight: 800; font-size: 1.1rem; }
.slot-desc { color: var(--muted); font-size: .9rem; }
.slot-card .arrow { margin-top: 12px; color: var(--ac, var(--accent)); font-weight: 700; font-size: .85rem; }

/* ---------- Status board ("what's new") ---------- */
.board {
  background: var(--slot); border: 3px solid var(--edge); border-radius: var(--radius);
  box-shadow: inset 2px 2px 0 var(--bev-lo), inset -2px -2px 0 var(--bev-hi);
  padding: 10px 12px; max-width: 640px;
}
.board-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-bottom: 2px solid var(--edge); }
.board-row:last-child { border-bottom: 0; }
.board-row .dot { width: 12px; height: 12px; border-radius: 3px; flex: none; border: 2px solid var(--edge); }
.dot.done { background: var(--rarity-uncommon); }
.dot.wip  { background: var(--rarity-legendary); }
.dot.plan { background: var(--muted); }
.board-row .label { font-weight: 700; }
.board-row .state { margin-left: auto; font-family: var(--font-pixel); font-size: .5rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section-head { margin-bottom: 30px; max-width: 660px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Generic grid + cards (sub-pages) ---------- */
.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--panel); border: 2px solid var(--edge); border-radius: var(--radius);
  box-shadow: inset 2px 2px 0 var(--bev-hi), inset -2px -2px 0 var(--bev-lo);
  padding: 22px;
}
a.card { color: var(--text); display: block; transition: transform .12s, filter .15s; }
a.card:hover { transform: translateY(-3px); filter: brightness(1.07); }
.card-ico {
  width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 15px; color: var(--accent);
  background: var(--slot); border: 2px solid var(--edge); border-radius: var(--radius-sm);
  box-shadow: inset 2px 2px 0 var(--bev-lo), inset -2px -2px 0 var(--bev-hi);
}
.card-ico svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.16rem; margin-bottom: 6px; }
.card p { color: var(--muted); margin: 0; font-size: .93rem; }
.card .arrow { margin-top: 13px; color: var(--accent); font-weight: 700; font-size: .88rem; display: inline-flex; gap: 6px; }

/* ---------- "Empty slot" placeholders (recessed, no shimmer) ---------- */
.placeholder {
  background: var(--slot); border: 2px solid var(--edge); border-radius: var(--radius);
  box-shadow: inset 2px 2px 0 var(--bev-lo), inset -2px -2px 0 var(--bev-hi);
  padding: 30px 24px; color: var(--muted); text-align: center;
}
.placeholder .tag {
  font-family: var(--font-pixel); font-size: .5rem; letter-spacing: .1em; color: var(--rarity-legendary);
  border: 2px solid var(--edge); border-radius: 6px; padding: 6px 9px; display: inline-block; margin-bottom: 12px;
  background: color-mix(in srgb, var(--rarity-legendary) 14%, transparent);
}
.placeholder h3 { color: var(--text); }
.skel { display: grid; gap: 10px; margin-top: 8px; }
.skel-row { height: 12px; border-radius: 4px; background: var(--panel); border: 1px solid var(--edge); opacity: .7; }
.skel-row.w-80 { width: 80%; } .skel-row.w-60 { width: 60%; } .skel-row.w-40 { width: 40%; }

/* ---------- Sub-page header ---------- */
.page-head { padding: 50px 0 8px; }
.page-head h1 { font-family: var(--font-pixel); font-size: clamp(1.2rem, 3.4vw, 1.9rem); line-height: 1.5; }
.page-head p { color: var(--muted); max-width: 640px; }

/* ---------- Search bar (recessed slot) ---------- */
.searchbar {
  display: flex; align-items: center; gap: 10px; max-width: 560px; color: var(--muted);
  background: var(--slot); border: 2px solid var(--edge); border-radius: var(--radius-sm);
  box-shadow: inset 2px 2px 0 var(--bev-lo), inset -2px -2px 0 var(--bev-hi); padding: 12px 16px;
}
.searchbar svg { width: 18px; height: 18px; flex: none; }
.searchbar input { border: 0; background: transparent; color: var(--text); font-size: 1rem; width: 100%; outline: none; }

/* ---------- Filter pills (slot tabs) ---------- */
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 28px; }
.pill {
  padding: 7px 14px; border-radius: 6px; font-weight: 700; font-size: .84rem; cursor: pointer; color: var(--muted);
  background: var(--panel-2); border: 2px solid var(--edge);
  box-shadow: inset 2px 2px 0 var(--bev-hi), inset -2px -2px 0 var(--bev-lo);
}
.pill:hover { color: var(--text); filter: brightness(1.1); }
.pill.active { color: var(--accent); box-shadow: inset 2px 2px 0 var(--bev-lo), inset -2px -2px 0 var(--bev-hi); }

/* ---------- Map placeholder (legacy) ---------- */
.map-frame {
  aspect-ratio: 16 / 9; border: 3px solid var(--edge); border-radius: var(--radius);
  box-shadow: inset 2px 2px 0 var(--bev-lo), inset -2px -2px 0 var(--bev-hi);
  display: grid; place-items: center; text-align: center; color: var(--muted);
  background-color: var(--slot);
  background-image:
    repeating-linear-gradient(0deg, transparent 0 39px, var(--edge) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, var(--edge) 39px 40px);
}

/* ---------- Interactive map (Leaflet) ---------- */
.map-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 4px 0 16px; padding: 12px 16px;
  background: var(--panel); border: 2px solid var(--edge); border-radius: var(--radius);
  box-shadow: inset 2px 2px 0 var(--bev-hi), inset -2px -2px 0 var(--bev-lo);
}
.map-toolbar label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; cursor: pointer; }
.map-toolbar input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.map-toolbar .btn { padding: 8px 14px; }
.map-toolbar .sep { flex: 1; }
.map-wrap { width: 100%; height: min(74vh, 680px); border-radius: var(--radius); overflow: hidden; }
.map-fallback { display: grid; place-items: center; height: 100%; color: var(--muted); text-align: center; padding: 20px; }

.leaflet-container { background: var(--slot); font-family: var(--font-body); }
.leaflet-div-icon { background: transparent; border: 0; }
.cc-pin {
  display: block; width: 100%; height: 100%; background: var(--c, var(--accent));
  border: 2px solid var(--edge); border-radius: 3px; transform: rotate(45deg);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.45), inset -1px -1px 0 rgba(0,0,0,.4);
}
.cc-ico-img { width: 100%; height: 100%; image-rendering: pixelated; }
.cc-pin.found { filter: grayscale(1); opacity: .4; }
.no-previews .leaflet-tooltip { display: none !important; }
.leaflet-tooltip {
  background: var(--panel) !important; color: var(--text) !important; border: 2px solid var(--edge) !important;
  box-shadow: var(--shadow-sm) !important; border-radius: 6px !important; font-weight: 700;
}
.leaflet-tooltip-top::before { border-top-color: var(--edge) !important; }
.cc-thumb { width: 120px; display: block; margin-top: 5px; border-radius: 4px; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel) !important; color: var(--text) !important; box-shadow: var(--shadow) !important; }
.leaflet-popup-content-wrapper { border: 2px solid var(--edge) !important; border-radius: var(--radius-sm) !important; }
.cc-pop-h { font-family: var(--font-pixel); font-size: .62rem; line-height: 1.5; color: var(--c, var(--accent)); margin-bottom: 8px; }
.cc-pop-img { width: 190px; max-width: 100%; border-radius: 6px; margin-bottom: 6px; }
.cc-pop-coords { font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.cc-found-btn {
  font-weight: 700; cursor: pointer; padding: 8px 12px; border-radius: 6px; color: var(--text);
  background: var(--panel-2); border: 2px solid var(--edge);
  box-shadow: inset 2px 2px 0 var(--bev-hi), inset -2px -2px 0 var(--bev-lo);
}
.leaflet-bar a { background: var(--panel) !important; color: var(--text) !important; border-color: var(--edge) !important; }
.leaflet-bar a:hover { filter: brightness(1.15); }
.leaflet-control-layers {
  background: var(--panel) !important; color: var(--text) !important; border: 2px solid var(--edge) !important;
  border-radius: var(--radius-sm) !important; padding: 8px 10px !important;
  box-shadow: inset 2px 2px 0 var(--bev-hi), inset -2px -2px 0 var(--bev-lo) !important;
}
.leaflet-control-layers label { font-weight: 600; margin: 4px 0; display: flex; align-items: center; }
.cc-leg { display: inline-block; width: 12px; height: 12px; background: var(--c); border: 2px solid var(--edge); border-radius: 3px; transform: rotate(45deg); margin: 0 8px 0 4px; }

/* off-screen edge indicators (point toward important markers out of view) */
.cc-edge-layer { position: absolute; inset: 0; z-index: 650; pointer-events: none; }
.cc-edge { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 6px; pointer-events: auto; cursor: pointer; }
.cc-edge-ic { display: grid; place-items: center; width: 26px; height: 26px; color: var(--c, var(--accent)); filter: drop-shadow(0 1px 2px rgba(0,0,0,.55)); }
.cc-edge-ic svg { width: 22px; height: 22px; }
.cc-edge-lbl { display: none; font-size: .72rem; font-weight: 700; color: var(--text); background: var(--panel); border: 2px solid var(--edge); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.cc-edge:hover .cc-edge-lbl { display: block; }

/* ---------- Footer ---------- */
.site-footer { border-top: 3px solid var(--edge); background: var(--panel); box-shadow: inset 0 3px 0 var(--bev-hi); margin-top: 40px; padding: 46px 0 28px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.footer-brand { max-width: 320px; }
.footer-brand .name { font-family: var(--font-pixel); font-size: .66rem; }
.footer-brand .name small { display: block; font-family: var(--font-body); font-size: .8rem; font-weight: 700; color: var(--muted); margin-top: 4px; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--font-pixel); font-size: .55rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.footer-col a { display: block; color: var(--text); padding: 4px 0; font-size: .92rem; }
.footer-col a:hover { color: var(--accent); }
.credits-note { margin-top: 32px; padding-top: 20px; border-top: 2px solid var(--edge); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.credits-note .tag { font-family: var(--font-pixel); font-size: .48rem; color: var(--rarity-legendary); border: 2px solid var(--edge); padding: 5px 8px; border-radius: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .inv-grid, .grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--panel); border-bottom: 3px solid var(--edge); padding: 12px; margin: 0;
    transform: translateY(-140%); transition: transform .25s; box-shadow: var(--shadow);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 14px; font-size: 1rem; }
  .nav-search { width: 100%; margin: 0 0 8px; }
  .nav-search input { width: 100%; }
  .nav-tools { margin-left: auto; }
  .hamburger { display: grid; }
}
@media (max-width: 560px) {
  .inv-grid, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .brand .name small { display: none; }
  .hero { padding-top: 44px; }
  .hero-panel { padding: 26px 22px 30px; }
}

/* ===================================================================
   Interactive map — sidebar + dimension layout (HoYoLAB style)
   =================================================================== */
/* full-bleed app layout: flush-left rail + map fills the rest */
.map-shell { display: flex; gap: 0; max-width: none; margin: 0; padding: 0; align-items: stretch; height: calc(100vh - var(--nav-h)); }
.map-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.map-wrap { flex: 1 1 auto; width: 100%; height: auto; min-height: 0; border-radius: 0; overflow: hidden; }

.map-sidebar {
  width: 290px; flex: none; background: var(--panel);
  border: 0; border-right: 1px solid var(--edge); border-radius: 0;
  box-shadow: 7px 0 18px -12px rgba(0,0,0,.5);
  padding: 18px 16px 28px; overflow-y: auto;
}
.sb-head { display: flex; align-items: center; justify-content: space-between; }
.sb-title { font-family: var(--font-pixel); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.sb-close { display: none; width: 32px; height: 32px; font-size: 1.3rem; line-height: 1; background: var(--panel-2); border: 2px solid var(--edge); border-radius: 7px; color: var(--text); cursor: pointer; }
.sb-section { margin-top: 16px; }
.sb-section h4 { font-family: var(--font-pixel); font-size: .54rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.sb-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.select-all, .hide-found { display: flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.hide-found { margin: 8px 0 10px; }
.map-sidebar input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.region-list { display: flex; flex-direction: column; gap: 4px; }
.region-row { text-align: left; padding: 8px 10px; border-radius: 7px; border: 2px solid transparent; background: transparent; color: var(--muted); font-weight: 700; font-size: .88rem; cursor: pointer; }
.region-row:hover { background: var(--slot); color: var(--text); }
.region-row.active { background: var(--slot); color: var(--accent); border-color: var(--edge); box-shadow: inset 1px 1px 0 var(--bev-lo); }

.cat-list { display: flex; flex-direction: column; gap: 2px; }
.cat-row { display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-radius: 7px; }
.cat-row:hover { background: var(--slot); }
.cat-eye { width: 28px; height: 28px; flex: none; display: grid; place-items: center; background: transparent; border: 0; color: var(--muted); cursor: pointer; border-radius: 6px; }
.cat-eye:hover { color: var(--text); }
.cat-eye:not(.on) { opacity: .45; }
.cat-eye svg { width: 18px; height: 18px; }
.cat-eye .eye-on, .cat-eye .eye-off { display: none; }
.cat-eye.on .eye-on { display: block; }
.cat-eye:not(.on) .eye-off { display: block; }
.cat-dot { width: 11px; height: 11px; flex: none; background: var(--c); border: 2px solid var(--edge); border-radius: 3px; transform: rotate(45deg); }
.cat-name { flex: 1; font-weight: 700; font-size: .9rem; }
.cat-count { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.cat-chk { flex: none; }
.cat-chk:disabled { opacity: .3; cursor: not-allowed; }

.map-titlebar { display: flex; align-items: center; gap: 12px; margin: 0; padding: 11px 18px; background: var(--panel); border-bottom: 1px solid var(--edge); flex-wrap: wrap; }
.dim-title { display: flex; align-items: center; gap: 10px; }
.dim-name { font-family: var(--font-pixel); font-size: clamp(.8rem, 2vw, 1rem); letter-spacing: .04em; color: var(--text); }
.dim-switch { width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: var(--panel-2); border: 2px solid var(--edge); border-radius: 8px; color: var(--accent); cursor: pointer; box-shadow: inset 2px 2px 0 var(--bev-hi), inset -2px -2px 0 var(--bev-lo); }
.dim-switch:hover { filter: brightness(1.14); }
.dim-switch svg { width: 20px; height: 20px; }
.map-tools { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.map-tools .mini { display: flex; align-items: center; gap: 7px; font-size: .85rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.map-tools .mini input { width: 16px; height: 16px; accent-color: var(--accent); }
.filter-pins-btn { display: none; }

/* account / sign-in button in the header */
.account-btn { font-size: .82rem; padding: 9px 13px; gap: 7px; }

@media (max-width: 1024px) {
  .map-shell { display: block; height: auto; padding: 0; }
  .map-col { display: block; }
  .map-titlebar { padding: 12px 14px; }
  .map-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 86vw; max-height: 100vh;
    border: 0; border-right: 2px solid var(--edge); border-radius: 0; z-index: 1200;
    transform: translateX(-110%); transition: transform .25s; box-shadow: var(--shadow);
  }
  .map-sidebar.open { transform: translateX(0); }
  .sb-close { display: grid; place-items: center; }
  .filter-pins-btn { display: inline-flex; }
  .map-wrap { flex: none; height: calc(100vh - var(--nav-h) - 120px); min-height: 380px; }
}
