/* ============================================================================
   Sosaria — site theme
   Deep-navy parchment-gold design system.
   ========================================================================== */

:root {
  --ink:            #050b14;
  --ink-2:          #08111d;
  --panel:          #0c1724;
  --panel-2:        #0f1d2d;
  --line:           rgba(200, 165, 91, 0.22);
  --line-soft:      rgba(200, 165, 91, 0.12);
  --gold:           #c8a55b;
  --gold-bright:    #ecd9a6;
  --gold-dim:       #8d7440;
  --text:           #c7d1dc;
  --text-dim:       #8b9aa9;
  --heading:        #f2e7cd;
  --green:          #7fca8b;
  --red:            #d97a6c;
  --cyan:           #79c4d6;
  --serif:          "Cinzel", "Trajan Pro", Garamond, "Times New Roman", serif;
  --sans:           "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius:         6px;
  --wrap:           1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
}

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 620px at 18% -12%, rgba(58, 84, 120, 0.32), transparent 62%),
    radial-gradient(900px 500px at 88% 4%, rgba(120, 84, 44, 0.16), transparent 60%),
    linear-gradient(180deg, #070e18 0%, #060c15 45%, #04090f 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* faint starfield / dust so the dark areas are not flat */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255, 240, 205, 0.5), transparent),
    radial-gradient(1px 1px at 68% 12%, rgba(255, 240, 205, 0.35), transparent),
    radial-gradient(1px 1px at 34% 78%, rgba(255, 240, 205, 0.3), transparent),
    radial-gradient(1px 1px at 82% 62%, rgba(255, 240, 205, 0.28), transparent),
    radial-gradient(1px 1px at 52% 44%, rgba(255, 240, 205, 0.22), transparent);
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold-bright); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--heading);
  letter-spacing: 0.01em;
  margin: 0 0 0.4em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 0.9em; }

img { border: 0; max-width: 100%; }

/* ---------------------------------------------------------------- top bar -- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(12px, 2vw, 28px);
  padding: 0 clamp(14px, 3vw, 40px);
  height: 68px;
  background: linear-gradient(180deg, rgba(6, 13, 22, 0.97), rgba(6, 13, 22, 0.88));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 1.32rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-bright);
  white-space: nowrap;
}
.brand img { width: 30px; height: 30px; display: block; }

.topbar .divider {
  width: 1px;
  height: 26px;
  background: linear-gradient(180deg, transparent, var(--line), transparent);
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(8px, 1.6vw, 26px);
  margin-left: auto;
  min-width: 0;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.topbar > .btn { flex: none; }
.nav a {
  position: relative;
  padding: 6px 2px;
  transition: color 0.18s ease;
}
.nav a:hover { color: var(--gold-bright); }
.nav a.active { color: var(--gold-bright); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ---------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 24px;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: rgba(200, 165, 91, 0.05);
  color: var(--gold-bright);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.btn:hover {
  border-color: rgba(236, 217, 166, 0.55);
  background: rgba(200, 165, 91, 0.12);
  color: #fff6e2;
  box-shadow: 0 0 24px rgba(200, 165, 91, 0.14);
}
.btn-gold {
  border: 1px solid #e3c78d;
  background: linear-gradient(180deg, #e9d29c, #c19c56 55%, #9a7a3c);
  color: #241a0c;
  text-shadow: 0 1px 0 rgba(255, 250, 235, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 22px rgba(0, 0, 0, 0.45);
}
.btn-gold:hover {
  background: linear-gradient(180deg, #f3e0b2, #cfab62 55%, #a88744);
  color: #1b1308;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 26px rgba(200, 165, 91, 0.28);
}
.btn-sm { padding: 8px 16px; font-size: 0.68rem; }

/* ----------------------------------------------------------------- layout -- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px) clamp(16px, 3vw, 28px) 56px;
  position: relative;
  z-index: 1;
}

/* ------------------------------------------------------------------- hero -- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: clamp(70px, 10vw, 104px) 0 clamp(46px, 6vw, 70px);
  margin-top: -1px;
  background-image: url(../images/hero.svg);
  background-size: cover;
  background-position: 62% 58%;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(5, 11, 20, 0.5), rgba(5, 11, 20, 0.06) 40%, rgba(5, 11, 20, 0.82));
  pointer-events: none;
}
.hero-inner { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 3vw, 28px); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: clamp(18px, 5vw, 54px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim));
}
.eyebrow::after { background: linear-gradient(90deg, var(--gold-dim), transparent); }

.hero h1 {
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  line-height: 1.06;
  margin: 0 0 14px;
  color: #fbf3e2;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.7);
  max-width: 15ch;
}
.hero .lede {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  color: #d7cdb8;
  max-width: 42ch;
  margin: 0 0 26px;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.8);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  font-size: 0.82rem;
  color: #cfd8e1;
}
.status-pill .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #57d07a;
  box-shadow: 0 0 0 4px rgba(87, 208, 122, 0.16), 0 0 14px rgba(87, 208, 122, 0.7);
}
.status-pill.offline .dot {
  background: #d97a6c;
  box-shadow: 0 0 0 4px rgba(217, 122, 108, 0.16), 0 0 14px rgba(217, 122, 108, 0.6);
}

/* --------------------------------------------------------- section heading -- */
.section-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 22px;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  color: var(--heading);
  justify-content: center;
}
.section-title::before,
.section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--line) 40%, var(--line));
}
.section-title::after { background: linear-gradient(270deg, transparent, var(--line) 40%, var(--line)); }
.section-title .diamond {
  width: 7px; height: 7px;
  transform: rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 12px rgba(200, 165, 91, 0.7);
}

