/* ============================================================================
 * Menus — one forged style across every window
 *
 * hudv2.css handles the HUD plates; this file handles everything that opens on top of them. The game ships ~97
 * windows with their own ad-hoc panels, so the rules below target the shared shapes they all use: the frame, the
 * header, tabs, section titles, list rows, item cards, tables, fields and scrollbars. Bodies stay light parchment
 * so dense text stays readable — the chrome around them is bronze and obsidian like the rest of the HUD.
 *
 * Paint only. Loaded last, after theme.css and hudv2.css. Delete the <link> to restore shipped menus.
 * ========================================================================== */

:root {
  --mn-bronze: #7a5928;
  --mn-bronze-dk: #3a2912;
  --mn-gold: #f2c75c;
  --mn-gold-lt: #ffe6a2;
  --mn-paper: #f2f5fb;
  --mn-ink: #1d2942;
  --mn-dim: #5f6f8c;
}

/* ── the frame: chamfered, riveted, bronze-edged ─────────────────────────── */
.win {
  background-image:
    radial-gradient(circle at 9px 9px, var(--mn-gold) 0 1.5px, transparent 2px),
    radial-gradient(circle at calc(100% - 9px) 9px, var(--mn-gold) 0 1.5px, transparent 2px),
    radial-gradient(circle at 9px calc(100% - 9px), var(--mn-gold) 0 1.5px, transparent 2px),
    radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), var(--mn-gold) 0 1.5px, transparent 2px),
    linear-gradient(155deg, #f4f7fc, #dfe7f4);
  border: 2px solid var(--mn-bronze) !important;
  border-radius: 4px !important;
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
  box-shadow: 0 20px 54px rgba(0,0,0,.7), inset 0 0 0 1px rgba(242,199,92,.5), inset 0 0 0 3px rgba(58,41,18,.35);
}

.win .win-head {
  background:
    repeating-linear-gradient(90deg, rgba(255,230,162,.2) 0 2px, transparent 2px 6px) 12px 50% / 48px 4px no-repeat,
    linear-gradient(180deg, #4b3619, #2b1e0e) !important;
  border-bottom: 2px solid var(--mn-gold) !important;
  box-shadow: inset 0 1px 0 rgba(255,232,170,.28), 0 2px 6px rgba(0,0,0,.35);
  min-height: 34px;
  color: var(--mn-gold-lt);
}
.win .win-head .wt {
  font-size: 13px; letter-spacing: .8px; font-weight: 900;
  text-shadow: 0 1px 0 #000, 0 0 10px rgba(242,199,92,.3);
}
.win .win-head button {
  background: linear-gradient(180deg, #5c4420, #2c1e0c);
  border: 1px solid var(--mn-gold);
  color: var(--mn-gold-lt);
}

/* ── body: parchment with a bronze inner rule ───────────────────────────── */
.win .win-body {
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(122,89,40,.05));
  color: var(--mn-ink);
  padding-top: 4px;
}

/* nested panels */
.win .win-body > div,
.win .panel, .win .cc-panel, .win .rb-hero, .win .bq-intro, .win .pt-pay, .win .pt-pkgs {
  border-radius: 6px;
}

/* ── section titles ─────────────────────────────────────────────────────── */
.win .win-body h2, .win .win-body h3, .win .win-body h4 {
  background: linear-gradient(180deg, #4b3619, #2b1e0e);
  color: var(--mn-gold-lt);
  border: 1px solid var(--mn-bronze);
  border-left: 4px solid var(--mn-gold);
  border-radius: 3px;
  padding: 5px 9px;
  font-size: 12px;
  letter-spacing: .6px;
  text-shadow: 0 1px 0 #000;
  box-shadow: inset 0 1px 0 rgba(255,232,170,.2);
}
.win .win-body h4 { font-size: 11.5px; }
.win .win-body .bs-head {
  background: linear-gradient(180deg, #4b3619, #2b1e0e);
  color: var(--mn-gold-lt);
  border: 1px solid var(--mn-bronze);
  border-left: 4px solid var(--mn-gold);
  border-radius: 3px;
  letter-spacing: .5px;
}

/* ── tabs: bronze pills, gold when chosen ───────────────────────────────── */
.win .tabs button, .win .eq-tabs button, .win .bag-tabs button,
.win .bq-tab, .win .ov-hub-tab, .win .cd-chips button, .win .rb-form button,
.win .gd-tab {
  background: linear-gradient(180deg, #fff, #e3eaf6);
  border: 1px solid #a98a52;
  border-radius: 999px;
  color: #3a2a12;
  font-weight: 700;
  padding: 5px 12px;
}
.win .tabs button:hover, .win .eq-tabs button:hover, .win .bag-tabs button:hover,
.win .bq-tab:hover, .win .ov-hub-tab:hover, .win .gd-tab:hover { border-color: var(--mn-gold); color: #241704; }
.win .tabs button.on, .win .eq-tabs button.on, .win .bag-tabs button.on,
.win .bq-tab.on, .win .ov-hub-tab.on, .win .cd-chips button.on, .win .gd-tab.on {
  background: linear-gradient(180deg, #6d4f21, #3a2912);
  border-color: var(--mn-gold);
  color: var(--mn-gold-lt);
  box-shadow: inset 0 1px 0 rgba(255,232,170,.25), 0 0 8px rgba(242,199,92,.25);
  text-shadow: 0 1px 0 #000;
}

/* guild tabs must stay clickable above the styled window chrome */
.win .gd-tabs { position: relative; z-index: 1; }
.win .gd-tab { position: relative; z-index: 1; cursor: pointer; }

/* ── buttons ────────────────────────────────────────────────────────────── */
.win .btn {
  background: linear-gradient(180deg, #33405a, #151d2e);
  border: 1px solid var(--mn-bronze);
  border-radius: 5px;
  color: #eef3ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 2px 6px rgba(0,0,0,.28);
}
.win .btn:hover { border-color: var(--mn-gold); filter: brightness(1.1); }
.win .btn.gold {
  background: linear-gradient(180deg, #ffe08c, #d99b1e);
  border-color: #9a6d13;
  color: #2a1c04;
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
}

/* ── list rows, key/value tables ────────────────────────────────────────── */
.win .row, .win .kv { border-radius: 5px; }
.win table { border-collapse: separate; border-spacing: 0; }
.win table th {
  background: linear-gradient(180deg, #4b3619, #2b1e0e);
  color: var(--mn-gold-lt);
  border: 1px solid var(--mn-bronze);
  font-size: 11px;
  letter-spacing: .4px;
  padding: 5px 8px;
}
.win table td {
  border-bottom: 1px solid rgba(122,89,40,.28);
  padding: 5px 8px;
}
.win tbody tr:nth-child(even) td { background: rgba(122,89,40,.06); }
.win tbody tr:hover td { background: rgba(242,199,92,.16); }

/* ── item / option cards ────────────────────────────────────────────────── */
.win .bag-card, .win .eq-slot, .win .pt-pkg, .win .skill-card, .win .bq-c,
.win .bb-row, .win .cs-card, .win .cc-grid > button, .win .gm-card {
  background: linear-gradient(180deg, #fffdf6, #e9dfc7);
  border: 1px solid #b08b45;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 2px 5px rgba(0,0,0,.14);
  color: #2c2110;
}
.win .bag-card:hover, .win .pt-pkg:hover, .win .cs-card:hover, .win .cc-grid > button:hover {
  border-color: var(--mn-gold);
  box-shadow: 0 0 0 1px rgba(242,199,92,.5), 0 4px 10px rgba(0,0,0,.2);
}
.win .bag-card.on, .win .pt-pkg.on, .win .bq-c.right {
  border-color: var(--mn-gold);
  box-shadow: 0 0 0 2px rgba(242,199,92,.4);
}

/* ── inputs stay white so text survives, gold when focused ─────────────── */
.win input, .win select, .win textarea {
  background: #fff;
  border: 1px solid #b08b45;
  border-radius: 4px;
  color: var(--mn-ink);
}
.win input:focus, .win select:focus, .win textarea:focus {
  border-color: var(--mn-gold);
  box-shadow: 0 0 0 2px rgba(242,199,92,.35);
  outline: none;
}

/* ── notes and inline labels ────────────────────────────────────────────── */
.win .note, .win small { color: var(--mn-dim); }
.win .warn, .win .acc-err { color: #a3331f; }

/* ── scrollbars inside menus ────────────────────────────────────────────── */
.win .win-body::-webkit-scrollbar { width: 9px; height: 9px; }
.win .win-body::-webkit-scrollbar-track { background: rgba(58,41,18,.12); }
.win .win-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #b58b3c, #6c4d1e);
  border: 1px solid #3a2912;
  border-radius: 6px;
}
.win .win-body::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #e0b45a, #8a6426); }

/* ── small screens: the window itself is capped in hudv2.css; here the
      internal grids lose their rigid widths so nothing spills sideways ──── */
@media (max-width: 880px) {
  .win .win-body { padding-left: 6px; padding-right: 6px; }
  .win .win-body h2, .win .win-body h3, .win .win-body h4 { font-size: 11px; }
}
