/* Ninjaverse Wiki — design system synced with the landing site (App.css) */
:root {
  --orange: #e0a040;
  --orange-dark: #c08030;
  --orange-glow: rgba(224, 160, 64, 0.25);
  --orange-bright: #ffb347;

  /* element colours (for Drops / Land sections) */
  --metal: #b0c4de;
  --wood: #4caf50;
  --water: #42a5f5;
  --fire: #ff5722;
  --earth: #8d6e63;

  --bg: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #1a1a1a;
  --bg-deep: #060610;
  --border: #333333;
  --border-lt: rgba(224, 160, 64, 0.4);

  --text: #f0ece2;
  --text-muted: #b8b2a6;

  --font-pixel: 'Press Start 2P', monospace;
  --font-body: 'Share Tech Mono', 'Fira Mono', 'Courier New', monospace;

  --content-max: 1120px;
  --radius-card: 8px;
  --radius-button: 6px;

  /* icon sprite scale: logical atlas is 1024px wide; --s scales it up */
  --s: 2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  /* Sticky footer: stack header / content / footer and let content grow so the
     footer stays pinned to the bottom even when a page is short. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.layout { flex: 1 0 auto; }
footer { flex-shrink: 0; }
/* Fixed pixel-art scene behind everything, dimmed for readability */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background: url("bg.png") center top / cover no-repeat;
  image-rendering: pixelated;
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(rgba(8, 8, 10, 0.68), rgba(8, 8, 10, 0.74));
}

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-bright); }
code { color: var(--metal); background: var(--bg-deep); padding: 1px 5px; border-radius: 3px; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(to bottom, var(--orange), var(--orange-dark)); border-radius: 4px; }

/* ---- top bar (landing navbar style) ---- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 12px 28px;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-lt);
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.6), 0 0 60px rgba(224, 160, 64, 0.05);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: max-content; }
.brand-icon { width: 26px; height: 26px; image-rendering: pixelated; }
.brand span {
  color: var(--orange); font-family: var(--font-pixel);
  font-size: 12px; line-height: 1; letter-spacing: 2px;
}
.brand .brand-sub { color: var(--text-muted); font-size: 9px; }

/* ---- left sidebar nav (Terraria-style) ---- */
/* Content is centered in the VIEWPORT (independent of the nav); the sidebar
   floats in the left gutter via position:fixed so it never offsets the
   content. Below 1360px the gutter is too small, so the nav drops to a strip
   above the content (see media queries) to avoid overlapping it. */
.layout { display: block; padding: 0 16px; }
.sidebar { position: fixed; top: 72px; left: 16px; width: 200px; z-index: 50; }
.side-panel {
  max-height: calc(100vh - 92px); overflow-y: auto;
  background: rgba(10, 10, 10, 0.82);
  border: 1px solid var(--border); border-radius: var(--radius-card);
}
.side-head {
  font-family: var(--font-pixel); font-size: 11px; letter-spacing: 1px;
  color: var(--orange); text-transform: uppercase;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg-deep);
}
.sidebar nav { display: flex; flex-direction: column; }
.sidebar nav a {
  color: var(--text); font-family: var(--font-pixel);
  font-size: 13px; letter-spacing: 1px; line-height: 1.5;
  padding: 16px 16px; border-left: 4px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.sidebar nav a + a { border-top: 1px solid var(--border); }
.sidebar nav a:hover { color: var(--orange); background: var(--bg-card-hover); }
.sidebar nav a.active {
  color: var(--orange); background: var(--focus, rgba(224,160,64,0.08));
  border-left-color: var(--orange); text-shadow: 0 0 10px var(--orange-glow);
}

main {
  max-width: 880px; min-width: 0;
  margin: 28px auto 56px;
  background: rgba(10, 10, 10, 0.82);
  border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 26px 30px 34px;
  /* Wide content (tables) scrolls inside the panel, not the whole page. */
  overflow-x: auto;
}

/* Below 1360px the side gutter can't hold the nav without overlapping the
   centered content → drop the nav to a swipeable strip above it. */
@media (max-width: 1360px) {
  .sidebar {
    position: static; left: auto; top: auto; width: auto;
    max-width: 880px; margin: 16px auto 0;
  }
  .side-panel { max-height: none; overflow: visible; }
  .side-head { display: none; }
  .sidebar nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; }
  .sidebar nav a {
    border-left: none; border-top: none; flex: 0 0 auto;
    white-space: nowrap; text-align: center; font-size: 11px; padding: 12px 14px;
  }
  .sidebar nav a + a { border-top: none; }
  .sidebar nav a.active { border-left: none; border-bottom: 3px solid var(--orange); }
  main { margin-top: 18px; }
}

