/* =====================================================================
   Domus RP — shared visual theme (restyle only)
   Loaded AFTER each page's own <style>, so it only overrides looks.
   No IDs, classes, menus or scripts were renamed or removed.
   ===================================================================== */
@import url('fonts/fonts.css');

/* ---------- Base layout (moved here from the old per-page <style> blocks) ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
a { color: inherit; }
.topbar { display: flex; align-items: center; padding: 12px 28px; }
.logo { text-decoration: none; display: flex; align-items: center; gap: 10px; }
.menu { display: flex; justify-content: center; flex-wrap: wrap; padding: 10px 20px; }
.menu a { display: flex; align-items: center; gap: 6px; text-decoration: none; }
.menu a img { width: 18px; height: 18px; }
.rep-bar { height: 7px; overflow: hidden; border-radius: 4px; }
.rep-fill { height: 100%; }
.container { max-width: 1120px; margin: 0 auto; padding: 24px 20px 40px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.card { overflow: hidden; text-decoration: none; color: inherit; }
.card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.card-body { padding: 16px 18px; }
.activity { padding: 18px; }
.layout { display: grid; grid-template-columns: 300px 1fr; }
.sidebar { padding: 16px; }
.glad { display: flex; gap: 10px; padding: 10px; cursor: pointer; }
.glad img { object-fit: cover; }
.main { padding: 20px; }
.pg-arena .container, .pg-events .container { text-align: center; }
.arena { min-height: 300px; background-size: cover; background-position: center; position: relative; margin: 16px 0; }
.fighters { display: flex; justify-content: space-around; align-items: flex-end; height: 260px; }
.fighter { display: flex; flex-direction: column; align-items: center; }
.fighter img { width: 130px; height: 170px; object-fit: cover; transition: transform .3s; }
.vs { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); font-family: 'IM Fell English SC', serif; }
.event { padding: 22px; margin-top: 20px; text-align: left; display: none; }
.event.show { display: block; }
.choice { display: block; width: 100%; padding: 12px; margin: 8px 0; text-align: left; cursor: pointer; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.item { padding: 12px; text-align: center; }
.item img { width: 100%; height: 120px; object-fit: cover; }
.pol { padding: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 16px; }
.pol img { object-fit: cover; border-radius: 4px; }
.pol .info { flex: 1; }
.pol .name { font-family: 'IM Fell English SC', serif; color: var(--goldb); }
.relation { padding: 4px 12px; border-radius: 12px; font-size: .85rem; }
.slaves { display: grid; gap: 16px; margin-bottom: 20px; }
.slave { padding: 12px; }
.slave img { width: 100%; object-fit: cover; border-radius: 4px; }
.panel { padding: 16px; margin-bottom: 14px; }
input { padding: 6px; }

:root {
  --bg: #06080b;
  --bg-2: #090d16;
  --panel: rgba(11,16,28,0.92);
  --panel-2: rgba(15,22,39,0.92);
  --border: rgba(153,163,175,0.55);
  --border-soft: rgba(153,163,175,0.22);
  --gold: #99a3af;
  --goldb: #d4c8a6;
  --gold-bright: #d4c8a6;
  --panel-border: rgba(153,163,175,0.55);
  --text: #dfe2e6;
  --muted: #bec1c5;
  --blood: #1f3d86;
  --blood-2: #12285a;
  --bar-bg: #0b111d;
  --frame: inset 0 0 0 1px rgba(0,0,0,.65), inset 0 0 0 4px rgba(153,163,175,.10), 0 8px 26px rgba(0,0,0,.55);
}

/* ---------- Page background: dark maroon, red vignette, faint columns ---------- */
body {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(20,46,106,0.30) 0%, rgba(7,17,39,0.10) 45%, rgba(0,0,0,0.75) 100%),
    linear-gradient(180deg, #090d17 0%, #06080d 55%, #040508 100%);
  background-color: var(--bg);
  background-attachment: fixed;
  background-blend-mode: normal;
  line-height: 1.5;
}
body::before {               /* faint colonnade imagery behind everything */
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url('img/rg/realm_map.jpg') center / cover no-repeat;
  opacity: 0.07;
  filter: grayscale(.5) brightness(.8);
}

h1, h2, h3 { font-family: 'IM Fell English SC', serif; letter-spacing: .06em; }
h1, h2, h3, h1 *, h2 * { color: var(--goldb); }
h1 { font-weight: 600; text-shadow: 0 2px 10px rgba(0,0,0,.8); }
main h1::after {             /* small ornament under page titles */
  content: "";
  display: block;
  width: 180px; height: 10px; margin: 8px auto 6px;
  background:
    radial-gradient(circle, var(--gold) 0 3px, transparent 4px) center / 10px 10px no-repeat,
    linear-gradient(90deg, transparent, var(--gold) 30%, transparent 46%, transparent 54%, var(--gold) 70%, transparent) center / 100% 1px no-repeat;
}
main h1 { text-align: center; font-size: 2.1rem; }
small { color: var(--muted); }

/* Gold icon images (they sit on black, so 'lighten' drops the black square) */
.menu a img, .stat img, .rep-wrap img, .logo img {
  object-fit: cover; object-position: center;
  mix-blend-mode: lighten;
  border-radius: 3px;
}

/* ---------- Top resource bar ---------- */
.topbar {
  background: linear-gradient(180deg, rgba(12,21,41,.97) 0%, rgba(7,11,20,.97) 100%) !important;
  border-bottom: 1px solid var(--gold) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.8), 0 6px 18px rgba(0,0,0,.6);
  padding: 12px 28px;
  gap: 26px;
  position: relative;
  color: var(--goldb);
}
.topbar::after {             /* thin second gold rule, like the concepts */
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(153,163,175,.45), transparent);
}
.logo {
  font-family: 'IM Fell English SC', serif !important;
  font-weight: 700;
  letter-spacing: .12em;
  font-size: 1.6rem !important;
  color: var(--goldb) !important;
  background: linear-gradient(180deg, #c2cbd7 0%, #99a3af 60%, #677586 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  padding-right: 22px;
  border-right: 1px solid var(--border-soft);
}
.logo img { width: 34px; height: 34px; }
.stat {
  font-size: .95rem; color: var(--text);
  padding-right: 22px; border-right: 1px solid var(--border-soft);
}
.stat span, .stat .value { color: var(--goldb); font-weight: 600; }
.stat .label { color: var(--gold); font-family: 'IM Fell English SC', serif; font-size: .78rem; letter-spacing: .08em; }
.stat img, .rep-wrap img { width: 26px !important; height: 26px; }
.topbar > div[style*="margin-left:auto"] {   /* gold/influence readout on sub-pages */
  font-family: 'IM Fell English SC', serif; letter-spacing: .05em;
  border: 1px solid var(--border); border-radius: 4px;
  padding: 6px 14px; background: rgba(0,0,0,.35);
}
.topbar > div[style*="margin-left:auto"] span,
.topbar > div[style*="margin-left:auto"] strong { color: #e1e6ed; font-weight: 700; }
.rep-wrap, .reputation-wrap { color: var(--text); font-size: .95rem; }
.rep-wrap span, .reputation-wrap .value { color: var(--goldb); font-weight: 600; }
.reputation-wrap .label { color: var(--gold); font-family: 'IM Fell English SC', serif; font-size: .78rem; letter-spacing: .08em; }
.rep-bar {
  height: 9px !important;
  background: var(--bar-bg) !important;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.8);
}
.rep-fill { background: linear-gradient(90deg, #5e6a7a, #99a3af 55%, #d7cba8) !important; box-shadow: 0 0 8px rgba(215,203,168,.35); }
.top-icons span { color: var(--gold); filter: grayscale(1) sepia(1) saturate(3) brightness(1.1); }

/* ---------- Category menu (kept at the top, same links/order) ---------- */
.menu {
  background: linear-gradient(180deg, rgba(9,14,24,.96), rgba(6,8,14,.96)) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 10px 20px 12px;
  gap: 0;
  box-shadow: 0 8px 18px rgba(0,0,0,.5);
}
.menu a {
  background: transparent !important;
  border: none !important;
  border-right: 1px solid var(--border-soft) !important;
  border-radius: 0 !important;
  color: var(--goldb) !important;
  font-family: 'IM Fell English SC', serif;
  font-size: .9rem !important;
  font-weight: 600;
  letter-spacing: .1em;
  padding: 8px 22px !important;
  gap: 9px !important;
  position: relative;
  transition: color .2s, text-shadow .2s;
}
.menu a:last-child { border-right: none !important; }
.menu a img { width: 24px !important; height: 24px !important; }
.menu a:hover { color: #e1e6ed !important; text-shadow: 0 0 10px rgba(212,200,166,.5); }
.menu a.active { color: #e1e6ed !important; text-shadow: 0 0 10px rgba(212,200,166,.45); }
.menu a.active::after, .menu a:hover::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: -3px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ---------- Generic framed panels ---------- */
.card, .activity, .panel, .slave, .item, .equip-item, .event, .pol, .arena,
.nav-card, .footer-status, .sidebar {
  background: linear-gradient(180deg, var(--panel-2), var(--panel)) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px;
  box-shadow: var(--frame);
}
.card:hover, .nav-card:hover, .slave:hover, .item:hover, .equip-item:hover, .pol:hover {
  border-color: var(--goldb) !important;
  box-shadow: var(--frame), 0 0 18px rgba(153,163,175,.18);
}
.container { position: relative; }

/* ---------- Buttons ---------- */
.btn {
  background: linear-gradient(180deg, #111d39, #090f1c) !important;
  border: 1px solid var(--gold) !important;
  color: var(--goldb) !important;
  font-family: 'IM Fell English SC', serif;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .8rem;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), inset 0 1px 0 rgba(196,206,219,.12), 0 3px 10px rgba(0,0,0,.5);
  transition: box-shadow .2s, color .2s, transform .1s;
}
.btn:hover { color: #e1e6ed !important; box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), 0 0 14px rgba(153,163,175,.35); }
.btn:active { transform: translateY(1px); }
input {
  background: #060a12 !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 4px;
  font-family: 'Source Sans 3', sans-serif;
}
input:focus { outline: none; border-color: var(--goldb) !important; box-shadow: 0 0 8px rgba(153,163,175,.35); }

/* ---------- MAIN dashboard (index.html): image-left cards like the concept ---------- */
.cards { gap: 20px; }
.cards .card {
  display: grid; grid-template-columns: 46% 1fr; min-height: 190px;
}
.cards .card img {
  height: 100% !important; min-height: 190px;
  -webkit-mask-image: linear-gradient(90deg, #000000 60%, transparent 100%);
          mask-image: linear-gradient(90deg, #000000 60%, transparent 100%);
}
.cards .card-body { padding: 22px 18px 18px 6px; display: flex; flex-direction: column; }
.cards .card h2 {
  font-size: 1.45rem !important; margin-bottom: 8px;
  background: linear-gradient(180deg, #c2cbd7, #99a3af);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.cards .card p { color: var(--text); font-size: .95rem; opacity: .9; }
.cards .card-body::after { content: "›  Enter"; margin-top: auto; padding-top: 14px; color: var(--goldb); font-weight: 600; }

.activity { padding: 20px 26px !important; }
.activity h3 {
  font-size: 1.3rem; display: flex; align-items: center; gap: 12px;
  color: var(--goldb) !important; padding-bottom: 12px; border-bottom: 1px solid var(--border-soft);
}
.activity h3::after { content: "◆"; color: var(--gold); font-size: .7rem;
  padding-right: 60px; background: linear-gradient(90deg, var(--gold), transparent) right center / 60px 1px no-repeat; }
.activity > div {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0 !important;
  border-bottom: 1px solid var(--border-soft) !important;
}
.activity > div:last-child { border-bottom: none !important; }
.activity > div::before, .activity-item::before {
  content: "◆"; flex: 0 0 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-size: .8rem;
  background: radial-gradient(circle, rgba(153,163,175,.12), transparent 70%);
}

/* ---------- Domus RP main (domus_main.html, older dashboard) ---------- */
.nav-card h2 { color: var(--goldb) !important; }
.nav-card p { color: var(--text) !important; opacity: .85; }
.enter { color: var(--goldb) !important; }
.activity-item { align-items: center !important; gap: 14px; }
.activity-item .desc { flex: 1; }
.activity-item .desc span { color: var(--muted) !important; }
.time { color: var(--muted) !important; }
.footer-status { color: var(--text) !important; font-family: 'IM Fell English SC', serif; letter-spacing: .05em; }
.footer-status strong { color: var(--goldb); font-size: 1.15rem; }

/* ---------- GLADIATORS ---------- */
.layout { max-width: 1240px; margin: 22px auto; gap: 20px; padding: 0 20px; grid-template-columns: 320px 1fr !important; }
.sidebar { padding: 18px !important; border-right: 1px solid var(--border) !important; align-self: start; }
.sidebar h3 { color: var(--goldb) !important; border-bottom: 1px solid var(--border-soft); padding-bottom: 10px; }
.glad {
  border: 1px solid var(--border-soft) !important; border-radius: 6px; margin-bottom: 10px;
  background: rgba(0,0,0,.25); align-items: center; transition: border-color .2s, background .2s;
}
.glad:hover { border-color: var(--border) !important; }
.glad.active { background: linear-gradient(90deg, rgba(20,46,106,.55), rgba(11,19,39,.6)) !important; border-color: var(--gold) !important; }
.glad img { border: 1px solid var(--border); width: 56px !important; height: 66px !important; }
.glad strong { font-family: 'IM Fell English SC', serif; color: var(--goldb); font-weight: 600; letter-spacing: .03em; }
.glad small span { color: var(--goldb); }
.layout > .main {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--frame);
  padding: 24px 28px !important;
}
.layout > .main h1 { text-align: left; font-size: 2.2rem; }
.layout > .main h1::after { margin-left: 0; }
.layout > .main > p { font-family: 'IM Fell English SC', serif; letter-spacing: .06em; }
.equip-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; gap: 14px !important; }
.equip-item { color: var(--goldb); font-family: 'IM Fell English SC', serif; font-size: .8rem !important; padding: 12px !important; }
.equip-item img, .item img {
  object-fit: cover !important; object-position: center 40%; background: radial-gradient(circle, rgba(22,50,114,.35), rgba(0,0,0,.6));
  border: 1px solid var(--border-soft); border-radius: 4px !important; margin-bottom: 8px;
}
.equip-item img { height: 100px !important; }
#armorBonus { color: #e1e6ed; font-size: 1.2rem; }

/* ---------- ARENA ---------- */
.arena { min-height: 320px !important; overflow: hidden; }
.arena::before { content: ""; position: absolute; inset: 0; border-radius: 8px;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,.7) 100%); pointer-events: none; }
.fighters { position: relative; height: 290px !important; padding-bottom: 16px; }
.fighter { font-family: 'IM Fell English SC', serif; color: var(--goldb); text-shadow: 0 2px 6px #000000; }
.fighter img { border: 2px solid var(--gold) !important; box-shadow: 0 0 0 4px rgba(0,0,0,.6), 0 0 0 5px rgba(153,163,175,.35), 0 10px 22px rgba(0,0,0,.7); border-radius: 6px !important; }
.vs { font-size: 2.6rem !important; color: var(--goldb) !important; text-shadow: 0 0 18px rgba(153,163,175,.6), 0 3px 8px #000000 !important; z-index: 2; }
#result { font-family: 'IM Fell English SC', serif; font-size: 1.25rem; letter-spacing: .05em; text-shadow: 0 2px 6px #000000; }
main.container > .btn { font-size: 1.05rem; padding: 14px 34px !important; }

/* ---------- EVENTS ---------- */
.event { padding: 26px 28px !important;
  box-shadow: inset 0 0 0 4px rgba(0,0,0,.65), inset 0 0 0 5px rgba(153,163,175,.35), 0 10px 30px rgba(0,0,0,.6); }
.event h2 { font-variant: small-caps; font-size: 1.5rem; border-bottom: 1px solid var(--border-soft); padding-bottom: 12px; }
.event p { color: var(--text) !important; opacity: .9; }
.choice {
  background: linear-gradient(180deg, rgba(13,20,37,.95), rgba(7,11,20,.95)) !important;
  border: 1px solid var(--border) !important;
  color: var(--goldb) !important;
  font-family: 'IM Fell English SC', serif; letter-spacing: .04em; font-size: .98rem;
  padding: 14px 16px !important; border-radius: 6px !important;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.6);
  transition: border-color .2s, box-shadow .2s, transform .1s;
}
.choice:hover { border-color: var(--goldb) !important; box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), 0 0 14px rgba(153,163,175,.25); }
.choice[onclick*="'rep'"], .choice[onclick*="'duel'"] {       /* danger-tinted choices */
  background: linear-gradient(180deg, rgba(20,41,90,.85), rgba(10,20,45,.9)) !important;
  border-color: rgba(57,96,187,.65) !important;
}
.choice[onclick*="'rep'"]:hover, .choice[onclick*="'duel'"]:hover { box-shadow: 0 0 14px rgba(51,91,185,.35); }
.btn[onclick="draw()"] { font-size: 1.25rem; padding: 16px 44px !important; margin-top: 6px;
  box-shadow: inset 0 0 0 4px rgba(0,0,0,.55), inset 0 0 0 5px rgba(153,163,175,.35), 0 6px 18px rgba(0,0,0,.6); }

/* ---------- MARKET ---------- */
.grid { gap: 16px !important; }
.item { color: var(--goldb); font-family: 'IM Fell English SC', serif; padding: 14px !important; }
.item img { height: 130px !important; }
.item div[style*="color:var(--gold)"] { font-family: 'Source Sans 3', sans-serif; font-weight: 600; margin-top: 2px; }
#owned p { color: var(--muted); font-style: italic; }

/* ---------- REPUTATION ---------- */
.pol { padding: 14px 18px !important; }
.pol img { border: 1px solid var(--gold); box-shadow: 0 0 0 3px rgba(0,0,0,.6); }
.pol .name { font-size: 1.15rem; letter-spacing: .04em; }
.relation { font-family: 'IM Fell English SC', serif; letter-spacing: .06em; border: 1px solid currentColor; }
.friendly { background: rgba(46,74,40,.55) !important; color: #b9dc98 !important; }
.neutral  { background: rgba(63,68,74,.55) !important; color: #cfc6ab !important; }
.hostile  { background: rgba(24,48,105,.6) !important; color: #789aea !important; }

/* ---------- SLAVES ---------- */
.slaves { gap: 18px !important; }
.slave { padding: 14px !important; }
.slave img { height: 190px !important; object-position: top; border: 1px solid var(--border); margin-bottom: 10px; }
.slave h3 { font-size: 1.25rem; margin-bottom: 4px; }
.slave > div:first-of-type { color: var(--text); }
.slave span[id^="d"] { color: #789aea; font-weight: 700; }
.slave input { margin: 8px 6px 0 0; }
.panel h2 { color: var(--goldb) !important; border-bottom: 1px solid var(--border-soft); padding-bottom: 8px; }
#marketStatus { font-family: 'IM Fell English SC', serif; color: var(--goldb); letter-spacing: .04em; }

/* ---------- Concept document (domus_concept.html) — dark version ---------- */
body > header:not(.topbar) {
  border-bottom: 1px solid var(--border) !important;
  background: radial-gradient(ellipse at 50% 100%, rgba(20,46,106,.35), transparent 70%);
}
body > header:not(.topbar)::before { color: var(--gold) !important; }
body > header:not(.topbar) h1 { color: var(--goldb) !important;
  background: linear-gradient(180deg, #c2cbd7, #99a3af 60%, #677586);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.subtitle { color: var(--muted) !important; font-family: 'IM Fell English', serif; }
.tagline, .lead, section p, section li { color: var(--text) !important; }
section + section { border-top: 1px solid var(--border-soft) !important; }
section h2 { color: var(--goldb) !important; }
section h3 { color: var(--gold) !important; }
.systems .card { padding: 22px !important; }
.scale-box, .tech {
  background: linear-gradient(180deg, var(--panel-2), var(--panel)) !important;
  border: 1px solid var(--border) !important; border-radius: 8px; box-shadow: var(--frame);
}
.tech { border-left: 3px solid var(--gold) !important; }
.scale-labels { color: var(--muted) !important; }
.loop li { border-bottom: 1px solid var(--border-soft) !important; }
.loop li::before { background: var(--blood) !important; color: var(--goldb) !important; border: 1px solid var(--gold); }
code { color: var(--goldb); background: rgba(0,0,0,.4); padding: 1px 5px; border-radius: 3px; }
footer { color: var(--muted) !important; border-top: 1px solid var(--border-soft) !important; }

/* ---------- Small screens ---------- */
@media (max-width: 800px) {
  .cards { grid-template-columns: 1fr !important; }
  .layout { grid-template-columns: 1fr !important; }
  .menu a { padding: 8px 12px !important; }
  .logo, .stat { border-right: none; padding-right: 0; }
}

/* =====================================================================
   v2 — components for the game engine (game.js)
   ===================================================================== */
.muted { color: var(--muted); }
.warn { color: #789aea; font-style: normal; }
.ok { color: #b9dc98; }
.sec { margin: 26px 0 12px; font-size: 1.25rem; color: var(--goldb); }
.sec small { font-family: 'Source Sans 3', sans-serif; letter-spacing: 0; font-size: .85rem; margin-left: 10px; }
button { font: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; cursor: pointer; text-decoration: none; }
.btn svg { width: 18px; height: 18px; }
.btn small { font-family: 'Source Sans 3', sans-serif; text-transform: none; letter-spacing: 0; opacity: .8; }
.btn.danger { background: linear-gradient(180deg, #162b5c, #0a1632) !important; border-color: rgba(63,106,207,.75) !important; }
.btn.gold { background: linear-gradient(180deg, #47515e, #2a3038) !important; color: #e1e6ed !important; }
.btn.on { background: linear-gradient(180deg, #47515e, #2a3038) !important; color: #e1e6ed !important; }
.btn.wide { width: 100%; margin-top: 12px; padding: 12px; font-size: .9rem; }
select { background: #060a12; color: var(--text); border: 1px solid var(--border); border-radius: 4px; padding: 6px 8px; font-family: 'Source Sans 3', sans-serif; }

/* ---- top bar ---- */
.topbar { gap: 22px; flex-wrap: wrap; }
.g-logo { display: flex; align-items: center; gap: 10px; }
.g-logo img { width: 46px !important; height: 46px !important; object-fit: cover; mix-blend-mode: lighten; border-radius: 50%; }
.g-stat { display: flex; align-items: center; gap: 9px; color: var(--text); font-size: .98rem; padding-right: 22px; border-right: 1px solid var(--border-soft); }
.g-stat b { color: var(--goldb); font-weight: 600; }
.g-ic { color: var(--gold); display: inline-flex; }
.g-ic svg { width: 26px; height: 26px; }
.g-coin { background: radial-gradient(circle, #d7cba8, #7a889a); color: #2a3038; border-radius: 50%; padding: 2px; }
.g-coin svg { width: 22px; height: 22px; }
.g-mini { padding: 4px 10px !important; font-size: .7rem !important; }
.g-rep { border-right: none; }
.g-repbox { display: flex; flex-direction: column; gap: 5px; }
.g-bar { width: 190px !important; }
.g-day { font-family: 'IM Fell English SC', serif; color: var(--muted); letter-spacing: .08em; font-size: .85rem; }
.g-day b { color: var(--goldb); }
.g-icons { margin-left: auto; display: flex; gap: 18px; align-items: center; position: relative; }
.g-ib { background: none; border: none; color: var(--gold); cursor: pointer; position: relative; padding: 2px; display: inline-flex; }
.g-ib svg { width: 26px; height: 26px; }
.g-ib:hover { color: #e1e6ed; filter: drop-shadow(0 0 6px rgba(212,200,166,.5)); }
.g-badge { position: absolute; top: -6px; right: -8px; background: var(--blood); color: #ffffff; font-style: normal; font-size: .65rem; border: 1px solid var(--gold); border-radius: 10px; padding: 0 5px; }
.g-pop { display: none; position: absolute; right: 0; top: 40px; z-index: 50; min-width: 280px; padding: 14px; flex-direction: column; gap: 8px;
  background: linear-gradient(180deg, #0e1629, #060b15); border: 1px solid var(--gold); border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.7); font-size: .9rem; }
.g-pop.show { display: flex; }
.g-pop small { color: var(--muted); }

/* ---- toasts (v13.2) ----
   Same width, same right edge, same padding for every toast; text left-aligned
   with the ×N counter inline. game.js picks the mode from the page width:
   body.toast-gutter → fixed stack in the right gutter beside the content column;
   body.toast-bar    → slim centred bar in a reserved sticky strip under the menu. */
#g-toast-slot { position: sticky; top: 0; z-index: 9500; height: 0; pointer-events: none; }
/* in bar mode the ribbon sits below the gear/bell pop-ups (z 50) and modals, like the rest of the chrome */
body.toast-bar #g-toast-slot { z-index: 40; }
body.toast-bar .adm-bar { top: 40px; }   /* admin's sticky action bar parks under the ribbon */
#g-toasts { display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.g-toast { pointer-events: auto; cursor: pointer; box-sizing: border-box; width: 100%; margin: 0; position: relative;
  text-align: left; padding: 9px 12px 9px 16px; border-radius: 4px;
  background: linear-gradient(180deg, #121e39 0%, #0a1123 55%, #050b17 100%);
  border: 1px solid rgba(153,163,175,.75); box-shadow: inset 0 1px 0 rgba(226,214,179,.12), 0 0 0 1px rgba(0,0,0,.6), 0 8px 18px rgba(0,0,0,.55);
  color: #dbd2b6; font-family: 'IM Fell English SC', serif; font-size: 12px; line-height: 1.4; letter-spacing: .03em; overflow-wrap: anywhere;
  transition: opacity .4s, transform .4s; animation: g-toast-in .22s ease-out; }
.g-toast::before { content: ""; position: absolute; left: 5px; top: 7px; bottom: 7px; width: 3px; border-radius: 2px;
  background: linear-gradient(180deg, #d2c49b, #7c8a9b); }
.g-toast-m { display: block; }
.g-toast-n { display: inline-block; margin-left: 2px; padding: 0 6px; border-radius: 8px; font-size: 10.5px; line-height: 16px; vertical-align: 1px;
  color: #070d1b; background: #acb5c0; letter-spacing: 0; }
.g-toast.bad { border-color: rgba(63,106,207,.85); color: #99b3f0; }
.g-toast.bad::before { background: linear-gradient(180deg, #638be9, #2f52a3); }
.g-toast.bad .g-toast-n { background: #577ed9; }
.g-toast.bump { animation: g-toast-bump .25s ease-out; }
.g-toast.out { opacity: 0; transform: translateY(-4px); }
@keyframes g-toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes g-toast-bump { 50% { transform: scale(1.03); } }
/* gutter mode: a fixed column outside the content, bottom-right */
body.toast-gutter #g-toasts { position: fixed; bottom: 16px; width: 260px; }   /* right: set by game.js to centre it in the gutter */
/* bar mode: a slim "notice ribbon" under the menu. It is part of the page chrome
   (opaque, sticky to the top of the window, always there in this mode), so a
   notice inside it never covers page content: content scrolls under the ribbon
   the same way whether a notice is showing or not. One notice at a time. */
body.toast-bar #g-toast-slot { height: 40px; pointer-events: none;
  background: linear-gradient(180deg, rgba(9,15,29,.97), rgba(6,10,18,.97)); border-bottom: 1px solid rgba(153,163,175,.45);
  box-shadow: 0 4px 10px rgba(0,0,0,.45); }
body.toast-bar #g-toast-slot::after { content: "❖"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  color: rgba(153,163,175,.28); font-size: 11px; }
body.toast-bar #g-toast-slot:has(.g-toast:not(.out))::after { display: none; }
body.toast-bar #g-toasts { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); width: min(620px, calc(100vw - 20px)); z-index: 1; }
body.toast-bar .g-toast:not(:first-child) { display: none; }
body.toast-bar .g-toast { padding: 0 12px 0 16px; height: 32px; display: flex; align-items: center; box-shadow: inset 0 1px 0 rgba(226,214,179,.12); }
body.toast-bar .g-toast-m { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.2; font-size: 11.5px; }
body.toast-bar .g-toast::before { top: 5px; bottom: 5px; }

/* ---- meters ---- */
.g-meter { height: 7px; background: #070d1a; border: 1px solid rgba(153,163,175,.35); border-radius: 4px; overflow: hidden; }
.g-meter > div { height: 100%; background: linear-gradient(90deg, #5e6a7a, #c5b88f); }
.g-meter.hp > div { background: linear-gradient(90deg, #122d6c, #2450b7); }
.g-meter.food > div { background: linear-gradient(90deg, #49535f, #919caa); }
.g-meter.loy > div { background: linear-gradient(90deg, #5e6a7a, #d7cba8); }

/* ---- MAIN ---- */
.pg-index .cards .card { min-height: 200px; }
.pg-index .cards .card-body { padding-top: 26px; }
.pg-index .cards .card h2 { font-size: 1.7rem !important; }
.card-stat { color: var(--muted); margin-top: 6px; font-size: .82rem; }
.activity > .act-list, .activity > .act-item { border: none; }
.activity > .act-list { display: block !important; padding: 0 !important; border-bottom: none !important; }
.activity > .act-list::before, .activity > .act-item::before { content: none !important; }
.act-item { display: flex; align-items: center; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); }
.act-item:last-child { border-bottom: none; }
.act-ic { flex: 0 0 42px; height: 42px; border: 1px solid var(--gold); border-radius: 50%; display: grid; place-items: center; color: var(--gold);
  background: radial-gradient(circle, rgba(153,163,175,.14), transparent 70%); }
.act-ic svg { width: 22px; height: 22px; }
.act-item .desc { flex: 1; color: var(--text); font-size: 1rem; }
.act-item .desc span { display: block; color: var(--muted); font-size: .88rem; margin-top: 2px; }
.act-item .time { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.g-link { display: block; margin: 10px auto 0; background: none; border: none; color: var(--goldb); font-family: 'Source Sans 3', sans-serif; font-size: 1rem; cursor: pointer; }
.g-link:hover { color: #e1e6ed; text-decoration: underline; }
.favors-box { margin: 18px 0 0 auto; width: max-content; display: flex; align-items: center; gap: 12px; padding: 12px 22px; font-size: 1.1rem;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--frame); }
.favors-box b { color: var(--goldb); font-size: 1.3rem; }
.favors-box svg { width: 30px; height: 30px; color: var(--gold); }

/* ---- GLADIATORS ---- */
.sidebar h3 { display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; }
.sidebar .count { color: var(--muted); font-size: .9rem; }
.pg-glad .layout { grid-template-columns: 360px 1fr !important; }
.glad { display: grid !important; grid-template-columns: 52px 1fr auto 14px; gap: 10px; padding: 8px 10px !important; margin-bottom: 8px !important; }
.glad img { width: 52px !important; height: 52px !important; border-radius: 4px; object-position: top; }
.glad-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.glad-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.glad-info small { color: var(--muted); }
.glad-nums { display: flex; flex-direction: column; font-size: .78rem; color: var(--text); text-align: right; gap: 3px; white-space: nowrap; }
.glad-nums svg { width: 12px; height: 12px; color: var(--gold); vertical-align: -1px; }
.chev svg { width: 14px; height: 14px; color: var(--gold); }
.gd-top { display: grid; grid-template-columns: 1fr 360px; gap: 22px; }
.gd-left h1 { margin: 0; }
.gd-class { color: var(--gold); font-family: 'IM Fell English SC', serif; letter-spacing: .12em; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.gd-class svg { width: 18px; height: 18px; }
.gd-portrait img { width: 100%; height: 380px; object-fit: cover; object-position: 50% 28%; border-radius: 6px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000000 55%, transparent 80%); mask-image: radial-gradient(ellipse at 50% 40%, #000000 55%, transparent 80%); }
.gd-stats { border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; background: rgba(0,0,0,.3); box-shadow: var(--frame); align-self: start; }
.gd-stats h3 { font-size: 1rem; margin-bottom: 8px; border-bottom: 1px solid var(--border-soft); padding-bottom: 6px; }
.st-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 4px 0; font-size: .92rem; border-bottom: 1px dashed rgba(153,163,175,.12); }
.st-row > span { color: var(--text); }
.st-row b { color: var(--goldb); font-weight: 600; text-align: right; }
.st-row .g-meter { grid-column: 1 / -1; order: 3; }
.bonus { color: #b9dc98; font-style: normal; font-size: .8rem; }
.gd-desc { font-style: italic; color: var(--text); border: 1px solid var(--border-soft); border-radius: 6px; padding: 10px 14px; margin-top: 12px; background: rgba(0,0,0,.25); font-family: 'IM Fell English', serif; font-size: 1.1rem; }
.slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.slot { border: 1px solid var(--border); border-radius: 6px; padding: 8px; text-align: center; cursor: pointer; background: linear-gradient(180deg, rgba(17,30,59,.6), rgba(7,11,20,.8)); box-shadow: var(--frame); }
.slot:hover, .slot.picking { border-color: var(--goldb); box-shadow: var(--frame), 0 0 14px rgba(153,163,175,.3); }
.slot img { width: 100%; height: 74px; object-fit: cover; border-radius: 4px; }
.slot-empty { height: 74px; display: grid; place-items: center; color: var(--border); font-size: 2rem; border: 1px dashed var(--border-soft); border-radius: 4px; }
.slot.empty { opacity: .75; }
.slot-name { font-family: 'IM Fell English SC', serif; font-size: .72rem; color: var(--goldb); margin-top: 5px; line-height: 1.2; }
.slot-sub { font-size: .72rem; color: var(--muted); }
.slot-eq { font-size: .7rem; color: #b9dc98; }
.picker { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border: 1px dashed var(--border); border-radius: 6px; }
.picker b { font-family: 'IM Fell English SC', serif; color: var(--goldb); margin-right: 6px; }
.gd-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 16px; }
.gd-actions .btn { padding: 12px 8px; flex-direction: row; flex-wrap: wrap; }

/* ---- ARENA ---- */
.pg-arena .container { max-width: 900px; }
.arena-setup { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; text-align: left; }
.arena-setup label { display: flex; align-items: center; gap: 8px; font-family: 'IM Fell English SC', serif; color: var(--goldb); font-size: .85rem; }
.arena-setup input[type=number] { width: 90px; padding: 6px; }
.chk { font-family: 'Source Sans 3', sans-serif !important; color: var(--text) !important; }
.f-stats { font-family: 'Source Sans 3', sans-serif; font-size: .8rem; color: var(--text); margin-top: 4px; width: 150px; }
.f-stats .g-meter { margin-top: 4px; }
.odds { margin: 6px 0 14px; color: var(--text); }
.odds b { color: var(--goldb); }
.btn.big { font-size: 1.1rem; padding: 14px 40px; }
#result.win { color: #b9dc98; } #result.loss { color: #789aea; }
#result { margin-top: 14px; }
.fight-log { max-width: 520px; margin: 10px auto; color: var(--muted); font-size: .9rem; max-height: 160px; overflow: hidden; }

/* ---- EVENTS ---- */
.subtitle-laurel { text-align: center; font-family: 'IM Fell English SC', serif; color: var(--gold); letter-spacing: .14em; margin: -4px 0 16px; font-size: .95rem; }
.subtitle-laurel::before, .subtitle-laurel::after { content: " ❦ "; color: var(--gold); }
.draw-btn { font-size: 1.35rem !important; padding: 16px 40px !important; }
.draw-btn .ic svg { width: 30px; height: 30px; }
.draw-btn .die { font-size: 1.8rem; line-height: 1; }
.pg-events .container { max-width: 760px; }
.ev-head { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--border-soft); padding-bottom: 12px; margin-bottom: 12px; }
.ev-head img { width: 130px; height: 74px; object-fit: cover; border-radius: 4px; -webkit-mask-image: linear-gradient(90deg, #000000 60%, transparent); mask-image: linear-gradient(90deg, #000000 60%, transparent); }
.ev-head h2 { border: none !important; padding: 0 !important; margin: 0 !important; }
.ev-text { margin-bottom: 12px; }
.choice small { display: block; font-family: 'Source Sans 3', sans-serif; color: var(--text); opacity: .85; letter-spacing: 0; font-size: .85rem; margin-top: 2px; }
.choice.danger { background: linear-gradient(180deg, rgba(20,41,90,.85), rgba(10,20,45,.9)) !important; border-color: rgba(57,96,187,.65) !important; }
.choice.slave { border-style: double !important; border-width: 3px !important; }
.outcome:not(:empty) { margin-top: 18px; text-align: left; padding: 16px 20px; border: 1px solid var(--gold); border-radius: 8px; background: rgba(13,21,39,.85); box-shadow: var(--frame); }
.outcome h3 { font-size: 1rem; margin-bottom: 6px; }
.favors-line { margin-top: 22px; font-family: 'IM Fell English SC', serif; color: var(--gold); letter-spacing: .1em; display: flex; justify-content: center; align-items: center; gap: 8px; }
.favors-line svg { width: 26px; height: 26px; }
.favors-line b { color: var(--goldb); }

/* ---- MARKET ---- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 18px; align-items: center; }
.rar { font-family: 'Source Sans 3', sans-serif; font-size: .78rem; }
.r-Common { color: #e2e3e5; } .r-Uncommon { color: #9fd08a; } .r-Rare { color: #c5b88f; }
.bon { font-family: 'Source Sans 3', sans-serif; color: var(--text); font-size: .85rem; }
.price { font-family: 'Source Sans 3', sans-serif; color: var(--gold); font-weight: 600; margin: 4px 0; }
.who { font-family: 'Source Sans 3', sans-serif; font-size: .8rem; color: var(--muted); margin: 4px 0; }
.item select { width: 100%; margin: 4px 0; }
.item .btn { margin: 3px 2px; }

/* ---- REPUTATION ---- */
.rep-scale { margin-bottom: 18px; }
.rs-top { display: flex; justify-content: space-between; font-family: 'IM Fell English SC', serif; color: var(--goldb); margin-bottom: 8px; }
.rep-scale .scale-bar { height: 14px; border-radius: 7px; position: relative; border: 1px solid var(--border);
  background: linear-gradient(to right, #0f1c39, #3c5389, #a6acb3, #d7cba8); }
.scale-mark { position: absolute; top: -5px; width: 4px; height: 22px; background: #e1e6ed; box-shadow: 0 0 8px #d7cba8; border-radius: 2px; transform: translateX(-2px); }
.rep-scale .scale-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: .85rem; color: var(--muted); }
.relbar { position: relative; height: 8px; background: #070d1a; border: 1px solid var(--border-soft); border-radius: 4px; margin: 6px 0 2px; max-width: 360px; }
.relbar i { position: absolute; left: 50%; top: -3px; width: 1px; height: 12px; background: var(--gold); }
.relfill { position: absolute; top: 0; bottom: 0; }
.relfill.friendly { background: #6fa055; } .relfill.neutral { background: #a6acb3; } .relfill.hostile { background: #2f54ab; }
.pol-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.pol img { width: 80px !important; height: 100px !important; object-position: top; }

/* ---- SLAVES ---- */
.pg-slaves .container { max-width: 1240px; }
.house-bar { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: space-between; }
.house-bar b { color: var(--goldb); }
.slaves { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important; }
.slave { text-align: left !important; display: flex; flex-direction: column; gap: 4px; }
.slave h3 { text-align: center; }
.sl-sub { text-align: center; color: var(--muted); font-size: .85rem; }
.slave .debt { color: #789aea; font-weight: 700; }
.meters { display: grid; gap: 2px; margin: 6px 0; }
.meters label { font-size: .75rem; color: var(--muted); font-family: 'IM Fell English SC', serif; letter-spacing: .05em; }
.traits { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: .84rem; margin: 6px 0; }
.traits dt { color: var(--gold); font-family: 'IM Fell English SC', serif; font-size: .72rem; letter-spacing: .04em; padding-top: 2px; }
.traits dd { color: var(--text); }
.trait-in { width: 100% !important; padding: 2px 6px !important; font-size: .82rem; }
.sl-pay { display: flex; gap: 6px; margin-top: 4px; }
.sl-pay input { flex: 1; width: auto; margin: 0 !important; }
.sl-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.sl-acts .btn { padding: 6px; font-size: .72rem; }
.offers { display: grid; gap: 10px; margin-top: 12px; }
.offer { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--border-soft); border-radius: 6px; background: rgba(0,0,0,.25); }
.offer img { width: 60px; height: 70px; object-fit: cover; object-position: top; border-radius: 4px; border: 1px solid var(--border); }
.offer small { color: var(--muted); }

@media (max-width: 1000px) {
  .gd-top { grid-template-columns: 1fr; } .slots { grid-template-columns: repeat(3, 1fr); } .gd-actions { grid-template-columns: repeat(2, 1fr); }
  .pg-glad .layout { grid-template-columns: 1fr !important; }
}

/* v2 tweaks */
.ic-img { width: 30px; height: 30px; object-fit: cover; mix-blend-mode: lighten; border-radius: 50%; display: inline-block; vertical-align: middle; }
.act-ic .ic-img { width: 34px; height: 34px; }
.btn .ic-img { width: 22px; height: 22px; }
.pg-index .cards .card { grid-template-columns: 42% 1fr; }
.pg-index .cards .card h2 { font-size: 1.5rem !important; white-space: nowrap; }
.pg-glad .layout { grid-template-columns: 380px 1fr !important; }
.gd-actions .btn { flex-wrap: nowrap !important; white-space: nowrap; font-size: .74rem; gap: 5px; }
.gd-actions .btn small { font-size: .7rem; }

.sl-pay .btn { white-space: nowrap; font-size: .72rem; padding: 6px 10px; }

/* ---- v3 ---- */
.center { text-align: center; }
.badge { display: inline-block; font-family: 'Source Sans 3', sans-serif; font-size: .7rem; padding: 0 7px; border-radius: 10px; border: 1px solid currentColor; letter-spacing: 0; text-transform: none; font-style: normal; white-space: nowrap; }
.badge.ready { color: #b9dc98; } .badge.wait { color: #c5b88f; }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }
.staff-tabs { display: flex; gap: 10px; justify-content: center; margin-bottom: 6px; }
.g-meter.disc > div { background: linear-gradient(90deg, #3b4a6a, #8fa6d0); }
.guard .traits dd b { font-weight: 700; }
.ph-box { border: 1px dashed var(--border); border-radius: 6px; padding: 8px 10px; margin: 6px 0; text-align: center; background: rgba(0,0,0,.3); display: grid; gap: 5px; }
.ph-label { font-family: 'IM Fell English SC', serif; color: var(--gold); font-size: .78rem; letter-spacing: .08em; }
.ph-timer { font-family: 'IM Fell English SC', serif; color: var(--goldb); font-size: 1.15rem; letter-spacing: .05em; font-variant-numeric: tabular-nums; }
.ph-box.done { border-color: #3f6acf; background: rgba(20,41,90,.45); }
.ph-box.done .ph-timer { color: #8ca9ed; }
.ph-box .btn { justify-self: center; }
.pg-chars .container { max-width: 1240px; }
.char-head { display: grid; grid-template-columns: 300px 1fr; gap: 24px; padding: 20px; margin: 16px 0 22px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--frame); }
.ch-portrait img { width: 100%; height: 340px; object-fit: cover; object-position: top; border: 1px solid var(--border); border-radius: 6px; display: block; }
.ch-title { font-family: 'IM Fell English SC', serif; color: var(--gold); letter-spacing: .14em; font-size: .85rem; }
.ch-name { width: 100% !important; font-family: 'IM Fell English SC', serif !important; font-size: 1.35rem; color: var(--goldb) !important; background: transparent !important; border: none !important; border-bottom: 1px solid var(--border-soft) !important; border-radius: 0; padding: 6px 2px !important; margin: 4px 0 10px; }
.ch-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.ch-stats > div { border: 1px solid var(--border-soft); border-radius: 6px; padding: 8px 10px; background: rgba(0,0,0,.25); display: grid; gap: 3px; }
.ch-stats span, .ch-debt span { font-family: 'IM Fell English SC', serif; font-size: .7rem; color: var(--gold); letter-spacing: .06em; }
.ch-stats b { color: var(--goldb); }
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.cf { display: grid; gap: 2px; }
.cf label { font-family: 'IM Fell English SC', serif; font-size: .7rem; color: var(--gold); letter-spacing: .06em; }
.cf input, .cf textarea { width: 100%; background: #060a12; border: 1px solid var(--border-soft); color: var(--text); border-radius: 4px; padding: 5px 7px; font-family: 'Source Sans 3', sans-serif; font-size: .9rem; resize: vertical; }
.cf textarea:focus, .cf input:focus { outline: none; border-color: var(--goldb); }
.char-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.char-card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--frame); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.char-card .ch-portrait img { height: 260px; }
.char-card .ch-name { font-size: 1.1rem; text-align: center; }
.ch-debt { border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; background: rgba(11,25,59,.35); display: grid; gap: 6px; }
.ch-debt b { font-size: 1.15rem; margin-left: 6px; }
.g-link.small { display: inline; font-size: .8rem; margin: 0 0 0 8px; }
.cf-list { display: grid; gap: 6px; }
@media (max-width: 1100px) { .char-grid { grid-template-columns: 1fr 1fr; } .char-head { grid-template-columns: 1fr; } .ch-stats { grid-template-columns: 1fr 1fr; } }

.fatigue-warn:not(:empty) { max-width: 640px; margin: 0 auto 12px; padding: 8px 14px; border: 1px solid #c5b88f; border-radius: 6px; background: rgba(56,65,77,.35); color: #c9d0da; font-size: .9rem; }
.btn.fatigued { background: linear-gradient(180deg, #434e5c, #272d35) !important; border-color: #c5b88f !important; }
.g-sec.low b { color: #789aea; }
.staff-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sec-meter { min-width: 220px; }
.slave .rm { align-self: flex-end; margin-top: 4px; }
.char-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.char-card, .char-card * { min-width: 0; }
.char-card input, .char-card textarea { width: 100%; box-sizing: border-box; }
.ch-pay { display: flex; gap: 6px; } .ch-pay input { flex: 1; }
@media (max-width: 1100px) { .char-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- v4 events: narrative outcome, chains, memories ---- */
.outcome.narr:not(:empty) { position: relative; padding: 20px 26px 16px; border-color: var(--goldb, #c5b88f); background: linear-gradient(180deg, rgba(17,29,57,.92), rgba(9,15,29,.94)); }
.narr-head { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--border-soft); padding-bottom: 8px; margin-bottom: 10px; }
.narr-k { font-family: 'IM Fell English SC', serif; font-size: .72rem; letter-spacing: .18em; color: var(--gold, #99a3af); text-transform: uppercase; }
.narr-head h3 { margin: 0 !important; font-size: 1.15rem !important; font-variant: small-caps; }
.narr-choice { font-size: .85rem; opacity: .75; margin: 0 0 8px; }
.narr-main { font-family: 'IM Fell English SC', serif; font-size: 1.05rem; line-height: 1.55; color: #c9d0da !important; opacity: 1 !important; margin: 0 0 8px; }
.narr-extra { list-style: none; padding: 0; margin: 0 0 8px; }
.narr-extra li { padding: 3px 0 3px 18px; position: relative; font-style: italic; opacity: .92; }
.narr-extra li::before { content: '◆'; position: absolute; left: 0; color: var(--gold, #99a3af); font-size: .7rem; top: 6px; font-style: normal; }
.narr-foot { font-size: .75rem; opacity: .55; margin: 4px 0 0; }
.ev-chain { display: block; font-family: 'IM Fell English SC', serif; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: #789aea; margin-bottom: 2px; }
.threads { margin-top: 10px; font-size: .85rem; opacity: .8; font-style: italic; min-height: 1.2em; }
.threads .thread-due { color: #cebf93; opacity: 1; font-style: normal; font-weight: 600; }
.memories:not(:empty) { margin-top: 18px; text-align: left; padding: 14px 20px; border: 1px solid var(--border-soft); border-radius: 8px; background: rgba(10,16,30,.75); }
.memories h3 { font-size: .9rem; letter-spacing: .12em; margin: 0 0 8px; color: var(--gold, #99a3af); }
.memories ul { list-style: none; padding: 0; margin: 0; }
.memories li { padding: 4px 0; border-bottom: 1px solid rgba(153,163,175,.12); font-size: .9rem; }
.memories li:last-child { border-bottom: none; }
.memories li span { display: inline-block; min-width: 54px; font-size: .75rem; opacity: .6; }
.memories li.mem-grudge { color: #83a2ea; } .memories li.mem-favor { color: #d0c6a8; } .memories li.mem-loss { color: #d7d9db; font-style: italic; }
.choice { font-size: 1rem; }

/* ---- hidden admin page ---- */
.adm { max-width: 1240px; }
.adm-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 14px 0; position: sticky; top: 0; z-index: 5; padding: 10px; background: rgba(8,14,26,.92); border: 1px solid var(--border-soft); border-radius: 8px; }
.adm-bar label.btn { cursor: pointer; }
.adm-paste { margin: 8px 0 14px; } .adm-paste textarea { width: 100%; box-sizing: border-box; }
.adm-msg { height: 0; overflow: hidden; text-align: center; color: #bde3a8; transition: height .2s; } .adm-msg.show { height: 1.6em; } .adm-msg.bad { color: #789aea; }
.adm-panel { margin: 18px 0; padding: 18px 20px; text-align: left; }
.adm-sub { font-size: .9rem; letter-spacing: .1em; color: var(--gold, #99a3af); margin: 14px 0 6px; }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; }
.adm-grid.cfg { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.adm-f { display: flex; flex-direction: column; gap: 3px; font-size: .8rem; }
.adm-f > span { font-family: 'IM Fell English SC', serif; font-size: .72rem; letter-spacing: .08em; color: var(--gold, #99a3af); }
.adm-f small { opacity: .55; font-size: .72rem; }
.adm-f.changed > span { color: #cebf93; } .adm-f.changed input { border-color: #cebf93 !important; }
.adm-in, .adm select, .adm-paste textarea { background: rgba(4,6,10,.6); color: var(--text, #d0d4da); border: 1px solid rgba(153,163,175,.35); border-radius: 4px; padding: 4px 6px; font: inherit; font-size: .85rem; }
.adm-t { border-collapse: collapse; width: 100%; font-size: .82rem; margin: 6px 0 10px; }
.adm-t th { font-family: 'IM Fell English SC', serif; font-size: .68rem; letter-spacing: .06em; color: var(--gold, #99a3af); text-align: left; padding: 4px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.adm-t td { padding: 3px 4px; border-bottom: 1px solid rgba(153,163,175,.08); }
.adm-t td .adm-in { width: 100%; min-width: 52px; box-sizing: border-box; }
.adm-t td .adm-in[type="text"] { min-width: 120px; }
.adm-scroll { overflow-x: auto; }
.adm-ro { color: #c9d0da; font-weight: 600; text-align: center; }
.adm-timer { display: flex; gap: 4px; align-items: center; } .adm-timer .adm-in { width: 80px !important; }
.adm-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 10px 0; }
.adm-narrow { width: 140px; }

/* ---- v5: calendar, festivals, goods, grades, household, modal ---- */
.g-day { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.g-date { font-family: 'Source Sans 3', sans-serif; font-size: .7rem; letter-spacing: .02em; color: var(--text, #d0d4da); opacity: .85; text-transform: none; white-space: nowrap; }
.g-date i { color: #cebf93; font-style: normal; }
.fest-banner:not([hidden]) { display: block; margin: 0 0 18px; padding: 16px 22px; text-align: center; border: 1px solid var(--goldb, #c5b88f); border-radius: 8px;
  background: radial-gradient(ellipse at center, rgba(22,50,114,.85), rgba(9,18,39,.95)); box-shadow: 0 0 24px rgba(197,184,143,.18), var(--frame, none); }
.fest-banner .fb-k { font-family: 'IM Fell English SC', serif; font-size: .7rem; letter-spacing: .3em; color: var(--gold, #99a3af); text-transform: uppercase; }
.fest-banner h2 { margin: 2px 0 6px !important; font-size: 1.7rem; color: #c9d0da; letter-spacing: .08em; }
.fest-banner p { margin: 0 auto 6px; max-width: 760px; } .fest-banner small { opacity: .8; }
.dash-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin: 18px 0; }
.dash-row .panel { padding: 16px 20px; text-align: left; }
.dash-row h3 { margin: 0 0 8px; letter-spacing: .1em; } .dash-row h4 { margin: 12px 0 4px; font-size: .8rem; letter-spacing: .12em; color: var(--gold, #99a3af); }
.cal-date { display: flex; align-items: baseline; gap: 12px; } .cal-date b { font-family: 'IM Fell English SC', serif; font-size: 1.4rem; color: #c9d0da; } .cal-date span { opacity: .8; }
.cal-up { list-style: none; padding: 0; margin: 0; } .cal-up li { display: grid; grid-template-columns: 1.4fr 1fr .8fr; padding: 4px 0; border-bottom: 1px solid rgba(153,163,175,.12); font-size: .9rem; }
.cal-up li i { text-align: right; opacity: .7; }
.st-mini { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin: 4px 0; }
.st-mini b, .st-badge b, .grade b { display: inline-grid; place-items: center; border-radius: 50%; font-family: 'IM Fell English SC', serif; color: #090e1b; }
.st-mini b { width: 38px; height: 38px; font-size: 1rem; } .st-mini span { font-family: 'IM Fell English SC', serif; font-size: 1.1rem; color: #c9d0da; }
.g1 b { background: radial-gradient(circle at 35% 30%, #c9bd98, #697687 70%, #404954); }
.g2 b { background: radial-gradient(circle at 35% 30%, #ffffff, #b9bec4 60%, #6c7279); }
.g3 b { background: radial-gradient(circle at 35% 30%, #d3dae4, #a5afbd 60%, #536173); }
.grade { display: inline-flex; align-items: center; gap: 6px; font-family: 'IM Fell English SC', serif; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px 2px 2px; border-radius: 12px; border: 1px solid; }
.grade b { width: 20px; height: 20px; font-size: .62rem; }
.grade.g1 { color: #c5b995; border-color: rgba(139,151,167,.6); background: rgba(139,151,167,.1); }
.grade.g2 { color: #d9dde2; border-color: rgba(192,197,204,.6); background: rgba(192,197,204,.08); }
.grade.g3 { color: #cebf93; border-color: rgba(172,182,195,.75); background: rgba(172,182,195,.12); }
.mk-season { margin: -4px 0 12px; opacity: .85; font-size: .9rem; }
.mk-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 12px; }
.mk-tab { font-family: 'IM Fell English SC', serif; letter-spacing: .08em; font-size: .9rem; padding: 9px 16px; cursor: pointer; color: var(--text, #d0d4da);
  background: linear-gradient(180deg, rgba(17,30,59,.9), rgba(9,15,29,.95)); border: 1px solid rgba(153,163,175,.4); border-radius: 6px; }
.mk-tab span { margin-right: 6px; } .mk-tab.on { border-color: var(--goldb, #c5b88f); color: #c9d0da; box-shadow: 0 0 12px rgba(197,184,143,.3); }
.mk-note { margin-left: 10px; font-size: .85rem; }
.item.good { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; position: relative; }
.item.good .gd-ic { font-size: 2rem; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; margin: 4px auto 2px;
  background: radial-gradient(circle, rgba(22,42,88,.9), rgba(9,15,29,.9)); border: 1px solid rgba(153,163,175,.35); }
.item.good.grade-2 .gd-ic { border-color: rgba(192,197,204,.6); } .item.good.grade-3 .gd-ic { border-color: rgba(172,182,195,.85); box-shadow: 0 0 14px rgba(172,182,195,.25); }
.item.good.grade-3 { border-color: rgba(172,182,195,.6) !important; }
.gd-name { font-family: 'IM Fell English SC', serif; color: #c9d0da; font-size: .95rem; line-height: 1.25; }
.gd-latin { font-size: .75rem; font-style: italic; opacity: .65; }
.gd-desc { font-size: .82rem; opacity: .85; margin: 2px 0 4px; min-height: 2.4em; }
.gd-req { font-size: .75rem; color: #83a2ea; } .gd-req.ok { color: #bde3a8; }
.gd-eff { font-size: .8rem; color: #bde3a8; } .gd-unl { font-size: .72rem; opacity: .7; }
.gd-paid { font-size: .8rem; opacity: .85; }
.item.good.locked { opacity: .6; } .item.good.room.opened { border-color: rgba(150,200,120,.5) !important; }
.price s { opacity: .5; font-size: .8em; }
.hh-station { display: flex; gap: 22px; align-items: center; padding: 18px 24px; text-align: left; margin-bottom: 8px; }
.st-badge { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 120px; }
.st-badge b { width: 74px; height: 74px; font-size: 1.8rem; box-shadow: 0 0 18px rgba(172,182,195,.25); }
.st-badge span { font-family: 'IM Fell English SC', serif; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.st-body { flex: 1; } .st-body h2 { margin: 0 0 4px !important; font-size: 1.3rem; }
.st-bar { height: 8px; border-radius: 4px; background: rgba(0,0,0,.45); border: 1px solid rgba(153,163,175,.3); overflow: hidden; margin: 8px 0 6px; }
.st-bar div { height: 100%; background: linear-gradient(90deg, #536173, #a5afbd, #d3dae4); }
.hh-rooms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.hh-room { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px dashed rgba(153,163,175,.3); border-radius: 6px; background: rgba(6,10,20,.6); opacity: .7; text-align: left; }
.hh-room.open { border-style: solid; border-color: rgba(153,163,175,.6); background: rgba(13,24,49,.85); opacity: 1; }
.hh-room b { font-family: 'IM Fell English SC', serif; color: #c9d0da; } .hh-room i { font-size: .75rem; opacity: .65; } .hh-room small { font-size: .75rem; }
.hh-room .grade { align-self: flex-start; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: grid; place-items: center; z-index: 100; }
.modal-bg[hidden] { display: none; }
.modal { max-width: 440px; width: 92%; padding: 22px 26px; text-align: left; box-shadow: 0 0 40px rgba(0,0,0,.8), 0 0 0 1px var(--goldb, #c5b88f); }
.modal h3 { margin: 0 0 10px; } .modal-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.gold-t { color: #cebf93; }
.crowd-line { color: #cebf93; font-size: .85rem; margin-bottom: 4px; }
.slots-t td { vertical-align: middle; }
@media (max-width: 900px) { .dash-row { grid-template-columns: 1fr; } .hh-rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ev-chain.ev-fest { color: #cebf93; }

.adm-rooms { display: flex; flex-wrap: wrap; gap: 8px 18px; } .adm-chk { font-size: .85rem; display: inline-flex; gap: 6px; align-items: center; }
.slot-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .slot-btns .btn { padding: 4px 10px !important; font-size: .75rem !important; }
.slot-auto td { background: rgba(153,163,175,.05); }

.g-right { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.g-right .g-icons { margin-left: 0; }
.g-right .g-day { padding-right: 18px; border-right: 1px solid var(--border-soft); }

/* ---------- v6 shared save ---------- */
.g-sync:empty { display: none; }
.g-sync { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; font-family: 'IM Fell English SC', serif; font-size: .72rem; letter-spacing: .06em;
  color: var(--muted); border: 1px solid var(--border-soft); border-radius: 12px; padding: 3px 9px; margin-right: 10px; background: rgba(0,0,0,.25); }
.g-sync i { width: 8px; height: 8px; border-radius: 50%; background: #777777; flex: none; }
.g-sync.s-live i { background: #5fbf5a; box-shadow: 0 0 6px #5fbf5a; }
.g-sync.s-polling i { background: #a1abb8; }
.g-sync.s-syncing i, .g-sync.s-connecting i { background: #a1abb8; animation: gsyncPulse .8s ease-in-out infinite alternate; }
.g-sync.s-offline i { background: #4366b6; }
.g-sync.s-offline { color: #7291d8; }
.g-sync.flash { animation: gsyncFlash 1.2s ease-out; }
@keyframes gsyncPulse { from { opacity: .35; } to { opacity: 1; } }
@keyframes gsyncFlash { 0% { box-shadow: 0 0 0 0 rgba(161,171,184,.9); color: var(--goldb); } 100% { box-shadow: 0 0 0 10px rgba(161,171,184,0); } }
.sync-panel { display: flex; flex-direction: column; gap: 7px; border-top: 1px solid var(--border-soft); padding-top: 9px; margin-top: 2px; }
.sync-h { font-family: 'IM Fell English SC', serif; color: var(--goldb); letter-spacing: .08em; font-size: .85rem; }
.sync-panel label { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; color: var(--muted); }
.sync-panel input { background: rgba(0,0,0,.35); border: 1px solid var(--border-soft); color: var(--text); padding: 5px 7px; border-radius: 4px; font: inherit; font-size: .85rem; width: 100%; box-sizing: border-box; min-width: 0; }
.sync-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-panel .sync-panel { border-top: none; padding-top: 0; max-width: 520px; }
.act-by { color: var(--goldb); font-style: italic; font-size: .85em; }
.adm-syncnote { border: 1px solid var(--goldb); background: rgba(161,171,184,.12); padding: 10px 12px; border-radius: 6px; margin: 8px 0; }

/* ---------- v7 debt ---------- */
.dash-debt { margin: 18px 0; }
.dash-debt h3 { font-family: 'IM Fell English SC', serif; color: var(--goldb); letter-spacing: .08em; margin: 0 0 12px; }
.debt-grid { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr; gap: 16px; }
.debt-grid > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 6px; background: rgba(0,0,0,.22); }
.debt-k { font-family: 'IM Fell English SC', serif; font-size: .74rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.debt-big { font-family: 'IM Fell English SC', serif; font-size: 2rem; color: var(--goldb); }
.debt-due b { font-family: 'IM Fell English SC', serif; font-size: 1.5rem; color: var(--text); }
.debt-due.urgent { border-color: #4366b6; background: rgba(27,53,114,.35); }
.debt-due.urgent b { color: #84a3ea; }
.debt-due.paid b { color: #8fd48a; }
.debt-auto { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.debt-btns, .debt-custom { display: flex; gap: 6px; flex-wrap: wrap; }
.debt-custom input { flex: 1; min-width: 0; background: rgba(0,0,0,.35); border: 1px solid var(--border-soft); color: var(--text); padding: 6px 8px; border-radius: 4px; font: inherit; }
.debt-warn { color: #84a3ea; border-left: 3px solid #4366b6; padding: 6px 10px; margin: 12px 0 0; background: rgba(27,53,114,.25); }
.debt-proj { margin: 12px 0 4px; }
.debt-free { font-size: 1.1rem; color: #8fd48a; }
.ev-debt { background: rgba(27,53,114,.5); border-color: #4366b6; }
.draws-left { display: block; color: var(--muted); font-size: .85rem; margin-top: 4px; }
@media (max-width: 900px) { .debt-grid { grid-template-columns: 1fr; } }
.ev-chain.ev-debt { display: inline-block; width: auto; padding: 1px 8px; border: 1px solid #4366b6; border-radius: 3px; color: #a4b9e8; margin: 2px 0 4px; }

/* v7.1 household accounts */
.dash-acct { margin: 18px 0; }
.dash-acct h3 { font-family: 'IM Fell English SC', serif; color: var(--goldb); letter-spacing: .08em; margin: 0 0 10px; }
.dash-acct h3 small { font-family: inherit; letter-spacing: 0; text-transform: none; font-size: .8rem; }
.acct-list { display: flex; flex-direction: column; gap: 6px; }
.acct-row { display: grid; grid-template-columns: 28px 1fr auto 70px; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--border-soft); border-radius: 6px; background: rgba(0,0,0,.22); }
.acct-row.off { opacity: .5; }
.acct-row input[type=checkbox] { width: 18px; height: 18px; accent-color: #99a3af; }
.acct-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acct-sub { color: var(--muted); opacity: .85; overflow-wrap: anywhere; }
.acct-amt { font-family: 'IM Fell English SC', serif; font-size: 1.1rem; color: var(--goldb); text-align: right; white-space: nowrap; }
.acct-one { text-align: right; }
.acct-one .btn.small, .btn.small { padding: 4px 10px; font-size: .78rem; }
.acct-extra input { width: 140px; max-width: 100%; margin-top: 4px; background: rgba(0,0,0,.35); border: 1px solid var(--border-soft); color: var(--text); padding: 5px 8px; border-radius: 4px; font: inherit; }
.acct-total { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border-top: 1px solid var(--border-soft); }
.acct-total > span:first-child { font-family: 'IM Fell English SC', serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-size: .8rem; }
.acct-total b { font-family: 'IM Fell English SC', serif; font-size: 1.5rem; color: var(--goldb); }
.acct-total .btn { margin-left: auto; }
.acct-confirm { margin-top: 12px; padding: 12px 14px; border: 1px solid #4366b6; border-radius: 6px; background: rgba(27,53,114,.3); }
.acct-confirm p { margin: 6px 0; }
.acct-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.acct-note { margin: 10px 0 0; }
.acct-clear { margin: 0 0 8px; }
@media (max-width: 600px) { .acct-row { grid-template-columns: 24px 1fr auto; } .acct-one { grid-column: 2 / 4; text-align: left; } }

/* =====================================================================
   v8 — art slots, compact dashboard, ledger, notes, politics, forum
   ===================================================================== */
/* Art slots: a generated image if present, otherwise the emoji (data-emo). */
.art { position: relative; display: inline-grid; place-items: center; overflow: hidden; vertical-align: middle; line-height: 1; }
.art > img { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; margin: 0 !important; border: 0 !important; padding: 0 !important; border-radius: inherit; object-fit: cover; display: block; }   /* fills the slot exactly; the slot sets the size */
.art.art-room, .art.art-ev { display: grid; }
.gd-room { width: 100%; }   /* fills the slot exactly; the slot sets the size */
.art.noimg::after { content: attr(data-emo); }
.item.good .gd-ic .art-ic { width: 100%; height: 100%; border-radius: 50%; font-size: 2rem; }
.mk-tab .art-tab { width: 22px; height: 22px; border-radius: 50%; margin-right: 7px; font-size: 1rem; }
.gd-room { margin: -14px -14px 8px; }
.gd-room .art-room { width: 100%; height: 110px; font-size: 2.6rem; background: radial-gradient(circle at 50% 40%, rgba(31,56,114,.55), rgba(6,10,20,.9)); border-bottom: 1px solid var(--border-soft); }
.hh-room .art-room { width: 100%; height: 64px; margin-bottom: 6px; border-radius: 4px; font-size: 1.8rem; background: radial-gradient(circle at 50% 40%, rgba(31,56,114,.5), rgba(6,10,20,.9)); }
.ev-head .art-ev { width: 260px; height: 146px; flex: none; border-radius: 4px; font-size: 2.4rem; background: radial-gradient(circle, rgba(31,56,114,.6), rgba(6,10,20,.2)); }
.ev-head .art-ev img { -webkit-mask-image: linear-gradient(90deg, #000000 70%, transparent); mask-image: linear-gradient(90deg, #000000 70%, transparent); }
@media (max-width: 560px) { .ev-head { flex-wrap: wrap; } .ev-head .art-ev { width: 100%; height: auto; aspect-ratio: 16 / 9; } .ev-head .art-ev img { -webkit-mask-image: none; mask-image: none; } }

/* Market: links to the other places to buy */
.mk-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.mk-link { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--text); padding: 8px 10px; border: 1px solid var(--border-soft); border-radius: 6px; background: rgba(0,0,0,.2); }
.mk-link:hover { border-color: var(--goldb); }
.mk-link .art-ic { width: 44px; height: 44px; flex: none; border-radius: 50%; font-size: 1.4rem; border: 1px solid var(--border-soft); background: rgba(22,39,78,.5); }
.mk-link b { display: block; font-family: 'IM Fell English SC', serif; color: var(--goldb); font-size: .9rem; }
.mk-link small { color: var(--muted); }

/* ---- compact dashboard (index) ---- */
.dash { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dt { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 8px;
  background: linear-gradient(180deg, rgba(15,25,47,.82), rgba(7,12,22,.88)); text-decoration: none; color: var(--text); box-shadow: inset 0 0 0 1px rgba(0,0,0,.5); }
a.dt:hover { border-color: var(--goldb); }
.dt-k { font-family: 'IM Fell English SC', serif; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.dt-k svg { width: 14px; height: 14px; }
.dt > b { font-family: 'IM Fell English SC', serif; font-size: 1.45rem; color: var(--goldb); line-height: 1.15; overflow-wrap: anywhere; }
.dt > b small { font-family: 'Source Sans 3', sans-serif; font-size: .75rem; color: var(--muted); letter-spacing: 0; }
.dt-sub { font-size: .8rem; color: var(--muted); }
.dt-sub b { color: var(--text); }
.dt-date { grid-column: span 2; }
.dt-date .dt-date-main { font-size: 1.6rem; }
.dt-fest { color: #cebf93; font-family: 'IM Fell English SC', serif; font-size: .85rem; letter-spacing: .04em; }
.dt-fest small { font-family: 'Source Sans 3', sans-serif; color: var(--muted); letter-spacing: 0; }
.dt.urgent { border-color: #4366b6; background: linear-gradient(180deg, rgba(24,48,105,.6), rgba(9,18,39,.9)); }
.dt.urgent > b { color: #84a3ea; }
.dt.paid > b { color: #8fd48a; }
.dt.bell { border-color: var(--goldb); box-shadow: 0 0 14px rgba(212,200,166,.25); }
.dt-staff, .dt-glad, .dt-ev { grid-column: span 2; }
.dt-ev > b { font-size: 1.2rem; }
.g-lbl { font-style: normal; }
.dt-list { list-style: none; padding: 0; margin: 2px 0 0; font-size: .85rem; }
.dt-list li { padding: 1px 0; }
.dt-glads { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.dt-glads .gd { font-size: .75rem; padding: 1px 7px; border-radius: 10px; border: 1px solid var(--border-soft); white-space: nowrap; }
.dt-glads .gd.ready { border-color: rgba(143,212,138,.6); color: #b9dc98; }
.dt-glads .gd.rest { color: var(--muted); } .dt-glads .gd.rest i { font-style: normal; opacity: .75; }
.dt-glads .gd.hurt { border-color: rgba(63,106,207,.7); color: #84a3ea; }
.dt-links { grid-column: span 4; display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; padding: 10px; }
.dt-links a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; text-decoration: none; color: var(--goldb); font-family: "IM Fell English SC", serif; font-size: .64rem; letter-spacing: .02em; overflow: hidden; min-width: 0; border: 1px solid var(--border-soft); border-radius: 6px; background: rgba(0,0,0,.25); }
.dt-links a span { font-size: 1.2rem; }
.dt-links a:hover { border-color: var(--goldb); }
.dt-act { grid-column: span 4; }
.dt-log { list-style: none; padding: 0; margin: 2px 0 4px; font-size: .85rem; }
.dt-log li { padding: 2px 0; border-bottom: 1px solid rgba(153,163,175,.1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-log em { color: var(--muted); }
@media (max-width: 900px) { .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dt-links, .dt-act { grid-column: span 2; } }

/* ---- compact chrome for small windows (Second Life HUD at 512–800 px) ---- */
@media (max-width: 820px) {
  .topbar { gap: 8px 12px !important; padding: 6px 10px !important; flex-wrap: wrap; }
  .g-logo img { width: 28px !important; height: 28px !important; }
  .g-logo span { font-size: 1rem; letter-spacing: .08em; }
  .g-stat { padding-right: 10px; font-size: .85rem; gap: 5px; }
  .g-ic svg { width: 18px; height: 18px; } .g-coin svg { width: 15px; height: 15px; }
  .g-lbl { display: none; }
  .g-rep { display: none !important; }
  .g-right { gap: 8px !important; margin-left: auto; }
  .g-date { display: none; }
  .g-icons { gap: 10px !important; }
  .g-ib svg { width: 20px; height: 20px; }
  .menu { flex-wrap: wrap !important; justify-content: center !important; overflow-x: visible; padding: 4px 6px 6px !important; row-gap: 2px; }   /* v13: wraps — every page stays one tap away (no icon tiles any more) */
  .menu a { padding: 5px 9px !important; font-size: .68rem !important; letter-spacing: .05em; white-space: nowrap; gap: 5px !important; }
  .menu a img { width: 16px !important; height: 16px !important; }
  .container { padding: 12px 10px 24px; }
  h1 { font-size: 1.5rem; margin: 6px 0; }
  .mk-links { grid-template-columns: 1fr; }
  .layout { grid-template-columns: minmax(0, 1fr) !important; padding: 0 8px !important; margin: 10px auto !important; }
  .layout > .main { min-width: 0; }
  .gd-top { grid-template-columns: 1fr !important; }
  .pg-glad .layout { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 560px) {
  .g-logo span { display: none; }
  .topbar { flex-wrap: nowrap !important; gap: 6px !important; }
  .g-sec { display: none !important; }
  .g-stat { padding-right: 6px; }
  .g-day { font-size: .72rem; }
  .g-icons { gap: 6px !important; }
  .dash { gap: 8px; }
  .dt { padding: 8px 10px; }
  .dt > b { font-size: 1.15rem; }
  .dt-date .dt-date-main { font-size: 1.2rem; }
  .dt-sub, .dt-list, .dt-log { font-size: .75rem; }
  .dt-links { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
  .dt-links a { font-size: .62rem; padding: 5px 2px; }
}

/* ---- ledger ---- */
.lg-chart h3, .lg-month h3, .lg-hist h3 { font-family: 'IM Fell English SC', serif; color: var(--goldb); letter-spacing: .08em; margin: 0 0 10px; }
.lg-chart h3 small, .lg-month h3 small { font-family: 'Source Sans 3', sans-serif; letter-spacing: 0; font-size: .8rem; }
.debt-chart { width: 100%; height: 220px; display: block; }
.dc-grid { stroke: rgba(153,163,175,.15); stroke-width: 1; }
.dc-lbl { fill: var(--muted); font-size: 11px; font-family: 'Source Sans 3', sans-serif; }
.dc-area { fill: rgba(67,102,182,.18); }
.dc-debt { fill: none; stroke: #4f78d9; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.dc-gold { fill: none; stroke: #d4c8a6; stroke-width: 2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.lg-legend { display: flex; gap: 16px; font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.lg-legend span::before { content: ""; display: inline-block; width: 18px; height: 3px; margin-right: 6px; vertical-align: middle; }
.lk-debt::before { background: #4f78d9; } .lk-gold::before { background: #d4c8a6; }
.lg-sum { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 10px; }
.lg-sum b { font-family: 'IM Fell English SC', serif; font-size: 1.1rem; margin-left: 4px; }
.lg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lg-cols h4 { margin: 4px 0 6px; font-family: 'IM Fell English SC', serif; color: var(--gold); letter-spacing: .08em; font-size: .8rem; }
.lg-bar { display: grid; grid-template-columns: minmax(90px, 40%) 1fr auto; gap: 8px; align-items: center; font-size: .82rem; padding: 2px 0; }
.lg-bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-bt { height: 8px; background: rgba(0,0,0,.35); border-radius: 4px; overflow: hidden; }
.lg-bt i { display: block; height: 100%; border-radius: 4px; }
.lg-bt i.in { background: linear-gradient(90deg, #6f9a52, #b9dc98); } .lg-bt i.out { background: linear-gradient(90deg, #294382, #4f78d9); }
.lg-bar b { font-weight: 600; color: var(--text); min-width: 54px; text-align: right; }
.lg-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.lg-table th { text-align: left; font-family: 'IM Fell English SC', serif; font-size: .72rem; letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--border-soft); padding: 6px; }
.lg-table td { padding: 6px; border-bottom: 1px solid rgba(153,163,175,.1); }
.lg-detail td { background: rgba(0,0,0,.2); }
@media (max-width: 700px) { .lg-cols { grid-template-columns: 1fr; } .lg-table th:nth-child(2), .lg-table td:nth-child(2) { display: none; } }

/* ---- notes ---- */
.nt-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.nt-bar input, .nt-edit input, .nt-edit textarea { background: rgba(0,0,0,.35); border: 1px solid var(--border-soft); color: var(--text); padding: 7px 10px; border-radius: 4px; font: inherit; }
.nt-bar input { flex: 1; min-width: 140px; max-width: 320px; }
.nt-edit { display: flex; flex-direction: column; gap: 8px; }
.nt-edit h3 { margin: 0; font-family: 'IM Fell English SC', serif; color: var(--goldb); letter-spacing: .08em; }
.nt-edit textarea { resize: vertical; min-height: 120px; }
.nt-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 22px; }
.nt-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 8px; background: linear-gradient(180deg, rgba(15,25,47,.8), rgba(7,12,22,.9)); min-width: 0; }
.nt-card.pinned { border-color: var(--goldb); box-shadow: 0 0 12px rgba(212,200,166,.18); }
.nt-card header { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.nt-card h3 { margin: 0; font-size: 1rem; font-family: 'IM Fell English SC', serif; color: var(--goldb); overflow-wrap: anywhere; }
.nt-acts { display: flex; gap: 2px; flex: none; }
.nt-acts .g-link.small { margin-left: 6px; }
.nt-del { color: #84a3ea !important; }
.nt-text { font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }

/* ---- politics ---- */
.pol-mem { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.pol-mem .panel h3 { margin: 0 0 8px; font-family: 'IM Fell English SC', serif; color: var(--goldb); letter-spacing: .08em; font-size: .95rem; }
.pol-mem ul { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.pol-mem li { padding: 4px 0; border-bottom: 1px solid rgba(153,163,175,.1); }
.pol-mem li span { display: inline-block; min-width: 50px; font-size: .72rem; opacity: .6; }
.mem-full ul { max-height: 380px; overflow: auto; }
.mem-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.memories li.mem-rumour { color: #d9c3e8; }
@media (max-width: 800px) { .pol-mem { grid-template-columns: 1fr; } }
.ev-cal { margin-top: 18px; text-align: left; }
.ev-cal h3 { margin-top: 0; }

/* =====================================================================
   v9 — permanent wounds, the Ludi, retainers
   ===================================================================== */
.wound { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid rgba(50,88,176,.55); border-radius: 999px; background: rgba(20,46,106,.45); color: #9fb5ea; font-size: .78rem; font-family: 'IM Fell English SC', serif; letter-spacing: .03em; white-space: nowrap; }
.wound.sm { padding: 0 5px; font-size: .72rem; }
.wounds-sm { display: inline-flex; gap: 2px; }
.gd-portrait { position: relative; }
.gd-scars { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.gd-scars .wound { background: rgba(7,17,39,.85); }
.gd-wounds { margin: 14px 0; border-color: rgba(50,88,176,.5) !important; }
.gd-wounds h3 { font-family: 'IM Fell English SC', serif; color: #9fb5ea; margin-bottom: 8px; }
.wound-list { display: grid; gap: 6px; margin-bottom: 8px; }
.wound-row { display: grid; grid-template-columns: minmax(170px, auto) minmax(120px, auto) 1fr; gap: 10px; align-items: center; }
.wound-note { margin-top: 6px; font-size: .9rem; color: #9fb5ea; }
.adm-wounds { white-space: nowrap; } .adm-wounds .wound { margin-right: 3px; } .adm-wsel { max-width: 130px; }
.dt-glads .gd .scar { color: #5e85e2; font-style: normal; }

/* Ludi page */
.ludi-hosts .lh-row { display: grid; grid-template-columns: 44px minmax(160px, 1fr) minmax(200px, auto); gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.ludi-hosts .lh-row img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.ludi-hosts .lh-row.can .lh-name b { color: var(--goldb); }
.lh-name b { font-family: 'IM Fell English SC', serif; display: block; }
.lh-name .g-meter { margin: 4px 0 2px; max-width: 320px; }
.lh-st { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.ludi-cur h3, .ludi-champ h3, .ludi-hosts h3, .ludi-hist h3, .ludi-narr h3, .ludi-bracket-wrap h3 { font-family: 'IM Fell English SC', serif; color: var(--goldb); margin-bottom: 8px; }
.ludi-entr { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; margin: 12px 0; }
.lu-e { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 6px 10px; background: rgba(10,16,29,.8); border: 1px solid var(--border-soft); border-radius: 6px; color: var(--text); cursor: pointer; font: inherit; }
.lu-e img { width: 42px; height: 42px; object-fit: cover; border-radius: 4px; }
.lu-e b { font-family: 'IM Fell English SC', serif; display: block; font-size: .9rem; } .lu-e small { color: var(--muted); font-size: .74rem; }
.lu-e i { font-style: normal; font-family: 'IM Fell English SC', serif; font-size: .75rem; color: var(--muted); }
.lu-e.on { border-color: var(--gold); background: linear-gradient(90deg, rgba(20,46,106,.6), rgba(11,19,39,.7)); box-shadow: 0 0 12px rgba(172,182,195,.18); }
.lu-e.on i { color: var(--goldb); }
.lu-e:disabled { opacity: .45; cursor: not-allowed; }
.ludi-bracket { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.lb-col { display: flex; flex-direction: column; justify-content: space-around; gap: 8px; min-width: 190px; }
.lb-col h4 { font-family: 'IM Fell English SC', serif; font-size: .74rem; letter-spacing: .1em; color: var(--muted); text-align: center; text-transform: uppercase; }
.lb-m { position: relative; border: 1px solid var(--border-soft); border-radius: 5px; background: rgba(6,10,20,.75); }
.lb-m.wnd { border-color: rgba(50,88,176,.6); }
.lb-p { position: absolute; right: 4px; top: -8px; font-size: .62rem; font-style: normal; color: var(--muted); background: var(--bg-2); padding: 0 3px; }
.lb-f { display: flex; align-items: center; gap: 6px; padding: 3px 6px; font-size: .78rem; min-height: 30px; }
.lb-f + .lb-f { border-top: 1px solid rgba(153,163,175,.12); }
.lb-f img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.lb-f b { display: block; font-weight: 600; line-height: 1.1; } .lb-f small { color: var(--muted); font-size: .66rem; }
.lb-f.mine b { color: var(--goldb); } .lb-f.mine { background: rgba(20,46,106,.35); }
.lb-f.won b::after { content: ' ✓'; color: #9fd28a; }
.lb-f.lost { opacity: .5; } .lb-f.dead b { text-decoration: line-through; }
.lb-f.tbd { color: var(--muted); justify-content: center; }
.lb-crown { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; border: 1px solid var(--gold); border-radius: 8px; background: radial-gradient(circle at 50% 30%, rgba(99,114,134,.35), rgba(9,15,29,.9)); text-align: center; }
.lb-crown img { width: 74px; height: 74px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.lb-crown b { font-family: 'IM Fell English SC', serif; color: var(--goldb); } .lb-crown small { color: var(--muted); font-size: .72rem; } .lb-crown span { font-size: 1.4rem; }
.ln-bout { padding: 8px 0; border-bottom: 1px solid var(--border-soft); } .ln-bout p { margin-top: 3px; font-size: .9rem; }
.ln-bout.mine b { color: var(--goldb); }
.ludi-champ { border-color: var(--gold) !important; box-shadow: 0 0 30px rgba(172,182,195,.12), var(--frame); }
.lc-head { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.lc-head img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; border: 2px solid var(--gold); flex: none; }
.lc-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.lc-btns .btn { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; white-space: normal; height: auto; padding: 10px 12px; }
.lc-btns .btn small { font-family: 'Source Sans 3', sans-serif; text-transform: none; letter-spacing: 0; font-size: .78rem; opacity: .85; }
.ludi-hist tr.mine td { color: var(--goldb); }

/* Retainers (Staff page) */
.ret-bar .ret-fx { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.ret-bar .ret-fx i { font-style: normal; padding: 2px 8px; border: 1px solid var(--border-soft); border-radius: 999px; background: rgba(15,28,59,.5); font-size: .82rem; }
.slave.retainer { border-color: var(--gold) !important; }
.ret-badge { font-size: .62rem; vertical-align: middle; padding: 1px 6px; border: 1px solid var(--gold); border-radius: 999px; color: var(--goldb); letter-spacing: .08em; }
.ret-empty p + p { margin-top: 6px; }

@media (max-width: 560px) {
  .ludi-hosts .lh-row { grid-template-columns: 36px 1fr; } .lh-st { grid-column: 1 / -1; align-items: flex-start; text-align: left; }
  .lc-head { flex-direction: column; align-items: flex-start; } .lc-head img { width: 80px; height: 80px; }
  .wound-row { grid-template-columns: 1fr; gap: 2px; }
  .ludi-entr { grid-template-columns: 1fr; }
}
/* v9: more gladiator actions (surgeon, retire, sell to a lanista) - let the row wrap instead of overflowing */
.gd-actions { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; }
.gd-actions .btn { flex-wrap: wrap !important; white-space: normal; justify-content: center; text-align: center; min-width: 0; }
.gd-actions .btn small { white-space: nowrap; }
.pg-glad .layout > .main { min-width: 0; }

/* =====================================================================
   v10 — Begin New Day, ranks, city rumours, offer audit
   ===================================================================== */
.g-newday { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap;
  font-family: 'IM Fell English SC', serif; font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  color: #070d1a; background: linear-gradient(180deg, #d7ccab, #99a3af 60%, #748193); border: 1px solid #d4c8a6;
  border-radius: 6px; padding: 7px 13px; box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 2px 10px rgba(153,163,175,.35); }
.g-newday:hover { filter: brightness(1.08); box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 2px 16px rgba(212,200,166,.55); }
.nd-modal { position: fixed; inset: 0; z-index: 9000; display: none; align-items: center; justify-content: center; background: rgba(2,3,5,.72); backdrop-filter: blur(2px); padding: 14px; }
.nd-modal.show { display: flex; }
.nd-box { width: min(560px, 100%); max-height: calc(100vh - 28px); overflow: auto; background: linear-gradient(180deg, #0f1729, #070c17); border: 1px solid var(--gold);
  border-radius: 10px; padding: 22px 24px 18px; box-shadow: 0 0 0 4px rgba(153,163,175,.12), 0 20px 60px rgba(0,0,0,.7); text-align: center; }
.nd-sun { font-size: 2.2rem; color: var(--goldb); line-height: 1; text-shadow: 0 0 18px rgba(212,200,166,.6); }
.nd-box h2 { font-family: 'IM Fell English SC', serif; color: var(--goldb); margin: 6px 0 4px; letter-spacing: .08em; }
.nd-days { font-family: 'IM Fell English SC', serif; color: var(--muted); margin: 0 0 12px; letter-spacing: .05em; }
.nd-days b { color: var(--goldb); }
.nd-list { text-align: left; margin: 0 0 12px; padding-left: 20px; font-size: .92rem; line-height: 1.45; }
.nd-list li { margin: 4px 0; } .nd-list b { color: var(--goldb); } .nd-list .warn { color: #7291d8; }
.nd-shared { font-size: .82rem; color: #cabd98; border: 1px dashed var(--border-soft); border-radius: 6px; padding: 6px 8px; }
.nd-btns { display: flex; gap: 10px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.nd-btns .btn { min-width: 150px; }

.rank-badge { display: inline-flex; align-items: center; gap: 4px; font-family: 'IM Fell English SC', serif; font-size: .7rem; letter-spacing: .06em; color: var(--goldb);
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; background: rgba(153,163,175,.08); vertical-align: middle; white-space: nowrap; }
.rank-badge.r5, .rank-badge.r6 { background: linear-gradient(180deg, rgba(212,200,166,.3), rgba(153,163,175,.12)); box-shadow: 0 0 8px rgba(212,200,166,.35); }
.rk-mini { color: var(--gold); font-size: .62rem; letter-spacing: 1px; }
.gd-rank h3 small { font-family: 'Source Sans 3', sans-serif; letter-spacing: 0; text-transform: none; }
.rk-ladder { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 8px 0 12px; }
.rk-step { border: 1px solid var(--border-soft); border-radius: 6px; padding: 6px 4px; text-align: center; background: rgba(0,0,0,.18); min-width: 0; }
.rk-step b { display: block; font-family: 'IM Fell English SC', serif; color: var(--muted); }
.rk-step span { display: block; font-family: 'IM Fell English SC', serif; font-size: .66rem; letter-spacing: .03em; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-step small { display: block; font-size: .7rem; color: var(--muted); opacity: .8; }
.rk-step.done { border-color: var(--border); } .rk-step.done b, .rk-step.done span { color: var(--gold); }
.rk-step.cur { border-color: var(--goldb); background: rgba(153,163,175,.16); box-shadow: 0 0 10px rgba(212,200,166,.25); }
.rk-step.cur b, .rk-step.cur span, .rk-step.cur small { color: var(--goldb); opacity: 1; }
.rk-prog { display: grid; gap: 8px; }
.rk-need { display: grid; grid-template-columns: 150px 1fr 80px; align-items: center; gap: 10px; font-size: .9rem; }
.rk-need b { color: var(--goldb); } .rk-need small { color: var(--muted); text-align: right; }
.rk-price { margin: 10px 0 0; font-size: .95rem; } .rk-price b { color: var(--goldb); font-size: 1.1rem; }
.rk-max { color: var(--goldb); font-family: 'IM Fell English SC', serif; }

.rumors { margin-top: 16px; }
.rumors h3 small { font-family: 'Source Sans 3', sans-serif; letter-spacing: 0; text-transform: none; font-size: .78rem; }
.rm-day h4 { font-family: 'IM Fell English SC', serif; color: var(--gold); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin: 12px 0 6px; }
.rm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rm-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; padding: 9px 12px; border: 1px solid var(--border-soft); border-radius: 6px; background: rgba(0,0,0,.2); }
.rm-item p { margin: 0; font-style: italic; line-height: 1.4; }
.rm-item small { color: var(--muted); }
.rm-ic { font-size: 1.15rem; text-align: center; line-height: 1.4; }
.rm-item.rm-placeholder { border-style: dashed; }
.rm-foot { margin-top: 10px; }
.rm-adm .rm-text { width: 100%; min-width: 320px; resize: vertical; font-family: inherit; }
.rm-adm tr.ph td { opacity: .75; }
.rm-src { width: 100%; font-family: inherit; }
.choice.slave small { display: block; }

@media (max-width: 820px) {
  .g-newday { padding: 5px 8px; font-size: .68rem; }
  .rk-need { grid-template-columns: 1fr; gap: 3px; } .rk-need small { text-align: left; }
  .rk-ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) { .g-newday span { display: none; } .g-newday { font-size: .95rem; padding: 4px 8px; } }
@media (max-width: 480px) {   /* v10: room for the Begin New Day button on phones (also fixes the old 6px overflow at 375) */
  .topbar { padding: 6px 6px !important; gap: 6px 8px !important; flex-wrap: wrap !important; }
  .g-right { gap: 6px !important; } .g-icons { gap: 5px !important; } .g-stat { padding-right: 6px !important; }
  .g-right .g-day { padding-right: 6px; } .g-newday { padding: 3px 6px; }
}
.rm-adm { width: 100%; } .rm-adm select { width: 190px; } .rm-adm td:nth-child(3) { width: 100%; }
.rm-adm .rm-text { min-height: 44px; }
.rm-adm td:nth-child(2) { min-width: 200px; } .rm-adm select.adm-in { width: 190px !important; min-width: 190px; }

/* v11 — sell dialog with the lanista's price list; roster price */
.sell-box h2 { margin-top: 0; }
.sell-offer { font-family: 'IM Fell English SC', serif; color: var(--muted); margin: 10px 0; letter-spacing: .04em; }
.sell-offer b { color: var(--goldb); font-size: 1.35rem; }
.sell-ranks { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: .9rem; }
.sell-ranks th { font-family: 'IM Fell English SC', serif; color: var(--gold); font-weight: 600; text-align: left; border-bottom: 1px solid rgba(153,163,175,.35); padding: 3px 6px; }
.sell-ranks td { padding: 3px 6px; border-bottom: 1px solid rgba(153,163,175,.12); }
.sell-ranks td:first-child { color: var(--gold); letter-spacing: -1px; white-space: nowrap; }
.sell-ranks tr.cur td { background: rgba(153,163,175,.16); color: var(--goldb); font-weight: 700; }
.rk-mini i { font-style: normal; font-size: .72rem; color: var(--muted); letter-spacing: .02em; }
.rk-val { color: var(--goldb); font-size: .8rem; white-space: nowrap; }
.rk-val svg, .rk-val img { width: 14px; height: 14px; vertical-align: -2px; }
.rk-src { margin-top: 6px; }

/* v12 — Event Maker (admin) */
.em-how { margin: 6px 0 10px; font-size: .88rem; }
.em-how summary { cursor: pointer; color: var(--goldb); font-family: 'IM Fell English SC', serif; letter-spacing: .05em; }
.em-how ol { margin: 6px 0 0 18px; padding: 0; line-height: 1.45; }
.em-list td { vertical-align: middle; }
.em-list tr.em-bad td { background: rgba(32,67,149,.18); }
.em-list tr.em-cur td { background: rgba(153,163,175,.12); }
.em-acts { white-space: nowrap; }
.em-io { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: .78rem; margin-top: 6px; }
.em-ed { margin-top: 14px; padding: 14px; border: 1px solid var(--gold); border-radius: 8px; background: linear-gradient(180deg, rgba(15,23,41,.85), rgba(7,12,23,.9)); }
.em-ed .adm-sub { margin-top: 0; }
.em-ed textarea.adm-in { width: 100%; resize: vertical; }
.em-top { margin: 8px 0; }
.em-wide { grid-column: span 2; }
.em-imgf { position: relative; }
.em-prev { width: 100%; max-width: 220px; height: 92px; object-fit: cover; border: 1px solid rgba(153,163,175,.5); border-radius: 6px; margin-top: 4px; }
.em-seas { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .82rem; }
.em-seas label { display: inline-flex; align-items: center; gap: 4px; }
.em-ed code { background: rgba(153,163,175,.14); border: 1px solid rgba(153,163,175,.3); border-radius: 4px; padding: 0 4px; margin: 0 1px; font-size: .78rem; color: var(--goldb); cursor: help; }
.em-choice { border: 1px solid rgba(153,163,175,.35); border-radius: 8px; padding: 10px 12px; margin: 10px 0; background: rgba(0,0,0,.18); }
.em-ch-head { display: flex; justify-content: space-between; align-items: center; font-family: 'IM Fell English SC', serif; color: var(--goldb); letter-spacing: .06em; }
.em-sub { font-family: 'IM Fell English SC', serif; font-size: .72rem; letter-spacing: .08em; color: var(--gold); margin: 8px 0 4px; }
.em-fx { display: grid; gap: 5px; }
.em-fxrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.em-fxrow .em-k { min-width: 260px; flex: 1 1 260px; max-width: 380px; }
.em-fxrow .em-amt { width: 110px; }
.em-fxrow .em-txt { flex: 1 1 220px; }
.em-fxrow .em-who { min-width: 200px; }
.em-fx .btn.sm, .btn.sm { padding: 3px 10px; font-size: .72rem; justify-self: start; }
.em-fail { border-left: 3px solid rgba(50,88,176,.7); padding-left: 10px; margin-top: 8px; }
.em-err { border: 1px solid #3a5eb1; background: rgba(32,67,149,.22); border-radius: 6px; padding: 8px 12px; margin-bottom: 10px; font-size: .88rem; }
.em-err ul { margin: 4px 0 0 18px; padding: 0; }
.em-json { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: .78rem; }
.em-save { position: static; display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 4px; padding: 16px 0 6px; border-top: 1px solid rgba(153,163,175,.45); }   /* v13: a plain footer row — never floats over the form */
.em-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.em-head .adm-sub { margin: 0; }
@media (max-width: 620px) { .em-wide { grid-column: auto; } .em-fxrow .em-k { min-width: 0; flex-basis: 100%; } }
/* v12: sync-config.js now ships filled in, so the top-bar sync pill is always shown —
   on small windows (SL HUD 512–800 px) it shrinks to just its coloured dot (the title tooltip still explains it) */
@media (max-width: 820px) { .g-sync { font-size: 0 !important; gap: 0 !important; padding: 3px !important; margin-right: 0 !important; border: none !important; background: none !important; } .g-sync i { width: 9px; height: 9px; } .g-right { gap: 5px !important; } }

/* v13 — arena fights per day: pips, Second Wind, out of fights */
.fpips { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; font-family: 'IM Fell English SC', serif; font-size: .78rem; color: var(--goldb); letter-spacing: .03em; vertical-align: middle; }
.fpips b { color: var(--goldb); font-weight: 700; }
.fpips .pips { display: inline-flex; gap: 3px; }
.fpips .pip { width: 9px; height: 9px; transform: rotate(45deg); background: var(--gold); border: 1px solid var(--goldb); box-shadow: 0 0 4px rgba(212,200,166,.45); display: inline-block; font-style: normal; }
.fpips .pip.used { background: transparent; border-color: rgba(153,163,175,.45); box-shadow: none; }
.fpips .pip.sw { background: #245de1; border-color: #d6c694; box-shadow: 0 0 6px rgba(44,106,250,.7); }
.fpips .pip.sw.used { background: transparent; border-color: rgba(36,93,225,.5); box-shadow: none; }
.fpips.out, .fpips.out b { color: #8993a9; }
.fpips em { font-style: normal; font-size: .68rem; letter-spacing: .06em; padding: 1px 7px; border-radius: 10px; white-space: nowrap; }
.sw-badge { background: linear-gradient(180deg, #245de1, #1c439d); color: #ebeef3; border: 1px solid #d6c694; box-shadow: 0 0 8px rgba(44,106,250,.55); animation: swGlow 1.4s ease-in-out infinite alternate; }
.out-badge { background: rgba(20,37,78,.85); color: #89a0d7; border: 1px solid rgba(67,102,182,.6); }
@keyframes swGlow { from { box-shadow: 0 0 4px rgba(44,106,250,.35); } to { box-shadow: 0 0 12px rgba(44,106,250,.85); } }
.second-wind { margin: 10px auto 0; max-width: 620px; padding: 10px 14px; border: 1px solid #d6c694; border-radius: 8px; background: linear-gradient(180deg, rgba(28,67,157,.55), rgba(11,25,59,.8));
  color: #ebeef3; font-family: 'IM Fell English SC', serif; letter-spacing: .04em; font-size: 1.02rem; box-shadow: 0 0 18px rgba(44,106,250,.35); animation: swIn .6s ease-out; }
.second-wind small { display: block; font-family: 'Source Sans 3', sans-serif; letter-spacing: 0; color: #cad2dc; font-size: .82rem; margin-top: 2px; }
.second-wind .sw-ic { font-size: 1.2rem; }
@keyframes swIn { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.bouts-left { margin-top: 8px; font-size: .9rem; color: var(--muted); font-family: 'Source Sans 3', sans-serif; }
#fightBtn.out, #fightBtn:disabled.out { background: #131e39 !important; color: #8998ba !important; border-color: rgba(67,102,182,.5) !important; opacity: .85; cursor: not-allowed; filter: grayscale(.4); }
#fightBtn.sw { background: linear-gradient(180deg, #245de1, #1c439d) !important; border-color: #d6c694 !important; color: #ebeef3 !important; box-shadow: 0 0 14px rgba(44,106,250,.5); }
.btn.danger.sw { background: linear-gradient(180deg, #245de1, #1c439d) !important; border-color: #d6c694 !important; color: #ebeef3 !important; }
.btn.disabled.out { opacity: .7; filter: grayscale(.4); cursor: not-allowed; }
.gd-actions .btn small { opacity: .85; }
.adm-fl { white-space: nowrap; } .adm-fl .adm-in, .adm-t .adm-fl .adm-in { width: 56px !important; min-width: 0 !important; display: inline-block; }
.fpips .f-reset { font-family: 'Source Sans 3', sans-serif; font-size: .7rem; color: var(--muted); letter-spacing: 0; }
.fest-unl { max-width: 760px; margin: 6px auto 10px; padding: 8px 14px; text-align: center; border: 1px solid var(--goldb); border-radius: 8px;
  background: linear-gradient(180deg, rgba(22,50,116,.75), rgba(11,25,59,.85)); color: #d1d8e2; font-family: 'IM Fell English SC', serif; letter-spacing: .04em; box-shadow: 0 0 14px rgba(212,200,166,.25); }
.fest-unl[hidden] { display: none; }
.fest-unl b { color: var(--goldb); }
.fest-unl small { display: block; font-family: 'Source Sans 3', sans-serif; letter-spacing: 0; color: #d4ccb4; margin-top: 2px; }
.fest-badge { background: linear-gradient(180deg, #163274, #0e1f48); color: var(--goldb); border: 1px solid var(--goldb); }
.fpips.unl b { font-size: 1rem; }

/* v13 — ludus buildings (Forum > Renovations) and the Your Ludus panel on the Gladiators page */
.grid > .rm-head { grid-column: 1 / -1; margin: 6px 0 -4px; font-size: 1.15rem; color: var(--goldb); border-bottom: 1px solid var(--border-soft); padding-bottom: 6px; }
.grid > .rm-head small { font-size: .78rem; color: var(--muted); font-weight: normal; margin-left: 8px; letter-spacing: 0; }
.grid > .rm-head small a { color: var(--goldb); }
.item.good.room.ludus .gd-room img { object-position: center 30%; }
.ludus-panel { margin-top: 16px; }
.ludus-panel h3 { margin-bottom: 8px; }
.ludus-panel .lp-built { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.ludus-panel .lp-b { font-size: .72rem; padding: 2px 7px; border-radius: 10px; border: 1px solid var(--border); background: rgba(0,0,0,.25); white-space: nowrap; }
.ludus-panel .lp-b.g2 { border-color: rgba(177,185,195,.6); }
.ludus-panel .lp-fx { list-style: none; padding: 0; margin: 0 0 10px; font-size: .85rem; }
.ludus-panel .lp-fx li { padding: 3px 0; border-bottom: 1px dashed var(--border-soft); }
.ludus-panel .lp-fx li span { display: inline-block; width: 1.3em; text-align: center; }
.ludus-panel .lp-fx small { color: var(--muted); }
/* v13: in the narrow roster rows, a war festival shows just ⚔ ∞ (the full badge is in the tooltip and on the detail card) */
.glad-info .fest-badge { display: none; }

/* v13 — Events page: two event boxes side by side (main + The Domina's Affairs), stacked on narrow / HUD widths */
.pg-events .container { max-width: 1260px; }
.pg-events .container > .memories, .pg-events .container > .rumors, .pg-events .container > .favors-line, .pg-events .container > .ev-cal { max-width: 760px; margin-left: auto; margin-right: auto; }
@media (max-width: 560px) { .ev-col { padding: 10px 8px 12px; } .ev-col .event { padding: 14px 12px !important; } .ev-col .draw-btn { font-size: .95rem !important; padding: 10px 14px !important; } .ev-col-head small { display: block; } }

/* v13: top nav — no separators that dangle at line ends when wrapping on narrow windows */
@media (max-width: 820px) { .menu a { border-right: none !important; } }
.payday-line { flex-basis: 100%; font-size: .88rem; } .nd-payday b { color: var(--goldb); }

/* v13 — Ludi wagers (the bookmaker's board) */
.ludi-bets h4 { margin: 14px 0 6px; color: var(--goldb); font-size: .95rem; }
.bet-sum { font-size: 1rem; margin: 4px 0 8px; }
.bet-stake { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0; }
.bet-stake input { width: 110px; margin-left: 6px; }
.bet-bouts { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 8px; }
.bet-bout { display: flex; align-items: stretch; gap: 6px; padding: 6px; border: 1px solid var(--border-soft); border-radius: 8px; background: rgba(0,0,0,.2); }
.bet-bout.mine { border-color: rgba(177,185,195,.55); }
.bet-vs { align-self: center; font-size: .75rem; color: var(--muted); }
.bet-btn { flex: 1; min-width: 0; display: grid !important; grid-template-columns: 1fr auto; grid-template-rows: auto auto; text-align: left; padding: 6px 8px !important; gap: 0 8px; }
.bet-btn b { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bet-btn small { grid-row: 2; font-size: .7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bet-btn .bo { grid-column: 2; grid-row: 1; font-weight: 700; color: var(--goldb); }
.bet-btn .bpay { grid-column: 2; grid-row: 2; font-size: .7rem; }
.bet-btn.mine b { color: #d2c49b; }
.bet-placed { font-size: .85rem; padding: 6px; color: #bde3a8; }
.bet-champ { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.bet-list tr.won td:last-child { color: #bde3a8; } .bet-list tr.lost td { opacity: .8; }
@media (max-width: 560px) { .bet-bouts { grid-template-columns: 1fr; } .bet-champ { grid-template-columns: 1fr 1fr; } }
.gear-note { grid-column: 1 / -1; margin: 0 0 4px; }
/* v13: Market tabs, search and provisions */
.mk-search input { width: min(420px, 100%); padding: 7px 10px; background: rgba(0,0,0,.35); color: var(--goldb); border: 1px solid var(--border-soft); border-radius: 6px; font: inherit; }
.mk-tabs .btn { font-size: .95rem; }
.item.ware .ware-desc { font-family: Georgia, serif; font-size: .82rem; color: var(--muted); margin: 4px 0; line-height: 1.3; }
.item.ware .ware-latin { text-transform: none; }
.item.ware .art.ware-art { display: grid; width: 100%; height: 96px; border-radius: 6px; margin-bottom: 6px; font-size: 2.2rem; border: 1px solid var(--border-soft); }
.item.ware .art.ware-art > img { height: 100% !important; }
/* v13: Download / Import save */
.g-savefile { display: flex; gap: 6px; flex-wrap: wrap; }
.g-savefile .btn { flex: 1 1 auto; font-size: .85rem; }
.imp-box { max-width: 480px; }
.imp-prev { width: 100%; border-collapse: collapse; margin: 8px 0; }
.imp-prev th { text-align: left; color: var(--muted); font-weight: normal; padding: 3px 8px 3px 0; width: 38%; }
.imp-prev td { color: var(--goldb); padding: 3px 0; }
.imp-note { font-size: .85rem; color: var(--muted); }
.imp-err { color: #7396e8; }
.imp-shared { border: 1px solid var(--border-soft); border-radius: 6px; padding: 8px 10px; margin: 8px 0; text-align: left; font-size: .88rem; }
.imp-shared label { display: block; margin-top: 6px; cursor: pointer; }
.imp-shared .imp-danger { color: #83a1e7; }
.slot-files { align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
/* v13: the Garrison */
.gar-sec .gs-top { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.gar-sec .gs-big { min-width: 220px; flex: 0 0 auto; }
.gar-sec .gs-big b { display: block; font-family: 'IM Fell English SC', serif; font-size: 2.4rem; color: var(--goldb); }
.gar-sec .gs-big b.warn { color: #7396e8; }
.gs-meter { position: relative; height: 10px; border-radius: 5px; background: rgba(0,0,0,.4); border: 1px solid var(--border-soft); margin: 6px 0 2px; }
.gs-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, #5b636e, #99a3af); }
.gs-fill.low { background: linear-gradient(90deg, #2a4582, #4067c2); }
.gs-100 { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--goldb); }
.gar-sec .gs-note { flex: 1 1 320px; }
.gs-tab { margin-top: 10px; max-width: 640px; }
.gs-tab .gs-sum td { border-top: 1px solid var(--border-soft); font-weight: 600; }
.gar-rank { display: inline-block; font-size: .72rem; padding: 1px 7px; border-radius: 9px; border: 1px solid var(--border-soft); vertical-align: middle; margin-left: 4px; letter-spacing: .04em; color: var(--muted); }
.gar-rank.r1 { color: #c9cccf; border-color: #6a7f5a; }
.gar-rank.r2 { color: #9fc6ff; border-color: #4a6f9f; }
.gar-rank.r3 { color: #181c20; background: linear-gradient(180deg, #d0c39b, #99a3af); border-color: #d0c39b; }
.gar-slots { display: grid; gap: 5px; margin: 8px 0; text-align: left; }
.gar-slot { display: grid; grid-template-columns: 58px 1fr; gap: 2px 8px; align-items: center; padding: 5px 7px; border: 1px dashed var(--border-soft); border-radius: 6px; font-size: .82rem; }
.gar-slot.on { border-style: solid; background: rgba(153,163,175,.06); }
.gar-slot .gs-k { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.gar-slot .gs-v small { display: block; color: var(--muted); font-size: .72rem; }
.gar-slot .gs-sel { grid-column: 1 / -1; width: 100%; font-size: .78rem; background: rgba(0,0,0,.35); color: var(--goldb); border: 1px solid var(--border-soft); border-radius: 4px; padding: 3px; }
.gar-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 4px 0; }
.gar-why { display: block; text-align: center; }
.gar-ranks { flex-basis: 100%; }
.gar-h { margin: 12px 0 6px; font-size: 1rem; color: var(--goldb); }
.gar-spare, .gar-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.gar-col h4 { margin: 0 0 6px; color: var(--goldb); font-family: 'IM Fell English SC', serif; }
.gar-item { border: 1px solid var(--border-soft); border-radius: 6px; padding: 7px 9px; margin-bottom: 7px; display: grid; gap: 3px; font-size: .85rem; }
.gar-item small { color: var(--muted); }
.gar-item .gar-fx { color: #b0b6bd; }
.gar-item select { background: rgba(0,0,0,.35); color: var(--goldb); border: 1px solid var(--border-soft); border-radius: 4px; padding: 3px; }

/* ---- v14: household level ladder ---- */
.st-ladder { position: relative; }
.st-ladder .st-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--goldb); box-shadow: 0 0 4px rgba(0,0,0,.8); }
.st-grace { margin: 8px 0 0; padding: 6px 10px; border: 1px dashed rgba(153,163,175,.6); border-radius: 4px; color: var(--goldb); font-size: .92em; }
.st-how { margin: 8px 0 4px; font-size: .9em; color: #c5cbd4; }
.st-rooms { list-style: none; padding: 0; margin: 6px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 14px; font-size: .9em; }
.st-rooms li { opacity: .75; } .st-rooms li.done { opacity: 1; color: var(--goldb); }
.st-rooms .grade { transform: scale(.8); }

/* ---- v14: letters & rivals ---- */
.lt-intro { max-width: 900px; }
.npc-letter { margin-bottom: 14px; }
.nl-head { display: flex; gap: 12px; align-items: center; }
.nl-head h3 { margin: 0 0 2px; font-family: 'IM Fell English SC', serif; color: var(--goldb); }
.nl-face, .nc-face { width: 64px; height: 80px; object-fit: cover; border: 1px solid rgba(153,163,175,.6); border-radius: 4px; flex: none; }
.nl-text { font-style: italic; margin: 10px 0; }
.nl-replies { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.nl-r { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 4px; white-space: normal; height: auto; padding: 8px 10px; text-transform: none; letter-spacing: 0; }
.nl-r b { font-family: 'IM Fell English SC', serif; letter-spacing: .04em; }
.nl-r span { font-size: .9em; }
.nl-r small { font-size: .78em; opacity: .8; }
.nl-hostile { border-color: #3e5ea7; } .nl-forgive { border-color: #7fa37a; } .nl-laugh { border-color: #99a3af; }
@media (max-width: 900px) { .nl-replies { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .nl-replies { grid-template-columns: 1fr; } }
.npc-rel { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; margin-bottom: 16px; }
.npc-card { display: flex; gap: 10px; padding: 10px; border: 1px solid rgba(153,163,175,.35); border-radius: 6px; background: rgba(6,10,20,.6); }
.npc-card.gone { opacity: .55; filter: grayscale(.7); }
.nc-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.nc-body > b { font-family: 'IM Fell English SC', serif; color: var(--goldb); }
.nc-att span[class^="att-"] { font-family: 'IM Fell English SC', serif; font-size: .85em; padding: 0 6px; border: 1px solid currentColor; border-radius: 8px; }
.att-hostile { color: #4c76d9; } .att-cold { color: #6a89d1; } .att-neutral { color: #d0d3d6; } .att-warm { color: #a5abb4; } .att-friendly { color: #8fd08a; }
.nc-feud { color: #4c76d9; font-size: .85em; } .nc-pact { color: #8fd08a; font-size: .85em; }
.npc-att { position: relative; height: 6px; background: #070d1a; border: 1px solid rgba(153,163,175,.3); border-radius: 3px; }
.npc-att div { position: absolute; top: 0; bottom: 0; } .npc-att.neg div { background: #3e5ea7; } .npc-att.pos div { background: #7fa37a; } .npc-att.mid div { background: #99a3af; }
.npc-att i { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--goldb); }
.npc-att.neg div { transform: translateX(-100%); }
.nc-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.btn.sm { padding: 3px 8px; font-size: .75rem; }
.bad-t { color: #4c76d9; }
.lt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 800px) { .lt-cols { grid-template-columns: 1fr; } }
.lt-cols h3, .npc-feed-box h3 { margin: 0 0 8px; font-family: 'IM Fell English SC', serif; color: var(--goldb); letter-spacing: .08em; font-size: .95rem; }
.npc-feed, .npc-done { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.npc-feed li, .npc-done li { padding: 4px 0; border-bottom: 1px solid rgba(153,163,175,.1); }
.npc-feed li span, .npc-done li span { display: inline-block; min-width: 52px; font-size: .72rem; opacity: .6; }
.g-mailbadge { background: #3e5ea7; }
.npc-feed-box { text-align: left; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(153,163,175,.3); }
.npc-feed-box h3 small { font-family: 'Source Sans 3', sans-serif; letter-spacing: 0; font-size: .75rem; margin-left: 6px; }
.npc-feed-box li { text-align: left; }
.npc-feed-box .rm-foot { text-align: right; }

/* v14.2 — Ludi host groups & host's privilege */
.lh-group { font-family: 'IM Fell English SC', serif; color: var(--gold, #99a3af); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin: .9rem 0 .3rem; border-bottom: 1px solid rgba(153,163,175,.25); padding-bottom: .2rem; }
.lh-gold { display: block; margin-top: .2rem; }
.host-perks { background: rgba(153,163,175,.08); border-left: 3px solid var(--gold, #99a3af); padding: .45rem .7rem; border-radius: 4px; }
.host-priv { display: inline-block; margin-left: .5rem; padding: .15rem .55rem; border-radius: 999px; background: linear-gradient(180deg, #c5ba97, #808b9b); color: #111d39; font-size: .72rem; font-family: 'IM Fell English SC', serif; font-weight: 700; vertical-align: middle; box-shadow: 0 1px 3px rgba(0,0,0,.35); }

/* v14.2 — Admin accordion */
.adm-acc-bar { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin: .6rem 0; }
.adm-acc-bar .muted { margin-right: auto; }
.adm-acc { padding-top: .55rem; padding-bottom: .55rem; }
.adm-acc > .adm-acc-h { cursor: pointer; user-select: none; margin: 0; display: flex; align-items: center; gap: .5rem; transition: color .15s; }
.adm-acc > .adm-acc-h:hover, .adm-acc > .adm-acc-h:focus-visible { color: var(--gold, #99a3af); outline: none; }
.adm-acc .adm-arrow { display: inline-block; width: 1em; color: var(--gold, #99a3af); transition: transform .2s; }
.adm-acc.open > .adm-acc-h { margin-bottom: .7rem; border-bottom: 1px solid rgba(153,163,175,.3); padding-bottom: .4rem; }
.adm-acc > .adm-acc-b { animation: admAccIn .18s ease-out; }
@keyframes admAccIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* v14.2 — Politics & Rivals (merged page) */
.pr-jump { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 1rem; }
.pr-jump a { font-family: 'IM Fell English SC', serif; font-size: .8rem; letter-spacing: .05em; padding: .35rem .8rem; border: 1px solid rgba(153,163,175,.45); border-radius: 999px; color: var(--gold, #99a3af); text-decoration: none; background: rgba(22,42,88,.35); }
.pr-jump a:hover { background: rgba(153,163,175,.18); }
.pr-jump b { color: #d6caa7; }
#letters, #polGroup, #houseGroup, #prBottom, #lettersHead { scroll-margin-top: 80px; }
.pr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: .8rem; }
.pr-card .name b { font-family: 'IM Fell English SC', serif; font-size: 1.02rem; }
.pr-card .pr-desc { margin: .2rem 0 .3rem; line-height: 1.3; }
.pr-stats { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .8rem; margin: .35rem 0 .2rem; }
.pr-stats b { color: var(--gold, #99a3af); }
.pr-host { display: block; margin: .25rem 0; }
.pr-card .nc-acts { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.pr-card .nc-acts .btn[disabled] { opacity: .45; cursor: not-allowed; }
.pr-how { margin: .9rem 0 0; padding: .5rem .8rem; border: 1px solid rgba(153,163,175,.3); border-radius: 6px; background: rgba(11,19,39,.35); }
.pr-how summary { cursor: pointer; font-family: 'IM Fell English SC', serif; color: var(--gold, #99a3af); }
.pr-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.4rem; align-items: start; }
.pr-col > * + * { margin-top: 1rem; }
.pr-bottom .pol-mem { display: grid; grid-template-columns: 1fr; gap: .8rem; }
.pr-bottom .npc-feed, .pr-bottom .npc-done { max-height: 420px; overflow: auto; }
@media (max-width: 860px) { .pr-bottom { grid-template-columns: 1fr; } .pr-grid { grid-template-columns: 1fr; } }

/* v14.2 — friendlier Event Maker */
.em-intro { background: rgba(153,163,175,.08); border: 1px solid rgba(153,163,175,.35); border-radius: 8px; padding: .8rem 1rem; margin-bottom: .8rem; }
.em-intro ol { margin: .4rem 0 .6rem 1.2rem; }
.em-intro li { margin: .15rem 0; }
.em-step { display: flex; gap: .7rem; align-items: center; margin: 1.2rem 0 .5rem; padding: .5rem .7rem; border-left: 3px solid var(--gold, #99a3af); background: rgba(22,42,88,.35); border-radius: 0 6px 6px 0; }
.em-step b { font-family: 'IM Fell English SC', serif; color: var(--gold, #99a3af); display: block; font-size: 1rem; }
.em-step small { display: block; opacity: .85; }
.em-num { flex: 0 0 auto; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #c5ba97, #808b9b); color: #111d39; font-family: 'IM Fell English SC', serif; font-weight: 700; }
.em-names { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin: .35rem 0 .5rem; }
.em-names-l { font-size: .8rem; opacity: .85; margin-right: .2rem; }
.em-ins { font-size: .72rem !important; padding: .2rem .5rem !important; }
.em-preview { margin: .2rem 0 .4rem; padding: .5rem .7rem; border: 1px dashed rgba(153,163,175,.4); border-radius: 6px; font-style: italic; }
.em-preview b { font-style: normal; color: #d6caa7; }
.em-quickfx { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-top: .4rem; }
.em-hint { white-space: nowrap; }

/* =====================================================================
   v14.3 — Renown bar, merged Market & Forum accordions, Investments,
   admin Characters, and the dark cracked basalt pillars
   ===================================================================== */
.g-renbox .ren-bar { background: rgba(0,0,0,.45); }
.ren-fill, .g-meter.ren > div { height: 100%; background: linear-gradient(90deg, #565e68, #99a3af 55%, #d4c8a6); box-shadow: 0 0 6px rgba(153,163,175,.45); }
.g-renbox { cursor: help; }
.g-renbox b#renown { color: #d4c8a6; }
.pr-scales { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pr-scales .rep-scale { margin: 0; }
.ren-scale .scale-bar.ren-scale-bar { background: linear-gradient(90deg, #262a2f, #565e68 45%, #99a3af 80%, #d4c8a6); }
.ren-tip { cursor: help; color: var(--goldb); border: 1px solid rgba(153,163,175,.5); border-radius: 50%; padding: 0 5px; font-size: .8em; }
.ren-help { margin: 8px 0 0; }
.pr-ren b { color: #d4c8a6; }
.ren-t { color: #d4c8a6; }
.ludi-gate { border-left: 3px solid var(--gold); padding-left: 8px; }
@media (max-width: 760px) { .pr-scales { grid-template-columns: 1fr; } }

/* ---- accordions (Market & Forum, Investments) ---- */
.mk-acc-tools { display: flex; gap: 8px; justify-content: flex-end; margin: 6px 0 10px; }
.mk-acc { border: 1px solid rgba(153,163,175,.35); border-radius: 10px; margin: 0 0 12px; background: linear-gradient(180deg, rgba(13,21,39,.85), rgba(8,12,20,.9)); overflow: hidden; }
.mk-acc-h { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 18px; background: linear-gradient(180deg, rgba(22,42,88,.55), rgba(13,24,49,.55)); border: 0; border-bottom: 1px solid transparent; color: var(--goldb); font-family: 'IM Fell English SC', serif; font-size: 1.08rem; letter-spacing: .06em; cursor: pointer; text-align: left; }
.mk-acc-h:hover { background: linear-gradient(180deg, rgba(27,53,114,.6), rgba(15,28,59,.6)); }
.mk-acc-h small { font-family: 'Source Sans 3', sans-serif; color: var(--muted, #bcbfc3); font-size: .82rem; letter-spacing: 0; margin-left: auto; }
.mk-acc-ic { font-size: 1.25rem; width: 1.6em; text-align: center; }
.mk-acc-car { font-style: normal; transition: transform .2s; color: var(--gold); }
.mk-acc:not(.open) .mk-acc-car { transform: rotate(-90deg); }
.mk-acc .mk-acc-b { display: none; padding: 14px 16px 18px; }
.mk-acc.open .mk-acc-b { display: block; }
.mk-acc.open .mk-acc-h { border-bottom-color: rgba(153,163,175,.3); }
.ev-gift { color: #d4c8a6; }

/* ---- Investments ---- */
.inv-sum-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; }
.inv-sum-row b { display: block; font-family: 'IM Fell English SC', serif; font-size: 1.45rem; color: var(--goldb); }
.inv-sum-row small { color: var(--muted, #bcbfc3); }
.inv-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.inv-card { text-align: left; display: flex; flex-direction: column; gap: 6px; }
.inv-card.owned { border-color: rgba(153,163,175,.75); box-shadow: 0 0 0 1px rgba(153,163,175,.25), 0 0 18px rgba(153,163,175,.12); }
.inv-ic { font-size: 2rem; line-height: 1; }
.inv-stats { display: flex; flex-direction: column; gap: 3px; font-size: .9rem; border-top: 1px solid rgba(153,163,175,.2); padding-top: 6px; }
.inv-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.inv-log { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
@media (max-width: 640px) { .inv-sum-row { grid-template-columns: 1fr 1fr; } }

/* ---- admin: characters ---- */
.ch-list { display: flex; flex-direction: column; gap: 8px; }
.ch-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; padding: 8px; border: 1px solid rgba(153,163,175,.2); border-radius: 8px; background: rgba(0,0,0,.2); }
.ch-por { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(153,163,175,.5); background: #080b12; }
.ch-por.sm { width: 40px; height: 40px; vertical-align: middle; }
.ch-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.ch-thumb { padding: 0; border: 1px solid rgba(153,163,175,.35); border-radius: 6px; background: none; cursor: pointer; width: 44px; height: 44px; overflow: hidden; }
.ch-thumb:hover { border-color: var(--goldb); }
.ch-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-img-ctl summary { cursor: pointer; color: var(--goldb); font-size: .9rem; margin-top: 4px; }
.ch-up { cursor: pointer; }
.ch-add { border: 1px dashed rgba(153,163,175,.4); border-radius: 10px; padding: 12px; }
.char-extra .ch-xmeta { display: flex; gap: 6px; align-items: center; margin: 4px 0; }
.char-extra .ch-xtitle, .char-extra .ch-xbio { width: 100%; background: rgba(0,0,0,.3); border: 1px solid rgba(153,163,175,.25); color: var(--text); border-radius: 6px; padding: 5px 7px; font: inherit; }

/* ---- dark cracked basalt pillars (wide screens only) ---- */
.d-temple { display: none; }
@media (min-width: 980px) {
  :root { --pw: clamp(60px, 5.6vw, 118px); --fw: min(1260px, calc(100vw - 2 * var(--pw) - 56px)); --side: calc((100vw - var(--fw)) / 2); }
  body.has-pillars { padding-left: var(--side); padding-right: var(--side); }
  body.has-pillars::after { content: ""; position: fixed; top: 0; bottom: 0; left: var(--side); right: var(--side); z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, rgba(7,10,18,.93), rgba(4,6,9,.95)); border-left: 1px solid rgba(153,163,175,.28); border-right: 1px solid rgba(153,163,175,.28);
    box-shadow: 0 0 0 1px rgba(0,0,0,.8), 0 0 70px rgba(0,0,0,.95); }
  body.has-pillars .topbar, body.has-pillars .menu { border-radius: 0; }
  .d-temple { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 40; }
  .d-pillar { position: absolute; top: 0; bottom: 0; width: calc(var(--pw) + 10px); display: flex; flex-direction: column;
    filter: drop-shadow(0 0 22px rgba(0,0,0,.95)) drop-shadow(0 0 3px rgba(0,0,0,.9)); }
  .d-pillar.pl { left: calc(var(--side) - var(--pw) - 18px); }
  .d-pillar.pr { right: calc(var(--side) - var(--pw) - 18px); transform: scaleX(-1); }
  .d-pillar .d-cap, .d-pillar .d-base { width: 100%; height: auto; flex: none; display: block; }
  .d-pillar .d-shaft { flex: 1; width: 72%; margin: 0 auto; position: relative; overflow: hidden;
    background:
      linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.35) 16%, rgba(164,166,168,.10) 34%, rgba(0,0,0,0) 50%, rgba(0,0,0,.45) 72%, rgba(0,0,0,.95) 100%),
      url('img/pillar_basalt.svg') 0 0 / 100% 420px,
      repeating-linear-gradient(90deg, #010102 0, #101112 1.4%, #2b2c2d 4.4%, #141619 8.4%, #09090a 11.2%, #010101 12.5%);
    box-shadow: inset 0 12px 16px -8px rgba(0,0,0,.85), inset 0 -12px 16px -8px rgba(0,0,0,.85); }
  .d-pillar .d-cracks { position: absolute; inset: 0; background: url('img/pillar_cracks.svg') 0 0 / 100% 100% no-repeat; opacity: .95; }
  .d-pillar.pr .d-cracks { background-position: 0 0; transform: scaleY(-1); }   /* the other pillar breaks differently */
  /* a faint ember of torchlight from the game side, tarnished gold rather than bright */
  .d-pillar .d-shaft::after { content: ""; position: absolute; inset: 0; mix-blend-mode: soft-light; background: linear-gradient(90deg, transparent 55%, rgba(110,125,145,.28)); }
  .d-pillar .d-shaft::before { content: ""; position: absolute; left: 0; right: 0; top: 38%; height: 7px; background: linear-gradient(90deg, #15171a, #464d57 40%, #2f343b 70%, #111316); opacity: .7; box-shadow: 0 1px 0 rgba(0,0,0,.8); }   /* a tarnished bronze band */
}

/* ===== v14.4: Market Day — gladiator & slave pens ===== */
.mk-pens { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; border-left: 4px solid var(--border-soft); }
.mk-pens.open { border-left-color: #6fbf73; background: linear-gradient(90deg, rgba(60,120,60,0.18), var(--panel) 60%); }
.mk-pens.shut { border-left-color: #3e5ea7; }
.mk-pens > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.mk-pens b { font-family: 'IM Fell English SC', serif; color: var(--goldb); letter-spacing: .03em; }
.mk-pens small { color: var(--muted); }
.mk-pens-ic { font-size: 26px; line-height: 1; }
.pen-note { margin: 6px 0 10px; font-size: 13px; color: var(--muted); }
.pen-note.open { color: #8fd18f; }
.pen-note.shut { color: #7d98d8; }
.sidebar .pen-note { margin: 6px 2px 12px; line-height: 1.35; }
button.btn:disabled[title] { cursor: not-allowed; }
@media (max-width: 700px) { .mk-pens { flex-wrap: wrap; } .mk-pens .btn { width: 100%; text-align: center; } }
.staff-tabs { flex-wrap: wrap; }   /* v14.4: the Market Day tab no longer pushes past a phone screen */
/* v14.5: Market Day on the calendar */
.mk-day-status { padding: 8px 10px; border-left: 3px solid var(--border-soft); margin: 6px 0 10px; }
.mk-day-status.open { border-left-color: #6fbf73; }
.mk-day-status.shut { border-left-color: #3e5ea7; }
.dt-market.ok { color: #8fd18f; }
/* v14.6: investment level ladder (income a day at each level) */
.inv-ladder { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.inv-lv { font-style: normal; display: inline-flex; flex-direction: column; align-items: center; min-width: 46px; padding: 2px 4px; border: 1px solid var(--border-soft); border-radius: 4px; font-size: 10px; color: var(--muted); }
.inv-lv b { font-size: 11px; color: var(--text); font-weight: 600; }
.inv-lv.done { border-color: rgba(153,163,175,0.45); }
.inv-lv.cur { border-color: var(--gold); background: rgba(153,163,175,0.14); }
.inv-lv.cur b { color: var(--goldb); }

/* =====================================================================
   v14.7 — the hidden page: a candlelit private villa. Deep wine, black velvet, warm low light, gold trim.
   Only affects body.pg-noc and the dark veil used for the way in and out.
   ===================================================================== */
#nocVeil { position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity .85s ease;
  background: radial-gradient(ellipse at 50% 42%, rgba(10,18,72,.78) 0%, rgba(3,6,25,.93) 100%); }
#nocVeil.on { opacity: .6; }
#nocVeil.instant { transition: none; opacity: .92; }
body.pg-noc { --panel: rgba(7,11,37,.88); --panel-2: rgba(10,16,51,.9); --text: #dce0e5; --muted: #c4c7cb; --border-soft: rgba(171,179,190,.26);
  background:
    radial-gradient(ellipse at 14% -6%, rgba(176,185,198,.22) 0%, transparent 38%),
    radial-gradient(ellipse at 88% -4%, rgba(169,179,193,.17) 0%, transparent 34%),
    radial-gradient(ellipse at 50% 38%, rgba(14,26,102,.5) 0%, rgba(4,8,33,.35) 52%, rgba(0,0,0,.86) 100%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.014) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,.12) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, #080c29 0%, #040614 60%, #02030a 100%);
  background-attachment: fixed; }
body.pg-noc::before { opacity: .05; filter: sepia(1) saturate(2) hue-rotate(-35deg) brightness(.7); }
body.pg-noc::after { content: ""; position: fixed; inset: 0; z-index: 30; pointer-events: none;   /* soft vignette */
  background: radial-gradient(ellipse at 50% 45%, transparent 48%, rgba(0,0,0,.62) 100%); }
body.pg-noc.has-pillars::after { z-index: 30; left: 0; right: 0; border: 0; box-shadow: none; }
@media (min-width: 980px) {
  body.pg-noc.has-pillars::before { left: var(--side); right: var(--side); inset: 0 var(--side); z-index: -1; opacity: .07; }
  body.pg-noc .d-temple { filter: brightness(.7) saturate(.85); }
}
.noc-glow { position: fixed; inset: 0; z-index: 29; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle at 10% 8%, rgba(204,183,121,.16), transparent 26%), radial-gradient(circle at 92% 10%, rgba(176,185,198,.13), transparent 24%);
  animation: nocflick 5.5s ease-in-out infinite alternate; }
@keyframes nocflick { 0% { opacity: .72 } 18% { opacity: 1 } 36% { opacity: .8 } 61% { opacity: .98 } 100% { opacity: .75 } }
@media (prefers-reduced-motion: reduce) { .noc-glow { animation: none; } }
body.pg-noc .topbar { background: linear-gradient(180deg, rgba(9,16,63,.97), rgba(5,7,25,.97)) !important; border-bottom-color: rgba(171,179,190,.8) !important; }
body.pg-noc .menu { background: linear-gradient(180deg, rgba(6,10,39,.97), rgba(3,6,20,.97)) !important; border-bottom-color: rgba(171,179,190,.5) !important; }
body.pg-noc .menu a.noc-leave { margin-left: 6px; font-size: .78rem !important; opacity: .85; border: 1px solid rgba(171,179,190,.45) !important; border-radius: 4px !important; padding: 6px 14px !important; align-self: center; }
body.pg-noc .menu a.noc-leave:hover { opacity: 1; background: rgba(22,55,132,.35) !important; }
body.pg-noc h1, body.pg-noc h2, body.pg-noc h3 { color: #d7cba8; }
body.pg-noc main h1 { letter-spacing: .32em; text-shadow: 0 0 22px rgba(204,183,121,.35), 0 2px 10px #000000; }
.noc-sub { text-align: center; color: var(--muted); max-width: 760px; margin: 0 auto 18px; font-family: 'IM Fell English', 'Source Sans 3', serif; font-style: italic; font-size: 1.08rem; }
.noc-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.noc-card { position: relative; border-radius: 12px; padding: 16px; color: var(--text);
  background: linear-gradient(160deg, rgba(14,23,84,.62), rgba(5,8,29,.86)), repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 2px, transparent 2px 6px);
  border: 1px solid rgba(171,179,190,.38); box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), inset 0 0 38px rgba(0,0,0,.5), 0 10px 26px rgba(0,0,0,.55); transition: box-shadow .25s, border-color .25s; }
.noc-card:hover { border-color: rgba(207,194,153,.7); box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), inset 0 0 38px rgba(0,0,0,.45), 0 0 26px rgba(176,185,198,.2), 0 10px 26px rgba(0,0,0,.55); }
.noc-card h3 { font-size: 1.12rem; margin: 6px 0 2px; }
.noc-meta { color: #d9dce0; font-size: .88rem; text-transform: capitalize; }
.noc-rank { color: #d4c8a6; letter-spacing: .1em; font-size: .9rem; margin-top: 2px; } .noc-rank i { color: var(--muted); font-style: normal; letter-spacing: .04em; font-size: .8rem; }
.noc-desc { color: #ced2d8; font-size: .92rem; margin: 8px 0; min-height: 2.8em; }
.noc-glad-top { display: flex; gap: 12px; align-items: center; }
.noc-pic { width: 76px; height: 96px; object-fit: cover; border-radius: 6px; border: 2px solid var(--gold); box-shadow: 0 0 0 3px rgba(0,0,0,.55), 0 6px 14px rgba(0,0,0,.6); flex: none; }
.noc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.noc-stat { display: flex; flex-direction: column; gap: 3px; background: rgba(0,0,0,.34); border: 1px solid rgba(171,179,190,.28); border-radius: 8px; padding: 6px 8px; box-shadow: inset 0 0 12px rgba(0,0,0,.5); }
.noc-stat span { font-family: 'IM Fell English SC', serif; font-size: .64rem; letter-spacing: .08em; color: #d9dce0; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.noc-stat input { width: 100%; min-width: 0; background: transparent; border: 0; border-bottom: 1px dashed rgba(171,179,190,.35); color: #e1e6ed; font: 600 1rem 'Source Sans 3', sans-serif; padding: 2px 0; }
.noc-stat input:focus { outline: none; border-bottom-color: #d4c8a6; }
.noc-foot { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 18px; }
.noc-portrait { aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; border: 2px solid var(--gold); box-shadow: 0 0 0 3px rgba(0,0,0,.5), 0 8px 18px rgba(0,0,0,.6); background: #040614; }
.noc-portrait.wide { aspect-ratio: 4 / 3; }
.noc-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noc-kv { display: grid; gap: 4px; margin-top: 6px; }
.noc-kv > div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid rgba(171,179,190,.15); padding: 3px 0; font-size: .88rem; }
.noc-kv span { color: #d9dce0; } .noc-kv b { color: #e1e6ed; font-weight: 600; text-align: right; }
.noc-pips { letter-spacing: 1px; color: #d4c8a6; font-size: .66rem; white-space: nowrap; } .noc-pips i { color: rgba(255,255,255,.16); font-style: normal; }
.noc-buy { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.noc-price { font-family: 'IM Fell English SC', serif; color: #d4c8a6; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; flex: 1; } .noc-price svg { width: 17px; height: 17px; }
.noc-badge { font-size: .78rem; color: #060c1a; background: linear-gradient(180deg, #d7cba8, #99a3af); border-radius: 10px; padding: 2px 9px; font-weight: 700; }
.noc-buy .btn[disabled] { opacity: .45; cursor: not-allowed; }
.noc-note { text-align: center; color: #ced2d8; margin-bottom: 16px; } .noc-note b { color: #d4c8a6; }
.noc-sec { margin: 30px 0 12px; font-size: 1.25rem; } .noc-sec small { color: var(--muted); }
.noc-empty { text-align: center; color: var(--muted); font-style: italic; padding: 26px 10px; }
.noc-owned { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.noc-own { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; background: rgba(0,0,0,.3); border: 1px solid rgba(171,179,190,.28); border-radius: 8px; padding: 8px; }
.noc-own img, .noc-ownico { grid-row: 1 / 3; width: 56px; height: 42px; object-fit: cover; border-radius: 5px; display: flex; align-items: center; justify-content: center; }
.noc-ownico img { width: 100%; height: 100%; } .noc-own b { color: #e1e6ed; font-size: .92rem; line-height: 1.2; } .noc-own small { color: var(--muted); }
.noc-toolpic { height: 84px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, rgba(176,185,198,.16), transparent 70%); border-radius: 8px; }
.noc-toolpic img { max-height: 84px; max-width: 100%; object-fit: contain; border-radius: 6px; }
/* events */
.noc-evlist { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 18px; }
.noc-evbtn { text-align: left; background: rgba(0,0,0,.32); border: 1px solid rgba(171,179,190,.3); border-radius: 10px; padding: 10px 14px; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 3px; font: inherit; }
.noc-evbtn b { font-family: 'IM Fell English SC', serif; color: #d7cba8; } .noc-evbtn small { color: #d9dce0; }
.noc-evbtn.on { border-color: #d4c8a6; background: linear-gradient(160deg, rgba(18,31,114,.6), rgba(6,10,39,.8)); box-shadow: 0 0 20px rgba(176,185,198,.2); }
.noc-pick { display: flex; align-items: flex-end; justify-content: center; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.noc-pick label { display: flex; flex-direction: column; gap: 4px; font-family: 'IM Fell English SC', serif; color: #d4c8a6; font-size: .85rem; letter-spacing: .08em; text-align: left; }
.noc-pick select { min-width: 210px; background: rgba(0,0,0,.5); color: #e1e6ed; border: 1px solid rgba(171,179,190,.5); border-radius: 6px; padding: 8px 10px; font: 1rem 'Source Sans 3', sans-serif; }
.noc-and { font-family: 'IM Fell English', 'IM Fell English SC', serif; font-style: italic; font-size: 1.7rem; color: #d4c8a6; padding-bottom: 4px; text-shadow: 0 0 14px rgba(204,183,121,.5); }
.noc-arena { background: radial-gradient(ellipse at 50% 100%, rgba(176,185,198,.18), transparent 60%), radial-gradient(ellipse at 50% 30%, rgba(16,29,108,.65), rgba(3,5,18,.95)) !important; border: 1px solid rgba(171,179,190,.4); border-radius: 12px; box-shadow: inset 0 0 60px rgba(0,0,0,.7); }
.noc-vs.vs { font-family: 'IM Fell English', 'IM Fell English SC', serif !important; font-style: italic; font-size: 2.2rem !important; text-transform: lowercase; }
.noc-start { display: block; margin: 8px auto 0; min-width: 220px; }
.noc-modal { position: fixed; inset: 0; z-index: 10000; background: rgba(1,2,8,.84); display: flex; align-items: center; justify-content: center; padding: 16px; }
.noc-modal[hidden] { display: none; }
.noc-modal-box { max-width: 560px; width: 100%; max-height: 94vh; overflow: auto; text-align: center; border-radius: 14px; padding: 20px; border: 1px solid rgba(207,194,153,.7);
  background: linear-gradient(160deg, rgba(14,24,90,.96), rgba(4,6,23,.98)); box-shadow: 0 0 60px rgba(176,185,198,.25), 0 20px 50px #000000; animation: nocpop .35s ease; }
@keyframes nocpop { from { transform: scale(.94); opacity: 0 } to { transform: none; opacity: 1 } }
.noc-modal-img { margin: 12px 0; } .noc-modal-img img { max-width: 100%; max-height: 52vh; border-radius: 8px; border: 2px solid var(--gold); object-fit: contain; background: #030512; }
.noc-modal-text { color: #dce0e5; white-space: pre-line; margin-bottom: 14px; font-size: 1.04rem; }
@media (max-width: 640px) {
  .noc-grid { grid-template-columns: 1fr; }
  .noc-stats { grid-template-columns: repeat(2, 1fr); }
  body.pg-noc .menu { padding: 8px 6px; } body.pg-noc .menu a { padding: 7px 10px !important; font-size: .74rem !important; border-right: 0 !important; }
  body.pg-noc .menu a img { width: 20px !important; height: 20px !important; }
  .noc-pick { gap: 8px; } .noc-pick select { min-width: 0; width: 100%; } .noc-pick label { flex: 1 1 40%; min-width: 130px; }
  .noc-and { order: 0; width: 100%; text-align: center; padding: 0; line-height: 1; margin: -2px 0; } .noc-pick label:first-child { order: -1; } 
  .noc-arena .fighter img { width: 96px; height: 124px; } .noc-vs.vs { font-size: 1.7rem !important; }
  .noc-pic { width: 64px; height: 82px; }
}
/* v14.7 admin: the hidden-page editor */
.noc-subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.noc-arow { display: grid; grid-template-columns: 220px 1fr; gap: 14px; border: 1px solid rgba(153,163,175,.28); border-radius: 8px; padding: 12px; margin: 10px 0; background: rgba(0,0,0,.22); }
.noc-arow[hidden] { display: none; }
.noc-afields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; align-content: start; }
.noc-afields .wide, .noc-ev-adm .wide { grid-column: 1 / -1; }
.noc-imgctl { display: flex; flex-direction: column; gap: 8px; }
.noc-athumb { width: 100%; max-width: 200px; aspect-ratio: 4 / 3; border: 1px solid var(--gold); border-radius: 6px; overflow: hidden; background: #040614; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .8rem; }
.noc-athumb img, .noc-athumb svg { width: 100%; height: 100%; object-fit: cover; }
.noc-imgin { display: flex; flex-direction: column; gap: 6px; }
.noc-statrow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin: 4px 0; }
.noc-ev-adm { grid-template-columns: 1fr; }
.noc-evcol h4 { color: var(--goldb); font-family: 'IM Fell English SC', serif; margin: 14px 0 6px; }
.noc-outs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.noc-out { border: 1px dashed rgba(153,163,175,.35); border-radius: 8px; padding: 10px; display: grid; gap: 8px; align-content: start; }
.noc-out h4 { margin: 0; }
.noc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.noc-chip { background: rgba(0,0,0,.3); border: 1px solid rgba(153,163,175,.3); border-radius: 14px; padding: 3px 10px; font-size: .85rem; cursor: pointer; }
.noc-find { max-width: 220px; }
.noc-gt input { min-width: 90px; }
@media (max-width: 760px) { .noc-arow { grid-template-columns: 1fr; } .noc-outs { grid-template-columns: 1fr; } }
/* v14.7: levels, experience and the two-part market */
.noc-lv { display: inline-block; vertical-align: middle; margin-left: 6px; font: 700 .68rem 'IM Fell English SC', serif; letter-spacing: .08em; color: #060c1a; background: linear-gradient(180deg, #d7cba8, #99a3af); border-radius: 9px; padding: 1px 8px; }
.noc-xp { margin: 6px 0 2px; } .noc-xpbar { height: 7px; border-radius: 4px; background: rgba(0,0,0,.5); border: 1px solid rgba(171,179,190,.3); overflow: hidden; } .noc-xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #5e6a7a, #d7cba8); }
.noc-xp small { color: var(--muted); font-size: .76rem; } .noc-worth { color: #d9dce0; font-size: .85rem; } .noc-worth b { color: #d4c8a6; }
.noc-modal-xp { color: #d4c8a6; margin: -6px 0 14px; min-height: 1em; } .noc-up { color: #e1e6ed; text-shadow: 0 0 12px rgba(204,183,121,.8); }
.noc-worthv { color: var(--goldb); font-size: 1.05rem; padding-top: 6px; }

/* ===== v14.8: the hidden page, revamped ===== */
.noc-info { display: flex; flex-direction: column; gap: 5px; margin-top: 14px; }
.noc-info span { font-family: 'IM Fell English SC', serif; font-size: .7rem; letter-spacing: .1em; color: #d9dce0; text-transform: uppercase; }
.noc-info textarea { width: 100%; min-height: 110px; resize: vertical; background: rgba(0,0,0,.38); border: 1px solid rgba(171,179,190,.35); border-radius: 8px; color: #e1e6ed; padding: 9px 11px; font: inherit; line-height: 1.45; }
.noc-info textarea:focus { outline: none; border-color: #d4c8a6; box-shadow: 0 0 0 2px rgba(212,200,166,.18); }
.noc-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 8px; }
.noc-sidehd { font-family: 'IM Fell English SC', serif; color: #d4c8a6; font-size: .95rem; letter-spacing: .06em; margin: 0 0 8px; text-align: center; }
.noc-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.noc-person { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; background: rgba(0,0,0,.34); border: 1px solid rgba(171,179,190,.3); border-radius: 10px; padding: 7px 6px 8px; color: #d2d6db; cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.noc-person img { width: 56px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid rgba(171,179,190,.55); }
.noc-person b { font-family: 'IM Fell English SC', serif; font-size: .78rem; color: #d7cba8; line-height: 1.15; } .noc-person small { color: #d9dce0; font-size: .72rem; }
.noc-person:hover { border-color: rgba(207,194,153,.8); }
.noc-person.on { border-color: #d4c8a6; background: linear-gradient(160deg, rgba(18,31,114,.65), rgba(6,10,39,.85)); box-shadow: 0 0 18px rgba(199,182,131,.35); }
.noc-person[data-full="1"] { opacity: .5; }
.noc-count { text-align: center; color: #ced2d8; margin: 10px 0 0; } .noc-count b { color: #d4c8a6; } .noc-count small { color: var(--muted); }
.noc-fighters { gap: 10px; }
.noc-slot { flex: 1 1 0; min-width: 0; transition: transform .18s; } .noc-slot img { width: 108px; height: 140px; max-width: 100%; }
.noc-slot.empty { align-self: center; } .noc-empty-slot { border: 1px dashed rgba(171,179,190,.4); color: var(--muted); border-radius: 8px; padding: 36px 8px; font-size: .8rem; text-align: center; background: rgba(0,0,0,.25); }
.noc-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.noc-item { position: relative; display: grid; grid-template-columns: 38px 1fr auto; column-gap: 8px; align-items: center; text-align: left; background: rgba(0,0,0,.34); border: 1px solid rgba(171,179,190,.3); border-radius: 10px; padding: 8px 10px; color: #d2d6db; cursor: pointer; font: inherit; }
.noc-item b { font-family: 'IM Fell English SC', serif; font-size: .82rem; color: #d7cba8; line-height: 1.15; } .noc-item em { font-style: normal; color: #d4c8a6; font-weight: 700; }
.noc-item small { grid-column: 2 / 4; color: #d9dce0; font-size: .74rem; } .noc-itemico { grid-row: 1 / 3; display: flex; justify-content: center; } .noc-itemico img { width: 34px; height: 34px; object-fit: contain; }
.noc-item.on { border-color: #d4c8a6; background: linear-gradient(160deg, rgba(18,31,114,.6), rgba(6,10,39,.8)); box-shadow: 0 0 16px rgba(199,182,131,.3); }
.noc-item.on.unmet { border-color: #5d7abd; box-shadow: 0 0 14px rgba(61,101,192,.28); }
.noc-met, .noc-unmet { grid-column: 1 / 4; margin-top: 4px; font-size: .74rem; font-weight: 600; } .noc-met { color: #9fe0a8; } .noc-unmet { color: #7a9cea; }
.noc-chance { max-width: 560px; margin: 18px auto 6px; background: rgba(0,0,0,.34); border: 1px solid rgba(171,179,190,.35); border-radius: 12px; padding: 12px 16px; }
.noc-chance-top { display: flex; justify-content: space-between; align-items: baseline; font-family: 'IM Fell English SC', serif; color: #d9dce0; } .noc-chance-top b { color: #d4c8a6; font-size: 1.6rem; }
.noc-chbar { height: 9px; border-radius: 5px; background: rgba(0,0,0,.55); border: 1px solid rgba(171,179,190,.35); overflow: hidden; margin: 6px 0 8px; } .noc-chbar i { display: block; height: 100%; background: linear-gradient(90deg, #2a3682, #d4c8a6); }
.noc-chlist { list-style: none; margin: 0; padding: 0; font-size: .86rem; } .noc-chlist li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; border-bottom: 1px solid rgba(171,179,190,.12); }
.noc-chlist li.ok b { color: #9fe0a8; } .noc-chlist li.no { color: #7a9cea; } .noc-chlist li.no b { color: #7a9cea; }
.noc-outcome { font-size: 2rem; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 4px; } .noc-outcome[data-out="success"] { color: #daceab; text-shadow: 0 0 18px rgba(210,191,135,.6); } .noc-outcome[data-out="failure"] { color: #7993d1; text-shadow: 0 0 14px rgba(32,67,149,.7); }
.noc-modal-who { color: #d9dce0; font-size: .88rem; margin: 0 0 4px; }
.noc-side-l { background: linear-gradient(180deg, #d9dce0, #989da4); } .noc-side-r { background: linear-gradient(180deg, #d7cba8, #99a3af); }
.noc-pchar .noc-badge { display: inline-block; margin-top: 8px; }
.noc-tool .noc-kv b { max-width: 62%; }
@media (max-width: 700px) { .noc-sides { grid-template-columns: 1fr; } .noc-fighters { flex-wrap: wrap; height: auto !important; } .noc-slot { flex: 1 1 44%; } .noc-slot img { width: 84px; height: 108px; } .noc-people { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); } }

.noc-rules { text-align: center; color: #ced2d8; margin: 14px auto 6px; max-width: 640px; } .noc-rules b { color: #d4c8a6; }
#noMatch { color: #7a9cea; }

/* ===== Valcourt r1: stone castle columns with royal banners (replace the basalt pillars) ===== */
@media (min-width: 980px) {
  .d-pillar.rg-col { width: calc(var(--pw) + 40px); overflow: hidden; filter: none; }
  .d-pillar.rg-col.pl { left: calc(var(--side) - var(--pw) - 34px); }
  .d-pillar.rg-col.pr { right: calc(var(--side) - var(--pw) - 34px); transform: scaleX(-1); }
  .d-pillar.rg-col .rg-banner { position: absolute; inset: 0; background: url('img/rg/column_banner.jpg') center top / auto 100% no-repeat;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000000 22%, #000000 78%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000000 22%, #000000 78%, transparent 100%); }
}
h1 { font-weight: 400; }

/* ===== Valcourt r1: the Realm map, the Lady's tasks, court audiences, battles placeholder ===== */
.rm-panel { margin-bottom: 22px; }
.rm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rm-wrap { display: grid; grid-template-columns: 1fr 260px; gap: 14px; margin-top: 10px; }
.rm-map { position: relative; border: 1px solid rgba(190,200,215,.45); border-radius: 6px; overflow: hidden; background: #1d5a60; box-shadow: 0 6px 22px rgba(0,0,0,.6);
  height: min(78vh, 980px); min-height: 520px; }
.rm-svg, .rm-map > svg.wm-svg { display: block; width: 100%; height: 100%; cursor: grab; }
.rm-map > svg.wm-svg.dragging { cursor: grabbing; }
.rm-cell { fill-opacity: .36; stroke: #e8ecf4; stroke-opacity: .55; stroke-width: 1.6; transition: fill .6s, fill-opacity .3s; }
.rm-cell:hover { fill-opacity: .55; }
.rm-map .wm-cell { fill-opacity: .88; stroke: rgba(20,24,30,.4); stroke-width: 1.15; transition: fill .6s, fill-opacity .3s; }
.rm-map .wm-cell:hover, .rm-map .wm-cell.rm-hit { fill-opacity: 1; }
.rm-map.is-full { position: fixed; inset: 0; z-index: 80; height: 100vh; min-height: 0; border-radius: 0; }
@media (max-width: 900px) { .rm-map { height: 72vh; height: 72dvh; min-height: 420px; } }
.rm-cell.rm-hit { animation: rmPulse .35s ease-in-out 3 alternate; }
@keyframes rmPulse { from { fill-opacity: .3; } to { fill-opacity: .85; stroke-width: 4; } }
.rm-lbl circle { stroke: #0b1222; stroke-width: 2; }
.rm-lbl text { font-family: 'IM Fell English SC', serif; font-size: 19px; text-anchor: middle; fill: #f4f1e6; paint-order: stroke; stroke: #0b1222; stroke-width: 4px; stroke-linejoin: round; }
.rm-arrow { stroke: #f2f4f8; stroke-width: 5; stroke-dasharray: 14 8; animation: rmDash .8s linear infinite; }
@keyframes rmDash { to { stroke-dashoffset: -44; } }
.rm-burst { fill: none; stroke: #e6dcb4; stroke-width: 4; animation: rmBurst 1.1s ease-out infinite; }
@keyframes rmBurst { from { r: 10; opacity: 1; } to { r: 46; opacity: 0; } }
.rm-side h3 { margin-bottom: 8px; }
.rm-legend { list-style: none; display: grid; gap: 5px; }
.rm-legend li { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center; font-size: .86rem; }
.rm-legend li i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(255,255,255,.5); }
.rm-legend li b { color: var(--goldb); font-weight: 600; }
.rm-legend li.landless { opacity: .5; }
.rm-caption { min-height: 1.6em; margin: 10px 0; color: var(--goldb); font-family: 'IM Fell English', serif; font-size: 1.08rem; text-align: center; }
.rm-log { list-style: none; display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.rm-log li { font-size: .88rem; padding: 4px 8px; border-left: 3px solid #6a7a96; background: rgba(255,255,255,.03); }
.rm-log li.won { border-left-color: #e6dcb4; }
.rm-log li b { color: var(--goldb); margin-right: 6px; }
@media (max-width: 900px) { .rm-wrap { grid-template-columns: 1fr; } }
.lady-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; margin: 14px 0 22px; text-align: left; }
.lady-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.lady-head img { width: 74px; height: 98px; object-fit: cover; border-radius: 5px; border: 1px solid rgba(200,210,225,.5); }
.lady-tasks { display: grid; gap: 8px; }
.lady-task { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 6px; cursor: pointer; color: var(--text);
  background: linear-gradient(180deg, rgba(40,58,100,.55), rgba(18,28,52,.7)); border: 1px solid rgba(190,200,215,.4); font: inherit; }
.lady-task:hover:not([disabled]) { border-color: var(--goldb); }
.lady-task[disabled] { opacity: .55; cursor: default; }
.lady-task.done { opacity: .8; border-color: #e6dcb4; }
.lady-task .lt-ic { font-size: 1.5rem; width: 34px; text-align: center; }
.lady-task b { display: block; color: var(--goldb); font-weight: 600; }
.lady-task small { color: var(--muted); }
.lady-hist { list-style: none; margin-top: 12px; display: grid; gap: 4px; font-size: .86rem; }
.lady-hist li { padding: 4px 8px; border-left: 3px solid #6a7a96; }
.lady-hist li.ok { border-left-color: #e6dcb4; }
.lady-hist li i { color: var(--muted); }
.aud-panel .aud-in { width: 100%; margin: 6px 0; padding: 8px 10px; background: rgba(8,14,30,.8); color: var(--text); border: 1px solid rgba(190,200,215,.35); border-radius: 5px; font: inherit; }
.aud-fx { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; font-size: .86rem; }
.aud-fx input { width: 80px; margin-left: 4px; background: rgba(8,14,30,.8); color: var(--text); border: 1px solid rgba(190,200,215,.35); border-radius: 4px; }
.aud-list { list-style: none; margin-top: 12px; display: grid; gap: 6px; font-size: .86rem; }
.aud-list li { padding: 6px 8px; background: rgba(255,255,255,.03); border-left: 3px solid #e6dcb4; display: grid; gap: 2px; }
.aud-list li b { color: var(--goldb); }
.aud-list li i { color: var(--muted); }
@media (max-width: 900px) { .lady-row { grid-template-columns: 1fr; } }
.bt-placeholder { display: flex; gap: 22px; align-items: center; }
.bt-placeholder img { width: 140px; border-radius: 6px; }
.bt-placeholder p { margin: 8px 0; }


/* ---- Valcourt r2: Court Audiences — petitions ---- */
.pg-events .container > .pet-panel { max-width: 1100px; margin: 14px auto 6px; text-align: left; }
.pet-panel h2 { margin-top: 0; }
.pet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 12px; }
.pet-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--border-soft); border-radius: 8px; background: rgba(8,14,32,.55); text-align: left; }
.pet-card.on { border-color: var(--goldb); box-shadow: 0 0 0 1px rgba(200,212,230,.35) inset; }
.pet-card h3 { margin: 0; font-size: 1.15rem; color: var(--goldb); font-variant: small-caps; letter-spacing: .03em; }
.pet-who { font-style: italic; color: var(--muted); font-size: .92rem; }
.pet-card p { margin: 4px 0; line-height: 1.45; }
.pet-ideas { font-size: .88rem; color: var(--muted); }
.pet-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.pet-btns .btn { flex: 1 1 auto; }
.aud-pet { border: 1px solid var(--goldb); border-radius: 8px; padding: 10px 14px; margin: 8px 0 10px; background: rgba(8,14,32,.55); text-align: left; }
.aud-pet b { color: var(--goldb); display: block; font-variant: small-caps; font-size: 1.1rem; }
.aud-pet p { margin: 6px 0; font-size: .95rem; }
.aud-pet .g-link { margin: 4px 0 0; }
.dt-ev.bell { border-color: var(--goldb); }
.pet-adm { border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px; margin: 8px 0; display: grid; gap: 6px; }
.pet-adm.off { opacity: .6; }
.pet-adm-h { display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 8px; align-items: center; }
@media (max-width: 700px) { .pet-adm-h { grid-template-columns: 1fr; } }

/* ---- Retinue cards: same portrait frame as the fighter portraits on The Lists (.fighter img: 130x170, gold frame) ---- */
.gar-guards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)) !important; }
.gar-card { min-width: 0; max-width: 100%; box-sizing: border-box; }
.gar-card .gar-frame { margin: 2px auto 10px; }
.gar-card .gar-frame img { width: 130px; height: 170px; object-fit: cover; object-position: top; display: block; }
.gar-card h3, .gar-card .sl-sub { overflow-wrap: anywhere; }

/* ---------- Valcourt r3: the Battle Map button on the dashboard ---------- */
.dt-war { grid-column: span 4; flex-direction: row !important; align-items: center; gap: 16px !important; text-decoration: none; color: inherit; cursor: pointer;
  background: linear-gradient(90deg, rgba(16,30,62,.95), rgba(8,14,28,.92)), url('img/rg/realm_map.jpg') center / cover !important; border-color: rgba(212,200,166,.55) !important; }
.dt-war:hover { border-color: #f0e6c8 !important; box-shadow: 0 0 18px rgba(212,200,166,.25); }
.dt-war img { width: 54px; height: 54px; border-radius: 4px; object-fit: cover; }
.dt-war .dw-t { font-family: 'IM Fell English SC', serif; font-size: 1.35rem; letter-spacing: .1em; color: #f0e6c8; }
.dt-war .dw-go { margin-left: auto; }
@media (max-width: 900px) { .dt-war { grid-column: span 2; } }
.dt-war .dw-t { display: flex; flex-direction: column; gap: 2px; }
.dt-war .dw-t b { font-size: 1.5rem; font-weight: 600; line-height: 1.1; }
.dt-war .dw-t small { font-family: var(--font-body, inherit); font-size: .82rem; letter-spacing: .02em; color: var(--muted, #aab3c0); text-transform: none; }
.dt-war .dw-go { font-family: 'IM Fell English SC', serif; letter-spacing: .1em; border: 1px solid rgba(212,200,166,.6); border-radius: 4px; padding: 8px 16px; color: #f0e6c8; }

/* King and Queen as equals at the top of Characters */
.char-royal { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 16px 0 10px; align-items: start; }
.char-royal-card { padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: rgba(0,0,0,.25); }
.char-royal-card .ch-portrait {
  aspect-ratio: 3 / 4;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: radial-gradient(ellipse at 50% 28%, rgba(32, 52, 96, .55), #080b12 72%);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.char-royal-card .ch-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  border: 0;
  border-radius: 0;
  display: block;
}
.char-royal-card .ch-title { font-family: 'IM Fell English SC', serif; color: var(--goldb); letter-spacing: .08em; margin: 10px 0 4px; text-align: center; }
.char-house { margin: 0 0 22px; padding: 12px 16px; border: 1px solid var(--border-soft); border-radius: 8px; }
.ch-img-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.ch-img-row .ch-url { flex: 1; min-width: 140px; }
.pg-chars .ch-img-ctl { margin: 6px 0 10px; }
.pg-chars .ch-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.pg-chars .ch-thumb { padding: 0; border: 1px solid var(--border-soft); background: transparent; cursor: pointer; border-radius: 4px; }
.pg-chars .ch-thumb img { width: 40px; height: 48px; object-fit: cover; display: block; border-radius: 3px; }
.adm-por { display: flex; align-items: center; gap: 6px; min-width: 140px; }
.adm-por img.ch-por.sm, .ch-por.sm { width: 40px; height: 48px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
@media (max-width: 900px) { .char-royal { grid-template-columns: 1fr; } }
