/* ============================================================
   GLOBAL RESETS & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.page-content {
  padding: 50px 150px 50px;
  max-width: 1600px;
  margin-inline: auto;
  width: 100%;
}

:root {
  --rust:        #c45c2a;
  --rust-light:  #e07040;
  --rust-dim:    #7a3a1a;
  --rust-faint:  rgba(196,92,42,0.08);
  --amber:       #d4a843;
  --bg:          #0c0b09;
  --bg-surface:  #131210;
  --bg-raised:   #1a1917;
  --bg-card:     #161513;
  --bg-hover:    rgba(196,92,42,0.08);
  --bg-active:   rgba(196,92,42,0.14);
  --line:        rgba(255,255,255,0.07);
  --line-strong: rgba(255,255,255,0.13);
  --text:        #ede8e0;
  --text-mid:    #9a9088;
  --text-dim:    #5a5550;
  --mono:        'DM Mono', monospace;
  --serif:       'DM Serif Display', Georgia, serif;
  --sans:        'DM Sans', system-ui, sans-serif;
  --t:           0.15s ease;
  --t-fast:      0.15s ease;
  --t-med:       0.22s ease;
  --gold:        #c45c2a;
  --gold-light:  #e07040;
  --gold-dim:    #7a3a1a;
  --gold-faint:  rgba(196,92,42,0.08);
  --bg-void:     #0c0b09;
  --bg-base:     #161513;
  --bg-panel:    #131210;
  --border:      rgba(255,255,255,0.07);
  --border-mid:  rgba(255,255,255,0.13);
}

html[data-theme="light"] {
  --rust:        #c45c2a;
  --rust-light:  #a84820;
  --rust-dim:    #d4825a;
  --rust-faint:  rgba(196,92,42,0.10);
  --amber:       #b8860b;
  --bg:          #f5f2ee;
  --bg-surface:  #ede9e3;
  --bg-raised:   #e4dfd7;
  --bg-card:     #eae6e0;
  --bg-hover:    rgba(196,92,42,0.08);
  --bg-active:   rgba(196,92,42,0.14);
  --line:        rgba(0,0,0,0.08);
  --line-strong: rgba(0,0,0,0.15);
  --text:        #1a1714;
  --text-mid:    #4a4540;
  --text-dim:    #8a8078;
  --border:      rgba(0,0,0,0.08);
  --border-mid:  rgba(0,0,0,0.15);
  --gold:        #c45c2a;
  --gold-light:  #a84820;
  --gold-dim:    #d4825a;
  --gold-faint:  rgba(196,92,42,0.10);
  --bg-void:     #f5f2ee;
  --bg-base:     #eae6e0;
  --bg-panel:    #ede9e3;
}

html, body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); }
::-webkit-scrollbar-thumb:hover { background: var(--rust-dim); }

/* ============================================================
   PAGE ANIMATION
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-content { animation: fadeUp 0.3s ease both; }

/* ============================================================
   PAGE TITLE (global .page-title used in several pages)
   ============================================================ */
.page-title {
  font-family: var(--serif) !important;
  font-size: clamp(26px, 3.5vw, 40px) !important;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 24px;
  line-height: 1.15;
}

/* ============================================================
   SHARED PAGE WRAP UTILITIES
   All old "xxx-wrap" classes use consistent padding
   ============================================================ */
.home-wrap,
.mm-wrap,
.gm-wrap,
.calc-wrap,
.si-wrap,
.contact-wrap,
.dailies-wrap,
.quests-wrap,
.hs-wrap,
.pengs-wrap,
.death-wrap,
.links-wrap,
.troll-wrap,
.tagging-wrap,
.pof-wrap,
.ext-wrap,
.gs-wrap,
.skills-wrap,
.splash-wrap,
.contributors-wrap,
.profile-wrap,
.api-wrap,
.dg-wrap,
.lb-page-wrap,
.users-wrap,
.dash-wrap,
.quest-page-wrap,
.error-wrap,
.sp-wrap {
  padding: 48px 48px 80px;
  max-width: 1800px;
}

@media (max-width: 860px) {
  .home-wrap, .mm-wrap, .gm-wrap, .calc-wrap, .si-wrap,
  .contact-wrap, .dailies-wrap, .quests-wrap, .hs-wrap,
  .pengs-wrap, .death-wrap, .links-wrap, .troll-wrap,
  .tagging-wrap, .pof-wrap, .ext-wrap, .gs-wrap, .skills-wrap,
  .splash-wrap, .contributors-wrap, .profile-wrap, .api-wrap,
  .dg-wrap, .lb-page-wrap, .users-wrap, .dash-wrap,
  .quest-page-wrap, .error-wrap, .sp-wrap {
    padding: 28px 20px 60px;
  }
}

/* ============================================================
   SHARED SECTION HEADING
   ============================================================ */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 48px 0 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.section-head-title {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--text);
}
.section-head-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  margin-left: auto;
}

/* Legacy section labels used by several pages */
.home-section-label,
.section-heading {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust-dim);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.home-section-label::after,
.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
  max-width: 120px;
}

/* ============================================================
   BUTTONS — shared across many pages
   ============================================================ */
.btn-primary,
.suggestion-btn,
.sm-submit,
.sp-submit,
.lm-submit,
.ext-btn,
.dg-btn,
.pof-btn,
.users-btn,
.dash-btn,
.calc-btn,
.wip-cta-btn,
.back-btn,
.error-home-btn,
.splash-btn,
.combat-update-btn,
.xp-table-btn,
.calc-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: none;
  border: 1px solid var(--rust-dim);
  color: var(--rust-light);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t), border-color var(--t), color var(--t);
  white-space: nowrap;
}
.btn-primary:hover,
.suggestion-btn:hover,
.sm-submit:hover,
.sp-submit:hover,
.ext-btn:hover,
.dg-btn:hover,
.pof-btn:hover,
.users-btn:hover,
.dash-btn:hover,
.calc-btn:hover,
.wip-cta-btn:hover,
.back-btn:hover,
.error-home-btn:hover,
.splash-btn:hover,
.combat-update-btn:hover:not(:disabled),
.xp-table-btn:hover,
.calc-trigger:hover {
  background: var(--bg-active);
  border-color: var(--rust);
  color: var(--text);
}

/* Filled primary variant */
.btn-primary {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}
.btn-primary:hover { background: var(--rust-light); border-color: var(--rust-light); }

/* Ghost / subtle variant */
.btn-ghost,
.lb-clear-btn,
.lb-cancel-btn,
.pof-btn.muted,
.ext-btn.muted,
.dg-btn.muted {
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--text-mid);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 10px 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.btn-ghost:hover,
.lb-clear-btn:hover,
.lb-cancel-btn:hover,
.pof-btn.muted:hover,
.ext-btn.muted:hover,
.dg-btn.muted:hover {
  color: var(--text);
  border-color: var(--rust-dim);
  background: var(--rust-faint);
}

/* Danger */
.logout-btn,
.delete-btn,
.pof-btn.danger,
.reset-btn {
  background: rgba(181,80,80,0.08);
  border: 1px solid rgba(181,80,80,0.3);
  color: #d07070;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 16px;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.logout-btn:hover,
.delete-btn:hover,
.pof-btn.danger:hover,
.reset-btn:hover {
  background: rgba(181,80,80,0.16);
  border-color: #d07070;
  color: #e09090;
}

/* Disabled */
.dash-btn:disabled,
.sp-submit:disabled,
.combat-update-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   INPUTS / SELECTS / TEXTAREAS
   ============================================================ */
.lm-input,
.sm-input,
.sm-textarea,
.sp-input,
.dash-input,
.users-input,
.calc-input,
.calc-select,
.pof-select,
.combat-search,
.splash-input,
.lb-search-row input,
.report-textarea {
  display: block;
  width: 100%;
  padding: 4px 12px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  transition: border-color var(--t);
}
.lm-input:focus, .sm-input:focus, .sm-textarea:focus, .sp-input:focus,
.dash-input:focus, .users-input:focus, .calc-input:focus, .calc-select:focus,
.pof-select:focus, .combat-search:focus, .splash-input:focus,
.lb-search-row input:focus, .report-textarea:focus {
  border-color: var(--rust-dim);
}
.lm-input::placeholder, .sm-input::placeholder, .sm-textarea::placeholder,
.sp-input::placeholder, .dash-input::placeholder, .users-input::placeholder,
.calc-input::placeholder, .splash-input::placeholder {
  color: var(--text-dim);
}

.sm-textarea, .report-textarea { resize: vertical; min-height: 100px; }

.calc-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a3a1a'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
}
.calc-select option { background: var(--bg-surface); }

.pof-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a3a1a'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
  cursor: pointer;
  min-width: 180px;
}
.pof-select:disabled { opacity: 0.4; cursor: not-allowed; }
.pof-select option { background: var(--bg-surface); }

/* Labels */
.sm-label,
.sp-label,
.dash-label,
.users-label,
.calc-label,
.pof-form-field label,
.wfe-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 5px;
  margin-top: 14px;
}
.sm-label:first-of-type,
.calc-label:first-of-type { margin-top: 0; }

/* ============================================================
   STATUS / RESULT MESSAGES
   ============================================================ */
.lm-msg,
.sm-message,
.sp-msg,
.users-result,
.pof-msg,
.dash-response {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 8px 12px;
  display: none;
  border: 1px solid transparent;
}
.lm-msg.success, .sm-message.success, .sp-msg.success,
.users-result.success, .pof-msg.success {
  display: block;
  color: #6ab57a;
  border-color: rgba(106,181,122,0.3);
  background: rgba(106,181,122,0.06);
}
.lm-msg.error, .sm-message.error, .sp-msg.error,
.users-result.error, .pof-msg.error {
  display: block;
  color: #e07070;
  border-color: rgba(224,112,112,0.3);
  background: rgba(224,112,112,0.06);
}
.dash-response.show { display: block; }