@media (max-width: 760px) {
  .topbar { padding: 10px 16px; gap: 10px 16px; }
  .social-links { gap: 14px; }
  .layout { padding: 0 12px; }
  .sidebar { max-width: 100%; }
  main { max-width: 100%; margin: 14px 0 36px; padding: 18px 14px 26px; }
  .page-title { font-size: 16px; }
  .part-title { font-size: 15px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .eff-grid { grid-template-columns: 1fr 1fr; }
}

/* First block inside the content panel sits flush with the top padding. */
main > .page-title:first-child, main > .hero:first-child { margin-top: 0; }
.page-title {
  color: var(--orange); font-family: var(--font-pixel);
  font-size: 22px; line-height: 1.3;
  border-bottom: 1px solid var(--border-lt); padding-bottom: 14px;
  text-shadow: 0 0 16px rgba(224, 160, 64, 0.2);
}
.page-intro { color: #ddd8cc; margin-top: 2px; }

footer {
  border-top: 1px solid var(--border); color: var(--text-muted);
  padding: 22px 24px; text-align: center;
}
.social-links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.social-links a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted); font-family: var(--font-pixel); font-size: 10px;
  letter-spacing: 1px; text-transform: uppercase; transition: color 0.2s;
}
.social-links a:hover { color: var(--orange); }
.social-links svg { vertical-align: middle; }
.footer-links { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 12px; }
.footer-links a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted); font-family: var(--font-pixel); font-size: 10px;
  letter-spacing: 1px; text-transform: uppercase;
}
.footer-links a:hover { color: var(--orange); }
.footer-links svg { vertical-align: middle; }
.footer-copy { font-family: var(--font-pixel); font-size: 9px; letter-spacing: 1px; margin: 0; }

/* ---- home hero ---- */
.hero { text-align: center; margin: 26px 0 38px; }
.hero-logo { width: 100%; max-width: 560px; height: auto; image-rendering: pixelated; }
.hero-tag {
  color: var(--text-muted); font-family: var(--font-pixel);
  letter-spacing: 6px; text-transform: uppercase; font-size: 11px; margin: 10px 0 0;
}

/* ---- icons (CSS sprite from IconAtlas0.png) ---- */
.icon {
  display: inline-block; vertical-align: middle;
  image-rendering: pixelated;
  background-image: url("IconAtlas0.png");
  background-repeat: no-repeat;
  width: calc(var(--w) * var(--s) * 1px);
  height: calc(var(--h) * var(--s) * 1px);
  background-size: calc(1024px * var(--s)) calc(1024px * var(--s));
  background-position: calc(var(--x) * var(--s) * -1px) calc(var(--y) * var(--s) * -1px);
}
.icon--empty {
  width: calc(16px * var(--s)); height: calc(16px * var(--s));
  background: var(--bg-deep); border: 1px dashed var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-weight: bold; font-size: calc(9px * var(--s));
}
.icon--lg { --s: 3; }