/* ------------------------------------------------------------------ cards -- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 34px;
}
.stat {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(20, 34, 51, 0.85), rgba(10, 18, 29, 0.9));
  position: relative;
}
.stat::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  pointer-events: none;
}
.stat .glyph {
  width: 34px; height: 34px;
  flex: none;
  color: var(--gold);
  opacity: 0.9;
}
.stat .label {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 3px;
}
.stat .value {
  display: block;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--heading);
  line-height: 1.1;
}
.stat .value small { font-size: 0.85rem; color: var(--text-dim); font-family: var(--sans); }

/* ----------------------------------------------------------------- panels -- */
.columns {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 18px;
  align-items: start;
}
.columns.narrow-first { grid-template-columns: 1fr 1.6fr; }
.stats.pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1000px) {
  .columns,
  .columns.narrow-first { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 29, 45, 0.92), rgba(8, 15, 24, 0.94));
  position: relative;
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(30, 47, 68, 0.45), transparent);
}
.panel-head .glyph { width: 20px; height: 20px; color: var(--gold); flex: none; }
.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--heading);
}
.panel-head .grow { margin-left: auto; }
.panel-body { padding: 18px 22px; position: relative; z-index: 1; }
.panel-body.flush { padding: 0; }
.panel-foot {
  padding: 12px 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 0.05em;
}

/* -------------------------------------------------------------- empty state -- */
.empty {
  text-align: center;
  padding: 46px 20px 40px;
  color: var(--text-dim);
}
.empty .glyph { width: 46px; height: 46px; color: var(--gold-dim); opacity: 0.85; margin-bottom: 14px; }
.empty h3 {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.32rem;
  color: #ded3ba;
  margin: 0 0 6px;
}
.empty p { margin: 0; font-size: 0.88rem; }

/* ------------------------------------------------------------------ steps -- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(step);
  flex: none;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 0.82rem;
  color: var(--gold-bright);
  background: rgba(200, 165, 91, 0.07);
}
.steps a { color: var(--gold-bright); border-bottom: 1px solid rgba(200, 165, 91, 0.35); }
.steps a:hover { border-bottom-color: var(--gold-bright); }

/* ------------------------------------------------------------------ forms -- */
input[type="search"],
input[type="text"],
input[type="password"] {
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--text);
  background: rgba(4, 10, 17, 0.8);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px 13px;
  min-width: 190px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
input[type="search"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: rgba(236, 217, 166, 0.6);
  box-shadow: 0 0 0 3px rgba(200, 165, 91, 0.12);
}
input::placeholder { color: #5d6b7a; }

button, .btn-form {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: rgba(200, 165, 91, 0.08);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px 16px;
  cursor: pointer;
}
button:hover { background: rgba(200, 165, 91, 0.16); border-color: rgba(236, 217, 166, 0.5); }

/* ------------------------------------------------------------------ alpha -- */
.alpha {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.alpha a,
td.rolodex a {
  display: inline-block;
  min-width: 26px;
  padding: 4px 6px;
  text-align: center;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border-radius: 3px;
  transition: color 0.15s ease, background 0.15s ease;
}
.alpha a:hover,
td.rolodex a:hover {
  color: var(--gold-bright);
  background: rgba(200, 165, 91, 0.1);
}

/* ----------------------------------------------------------------- tables -- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table th {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(31, 47, 68, 0.35);
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 12px;
  text-align: left;
  white-space: nowrap;
}
table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(200, 165, 91, 0.07);
  vertical-align: middle;
}
table tr:nth-child(even) td { background: rgba(255, 255, 255, 0.012); }
table tr:hover td { background: rgba(200, 165, 91, 0.05); }
/* Headshots are cut out of the paperdoll, whose dark gear and black edges sit on the dark
   panels as if the character had holes in it. A black chip behind each one lets those
   parts melt into the tile instead of showing as lumps. */
table td img[src*="paperdoll"] {
  border-radius: 5px;
  background: radial-gradient(circle at 50% 35%, #07090c, #000 80%);
  box-shadow: inset 0 0 0 1px rgba(200, 165, 91, 0.14);
  height: auto; /* keep it square if the name column is narrow, rather than stretching it */
  aspect-ratio: 1 / 1;
}
table.defaulttable td,
table.defaulttable th { padding: 10px 12px; }

/* legacy text colours used by the MyRunUO pages */
.gold  { color: var(--gold-bright); }
.green { color: var(--green); }
.red   { color: var(--red); }
.cyan  { color: var(--cyan); }
.grey  { color: var(--text-dim); }
.white { color: #eef3f8; }
.no-results {
  text-align: center;
  padding: 34px 16px;
  color: var(--text-dim);
  font-style: italic;
}
td.rolodex { border: 0; padding: 0; }

/* ------------------------------------------------------------------ pager -- */
.pager {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 12px 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.76rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}
.pager a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  color: var(--text);
}
.pager a:hover { border-color: var(--line); color: var(--gold-bright); }

/* -------------------------------------------------------------- character -- */
.character {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 860px) {
  .character { grid-template-columns: 1fr; }
}
.doll-stage {
  display: grid;
  place-items: center;
  padding: 10px;
  background:
    radial-gradient(circle at 50% 30%, rgba(200, 165, 91, 0.12), transparent 65%),
    linear-gradient(180deg, rgba(9, 16, 26, 0.9), rgba(4, 9, 15, 0.95));
}
.doll-stage img { display: block; filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.55)); }

.char-name {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 4px;
}
.char-title { font-family: Georgia, serif; font-style: italic; color: var(--gold); margin: 0 0 18px; }

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.skill-card {
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 14px;
  text-align: center;
  background: rgba(10, 19, 30, 0.7);
}
.skill-card img { display: block; margin: 0 auto 8px; }
.skill-card .rank { font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.skill-card .name { font-size: 0.84rem; color: var(--text); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 0.9rem; }
.kv dt { color: var(--text-dim); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; align-self: center; }
.kv dd { margin: 0; color: var(--heading); }

/* ----------------------------------------------------------------- footer -- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 34px 20px 40px;
  text-align: center;
  background: linear-gradient(180deg, rgba(5, 11, 19, 0), rgba(3, 7, 12, 0.9));
}
.site-footer .mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.site-footer .mark img { width: 26px; height: 26px; }
.site-footer .tagline {
  margin: 12px 0 0;
  font-family: Georgia, serif;
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.92rem;
}
.site-footer .legal {
  margin: 14px 0 0;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #55636f;
}

/* ----------------------------------------------------------- small screens -- */
@media (max-width: 1080px) {
  .topbar .divider { display: none; }
  .nav { font-size: 0.7rem; letter-spacing: 0.12em; }
}

@media (max-width: 820px) {
  .topbar { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .nav { order: 3; width: 100%; margin-left: 0; justify-content: center; gap: 10px; flex-wrap: wrap; font-size: 0.63rem; letter-spacing: 0.08em; }
  .topbar .brand { font-size: 1.1rem; }
  .topbar > .btn-gold { margin-left: auto; padding: 9px 16px; }
  .stats,
  .stats.pairs { grid-template-columns: 1fr; }
  .hero { min-height: 440px; }
  .wrap { padding-top: 26px; }
  table { font-size: 0.82rem; }
  table th, table td { padding: 8px 8px; }
}

/* utility colours must win inside the character definition list */
.kv dd.gold  { color: var(--gold-bright); }
.kv dd.red   { color: var(--red); }
.kv dd.cyan  { color: var(--cyan); }

@media (max-width: 620px) {
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- legacy MyRunUO pages: neutralise the old slate strips and give their
   bare tables the same panel treatment as the rebuilt pages ---------------- */
tr[style*="bg_dark_slate"],
tr[style*="bg_light_slate"],
td[style*="bg_dark_slate"],
td[style*="bg_light_slate"] {
  background-image: none !important;
  background-color: transparent !important;
}

main.wrap > table {
  background: linear-gradient(180deg, rgba(16, 29, 45, 0.92), rgba(8, 15, 24, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}

main.wrap > table > tr > th,
main.wrap table th { background-image: none; }

main.wrap > table img[src*="buttons/"] { opacity: 0.75; }
main.wrap > table img[src*="buttons/"]:hover { opacity: 1; }

main.wrap h1.gold, main.wrap th h1 {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--gold-bright);
}