/* Combat status */
.combat-status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.combat-status.err { color: #e07070; }
.combat-status.ok  { color: #6ab57a; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay-base,
#suggestionModal,
#calcModal,
#xpTableModal,
#confirmModal,
#confirmationModal,
#messageModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}
#suggestionModal.show,
#confirmModal.show,
#confirmationModal.show,
#messageModal.show { display: flex; }
#calcModal.show { display: block; }
#xpTableModal.show { display: flex; align-items: flex-start; padding: 32px 16px; overflow-y: auto; }

.suggestion-modal-box,
.confirm-box,
.confirm-modal-box,
.message-box,
.xp-modal-box,
.calc-modal-box {
  width: 420px;
  max-width: 94vw;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--rust);
  padding: 32px;
  position: relative;
  animation: fadeUp 0.2s ease both;
}
.xp-modal-box { max-width: 900px; width: 100%; }
.calc-modal-box {
  width: 340px;
  position: fixed;
  top: 20%;
  left: 40%;
}

.suggestion-modal-box h2,
.confirm-box h2,
.confirm-modal-box h2 {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--text);
  margin-bottom: 16px;
}
.xp-modal-box h2 {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--text);
  margin-bottom: 20px;
}
.confirm-box p,
.confirm-modal-box p,
.message-box p {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 20px;
}

.sm-close,
.xp-modal-close,
.calc-close,
.modal-close-btn,
.lb-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: 1px solid var(--line);
  color: var(--text-mid);
  font-size: 16px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--t), border-color var(--t);
}
.sm-close:hover,
.xp-modal-close:hover,
.calc-close:hover,
.lb-modal-close:hover {
  color: #e07070;
  border-color: rgba(224,112,112,0.5);
}

.confirm-box-btns { display: flex; gap: 8px; justify-content: center; }

/* ============================================================
   TABLES — shared styles across many pages
   ============================================================ */
.hs-table,
.user-table,
.keys-table,
.xp-data-table,
.pof-table,
.mm-table,
.gm-bring-table,
.activity-table,
#challenges-table {
  width: 100%;
  border-collapse: collapse;
}

.hs-table thead th,
.user-table thead th,
.keys-table thead th,
.xp-data-table th,
.pof-table th,
.mm-table th,
.gm-bring-table th,
.activity-table thead th,
#challenges-table th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  font-weight: 400;
  white-space: nowrap;
}

.hs-table tbody tr,
.user-table tbody tr,
.keys-table tbody tr,
.activity-table tbody tr,
.pof-table tr.active { transition: background var(--t); }

.hs-table tbody tr:hover,
.user-table tbody tr:hover,
.keys-table tbody tr:hover,
.activity-table tbody tr:hover,
.pof-table tr.active:hover td,
.gm-bring-table tr:hover td { background: var(--bg-hover); }

.hs-table tbody td,
.user-table tbody td,
.keys-table tbody td,
.xp-data-table td,
.pof-table td,
.mm-table td,
.gm-bring-table td,
.activity-table tbody td,
#challenges-table td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text-mid);
  vertical-align: middle;
}

.hs-table tbody tr:hover { background: var(--bg-hover); }
.hs-table tbody tr.hs-highlight { background: var(--bg-active); }
.hs-table tbody td:first-child {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  text-align: center;
  width: 48px;
}
.hs-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.hs-table td.icon-cell { text-align: center; }
.hs-table td.icon-cell img { width: 20px; height: 20px; object-fit: contain; image-rendering: pixelated; vertical-align: middle; }

.hs-status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 24px 0;
  text-align: center;
}
.hs-status.err { color: #e07070; }

/* hs-btn row */
.hs-btn-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 32px; }
.hs-btn {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  color: var(--text-mid);
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
}
.hs-btn:hover { border-color: var(--text-dim); color: var(--text); }
.hs-btn.active { background: var(--bg-active); border-color: var(--rust); color: var(--rust-light); }

/* hs table title */
#hs-table-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust-light);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

/* ============================================================
   QUEST / GUIDE PAGES  (.quest-page-wrap, .gm-wrap, etc.)
   ============================================================ */
.quest-page-wrap h1,
.quest-page-wrap h2,
.gm-wrap h2,
.tagging-wrap h2,
.troll-wrap h2 {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin: 36px 0 16px;
}
.quest-page-wrap h1 { font-size: 26px; }

.quest-page-wrap h3,
.gm-wrap h3,
.tagging-wrap h3,
.troll-wrap h3 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust-dim);
  margin: 24px 0 12px;
}

.quest-page-wrap p,
.gm-wrap p,
.tagging-wrap p,
.troll-wrap p,
.death-wrap p {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 10px;
}

.quest-page-wrap strong,
.gm-wrap strong,
.tagging-wrap strong,
.troll-wrap strong { color: var(--text); }

.quest-page-wrap em,
.gm-wrap em,
.tagging-wrap em,
.troll-wrap em { color: var(--rust-dim); font-style: italic; }

.quest-note,
.gm-note,
.tagging-note,
.troll-note,
.death-note {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust-dim);
  background: var(--rust-faint);
  border: 1px solid rgba(196,92,42,0.2);
  border-left: 2px solid var(--rust-dim);
  padding: 10px 14px;
  margin: 0 0 24px;
  line-height: 1.7;
}
.quest-note strong,
.gm-note strong,
.tagging-note strong,
.troll-note strong,
.death-note strong { color: var(--rust-light); }

.quest-page-wrap ul,
.gm-wrap ul,
.tagging-wrap ul,
.troll-wrap ul,
.death-wrap ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quest-page-wrap ul li,
.gm-wrap ul li,
.tagging-wrap ul li,
.troll-wrap ul li {
  font-size: 15px;
  color: var(--text-mid);
  padding-left: 14px;
  border-left: 2px solid var(--line-strong);
  line-height: 1.6;
}
.quest-page-wrap ul li sup { display: block; font-size: 11px; color: var(--text-dim); margin-top: 3px; }

.quest-page-wrap a { color: var(--rust-light); text-decoration: none; transition: color var(--t); }
.quest-page-wrap a:hover { color: var(--text); }

.back-btn { margin-bottom: 28px; }

/* ============================================================
   EQUIPMENT / INVENTORY GRID (shared across quest & combat pages)
   ============================================================ */
.character-interface {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 48px;
  margin: 32px 0;
  flex-wrap: wrap;
}
.equipment-wrapper,
.inventory-wrapper,
.lb-equipment-wrapper,
.lb-inventory-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.char-label,
.lb-char-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
}

.equipment-grid,
.lb-equipment-grid {
  display: grid;
  grid-template-columns: repeat(3, 42px);
  grid-template-rows: repeat(6, 42px);
  grid-template-areas:
    "aura    .       pocket"
    ".       head    ."
    "cape    amulet  ammo"
    "weapon  body    shield"
    ".       legs    ."
    "gloves  boots   ring";
  gap: 4px 12px;
}
.lb-equipment-grid { grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(6, 44px); gap: 4px 14px; }

.slot,
.inventory-slot,
.lb-slot,
.lb-inv-slot {
  width: 42px;
  height: 42px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t);
  position: relative;
}
.lb-slot, .lb-inv-slot { width: 44px; height: 44px; cursor: pointer; position: relative; user-select: none; }
.slot:hover,
.inventory-slot:hover,
.lb-slot:hover,
.lb-inv-slot:hover { border-color: var(--rust-dim); }

.slot img,
.inventory-slot img,
.lb-slot img,
.lb-inv-slot img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  image-rendering: pixelated;
}
.slot a,
.inventory-slot a { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }

.inventory-grid,
.lb-inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, 42px);
  grid-template-rows: repeat(7, 42px);
  gap: 4px;
}
.lb-inventory-grid { grid-template-columns: repeat(4, 44px); grid-template-rows: repeat(7, 44px); }

/* Grid areas */
.aura{grid-area:aura} .pocket{grid-area:pocket} .head{grid-area:head}
.cape{grid-area:cape} .amulet{grid-area:amulet} .ammo{grid-area:ammo}
.weapon{grid-area:weapon} .body{grid-area:body} .shield{grid-area:shield}
.legs{grid-area:legs} .gloves{grid-area:gloves} .boots{grid-area:boots}
.ring{grid-area:ring}
.lb-slot.aura{grid-area:aura} .lb-slot.pocket{grid-area:pocket}
.lb-slot.head{grid-area:head} .lb-slot.cape{grid-area:cape}
.lb-slot.amulet{grid-area:amulet} .lb-slot.ammo{grid-area:ammo}
.lb-slot.weapon{grid-area:weapon} .lb-slot.body{grid-area:body}
.lb-slot.shield{grid-area:shield} .lb-slot.legs{grid-area:legs}
.lb-slot.gloves{grid-area:gloves} .lb-slot.boots{grid-area:boots}
.lb-slot.ring{grid-area:ring}

.skill-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

/* ============================================================
   VIDEO EMBED
   ============================================================ */
.video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin: 20px 0;
  border: 1px solid var(--line);
  background: var(--bg-surface);
}
.video-wrap iframe,
.video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================
   TOAST
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}
.toast {
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--rust);
  min-width: 260px;
  max-width: 380px;
  padding: 12px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.22s ease forwards;
}
.toast-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust-light);
  margin-bottom: 5px;
}
.toast-msg {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.5;
}

/* ============================================================
   HOME PAGE
   ============================================================ */
.home-rule {
  width: 100%;
  max-width: 400px;
  height: 2px;
  background: var(--rust);
  margin-bottom: 32px;
}
.home-headline {
  font-family: var(--serif);
  font-size: clamp(20px, 2.8vw, 30px);
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 8px;
}
.home-quote {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 44px;
}
.home-quote-bar {
  width: 2px;
  min-height: 100%;
  background: var(--line-strong);
  flex-shrink: 0;
  margin-top: 3px;
  align-self: stretch;
}
.home-quote-text { font-size: 18px; font-style: italic; color: var(--text-dim); line-height: 1.6; }
.home-quote-attr {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-top: 4px;
  opacity: 0.7;
}
.home-body { font-size: 15px; line-height: 1.85; color: var(--text-mid); }
.home-body p { margin-bottom: 16px; }

/* Home cards */
.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 36px 0;
}
.home-card {
  background: var(--bg-card);
  padding: 20px 18px;
  transition: background var(--t);
  text-decoration: none;
  display: block;
  cursor: pointer;
  animation: fadeUp 0.4s ease both;
}
.home-card:hover { background: var(--bg-hover); }
.home-card:nth-child(1){animation-delay:.05s}
.home-card:nth-child(2){animation-delay:.10s}
.home-card:nth-child(3){animation-delay:.15s}
.home-card:nth-child(4){animation-delay:.20s}
.home-card:nth-child(5){animation-delay:.25s}
.home-card-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust-light);
  margin-bottom: 6px;
}
.home-card-desc { font-size: 13px; color: var(--text-dim); line-height: 1.5; }

/* WIP notice */
.home-wip,
.skills-wip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--rust-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 32px;
}
.home-wip::before,
.skills-wip::before { content: '⚒'; font-size: 14px; opacity: 0.5; }