/* ---- panels / grid ---- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); }

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
a.panel { display: block; color: inherit; }
a.panel:hover {
  border-color: var(--orange); transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.5), 0 0 30px rgba(224, 160, 64, 0.08);
}
.panel h2 { font-family: var(--font-pixel); font-size: 13px; color: var(--orange); margin: 0 0 10px; }
.panel h3 { font-family: var(--font-pixel); font-size: 11px; color: var(--orange-bright); margin: 16px 0 8px; }

/* ---- potential stats ---- */
.stat {
  display: inline-block; min-width: 34px; text-align: center;
  font-size: 11px; font-weight: bold; padding: 1px 7px; border-radius: 4px;
  color: #0a0a0a;
}
.stat.atk { background: #ff4444; color: #fff; }
.stat.agi { background: #44cc44; }
.stat.vit { background: #4488ff; color: #fff; }
.stat.int { background: #ffaa00; }
.stat-card .stat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.stat-name { color: var(--orange); font-weight: bold; }
.stat-card p { margin: 0; }
.grow-card h3 { margin-top: 0; }
.grow-card p { margin: 0; }

/* ---- class skill tabs (CSS-only) ---- */
.njtabs input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.njtab-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.njtab {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: var(--radius-button);
  color: var(--text-muted); cursor: pointer;
  font-size: 13px; transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.njtab:hover { border-color: var(--orange); color: var(--text); }
.njpanel {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px;
}
#njtab-1:checked ~ .njpanels .njpanel-1,
#njtab-2:checked ~ .njpanels .njpanel-2,
#njtab-3:checked ~ .njpanels .njpanel-3,
#njtab-4:checked ~ .njpanels .njpanel-4,
#njtab-5:checked ~ .njpanels .njpanel-5,
#njtab-6:checked ~ .njpanels .njpanel-6 { animation: njFade 0.2s ease; }
@keyframes njFade { from { opacity: 0; } to { opacity: 1; } }

#njtab-1:checked ~ .njpanels .njpanel-1,
#njtab-2:checked ~ .njpanels .njpanel-2,
#njtab-3:checked ~ .njpanels .njpanel-3,
#njtab-4:checked ~ .njpanels .njpanel-4,
#njtab-5:checked ~ .njpanels .njpanel-5,
#njtab-6:checked ~ .njpanels .njpanel-6 { display: block; }

#njtab-1:checked ~ .njtab-bar label[for="njtab-1"],
#njtab-2:checked ~ .njtab-bar label[for="njtab-2"],
#njtab-3:checked ~ .njtab-bar label[for="njtab-3"],
#njtab-4:checked ~ .njtab-bar label[for="njtab-4"],
#njtab-5:checked ~ .njtab-bar label[for="njtab-5"],
#njtab-6:checked ~ .njtab-bar label[for="njtab-6"] {
  background: var(--focus); color: var(--orange); border-color: var(--border-lt);
}

.class-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.cname { color: var(--orange); font-family: var(--font-pixel); font-size: 14px; }
.class-role { color: #ddd8cc; margin: 8px 0; }

/* ---- skill list ---- */
.skill { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.skill:first-child { border-top: none; }
.skill .body { flex: 1; }
.skill .sname { color: var(--orange-bright); font-weight: bold; }
.skill .desc { color: var(--text); margin: 3px 0 6px; }
.skill .meta { color: var(--text-muted); font-size: 13px; }
.badge {
  display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 3px;
  background: var(--bg-deep); border: 1px solid var(--border); color: var(--text-muted);
  margin-right: 4px; letter-spacing: 0.5px;
}
.badge.type-active { color: var(--orange); border-color: var(--orange-dark); }
.badge.type-passive { color: var(--wood); border-color: var(--wood); }
.badge-soon { color: var(--bg); background: var(--text-muted); border-color: var(--text-muted); }

/* skill level table — fixed numeric columns + effect split into 3 columns */
.skill-lv { table-layout: fixed; width: 100%; }
.skill-lv th { vertical-align: top; }
.skill-lv th:nth-child(1), .skill-lv th:nth-child(2),
.skill-lv th:nth-child(3), .skill-lv th:nth-child(4),
.skill-lv td.num {
  width: 58px; white-space: nowrap; text-align: center;
  vertical-align: top; color: var(--text-muted);
}
.hint {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--border); color: var(--text);
  font-size: 9px; cursor: help; vertical-align: middle;
}
.hint:hover { background: var(--orange); color: #0a0a0a; }
.hint::after {
  content: attr(data-tip);
  position: absolute; bottom: 150%; left: 50%; transform: translateX(-50%);
  background: var(--bg-deep); color: var(--text);
  border: 1px solid var(--border-lt); border-radius: 4px;
  padding: 6px 9px; white-space: nowrap; font-size: 11px; font-weight: normal;
  text-transform: none; letter-spacing: 0; line-height: 1.3;
  opacity: 0; pointer-events: none; transition: opacity 0.15s; z-index: 50;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}
.hint:hover::after { opacity: 1; }
.eff-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2px 16px;
}
.eff-item { font-size: 12px; color: var(--text); line-height: 1.5; }

/* unreleased skills */
.skill--soon { opacity: 0.45; }
.skill--soon .icon { filter: grayscale(1); }

/* ---- tables ---- */
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { border: 1px solid var(--border); padding: 6px 9px; text-align: left; }
th { background: var(--bg-deep); color: var(--orange); }
tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

details { margin-top: 6px; }
details summary { cursor: pointer; color: var(--text-muted); font-size: 13px; }
details[open] summary { color: var(--text); }

/* ---- section titles (sub-headers within a page) ---- */
.section-title {
  font-family: var(--font-pixel); font-size: 15px; color: var(--orange-bright);
  margin: 26px 0 6px; text-shadow: 0 0 12px rgba(224, 160, 64, 0.2);
}

/* ---- part titles (major divider between two halves of a page) ---- */
.part-title {
  font-family: var(--font-pixel); font-size: 19px; color: var(--orange);
  margin: 40px 0 10px; padding: 12px 0 14px;
  border-top: 2px solid var(--border-lt); border-bottom: 1px solid var(--border);
  text-shadow: 0 0 16px rgba(224, 160, 64, 0.25);
}
.part-title span { color: var(--text-muted); font-size: 12px; }

/* ---- item catalog ---- */
.item-section { margin: 0 0 10px; }
.item-controls {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin: 0 0 18px;
}
.item-search {
  flex: 1 1 220px; min-width: 180px;
  font-family: var(--font-body); font-size: 14px;
  background: var(--bg-deep); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-button);
  padding: 8px 12px;
}
.item-search:focus { outline: none; border-color: var(--orange); }
.item-search::placeholder { color: var(--text-muted); }
.item-pick { color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.item-dropdown {
  font-family: var(--font-body); font-size: 14px;
  background: var(--bg-card); color: var(--orange);
  border: 1px solid var(--border-lt); border-radius: var(--radius-button);
  padding: 7px 12px; margin-left: 6px; cursor: pointer;
}
.item-dropdown:focus { outline: none; border-color: var(--orange); }
.item-noresult { color: var(--text-muted); }
.panel-h {
  font-family: var(--font-pixel); font-size: 12px; color: var(--orange-bright);
  margin: 22px 0 8px;
}
.panel-h span { color: var(--text-muted); font-size: 11px; }
.item-panel:first-child .panel-h { margin-top: 4px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 6px; }
.item-card {
  display: flex; align-items: center; gap: 10px; text-align: left;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 10px 12px;
}
.item-card .slot { padding: 6px; flex: 0 0 auto; }
.item-body { flex: 1; min-width: 0; }
.item-name { color: var(--text); font-size: 13px; line-height: 1.3; }
.item-lv { color: var(--orange); font-size: 11px; }
.item-descr { color: var(--text-muted); font-size: 11px; line-height: 1.4; margin-top: 3px; }

/* ---- currency ---- */
.cur-list { display: grid; gap: 16px; }
.cur-card { display: flex; gap: 16px; align-items: flex-start; }
.coin {
  flex: 0 0 auto; width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-pixel); font-size: 16px; color: #2a1a00;
  border: 2px solid rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.45), inset 0 -4px 7px rgba(0, 0, 0, 0.35);
}
.coin-yen { background: radial-gradient(circle at 35% 30%, #d6e6ff, #7da4d4); color: #143055; }
.coin-kin { background: radial-gradient(circle at 35% 30%, #ffdc92, #c8922f); }
.coin-gold { background: radial-gradient(circle at 35% 30%, #fff3b0, #e0a020); font-size: 11px; letter-spacing: -0.5px; }
.cur-body { flex: 1; min-width: 0; }
.cur-name { color: var(--orange); font-family: var(--font-pixel); font-size: 14px; }
.chain-badge {
  font-family: var(--font-body); font-size: 10px; letter-spacing: 0.5px;
  text-transform: uppercase; vertical-align: middle;
  padding: 2px 7px; border-radius: 10px; border: 1px solid;
}
.chain-on { color: var(--wood); border-color: var(--wood); background: rgba(76, 175, 80, 0.1); }
.chain-off { color: var(--text-muted); border-color: var(--border); background: var(--bg-deep); }

/* ---- land ---- */
.rar {
  font-family: var(--font-body); font-size: 10px; letter-spacing: 0.5px;
  text-transform: uppercase; vertical-align: middle;
  padding: 2px 8px; border-radius: 10px; border: 1px solid;
}
.rar-common { color: #b8b2a6; border-color: #6b665c; background: rgba(184, 178, 166, 0.08); }
.rar-uncommon { color: var(--wood); border-color: var(--wood); background: rgba(76, 175, 80, 0.1); }
.rar-rare { color: var(--water); border-color: var(--water); background: rgba(66, 165, 245, 0.1); }
.rar-epic { color: #b07de0; border-color: #b07de0; background: rgba(176, 125, 224, 0.12); }
.rar-legendary { color: var(--orange-bright); border-color: var(--orange); background: rgba(224, 160, 64, 0.12); }
.land-overview td:first-child, .land-overview th:first-child { width: 1%; white-space: nowrap; }
.land-total td { border-top: 2px solid var(--border-lt); }
.zone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 4px; }
.zone-tile {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--bg-deep); border: 1px solid var(--border);
  border-radius: 6px; padding: 9px 11px;
}
.zone-map { color: var(--text); font-size: 12px; line-height: 1.25; }
.zone-count { color: var(--orange); font-size: 12px; font-weight: bold; }
.cur-tag { color: var(--text-muted); font-size: 13px; margin: 3px 0 10px; }
.cur-row { display: flex; gap: 10px; margin: 6px 0; line-height: 1.45; }
.cur-row b { flex: 0 0 78px; color: var(--orange-bright); font-weight: normal; font-size: 12px; }

/* ---- Awaken points-per-level table (kept narrow) ---- */
.rate-panel { max-width: 360px; margin: 0 auto; }
.rate-panel .rate-per { color: var(--orange-bright); font-weight: bold; }


/* ---- keyboard keys ---- */
kbd {
  display: inline-block; min-width: 18px; text-align: center;
  font-family: var(--font-body); font-size: 12px;
  padding: 2px 7px; margin: 0 1px;
  background: linear-gradient(180deg, #2a2a2a, #181818);
  border: 1px solid #444; border-bottom-width: 2px;
  border-radius: 4px; color: var(--text);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

/* ---- world map figure ---- */
.wm { margin: 0 0 30px; text-align: center; }
.wm img {
  width: 100%; max-width: 720px; height: auto;
  image-rendering: pixelated;
  border: 1px solid var(--border-lt); border-radius: var(--radius-card);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
}
.wm figcaption { color: var(--text-muted); font-size: 13px; margin-top: 8px; }

/* ---- starter region "place" cards ---- */
.place h3 { margin-top: 0; }
.place p { margin: 0; }
.link-cue { color: var(--orange); font-weight: bold; white-space: nowrap; }
a.place:hover .link-cue { color: var(--orange-bright); }

/* ---- drop land cards ---- */
/* element-coloured accent per land card */
.land-card { border-left: 4px solid var(--border); }
.el-metal { border-left-color: var(--metal); }
.el-wood  { border-left-color: var(--wood); }
.el-water { border-left-color: var(--water); }
.el-fire  { border-left-color: var(--fire); }
.el-earth { border-left-color: var(--earth); }

.land-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.land-name { color: var(--text); font-weight: bold; font-size: 16px; }
.land-drops { color: #ddd8cc; margin: 0 0 14px; }
.land-rate { width: 100%; margin-bottom: 10px; }
.land-rate th, .land-rate td { padding: 6px 10px; }

/* item art as inventory-style slots */
.drop-art { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }
.drop-item { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.slot {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-deep); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.drop-item:hover .slot { border-color: var(--orange); }
.drop-item .icon { image-rendering: pixelated; }
.drop-label { font-size: 11px; color: var(--text-muted); text-align: center; line-height: 1.25; max-width: 74px; }

/* per-map Kessho odds — tiled grid */
.kessho-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; margin-top: 4px;
}
.kessho-map {
  background: var(--bg-deep); border: 1px solid var(--border);
  border-radius: 6px; padding: 10px 12px;
}
.km-head {
  display: flex; justify-content: space-between; align-items: baseline;
  color: var(--orange); font-weight: bold;
  margin-bottom: 9px; padding-bottom: 7px; border-bottom: 1px solid var(--border);
}
.km-name { font-size: 13px; line-height: 1.2; }
.km-rate { color: var(--text); font-size: 12px; font-weight: normal; white-space: nowrap; flex: 0 0 auto; }
.km-dim { color: var(--text-muted); }
.kessho-map .drop-art { gap: 8px; margin: 0; }
.kessho-map .drop-item .icon { --s: 2; }
.kessho-map .slot { padding: 4px; }
.kessho-map .drop-label { font-size: 10px; }

/* Moc map tile drop type caption */
.moc-type { color: var(--text-muted); font-size: 11px; margin: -4px 0 8px; }

.land-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; align-items: start; }
.land-cols h4 { margin: 0 0 8px; color: var(--orange-bright); font-size: 13px; }
.land-cols p { margin: 6px 0 0; }
.land-foot { color: var(--text-muted); font-size: 12px; margin: 14px 0 0; border-top: 1px solid var(--border); padding-top: 9px; }
.drop-rules { color: #ddd8cc; margin: 6px 0 24px; padding-left: 20px; }
.drop-rules li { margin: 7px 0; }
@media (max-width: 620px) { .land-cols { grid-template-columns: 1fr; } }

/* element gateway grid: row 1 = element, row 2 = village */
.gateway-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 6px; margin: 10px 0; text-align: center;
}
.gateway-grid > div { display: flex; flex-direction: column; gap: 5px; }
.gw-village { font-size: 12px; color: var(--text); line-height: 1.3; }
.elem {
  display: inline-block; text-align: center;
  font-size: 11px; font-weight: bold; padding: 3px 6px;
  border-radius: 4px; color: #0a0a0a;
}
.elem.metal { background: var(--metal); }
.elem.wood  { background: var(--wood); }
.elem.water { background: var(--water); }
.elem.fire  { background: var(--fire); color: #fff; }
.elem.earth { background: var(--earth); color: #fff; }

.progression {
  margin-top: 18px; line-height: 2.2;
  border-color: var(--border-lt);
}
.prog-step {
  display: inline-block; padding: 3px 10px; margin: 0 2px;
  background: var(--bg-deep); border: 1px solid var(--border);
  border-radius: 4px; color: var(--text); font-size: 13px;
}

/* ---- how-to step cards ---- */
.step { position: relative; padding-left: 58px; }
.step-no {
  position: absolute; left: 16px; top: 16px;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--orange); color: #0a0a0a;
  font-family: var(--font-pixel); font-size: 12px; border-radius: 6px;
}
.step h3 { margin-top: 0; }
.step p { margin: 0; }

/* ---- quest markers (! and ?) ---- */
.qmark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 4px;
  font-family: var(--font-pixel); font-size: 12px; vertical-align: middle;
  color: #0a0a0a; text-shadow: none;
}
.q-new { background: var(--orange-bright); box-shadow: 0 0 12px rgba(255, 179, 71, 0.6); }
.q-done { background: var(--water); box-shadow: 0 0 12px rgba(66, 165, 245, 0.6); }

.legend { display: flex; align-items: center; gap: 14px; }
.legend .qmark { flex: 0 0 auto; width: 32px; height: 32px; font-size: 15px; }

/* ---- controls table ---- */
.controls td { border: none; padding: 7px 10px; }
.controls td:nth-child(2), .controls td:nth-child(4) { color: var(--text-muted); }
.controls tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }
