/* ============================================================================
 * gameui.css — the iron pass over every window
 *
 * menus.css paints all ~97 windows in light parchment with a bronze frame. This
 * file replaces that with the identity the project brief calls for: dark iron,
 * gold structure, ember for danger, one pixel of outline, light from upper left.
 *
 * It targets the shared shapes every window already uses — frame, header, tabs,
 * titles, rows, cards, tables, fields, scrollbars — so one file restyles all of
 * them. Loaded last. Delete the <link> to fall back to menus.css.
 * ========================================================================== */

:root {
  --gu-ink:    #05060a;
  --gu-iron0:  #0b0d13;
  --gu-iron1:  #141720;
  --gu-iron2:  #1d212b;
  --gu-iron3:  #262b37;
  --gu-iron4:  #333a49;
  --gu-gold:   #d9b46a;
  --gu-gold2:  #8e6c2a;
  --gu-gold3:  #f6e3b0;
  --gu-ember:  #e8622a;
  --gu-text:   #e9e3d4;
  --gu-dim:    #9c9482;
  --gu-hp:     #c8362e;
  --gu-sp:     #3a6ac8;
  --gu-xp:     #d9b46a;
}

/* ── the frame ───────────────────────────────────────────────────────────── */
.win {
  background-image: none;
  background: linear-gradient(180deg, #1b1f29 0%, #121620 46%, #0c0e14 100%);
  border: 1px solid var(--gu-ink) !important;
  border-radius: 3px !important;
  clip-path: none;
  box-shadow:
    inset 0 1px 0 rgba(255,240,200,.10),
    inset 0 0 0 4px #0c0d13,
    inset 0 0 0 5px rgba(217,180,106,.26),
    inset 0 0 0 6px #0b0d13,
    0 26px 70px rgba(0,0,0,.82) !important;
  color: var(--gu-text);
}
/* corner rivets */
.win::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    radial-gradient(circle at 11px 11px, #b39a5c 0 1.4px, #4a3d1c 1.5px 2.4px, transparent 2.5px),
    radial-gradient(circle at calc(100% - 11px) 11px, #b39a5c 0 1.4px, #4a3d1c 1.5px 2.4px, transparent 2.5px),
    radial-gradient(circle at 11px calc(100% - 11px), #b39a5c 0 1.4px, #4a3d1c 1.5px 2.4px, transparent 2.5px),
    radial-gradient(circle at calc(100% - 11px) calc(100% - 11px), #b39a5c 0 1.4px, #4a3d1c 1.5px 2.4px, transparent 2.5px);
  background-repeat: no-repeat;
}

/* ── header: a struck gold bar with dark lettering ───────────────────────── */
.win .win-head {
  background:
    linear-gradient(180deg, #f0d493 0%, #d9b46a 42%, #a8802f 76%, #e6cd92 100%) !important;
  border-bottom: 1px solid var(--gu-ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 3px 10px rgba(0,0,0,.55);
  min-height: 32px;
  color: #1c1404;
}
.win .win-head .wt {
  font-family: Cinzel, Georgia, serif;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 900;
  color: #1c1404;
  text-shadow: 0 1px 0 rgba(255,255,255,.38);
}
.win .win-head button {
  background: linear-gradient(180deg, #3d3520, #241f14);
  border: 1px solid #6d5a2c;
  color: var(--gu-gold3);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255,240,200,.2);
}
.win .win-head button:hover { filter: brightness(1.25); }

/* ── body: dark iron, light text ─────────────────────────────────────────── */
.win .win-body {
  background: linear-gradient(180deg, rgba(217,180,106,.045), rgba(0,0,0,.25));
  color: var(--gu-text);
  padding-top: 6px;
}
.win, .win * { scrollbar-color: var(--gu-gold2) var(--gu-iron0); }
.win ::-webkit-scrollbar { width: 10px; height: 10px; }
.win ::-webkit-scrollbar-track { background: #0a0c11; }
.win ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6d5a2c, #3a2f16);
  border: 1px solid #0a0c11; border-radius: 2px;
}

/* ── nested panels ───────────────────────────────────────────────────────── */
.win .win-body > div,
.win .panel, .win .rb-hero, .win .bq-intro, .win .pt-pay, .win .pt-pkgs {
  border-radius: 2px;
  background: rgba(11,13,19,.55);
}
.win .note, .win .fine { color: var(--gu-dim) !important; }
.win b, .win strong { color: var(--gu-gold3); }
.win .gold { color: var(--gu-gold) !important; }
.win .bad, .win .acc-err { color: #ff9a8a !important; }

/* ── section titles: gold small caps on a rule ───────────────────────────── */
.win .win-body h2, .win .win-body h3, .win .win-body h4 {
  background: none !important;
  border: 0;
  border-bottom: 1px solid rgba(217,180,106,.22);
  color: var(--gu-gold3);
  font-family: Cinzel, Georgia, serif;
  font-weight: 700; text-transform: uppercase; letter-spacing: .16em;
  padding: 2px 0 6px; margin: 12px 0 8px;
  text-shadow: 0 1px 0 #000;
}
.win .win-body h2:first-child, .win .win-body h3:first-child, .win .win-body h4:first-child { margin-top: 0; }
.win .win-body h4 { font-size: 11px; }
.win .win-body .bs-head { background: none !important; border-bottom: 1px solid rgba(217,180,106,.18); }

/* ── tabs: cut plates ────────────────────────────────────────────────────── */
.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, #242a36, #141821);
  border: 1px solid #3a4557;
  border-radius: 2px;
  color: var(--gu-dim);
  font-family: Cinzel, Georgia, serif; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; font-size: 10px;
  box-shadow: inset 0 1px 0 rgba(255,240,200,.10);
}
.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(--gu-gold); color: var(--gu-gold3);
}
.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, #f0d493, #a8802f 78%, #e6cd92);
  border-color: var(--gu-gold3);
  color: #1c1404;
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
}

/* ── buttons ─────────────────────────────────────────────────────────────── */
.win .btn {
  border-radius: 2px;
  border: 1px solid #6d5a2c;
  background: linear-gradient(180deg, #3d3520, #2a2416 52%, #191508);
  color: var(--gu-gold3);
  font-family: Cinzel, Georgia, serif; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; font-size: 10.5px;
  box-shadow: inset 0 1px 0 rgba(255,240,200,.18), 0 2px 0 #08060a, 0 5px 12px rgba(0,0,0,.5);
  transition: filter .12s, transform .05s;
}
.win .btn:hover { border-color: var(--gu-gold); filter: brightness(1.22); }
.win .btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,240,200,.14), 0 1px 0 #08060a; }
.win .btn.gold {
  background: linear-gradient(180deg, #f4dc9e, #d3a94f 46%, #96701f 76%, #e3c682);
  border-color: var(--gu-gold3);
  color: #1c1404;
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
}
.win .btn.red, .win .btn.danger {
  background: linear-gradient(180deg, #6a1f12, #3d1109);
  border-color: #a83a14; color: #ffd9b0;
}
.win .btn:disabled, .win .btn[disabled] { filter: grayscale(.7) brightness(.7); cursor: not-allowed; }

/* ── fields ──────────────────────────────────────────────────────────────── */
.win input, .win select, .win textarea {
  background: linear-gradient(180deg, #07080c, #0e1017) !important;
  border: 1px solid #05060a !important;
  border-radius: 2px;
  color: var(--gu-text) !important;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.9), inset 0 0 0 1px rgba(217,180,106,.14);
}
.win input:focus, .win select:focus, .win textarea:focus {
  outline: none;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.9), inset 0 0 0 1px rgba(217,180,106,.62), 0 0 14px rgba(217,180,106,.16);
}
.win label { color: var(--gu-dim); font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; }

/* ── rows, lists, cards ──────────────────────────────────────────────────── */
.win .row, .win .kv {
  border-radius: 2px;
  background: rgba(255,255,255,.028);
  border: 1px solid rgba(217,180,106,.10);
}
.win .kv span { color: var(--gu-dim); }
.win .kv b { color: var(--gu-gold3); }
.win .shop-row, .win .bs-row, .win .tr-row, .win .gd-row, .win .bb-row {
  border-bottom: 1px solid rgba(217,180,106,.10);
}
.win .shop-row:hover, .win .tr-row:hover, .win .gd-row:hover { background: rgba(217,180,106,.07); }
.win .shop-total { color: var(--gu-gold); }

.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, #1d222c, #12161e);
  border: 1px solid #333a49;
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255,240,200,.08);
}
.win .bag-card:hover, .win .eq-slot:hover, .win .skill-card:hover, .win .cs-card:hover, .win .gm-card:hover {
  border-color: var(--gu-gold);
  box-shadow: inset 0 1px 0 rgba(255,240,200,.14), 0 0 12px rgba(217,180,106,.18);
}
.win .bag-name, .win .eq-name { color: var(--gu-text); }
.win .bag-n { color: var(--gu-gold); }

/* ── tables ──────────────────────────────────────────────────────────────── */
.win table th {
  background: linear-gradient(180deg, #2b2416, #191408);
  color: var(--gu-gold);
  border-bottom: 1px solid rgba(217,180,106,.35);
  font-family: Cinzel, Georgia, serif; font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase;
}
.win table td { border-bottom: 1px solid rgba(217,180,106,.08); color: var(--gu-text); }
.win tbody tr:nth-child(even) td { background: rgba(255,255,255,.025); }
.win tbody tr:hover td { background: rgba(217,180,106,.10); }

/* ── badges and rarity ───────────────────────────────────────────────────── */
.win .badge, .win .tag, .win .pill {
  background: linear-gradient(180deg, rgba(217,180,106,.2), rgba(217,180,106,.05));
  border: 1px solid rgba(217,180,106,.4);
  color: var(--gu-gold3);
  border-radius: 2px;
}
.win .rare    { color: #5ab0ff !important; }
.win .epic    { color: #c87aff !important; }
.win .legendary { color: #ffd060 !important; }

/* ── bars inside windows ─────────────────────────────────────────────────── */
.win .bar, .win .hp-bar, .win .sp-bar, .win .xp-bar {
  background: #07080c;
  border: 1px solid #05060a;
  border-radius: 2px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.9);
}