.home-wip-discord,
.skills-wip-discord {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  background: none;
  border: 1px solid #5865F2;
  color: #8b9cf0;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--t);
  flex-shrink: 0;
}
.home-wip-discord:hover,
.skills-wip-discord:hover {
  background: rgba(88,101,242,0.12);
  color: #a0aef5;
}

/* ============================================================
   CONTRIBUTORS PAGE
   ============================================================ */
.contributors-subtitle,
.hs-blurb {
  font-size: 15px;
  font-style: italic;
  color: var(--text-mid);
  margin-bottom: 28px;
  line-height: 1.6;
}
.contributors-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 36px;
}
.contributors-divider-line { flex: 1; height: 1px; background: var(--line-strong); }
.contributors-divider-gem {
  width: 6px; height: 6px;
  background: var(--rust-dim);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.contributors-stats {
  display: flex;
  border: 1px solid var(--line-strong);
  margin-bottom: 48px;
  overflow: hidden;
}
.stat-cell {
  flex: 1;
  padding: 16px 12px;
  text-align: center;
  border-right: 1px solid var(--line);
  background: var(--bg-surface);
}
.stat-cell:last-child { border-right: none; }
.stat-num {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--rust-light);
  display: block;
}
.stat-lbl { font-size: 13px; font-style: italic; color: var(--text-mid); margin-top: 2px; display: block; }

.founders-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 48px; }
a.founder-card-link { text-decoration: none; color: inherit; display: block; }
.founder-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--line-strong);
  position: relative;
  transition: border-color var(--t), background var(--t);
}
.founder-card:hover { border-color: var(--rust-dim); background: var(--bg-hover); }
.founder-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--rust);
}
.founder-avatar {
  width: 48px; height: 48px;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--rust-light);
  flex-shrink: 0;
  overflow: hidden;
}
.founder-avatar img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.founder-info { flex: 1; min-width: 0; }
.founder-rsn { font-family: var(--mono); font-size: 13px; color: var(--text); margin-bottom: 4px; letter-spacing: 0.05em; }
.founder-role { font-size: 14px; font-style: italic; color: var(--text-mid); margin-bottom: 10px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  color: var(--text-mid);
  background: var(--bg-raised);
  white-space: nowrap;
}
.tag-guide     { border-color: rgba(74,124,89,0.5);  color: #7ec99a; background: rgba(74,124,89,0.07); }
.tag-data      { border-color: rgba(60,90,160,0.5);  color: #8aaee8; background: rgba(60,90,160,0.07); }
.tag-verify    { border-color: rgba(120,80,180,0.5); color: #c4a0e8; background: rgba(120,80,180,0.07); }
.tag-tools     { border-color: var(--rust-dim);      color: var(--rust-light); background: var(--rust-faint); }
.tag-community { border-color: rgba(180,80,80,0.5);  color: #e89494; background: rgba(180,80,80,0.07); }

.contributors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin-bottom: 48px;
}
a.contributor-card-link { text-decoration: none; color: inherit; display: block; }
.contributor-card {
  padding: 18px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  transition: border-color var(--t), background var(--t);
}
.contributor-card:hover { border-color: var(--line-strong); background: var(--bg-hover); }
.contributor-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.contributor-avatar {
  width: 38px; height: 38px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--rust-dim);
  flex-shrink: 0;
  overflow: hidden;
}
.contributor-avatar img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.contributor-rsn { font-family: var(--mono); font-size: 12px; color: var(--text); letter-spacing: 0.05em; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contributor-since { font-size: 13px; font-style: italic; color: var(--text-dim); }

.wip-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  margin-top: 8px;
}
.wip-cta-text { font-size: 15px; font-style: italic; color: var(--text-mid); }
.wip-cta-text strong { color: var(--text); font-style: normal; font-weight: 600; }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  padding: 16px 20px;
}
.contact-item-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  min-width: 80px;
  flex-shrink: 0;
}
.contact-item-value { font-size: 15px; color: var(--text-mid); line-height: 1.5; }
.contact-item-value a { color: var(--rust-light); text-decoration: none; transition: color var(--t); }
.contact-item-value a:hover { color: var(--text); }
.contact-item-value code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--rust-light);
  background: var(--rust-faint);
  border: 1px solid rgba(196,92,42,0.2);
  padding: 2px 8px;
}
.suggestion-block {
  border: 1px solid var(--line);
  background: var(--bg-card);
  padding: 24px;
}
.suggestion-block h2 {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

/* ============================================================
   CALCULATORS PAGE
   ============================================================ */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 4px;
}
.calc-card { background: var(--bg-card); padding: 22px 20px 20px; }
.calc-card-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust-light);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.calc-result {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.7;
  display: none;
}
.calc-result.show { display: block; }
.calc-result strong { color: var(--rust-light); }
.calc-result .err { color: #e07070; }

.calc-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  font-size: 14px;
  color: var(--text-mid);
  cursor: pointer;
}
.calc-check-row input[type="checkbox"] { accent-color: var(--rust); width: 14px; height: 14px; cursor: pointer; }

/* XP table modal */
.xp-data-table th { text-align: center; }
.xp-data-table td { text-align: center; }
.xp-data-table tr:hover td { background: var(--bg-hover); color: var(--text); }
.xp-data-table td:first-child,
.xp-data-table td:nth-child(4),
.xp-data-table td:nth-child(7),
.xp-data-table td:nth-child(10) { color: var(--rust-dim); font-family: var(--mono); font-size: 11px; }

/* ============================================================
   MONEY-MAKING PAGE
   ============================================================ */
.method-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 4px;
}
.method-card { background: var(--bg-card); padding: 20px 22px; transition: background var(--t); }
.method-title { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rust-light); margin-bottom: 10px; }
.method-body { font-size: 15px; color: var(--text-mid); line-height: 1.75; }
.method-body p { margin-bottom: 8px; }
.method-body strong { color: var(--text); }
.method-body em { color: var(--text-dim); font-style: italic; }
.method-body ul { list-style: none; padding: 0; margin: 6px 0; }
.method-body ul li { padding: 3px 0 3px 16px; position: relative; color: var(--text-mid); }
.method-body ul li::before { content: '—'; position: absolute; left: 0; color: var(--rust-dim); font-size: 10px; top: 5px; }
.gp { color: var(--rust-light); font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; }
.req-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid rgba(196,92,42,0.2);
  color: var(--rust-dim);
  margin-left: 8px;
  vertical-align: middle;
}
.mm-table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 30px; }
.mm-table th { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); padding: 10px 14px; border-bottom: 1px solid var(--line-strong); text-align: left; white-space: nowrap; }
.mm-table td { padding: 10px 14px; color: var(--text-mid); border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.6; }
.mm-table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.mm-table td:last-child { font-family: var(--mono); font-size: 12px; color: var(--rust-dim); white-space: nowrap; }
.mm-table td strong { color: var(--rust-light); }

/* ============================================================
   DAILIES / ACTIVITY TABLE
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 40px 0 14px;
}
.activity-table tbody td:first-child {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--rust-light);
  white-space: nowrap;
  min-width: 160px;
}
.activity-table tbody td:nth-child(2) { font-size: 14px; color: var(--text-mid); line-height: 1.55; }
.activity-table tbody td:last-child { text-align: center; width: 60px; }
.activity-table input[type="checkbox"] {
  appearance: none;
  width: 18px; height: 18px;
  border: 1px solid var(--line-strong);
  background: rgba(0,0,0,0.3);
  cursor: pointer;
  position: relative;
  transition: border-color var(--t), background var(--t);
  vertical-align: middle;
}
.activity-table input[type="checkbox"]:hover { border-color: var(--rust-dim); }
.activity-table input[type="checkbox"]:checked { background: var(--bg-active); border-color: var(--rust); }
.activity-table input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--rust-light);
  line-height: 1;
}
.activity-table tbody tr.done td:first-child { color: var(--text-dim); text-decoration: line-through; text-decoration-color: var(--rust-dim); }
.activity-table tbody tr.done td:nth-child(2) { opacity: 0.4; }

#challenges-table th { text-align: center; }
#challenges-table td { background: var(--bg-raised); text-align: center; vertical-align: top; font-size: 14px; }
#challenges-table td:hover { background: var(--bg-hover); }
#challenges-table td img { display: block; margin: 0 auto 6px; image-rendering: pixelated; max-width: 36px; max-height: 36px; }
.challenges-note { font-size: 13px; color: var(--text-dim); font-style: italic; text-align: center; margin-top: 12px; }
.challenges-note strong { color: var(--rust-dim); }

/* ============================================================
   QUESTS & SKILLS LIST
   ============================================================ */
.quests-subtitle,
.skills-subtitle {
  font-size: 15px;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 28px;
}
.quest-list,
.skills-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.quest-item,
.skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 16px 20px;
  text-decoration: none;
  color: var(--text-mid);
  transition: background var(--t), color var(--t);
  gap: 12px;
}
.quest-item:hover,
.skill-item:hover { background: var(--bg-hover); color: var(--rust-light); }
.skill-item.skill-soon { pointer-events: none; opacity: 0.5; }
.quest-item-name,
.skill-item-name {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: inherit;
  transition: color var(--t);
}
.quest-item-arrow,
.skill-item-arrow {
  font-size: 14px;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: color var(--t), transform var(--t);
}
.quest-item:hover .quest-item-arrow,
.skill-item:hover .skill-item-arrow { color: var(--rust-dim); transform: translateX(3px); }
.skill-badge-soon {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust-dim);
  background: var(--rust-faint);
  border: 1px solid rgba(196,92,42,0.2);
  padding: 3px 7px;
  flex-shrink: 0;
}

/* ============================================================
   API PAGE
   ============================================================ */
.api-group { margin-bottom: 40px; }
.api-group-title {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1px;
}
.api-endpoints {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.api-endpoint { background: var(--bg-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.api-endpoint-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.api-endpoint-title { font-family: var(--mono); font-size: 11px; color: var(--text); }
.api-try-link {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust-dim);
  text-decoration: none;
  border: 1px solid var(--line-strong);
  padding: 4px 10px;
  transition: color var(--t), border-color var(--t), background var(--t);
  white-space: nowrap;
}
.api-try-link:hover { color: var(--text); border-color: var(--rust-dim); background: var(--bg-hover); }
.api-route {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--rust-light);
  background: var(--rust-faint);
  border: 1px solid rgba(196,92,42,0.2);
  padding: 5px 10px;
  display: inline-block;
}
.api-desc { font-size: 14px; color: var(--text-mid); line-height: 1.6; }

/* ============================================================
   HIGHSCORES — combat toolbar
   ============================================================ */
.combat-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.combat-search { flex: 1; min-width: 180px; max-width: 320px; }
.combat-filter-btn {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  color: var(--text-mid);
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
}
.combat-filter-btn:hover { border-color: var(--text-dim); color: var(--text); }
.combat-filter-btn.active { border-color: var(--rust); color: var(--rust-light); }
.build-select {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--t);
}
.build-select:focus { outline: none; border-color: var(--rust); color: var(--rust-light); }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.page-title-row { display: flex; align-items: center; justify-content: space-between; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.profile-stat {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  padding: 14px 20px;
  min-width: 140px;
  flex: 1;
}
.profile-stat-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mid); }
.profile-stat-value { font-family: var(--serif); font-size: 22px; color: var(--rust-light); }

.profile-section-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust-light);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin: 32px 0 20px;
}
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; margin-bottom: 8px; }
.skill-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  padding: 10px 12px;
  transition: background var(--t), border-color var(--t);
}
.skill-card:hover { background: var(--bg-hover); border-color: var(--rust-dim); }
.skill-info { flex: 1; min-width: 0; }
.skill-name { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skill-level { font-family: var(--serif); font-size: 18px; color: var(--text); line-height: 1.2; }
.skill-level.maxed { color: var(--rust-light); }
.skill-xp { font-size: 13px; color: var(--text-mid); font-variant-numeric: tabular-nums; }

.activity-list { display: flex; flex-direction: column; gap: 4px; }
.activity-item {
  display: flex; gap: 30px; align-items: baseline;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  padding: 10px 14px;
  transition: background var(--t);
}
.activity-item:hover { background: var(--bg-hover); }
.activity-date { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; color: var(--text-mid); white-space: nowrap; flex-shrink: 0; }
.activity-text { font-size: 15px; color: var(--rust-light); line-height: 1.5; }
.activity-detail { font-size: 14px; color: var(--text); margin-top: 2px; font-style: italic; }
.profile-status { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mid); padding: 48px 0; text-align: center; }
.profile-status.err { color: #e07070; }

#refresh-btn {
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--text-mid);
  cursor: pointer;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  transition: color var(--t), border-color var(--t);
}
#refresh-btn:hover:not(:disabled) { color: var(--text); border-color: var(--rust-dim); }
#refresh-btn:disabled { cursor: not-allowed; opacity: 0.4; }
#refresh-btn.spinning svg { animation: spin 0.8s linear infinite; }
@keyframes spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }

/* ============================================================
   SPLASH / PROFILE LOOKUP
   ============================================================ */
.splash-rule { width: 48px; height: 1px; background: var(--rust-dim); margin: 0 0 28px; }
.splash-title { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rust-light); margin-bottom: 10px; }
.splash-sub { font-size: 15px; color: var(--text-dim); font-style: italic; margin-bottom: 40px; }
.splash-form { display: flex; gap: 8px; width: 100%; max-width: 420px; }
.splash-err { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #e07070; margin-top: 14px; display: none; }
.splash-err.show { display: block; }
.splash-divider { width: 100%; max-width: 420px; display: flex; align-items: center; gap: 12px; margin: 32px 0 24px; }
.splash-divider-line { flex: 1; height: 1px; background: var(--line); }
.splash-divider-text { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.splash-recent { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 4px; }
.splash-recent-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
.splash-recent-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text-mid);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  transition: all var(--t);
}
.splash-recent-item:hover { border-color: var(--rust-dim); color: var(--rust-light); background: var(--bg-hover); }
.splash-recent-arrow { color: var(--text-dim); font-size: 14px; transition: color var(--t); }
.splash-recent-item:hover .splash-recent-arrow { color: var(--rust-dim); }
.splash-clear { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); background: none; border: none; cursor: pointer; margin-top: 10px; transition: color var(--t); }
.splash-clear:hover { color: #e07070; }

/* ============================================================
   PASSWORD PAGE
   ============================================================ */
.sp-wrap { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 90px); }
.sp-card { width: 400px; max-width: 100%; background: var(--bg-raised); border: 1px solid var(--line-strong); border-top: 2px solid var(--rust); padding: 36px; }
.sp-title { font-family: var(--serif); font-size: 22px; color: var(--text); text-align: center; margin-bottom: 8px; }
.sp-subtitle { font-size: 14px; color: var(--text-mid); text-align: center; font-style: italic; margin-bottom: 28px; }

/* ============================================================
   ERROR PAGES
   ============================================================ */
.error-code { font-family: var(--serif); font-size: 72px; color: var(--line-strong); line-height: 1; }
.error-title {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust-light);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  width: 100%;
}
.error-msg { font-size: 15px; color: var(--text-mid); line-height: 1.7; }

/* ============================================================
   USEFUL LINKS
   ============================================================ */
.link-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; text-decoration: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--line-strong);
  color: var(--text-mid);
  transition: background var(--t), border-color var(--t), color var(--t);
}
.link-btn:hover { background: var(--bg-hover); border-color: var(--rust-dim); color: var(--text); }
.link-btn.wiki { background: rgba(23,33,54,0.6); color: #8cabe6; border-color: #2e3f60; }
.link-btn.wiki:hover { background: rgba(34,46,69,0.9); border-color: #8cabe6; color: #b8ccf0; }
.link-btn.starfind { background: rgba(0,122,108,0.25); color: #b0eb00; border-color: #007a6c; }
.link-btn.starfind:hover { background: rgba(0,148,133,0.35); border-color: #00ccb8; color: #c8f520; }

.discord-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 4px;
}
.discord-card {
  background: var(--bg-card);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background var(--t);
  margin-bottom: 1px;          /* replaces the grid gap */
  border: 1px solid var(--line); /* each card gets its own border */
}
.discord-card:hover {
  background: var(--bg-hover);
}
.discord-card:last-child {
  margin-bottom: 0;
}
.discord-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-raised); border: 1px solid var(--line-strong); }
.discord-info { flex: 1; min-width: 0; }
.discord-name { font-family: var(--mono); font-size: 13px; letter-spacing: 0.05em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.discord-count { font-size: 13px; color: var(--text-mid); margin-top: 2px; font-style: italic; }
.discord-join {
  display: inline-flex; align-items: center;
  padding: 6px 14px;
  background: none;
  border: 1px solid var(--rust-dim);
  color: var(--rust-light);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; flex-shrink: 0;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.discord-join:hover { background: var(--bg-active); border-color: var(--rust); color: var(--text); }
.discord-card.empty { opacity: 0.3; pointer-events: none; }

/* ============================================================
   POF / ROOT (Player Owned Farms / Ranch Out of Time)
   ============================================================ */
.pof-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 32px;
}
.pof-stat { background: var(--bg-card); padding: 18px 16px; text-align: center; }
.pof-stat-num { font-family: var(--serif); font-size: 28px; color: var(--rust-light); line-height: 1; margin-bottom: 4px; }
.pof-stat-num.ready   { color: #6ab57a; }
.pof-stat-num.overdue { color: #e07070; }
.pof-stat-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.pof-form { background: var(--bg-surface); border: 1px solid var(--line-strong); padding: 20px 22px; margin-bottom: 24px; }
.pof-form-title { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rust-dim); margin-bottom: 16px; }
.pof-form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.pof-form-field { display: flex; flex-direction: column; gap: 5px; }

.pof-table-wrap { overflow-x: auto; }
.pof-countdown { font-family: var(--mono); font-size: 13px; color: var(--text); white-space: nowrap; }
.pof-table tr.row-ready td { background: rgba(106,181,122,0.04); }
.pof-table tr.row-ready td.pof-countdown { color: #6ab57a; font-weight: 700; }
.pof-table tr.row-overdue td { background: rgba(224,112,112,0.04); }
.pof-table tr.row-overdue td.pof-countdown { color: #e07070; font-weight: 700; }
.pof-table tr.row-completed td { opacity: 0.45; }
.pof-table tr.row-completed td.pof-countdown { opacity: 1; color: var(--text-dim); }

.pof-status {
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border: 1px solid var(--line); color: var(--text-dim); white-space: nowrap;
}
.pof-status.active  { color: var(--rust-dim); border-color: rgba(196,92,42,0.2); }
.pof-status.ready   { color: #6ab57a; border-color: rgba(106,181,122,0.3); }
.pof-status.overdue { color: #e07070; border-color: rgba(224,112,112,0.3); }
.pof-status.done    { color: var(--text-dim); border-color: var(--line); }

.pof-action {
  padding: 4px 10px; background: none;
  border: 1px solid var(--line-strong); color: var(--text-mid);
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.pof-action:hover { border-color: var(--rust-dim); color: var(--rust-light); background: var(--bg-hover); }
.pof-action.del { border-color: rgba(224,112,112,0.3); color: #e07070; }
.pof-action.del:hover { background: rgba(224,112,112,0.1); border-color: #e07070; }
.pof-action.done-btn { border-color: rgba(106,181,122,0.3); color: #6ab57a; }
.pof-action.done-btn:hover { background: rgba(106,181,122,0.08); border-color: #6ab57a; }
.pof-empty { padding: 28px; text-align: center; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }

/* ============================================================
   EXTENSION / DG PAGES
   ============================================================ */
.gs-img,
.ext-banner img { display: block; max-width: 100%; height: auto; margin: 16px 0 24px; border: 1px solid var(--line-strong); }
.gs-warn { border-left: 2px solid var(--rust-dim); padding: 12px 16px; background: var(--rust-faint); font-size: 15px; color: var(--text-mid); margin: 14px 0 18px; line-height: 1.65; }
.gs-warn strong { color: var(--rust-light); }
.gs-path { font-family: var(--mono); font-size: 12px; color: var(--rust-dim); background: rgba(0,0,0,0.2); border: 1px solid var(--line-strong); padding: 8px 14px; margin: 10px 0 6px; display: inline-block; }
.gs-path span { color: var(--rust-light); }
.img-center { display: flex; justify-content: center; margin: 16px 0; }

.ext-banner,
.dg-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--line-strong);
  background: var(--bg-surface);
  margin-bottom: 32px;
}
.ext-banner-left,
.dg-banner-left { display: flex; align-items: center; gap: 14px; }
.ext-indicator {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  background: var(--text-dim);
}
.ext-indicator.detected  { background: #6ab57a; box-shadow: 0 0 8px rgba(106,181,122,0.4); }
.ext-indicator.missing   { background: var(--rust-dim); box-shadow: 0 0 8px rgba(196,92,42,0.3); }
.dg-indicator { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: #6ab57a; box-shadow: 0 0 8px rgba(106,181,122,0.4); }
.ext-banner-status,
.dg-banner-status { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); }
.ext-banner-sub,
.dg-banner-sub { font-size: 13px; color: var(--text-dim); margin-top: 3px; }

.ext-section,
.dg-section { margin-bottom: 32px; }
.ext-section-title,
.dg-section-title {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.ext-section-body,
.dg-section-body { font-size: 15px; line-height: 1.7; color: var(--text-mid); }
.ext-section-body p,
.dg-section-body p { margin: 0 0 10px; }

.ext-steps,
.dg-steps {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  margin-top: 16px;
}
.ext-step,
.dg-step { background: var(--bg-surface); padding: 14px 18px; display: flex; gap: 16px; align-items: flex-start; }
.ext-step-num,
.dg-step-num { font-family: var(--mono); font-size: 11px; color: var(--rust-dim); letter-spacing: 0.05em; flex-shrink: 0; padding-top: 2px; width: 20px; }
.ext-step-text,
.dg-step-text { font-size: 14px; color: var(--text-mid); line-height: 1.6; }
.ext-step-text strong,
.dg-step-text strong { color: var(--text); font-weight: 600; }
.ext-step-text code,
.dg-step-text code { font-family: var(--mono); font-size: 12px; background: rgba(0,0,0,0.3); border: 1px solid var(--line); padding: 1px 6px; color: var(--rust-dim); }

.ext-features,
.dg-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.ext-feature,
.dg-feature { background: var(--bg-surface); padding: 18px 20px; }
.ext-feature-icon,
.dg-feature-icon { font-size: 22px; margin-bottom: 10px; }
.ext-feature-title,
.dg-feature-title { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); margin-bottom: 6px; }
.ext-feature-body,
.dg-feature-body { font-size: 13px; color: var(--text-mid); line-height: 1.6; }

.ext-github {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; border: 1px solid var(--line-strong); background: var(--bg-surface);
}
.ext-github-left { display: flex; align-items: center; gap: 16px; }
.ext-github-icon { font-size: 28px; flex-shrink: 0; }
.ext-github-title { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); margin-bottom: 4px; }
.ext-github-sub { font-size: 13px; color: var(--text-dim); }

.ext-note,
.dg-note {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border: 1px solid var(--line);
  background: var(--rust-faint); margin-top: 16px;
}
.ext-note-icon,
.dg-note-icon { color: var(--rust-dim); font-size: 18px; flex-shrink: 0; padding-top: 1px; }
.ext-note-text,
.dg-note-text { font-size: 13px; color: var(--text-mid); line-height: 1.6; }

.dg-launch {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--line); border: 1px solid var(--line-strong);
}
.dg-launch-row {
  background: var(--bg-surface);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px;
}
.dg-launch-left { display: flex; flex-direction: column; gap: 4px; }
.dg-launch-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); }
.dg-launch-url { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }

/* ============================================================
   PENGUINS PAGE
   ============================================================ */
.peng-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.peng-name-row td {
  background: rgba(148,170,230,0.12);
  border-left: 2px solid #7a9ed0;
  padding: 9px 14px;
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
  border-bottom: none;
}
.peng-name-row td em { color: var(--text-mid); font-weight: 400; }
.peng-name-row td strong { color: var(--rust-light); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; }
.peng-loc-row td { padding: 8px 14px 12px; color: var(--text-mid); font-size: 14px; border-bottom: 1px solid var(--line); background: var(--bg-card); }
.peng-loc-row td.peng-time { font-size: 12px; color: var(--text-dim); font-style: italic; }
.peng-loc-row td.peng-check { width: 48px; text-align: center; vertical-align: middle; }
.peng-name-row.highlight td { background: rgba(128,216,93,0.10); border-left-color: #80d85d; }
.peng-loc-row.highlight td  { background: rgba(128,216,93,0.05); }
.peng-checkbox { display: block; margin: 0 auto; transform: scale(1.3); accent-color: var(--rust); cursor: pointer; }
.bear-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--rust-dim); margin: 28px 0 10px;
  display: flex; align-items: center; gap: 10px;
}
.bear-label::after { content: ''; flex: 1; height: 1px; background: var(--line); max-width: 160px; }
.peng-source {
  margin-bottom: 24px; padding: 12px 16px;
  border-left: 2px solid var(--line-strong);
  font-size: 14px; color: var(--text-dim); font-style: italic; line-height: 1.6;
}
.peng-source a { color: var(--rust-dim); text-decoration: none; border-bottom: 1px solid rgba(196,92,42,0.2); transition: color var(--t), border-color var(--t); }
.peng-source a:hover { color: var(--rust-light); border-bottom-color: var(--rust-dim); }
.peng-source code { font-family: var(--mono); font-size: 12px; background: rgba(0,0,0,0.3); padding: 1px 5px; color: var(--text-mid); }

#calcModal { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 2000; display: none; }
#calcModal.show { display: block; }
.calc-modal-box h3 { font-family: var(--serif); font-size: 18px; color: var(--text); margin-bottom: 20px; text-align: center; }
.calc-submit { display: block; width: 100%; }

/* ============================================================
   CROESUS / ADVANCED GUIDE COMPONENTS
   ============================================================ */
.gm-stats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 8px;
}
.gm-stat { background: var(--bg-card); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.gm-stat-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.gm-stat-val { font-family: var(--mono); font-size: 13px; color: var(--rust-light); }

.gm-bring-table th { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rust-dim); }
.gm-bring-table td:first-child { font-family: var(--mono); font-size: 11px; color: var(--rust-dim); white-space: nowrap; width: 1%; }

.gm-attacks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 8px; }
.gm-attack { background: var(--bg-card); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; transition: background var(--t); }
.gm-attack:hover { background: var(--bg-hover); }
.gm-attack-name { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rust-light); display: flex; align-items: center; gap: 8px; }
.gm-attack-name span { font-size: 16px; line-height: 1; }
.gm-attack-desc { font-size: 14px; color: var(--text-mid); line-height: 1.6; }

.gm-rotation { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.gm-rot-item { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 10px; border: 1px solid; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.gm-rot-item.red-bomb    { border-color: rgba(181,80,80,.5);  color: #d06060; background: rgba(181,80,80,.07); }
.gm-rot-item.green-bomb  { border-color: rgba(80,160,80,.4);  color: #70b870; background: rgba(80,160,80,.07); }
.gm-rot-item.yellow-bomb { border-color: rgba(196,92,42,.4);  color: var(--rust-light); background: var(--rust-faint); }
.gm-rot-item.blue-bomb   { border-color: rgba(80,120,200,.4); color: #7090d8; background: rgba(80,120,200,.07); }
.gm-rot-item.stun        { border-color: rgba(200,130,50,.4); color: #d08840; background: rgba(200,130,50,.07); }
.gm-rot-item.fairy-ring  { border-color: rgba(160,80,200,.4); color: #b070d8; background: rgba(160,80,200,.07); }
.gm-rot-item.slimes      { border-color: rgba(100,160,100,.35); color: #80b880; background: rgba(100,160,100,.06); }
.gm-rot-item.sticky      { border-color: rgba(140,110,60,.4); color: #a88840; background: rgba(140,110,60,.07); }
.gm-rot-item.fungi-energy{ border-color: rgba(196,92,42,.5);  color: var(--rust-light); background: rgba(196,92,42,.08); }
.gm-rot-sep { color: var(--text-dim); font-size: 14px; display: flex; align-items: center; padding: 0 2px; }

.gm-steps { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 8px; counter-reset: gm-step; }
.gm-step {
  background: var(--bg-card); padding: 14px 18px 14px 58px;
  position: relative; counter-increment: gm-step;
  font-size: 14px; color: var(--text-mid); line-height: 1.65;
  transition: background var(--t);
}
.gm-step:hover { background: var(--bg-hover); }
.gm-step::before {
  content: counter(gm-step);
  position: absolute; left: 18px; top: 14px;
  font-family: var(--mono); font-size: 10px; color: var(--rust-dim);
  border: 1px solid rgba(196,92,42,0.2);
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
}
.gm-step strong { color: var(--text); }

.gm-rewards { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 8px; }
.gm-reward { background: var(--bg-card); padding: 12px 18px; display: flex; align-items: flex-start; gap: 12px; font-size: 13px; color: var(--text-mid); line-height: 1.6; transition: background var(--t); }
.gm-reward:hover { background: var(--bg-hover); }
.gm-reward-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.gm-tips { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 8px; }
.gm-tip { background: var(--bg-card); padding: 12px 18px; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-mid); line-height: 1.65; transition: background var(--t); }
.gm-tip:hover { background: var(--bg-hover); }
.gm-tip-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.gm-tip strong { color: var(--text); }

.gm-author {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); border-top: 1px solid var(--line); padding-top: 20px; margin-top: 48px;
}
.gm-author span { color: var(--rust-dim); }

.gm-hero {
  width: 100%; border: 1px solid var(--line); background: var(--bg-surface);
  display: flex; align-items: center; justify-content: center; padding: 16px; margin-bottom: 32px;
}
.gm-hero img { max-width: 100%; height: auto; display: block; }
.gm-img-wrap { margin: 24px 0; border: 1px solid var(--line); background: var(--bg-surface); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gm-img-wrap img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   TAGGING PAGE
   ============================================================ */
.req-block { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.req-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-mid); }
.req-row strong { font-family: var(--mono); font-size: 13px; color: var(--rust-light); }

.accuracy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 16px 0 24px; }
.accuracy-card { background: var(--bg-surface); padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.accuracy-card img { max-width: 100%; height: auto; image-rendering: pixelated; display: block; }
.accuracy-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rust-dim); text-align: center; line-height: 1.5; }
.accuracy-label strong { color: var(--rust-light); }

.lightbox-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.88); z-index: 9999; cursor: pointer; align-items: center; justify-content: center;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img { max-width: 90vw; max-height: 90vh; object-fit: contain; box-shadow: 0 8px 40px rgba(0,0,0,0.6); cursor: default; display: block; }
.lightbox-close { position: absolute; top: 20px; right: 28px; color: white; font-size: 2.5rem; cursor: pointer; line-height: 1; user-select: none; }

/* ============================================================
   SPECIAL ITEMS
   ============================================================ */
.si-list { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 4px; }
.si-card { background: var(--bg-card); padding: 20px 22px; transition: background var(--t); }
.si-title { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rust-light); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.si-title a { color: inherit; text-decoration: none; transition: color var(--t); }
.si-title a:hover { color: var(--text); }
.si-title-wiki { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 7px; border: 1px solid rgba(196,92,42,0.2); color: var(--rust-dim); text-decoration: none; transition: border-color var(--t), color var(--t); flex-shrink: 0; }
.si-title-wiki:hover { border-color: var(--rust-dim); color: var(--rust-light); }
.si-body { font-size: 14px; color: var(--text-mid); line-height: 1.75; }
.si-body p { margin-bottom: 8px; }
.si-body strong { color: var(--text); }
.si-body em { color: var(--text-dim); font-style: italic; }
.si-body a { color: var(--rust-dim); text-decoration: none; border-bottom: 1px solid rgba(196,92,42,0.2); transition: color var(--t), border-color var(--t); }
.si-body a:hover { color: var(--rust-light); border-bottom-color: var(--rust-dim); }
.si-list-items { list-style: none; padding: 0; margin: 8px 0 0; }
.si-list-items li { padding: 5px 0 5px 18px; position: relative; color: var(--text-mid); font-size: 14px; line-height: 1.6; }
.si-list-items li::before { content: '—'; position: absolute; left: 0; color: var(--rust-dim); font-size: 10px; top: 7px; }
.si-req { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rust-dim); border: 1px solid rgba(196,92,42,0.2); padding: 3px 10px; margin: 6px 0 4px; }
.si-note { font-size: 14px; color: var(--text-dim); font-style: italic; margin-top: 8px; padding-left: 12px; border-left: 1px solid var(--line-strong); line-height: 1.6; }
.si-note a { color: var(--rust-dim); text-decoration: none; border-bottom: 1px solid rgba(196,92,42,0.2); }
.si-note a:hover { color: var(--rust-light); border-bottom-color: var(--rust-dim); }
.si-steps { list-style: none; padding: 0; margin: 8px 0 0; counter-reset: steps; }
.si-steps li { counter-increment: steps; padding: 5px 0 5px 28px; position: relative; color: var(--text-mid); font-size: 14px; line-height: 1.6; }
.si-steps li::before { content: counter(steps); position: absolute; left: 0; font-family: var(--mono); font-size: 9px; color: var(--rust-dim); border: 1px solid rgba(196,92,42,0.2); width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; top: 6px; }
.si-sub { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rust-dim); margin: 16px 0 8px; }
.si-sub-notes { list-style: none; margin-top: 4px; }
.si-sub-notes li { padding-left: 20px; position: relative; color: var(--text-mid); font-size: 13px; line-height: 1.6; }
.si-sub-notes li::before { content: '—'; color: var(--rust-dim); position: absolute; left: 0; }

/* ============================================================
   NEWS PAGE
   ============================================================ */
.news-filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.news-filter-btn { background: none; border: 1px solid var(--line-strong); color: var(--text-mid); font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 12px; cursor: pointer; transition: border-color var(--t), color var(--t), background var(--t); }
.news-filter-btn:hover { border-color: var(--rust-dim); color: var(--rust-light); background: var(--bg-hover); }
.news-filter-btn.active { border-color: var(--rust); color: var(--rust-light); background: var(--bg-active); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.news-card { display: flex; flex-direction: column; background: var(--bg-surface); text-decoration: none; transition: background var(--t); cursor: pointer; }
.news-card:hover { background: var(--bg-raised); }
.news-card-img { width: 100%; height: 160px; object-fit: cover; border-bottom: 1px solid var(--line); display: block; }
.news-card-img-placeholder { width: 100%; height: 160px; background: var(--bg-raised); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.news-card-img-placeholder svg { width: 28px; height: 28px; color: var(--text-dim); stroke: currentColor; }
.news-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.news-card-tag { display: inline-block; font-family: var(--mono); font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; padding: 2px 7px; border: 1px solid var(--rust-dim); color: var(--rust-dim); margin-bottom: 8px; align-self: flex-start; }
.news-card-title { font-family: var(--serif); font-size: 16px; color: var(--text); line-height: 1.5; margin-bottom: 8px; }
.news-card:hover .news-card-title { color: var(--rust-light); }
.news-card-excerpt { font-size: 13px; color: var(--text-mid); font-style: italic; line-height: 1.6; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-date { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.news-empty { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); padding: 40px 0; text-align: center; }

/* ============================================================
   ADMIN / DASHBOARD SPECIFIC
   ============================================================ */
.users-section,
.dash-section {
  border: 1px solid var(--line);
  background: var(--bg-card);
}
.users-section-header,
.dash-section-header {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust-light);
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.users-section-body,
.dash-section-body { padding: 20px 18px; display: flex; flex-direction: column; gap: 12px; }

.user-table tbody td:first-child { font-family: var(--mono); font-size: 11px; color: var(--rust-light); }
.keys-table tbody tr.inactive { opacity: 0.45; }
.keys-table tbody td { font-size: 13px; }

.api-key-cell { cursor: pointer; position: relative; }
.api-key-cell code { font-family: var(--mono); font-size: 12px; color: transparent; background: var(--bg-raised); padding: 2px 6px; border: 1px solid var(--line); transition: color var(--t); user-select: none; }
.api-key-cell:hover code { color: var(--rust-light); }
.api-key-cell::after { content: 'Click to copy'; position: absolute; bottom: -1.4em; left: 0; font-size: 11px; color: var(--text-dim); white-space: nowrap; pointer-events: none; }

.key-action-btn { background: none; border: 1px solid var(--line); color: var(--text-mid); padding: 4px 8px; cursor: pointer; font-size: 13px; margin: 0 2px; transition: border-color var(--t), color var(--t); }
.key-action-btn:hover:not(:disabled) { border-color: var(--rust-dim); color: var(--rust-light); }
.key-action-btn:disabled { opacity: 0.3; cursor: default; }

.table-loading,
.keys-loading {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim); padding: 16px 0; text-align: center;
}

.dash-check-row { display: flex; gap: 20px; align-items: center; }
.dash-check-label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-mid); cursor: pointer; }
.dash-check-label input[type="checkbox"] { appearance: none; width: 16px; height: 16px; border: 1px solid var(--line-strong); background: rgba(0,0,0,0.3); cursor: pointer; position: relative; transition: border-color var(--t), background var(--t); }
.dash-check-label input[type="checkbox"]:checked { background: var(--bg-active); border-color: var(--rust); }
.dash-check-label input[type="checkbox"]:checked::after { content: '✓'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: var(--mono); font-size: 10px; color: var(--rust-light); line-height: 1; }

/* Admin modals */
.admin-fab {
  position: fixed; top: 28px; right: 240px; z-index: 900;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 10px 18px; background: var(--bg-surface); border: 1px solid var(--line);
  color: var(--text-mid); cursor: pointer; transition: all var(--t); white-space: nowrap; display: none;
}
.admin-fab:hover { border-color: var(--rust); color: var(--rust-light); }
.admin-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.admin-modal { background: var(--bg-surface); border: 1px solid var(--line); border-top: 2px solid var(--rust); padding: 28px 32px; width: 100%; max-width: 440px; position: relative; }
.admin-modal-title { font-family: var(--serif); font-size: 20px; color: var(--text); margin-bottom: 20px; }
.admin-modal label { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mid); margin-bottom: 6px; margin-top: 14px; }
.admin-modal input, .admin-modal select { width: 100%; background: var(--bg-raised); border: 1px solid var(--line-strong); color: var(--text); font-family: var(--mono); font-size: 11px; padding: 8px 10px; outline: none; box-sizing: border-box; transition: border-color var(--t); }
.admin-modal input:focus, .admin-modal select:focus { border-color: var(--rust-dim); }
.admin-modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--text-dim); font-size: 18px; cursor: pointer; line-height: 1; }
.admin-modal-close:hover { color: var(--text); }
.admin-modal-actions { display: flex; gap: 8px; margin-top: 20px; justify-content: flex-end; }
.admin-status { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 10px; min-height: 16px; }
.admin-section-divider { border: none; border-top: 1px solid var(--line); margin: 20px 0 4px; }
.admin-danger { border-color: #e07070 !important; color: #e07070 !important; }
.admin-danger:hover { background: rgba(224,112,112,0.1) !important; }

/* Report FAB */
.report-fab { position: fixed; top: 28px; right: 72px; z-index: 900; font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; padding: 10px 18px; background: var(--bg-surface); border: 1px solid var(--line); color: var(--text-mid); cursor: pointer; transition: all var(--t); white-space: nowrap; }
.report-fab:hover { border-color: #e07070; color: #e07070; }
.report-chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.report-chip { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 10px; background: var(--bg-surface); border: 1px solid var(--line); color: var(--text-mid); cursor: pointer; transition: all var(--t); }
.report-chip:hover { border-color: var(--text-dim); color: var(--text); }
.report-chip.active { border-color: var(--rust); color: var(--rust-light); }

/* ============================================================
   STARS PAGE
   ============================================================ */
.rs-map-page { display: flex; flex-direction: column; height: 100%; background: #0e0e0f; }
.rs-toolbar { display: flex; align-items: center; gap: 12px; padding: 6px 16px; background: var(--bg-surface); border-bottom: 1px solid var(--line-strong); flex-shrink: 0; flex-wrap: wrap; }
.rs-toolbar-title { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rust-light); white-space: nowrap; }
.rs-divider { width: 1px; height: 18px; background: var(--line-strong); flex-shrink: 0; }
.rs-ctrl-group { display: flex; align-items: center; gap: 16px; }
.rs-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); white-space: nowrap; }
.rs-plane-group { display: flex; gap: 2px; }
.rs-btn { height: 26px; padding: 0 10px; font-family: var(--mono); font-size: 11px; background: #1e1e22; color: #6b6b72; border: 1px solid #2e2e34; border-radius: 3px; cursor: pointer; transition: all 0.15s ease; display: flex; align-items: center; justify-content: center; white-space: nowrap; }
.rs-btn:hover { background: #2a2a30; color: var(--rust-light); border-color: var(--rust-dim); }
.rs-btn.active { background: #2a1a10; color: var(--rust-light); border-color: var(--rust-dim); }
.rs-coords { font-family: var(--mono); font-size: 12px; color: #ffffff; white-space: nowrap; margin-left: auto; letter-spacing: 0.04em; }
.rs-status { font-family: var(--mono); font-size: 11px; color: #4a4a52; letter-spacing: 0.05em; white-space: nowrap; }
#rs-map { flex: 1; width: 100%; min-height: 0; background: #000000; }

/* ============================================================
   LOADOUT BUILDER
   ============================================================ */
.lb-page-wrap .loadout-builder { display: flex; flex-direction: column; align-items: center; width: 100%; }
.lb-search { width: 100%; max-width: 600px; background: var(--bg-surface); border: 1px solid var(--line-strong); border-top: 2px solid var(--rust-dim); padding: 16px 20px 14px; margin-bottom: 20px; position: relative; }
.lb-search-title { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rust-dim); margin-bottom: 9px; }
.lb-search-row { display: flex; gap: 8px; }
.lb-search-row button { background: var(--rust-faint); border: 1px solid var(--rust-dim); color: var(--rust-light); font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; padding: 0 16px; cursor: pointer; white-space: nowrap; transition: background var(--t), border-color var(--t); }
.lb-search-row button:hover { background: rgba(196,92,42,0.2); border-color: var(--rust); }

.lb-results { position: absolute; top: calc(100% + 2px); left: 0; right: 0; background: var(--bg-raised); border: 1px solid var(--line-strong); border-top: 2px solid var(--rust-dim); z-index: 200; max-height: 300px; overflow-y: auto; display: none; }
.lb-results.open { display: block; }
.lb-result-item { display: flex; align-items: center; gap: 10px; padding: 7px 12px; cursor: pointer; border-bottom: 1px solid var(--line); transition: background var(--t); }
.lb-result-item:last-child { border-bottom: none; }
.lb-result-item:hover { background: var(--bg-hover); }
.lb-r-thumb { width: 30px; height: 30px; flex-shrink: 0; background: var(--bg-raised); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.lb-r-thumb img { max-width: 26px; max-height: 26px; object-fit: contain; image-rendering: pixelated; }
.lb-r-name { font-family: var(--mono); font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-r-desc { font-size: 12px; color: var(--text-mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.lb-r-msg { padding: 11px 14px; color: var(--text-dim); font-style: italic; font-size: 13px; }

.lb-slot.placing,
.lb-inv-slot.placing { border-color: var(--rust); box-shadow: 0 0 10px rgba(196,92,42,0.4), inset 0 0 8px rgba(196,92,42,0.1); animation: lb-pulse 0.9s ease-in-out infinite alternate; }
@keyframes lb-pulse { from{box-shadow:0 0 6px rgba(196,92,42,.3),inset 0 0 5px rgba(196,92,42,.07)} to{box-shadow:0 0 16px rgba(196,92,42,.6),inset 0 0 12px rgba(196,92,42,.15)} }

.lb-status-bar { width: 100%; max-width: 820px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); text-align: center; margin-top: 16px; }
.lb-action-bar { width: 100%; max-width: 820px; display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.lb-export-btn { background: var(--rust-faint); border: 1px solid var(--rust-dim); color: var(--rust-light); font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; padding: 9px 26px; cursor: pointer; text-transform: uppercase; transition: background var(--t), border-color var(--t), color var(--t); }
.lb-export-btn:hover { background: rgba(196,92,42,0.2); border-color: var(--rust); color: var(--text); }

.lb-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 500; display: none; align-items: center; justify-content: center; }
.lb-modal-overlay.open { display: flex; }
.lb-modal { background: var(--bg-surface); border: 1px solid var(--line-strong); border-top: 2px solid var(--rust-dim); width: min(760px, 95vw); max-height: 85vh; display: flex; flex-direction: column; padding: 20px 22px 18px; gap: 12px; }
.lb-modal-header { display: flex; align-items: center; justify-content: space-between; }
.lb-modal-header h2 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rust-light); }
.lb-modal textarea { flex: 1; min-height: 320px; background: var(--bg-raised); border: 1px solid var(--line-strong); color: #9abf8a; font-family: var(--mono); font-size: 12px; line-height: 1.5; padding: 12px 14px; outline: none; resize: vertical; transition: border-color var(--t); }
.lb-modal textarea:focus { border-color: var(--rust-dim); }
.lb-modal-footer { display: flex; gap: 8px; justify-content: flex-end; }
.lb-copy-btn { background: var(--rust-faint); border: 1px solid var(--rust-dim); color: var(--rust-light); font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; padding: 7px 18px; cursor: pointer; text-transform: uppercase; transition: background var(--t), border-color var(--t); }
.lb-copy-btn:hover { background: rgba(196,92,42,0.2); border-color: var(--rust); }
.lb-copy-btn.copied { color: #7abf6a; border-color: #4a8a40; }

.lb-tooltip { position: fixed; background: var(--bg-raised); border: 1px solid var(--line-strong); border-top: 2px solid var(--rust-dim); padding: 7px 11px; pointer-events: none; z-index: 1000; display: none; max-width: 220px; }
.lb-tooltip.show { display: block; }
.lb-tt-name { font-family: var(--mono); font-size: 11px; color: var(--rust-light); margin-bottom: 2px; }
.lb-tt-hint { font-size: 12px; font-style: italic; color: var(--text-dim); }

.lb-qty { position: absolute; top: 1px; left: 2px; font-family: var(--mono); font-size: 9px; font-weight: bold; color: #ffff00; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; pointer-events: none; z-index: 5; line-height: 1; }
.quantity { position: absolute; top: 1px; left: 2px; font-family: var(--mono); font-size: 9px; font-weight: bold; color: #ffff00; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; pointer-events: none; z-index: 5; line-height: 1; }

.lb-qty-popup { position: fixed; background: var(--bg-raised); border: 1px solid var(--rust-dim); border-top: 2px solid var(--rust); padding: 8px 10px; z-index: 600; display: none; flex-direction: column; gap: 6px; min-width: 160px; }
.lb-qty-popup.open { display: flex; }
.lb-qty-popup-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rust-dim); }
.lb-qty-popup input[type="number"] { background: var(--bg-raised); border: 1px solid var(--line-strong); color: #ffff00; font-family: var(--mono); font-size: 14px; padding: 5px 8px; outline: none; width: 100%; box-sizing: border-box; -moz-appearance: textfield; }
.lb-qty-popup input[type="number"]:focus { border-color: var(--rust); }
.lb-qty-popup-hint { font-size: 11px; font-style: italic; color: var(--text-dim); }

/* Mining-specific */
.mining-two-col,
.woodcutting-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 16px; }
.mining-method-card,
.woodcutting-method-card { background: var(--bg-raised); border: 1px solid var(--line); padding: 14px 16px; }
.mining-method-card:hover,
.woodcutting-method-card:hover { border-color: var(--rust-dim); }
.mining-method-card h3,
.woodcutting-method-card h3 { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rust-dim); margin: 0 0 10px; }
.mining-badge,
.woodcutting-badge { font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; color: #6ab57a; border: 1px solid rgba(106,181,122,0.4); padding: 3px 8px; display: inline-block; margin-top: 8px; }
.woodcutting-badge-rec { font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rust-light); border: 1px solid rgba(196,92,42,0.4); padding: 3px 8px; display: inline-block; margin-top: 8px; }
.woodcutting-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-bottom: 24px; }
.woodcutting-card { background: var(--bg-raised); border: 1px solid var(--line); padding: 14px 16px; position: relative; overflow: hidden; }
.woodcutting-card:hover { border-color: var(--rust-dim); }
.woodcutting-card-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.woodcutting-card-range { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mid); margin-bottom: 5px; }
.woodcutting-card-ore { font-size: 14px; color: var(--text); margin-bottom: 6px; }
.woodcutting-card-xp { font-size: 12px; color: var(--text-mid); margin-bottom: 4px; }
.woodcutting-card-xp strong { color: var(--text); }
.woodcutting-card-note { font-size: 11px; color: var(--text-dim); line-height: 1.5; }
.perk-card { background: var(--bg-raised); border: 1px solid var(--line); padding: 14px 16px; margin-bottom: 8px; }
.perk-card:hover { border-color: var(--rust-dim); }
.perk-name { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--rust-light); margin-bottom: 4px; }
.perk-desc { font-size: 13px; color: var(--text-mid); line-height: 1.6; }

/* RS Map toggle button */
.rsmap-toggle-btn { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; background: none; border: 1px solid var(--line-strong); color: var(--rust-light); font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; transition: border-color var(--t), background var(--t), color var(--t); }
.rsmap-toggle-btn:hover { border-color: var(--rust); background: var(--rust-faint); color: var(--text); }

/* Sidebar search (stars/layout-map) */
#search-input { width: 100%; background: var(--bg); border: 1px solid var(--line-strong); color: var(--rust-light); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; padding: 7px 14px; outline: none; transition: border-color var(--t); }
#search-input:focus { border-color: var(--rust); }
#search-input::placeholder { color: var(--text-dim); }

/* Quest divider */
.quest-divider { border: none; border-top: 1px solid var(--line); margin: 48px 0 0; }

/* Death page specific */
.death-section { margin-bottom: 40px; }
.death-section h2 { font-family: var(--serif); font-size: 18px; color: var(--text); padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.death-wrap li { font-family: var(--mono); font-size: 12px; color: var(--rust-light); margin-bottom: 4px; }
.cost-row { display: flex; align-items: baseline; gap: 10px; margin: 4px 0; font-size: 15px; color: var(--text-mid); }
.cost-row strong { font-family: var(--mono); font-size: 12px; color: var(--rust-light); }
.death-img-wrap { margin: 20px 0; border: 1px solid var(--line); background: var(--bg-surface); display: flex; align-items: center; justify-content: center; padding: 16px; }
.death-img-wrap img { max-width: 100%; width: 560px; height: auto; display: block; }

/* ============================================================
   RESPONSIVE OVERRIDES
   ============================================================ */
@media (max-width: 680px) {
  .contributors-stats { flex-wrap: wrap; }
  .stat-cell { flex: 1 1 40%; border-bottom: 1px solid var(--line); }
  .contributors-grid { grid-template-columns: 1fr; }
  .wip-cta { flex-direction: column; align-items: flex-start; }
  .mining-two-col,
  .woodcutting-two-col { grid-template-columns: 1fr; }
  .gm-bring-table { display: block; overflow-x: auto; }
  .api-endpoint-header { flex-direction: column; align-items: flex-start; }
  .pof-stats { grid-template-columns: 1fr 1fr; }
  .pof-form-row { flex-direction: column; }
  .pof-select { min-width: 100%; }
  .ext-banner,
  .dg-banner { flex-direction: column; align-items: flex-start; }
  .ext-github { flex-direction: column; align-items: flex-start; }
  .dg-launch-row { flex-direction: column; align-items: flex-start; }
  .accuracy-grid { grid-template-columns: 1fr; }
  .contact-item { flex-direction: column; align-items: flex-start; gap: 4px; }
  .contact-item-label { min-width: unset; }
  .activity-item { flex-direction: column; gap: 4px; }
  .skills-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .hs-table thead th,
  .hs-table tbody td { padding: 7px 8px; }
  .calc-modal-box { left: 50%; transform: translateX(-50%); width: 94vw; }
}

/* ============================================================
   LAYOUT — NAV, STRIP, FOOTER, DRAWER, MODALS
   ============================================================ */

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  overflow-x: hidden;
}

#top-strip {
  height: var(--strip-h);
  background: var(--bg-raised);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.strip-left { display: flex; align-items: center; gap: 20px; }
.strip-clock {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
  position: relative;
}
.strip-clock::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rust);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }
.strip-clock-tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  padding: 10px 14px;
  z-index: 500;
  width: 240px;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.strip-clock:hover .strip-clock-tooltip { display: block; }
.sct-row { display: flex; justify-content: space-between; padding: 5px 0; gap: 12px; }
.sct-row + .sct-row { border-top: 1px solid var(--line); }
.sct-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.sct-val { font-family: var(--mono); font-size: 10px; color: var(--rust-light); }
.strip-right { display: flex; align-items: center; gap: 12px; }
.strip-btn {
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  transition: color var(--t), border-color var(--t);
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.strip-btn:hover { color: var(--rust-light); border-color: var(--rust-dim); }
.strip-btn svg { width: 12px; height: 12px; }

#nav {
  height: var(--nav-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--line-strong);
  display: flex;
  align-items: stretch;
  padding: 0 24px;
  position: sticky;
  top: var(--strip-h);
  z-index: 90;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 32px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand-logo { width: 34px; height: 34px; object-fit: contain; }
.nav-brand-name { font-family: var(--serif); font-size: 22px; color: var(--text); letter-spacing: 0.02em; line-height: 1; }
.nav-brand-tag { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rust); margin-top: 2px; }
.nav-links { display: flex; align-items: stretch; gap: 0; flex: 1; justify-content: center; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 14px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-mid);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: color var(--t), border-color var(--t), background var(--t);
  white-space: nowrap;
  cursor: pointer;
  background: none;
}
.nav-link:hover { color: var(--text); background: var(--rust-faint); border-bottom-color: var(--rust-dim); }
.nav-link.active { color: var(--rust-light); border-bottom-color: var(--rust); }
.nav-link .chevron { font-size: 10px; opacity: 0.5; transition: transform var(--t); }
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--rust);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity var(--t), transform var(--t);
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown { opacity: 1; pointer-events: all; transform: translateY(0); }
.nav-item:hover .chevron { transform: rotate(180deg); }
.dd-link {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-mid);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color var(--t), background var(--t), border-color var(--t);
}
.dd-link:hover { color: var(--text); background: var(--rust-faint); border-left-color: var(--rust); }
.dd-link.active { color: var(--rust-light); background: var(--rust-faint); border-left-color: var(--rust); }
.dd-divider { height: 1px; background: var(--line); margin: 4px 0; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--line);
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.nav-icon-btn:hover { color: var(--rust-light); border-color: var(--rust-dim); background: var(--rust-faint); }
.nav-icon-btn svg { width: 15px; height: 15px; }
#hamburger { display: none; }

#page { min-height: calc(100vh - var(--nav-h) - var(--strip-h)); }

#footer { margin-top: 80px; border-top: 1px solid var(--line); background: var(--bg-surface); }
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 32px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}
.footer-col-title { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rust); margin-bottom: 12px; }
.footer-link { display: block; font-size: 13px; color: var(--text-dim); text-decoration: none; padding: 3px 0; transition: color var(--t); }
.footer-link:hover { color: var(--text); }
.footer-base {
  border-top: 1px solid var(--line);
  padding: 16px 32px;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-base-text { font-family: var(--mono); font-size: 10px; color: var(--text-dim); letter-spacing: 0.04em; }

#mobile-drawer {
  position: fixed;
  top: 0; left: 0;
  width: 280px;
  height: 100%;
  background: var(--bg-raised);
  border-right: 1px solid var(--line-strong);
  z-index: 500;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
#mobile-drawer.open { transform: translateX(0); }
#drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 450; }
#drawer-overlay.show { display: block; }
.drawer-header { padding: 20px 20px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.drawer-close {
  background: none;
  border: 1px solid var(--line);
  color: var(--text-dim);
  width: 28px; height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: color var(--t), border-color var(--t);
}
.drawer-close:hover { color: var(--text); border-color: var(--line-strong); }
.drawer-nav { padding: 12px 0; flex: 1; }
.drawer-link {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-mid);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color var(--t), background var(--t), border-color var(--t);
}
.drawer-link:hover, .drawer-link.active { color: var(--rust-light); background: var(--rust-faint); border-left-color: var(--rust); }
.drawer-section { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); padding: 14px 20px 6px; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show { display: flex; }
#events-modal {
  width: 500px;
  max-width: 94vw;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--rust);
  animation: fadeUp 0.2s ease both;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-title { font-family: var(--serif); font-size: 20px; color: var(--text); }
.modal-close {
  background: none;
  border: 1px solid var(--line);
  color: var(--text-dim);
  width: 28px; height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: color var(--t), border-color var(--t);
}
.modal-close:hover { color: var(--text); border-color: var(--line-strong); }
.modal-tabs { display: flex; border-bottom: 1px solid var(--line); }
.modal-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.modal-tab:hover { color: var(--text); background: var(--rust-faint); }
.modal-tab.active { color: var(--rust-light); border-bottom-color: var(--rust); }
.modal-body { padding: 20px; }
.modal-tab-content { display: none; }
.modal-tab-content.active { display: block; }
.wfe-heading { font-family: var(--serif); font-size: 18px; color: var(--text); margin-bottom: 6px; }
.wfe-sub { font-size: 13px; color: var(--text-dim); font-style: italic; margin-bottom: 20px; line-height: 1.6; }
.wfe-countdown { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.wfe-unit { background: var(--bg-card); border: 1px solid var(--line); padding: 16px 8px 12px; text-align: center; }
.wfe-num { font-family: var(--mono); font-size: 28px; font-weight: 500; color: var(--rust-light); line-height: 1; }
.wfe-lbl { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin-top: 6px; }
.merch-title { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }
.merch-items { display: flex; flex-direction: column; gap: 6px; }
.merch-item { display: flex; align-items: center; gap: 12px; background: var(--bg-card); border: 1px solid var(--line); padding: 10px 14px; transition: border-color var(--t); }
.merch-item:hover { border-color: var(--rust-dim); }
.merch-item-img { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; }
.merch-item-name { font-size: 14px; color: var(--text); font-weight: 500; }
.merch-item-price { font-family: var(--mono); font-size: 11px; color: var(--rust); margin-top: 2px; }
.merch-notice { font-size: 13px; color: var(--text-dim); font-style: italic; line-height: 1.6; }

#login-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}
#login-modal-overlay.show { display: flex; }

#login-modal {
    width: 380px;
    max-width: 92vw;
    background: var(--bg-panel);
    border: 1px solid var(--border-mid);
    padding: 32px;
    position: relative;
    animation: pageIn 0.2s ease both;
}
#login-modal h2 {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    text-align: center;
    margin-bottom: 24px;
}
.lm-input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 10px;
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--border-mid);
    color: var(--text);
    font-family: 'Crimson Pro', serif;
    font-size: 15px;
    outline: none;
    transition: border-color var(--t-fast);
}
.lm-input::placeholder { color: var(--text-faint); font-style: italic; }
.lm-input:focus { border-color: var(--gold-dim); }
.lm-submit {
    display: block;
    width: 100%;
    padding: 11px 20px;
    margin-top: 6px;
    border: 1px solid var(--gold-dim);
    background: rgba(200,168,75,0.08);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.lm-submit:hover {
    background: rgba(200,168,75,0.18);
    border-color: var(--gold);
    color: var(--gold-light);
}
.lm-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 16px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color var(--t-fast), color var(--t-fast);
}
.lm-close:hover { border-color: #b56a6a; color: #b56a6a; }
.lm-msg {
    margin-top: 14px;
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-align: center;
    padding: 8px 12px;
    display: none;
}
.lm-msg.success { display: block; color: #6ab57a; border: 1px solid #2a4230; background: rgba(106,181,122,0.06); }
.lm-msg.error   { display: block; color: #b56a6a; border: 1px solid #42202a; background: rgba(181,106,106,0.06); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  #hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-inner { grid-template-columns: 1fr; }
  #top-strip { padding: 0 14px; }
}

@media (max-width: 860px) {
  .page-content {
    padding: 28px 20px 48px;
  }
}

@media (max-width: 400px) {
  .pof-stats {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   QUICK-EDIT OVERLAY
   ============================================================ */
.quick-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  pointer-events: none;
}

.quick-edit-modal {
  pointer-events: all;
  position: fixed;
  min-width: 260px;
  max-width: 320px;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--rust);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  animation: fadeUp 0.18s ease both;
  z-index: 1500;
}

/* Header bar */
.quick-edit-title {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--text);
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}

/* Field rows */
.quick-edit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}

.quick-edit-row label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mid);
  flex-shrink: 0;
}

.quick-edit-row select {
  flex: 1;
  padding: 6px 28px 6px 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a3a1a'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 8px 5px;
  transition: border-color var(--t);
}

.quick-edit-row select:focus {
  border-color: var(--rust-dim);
}

.quick-edit-row select option {
  background: var(--bg-surface);
}

/* Action buttons row */
.quick-edit-actions {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
}

.quick-edit-actions .combat-filter-btn {
  flex: 1;
  justify-content: center;
}

/* Confirm / save button variant */
.quick-edit-actions .combat-filter-btn:last-child {
  border-color: var(--rust-dim);
  color: var(--rust-light);
}

.quick-edit-actions .combat-filter-btn:last-child:hover {
  background: var(--bg-active);
  border-color: var(--rust);
  color: var(--text);
}

/* Status message */
.quick-edit-status {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0 16px 10px;
  min-height: 16px;
  text-align: center;
}

.quick-edit-status.ok  { color: #6ab57a; }
.quick-edit-status.err { color: #e07070; }

/* Close button */
.quick-edit-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: 1px solid var(--line);
  color: var(--text-mid);
  font-size: 14px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: color var(--t), border-color var(--t);
}

.quick-edit-close:hover {
  color: #e07070;
  border-color: rgba(224, 112, 112, 0.5);
}