/* Ashen Crown: gold and bronze on ash, after design/reference.png */
@font-face { font-family: "Cinzel"; src: url("/fonts/Cinzel-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("/fonts/Cinzel-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #0b0a09;
  --bg2: #110e0c;
  --panel: rgba(22, 18, 15, .92);
  --panel-solid: #16120f;
  --line: #2f2721;
  --line-hi: #4a3b2c;
  --text: #e7dfd2;
  --muted: #998f80;
  --gold: #c9a25b;
  --gold-hi: #ecd29a;
  --gold-dark: #8a6a35;
  --bronze-a: #b88a49;
  --bronze-b: #7a5629;
  --online: #59a86a;
  --soon: #c08a3e;
  --danger: #a33a3a;
  --serif: "Cinzel", "Trajan Pro", "Palatino Linotype", Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--text); font: 15.5px/1.6 var(--sans);
  background:
    radial-gradient(ellipse at 70% -20%, rgba(120, 86, 40, .18), transparent 55%),
    linear-gradient(180deg, #0e0c0a, var(--bg) 40%);
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: .06em; color: #f1e8d8; margin: 0 0 .5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.3rem; }
h1 small, h2 small { color: var(--muted); font-size: .6em; letter-spacing: .02em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.eyebrow { font-family: var(--serif); font-size: .82rem; letter-spacing: .32em; text-transform: uppercase; color: #cfc3ae; }
.section-title { font-family: var(--serif); font-size: .95rem; letter-spacing: .2em; text-transform: uppercase; color: #ddd2bf; display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.section-title::after { content: ""; flex: 0 0 26px; height: 1px; background: var(--gold-dark); }
.section-title a { margin-left: auto; font-family: var(--sans); font-size: .82rem; letter-spacing: .02em; text-transform: none; color: var(--muted); }

/* ---- header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: stretch; justify-content: space-between;
  height: 64px; padding: 0 22px; background: rgba(11, 10, 9, .92);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 46px; width: auto; }
.brand:hover { filter: brightness(1.15); }
.tabs { display: flex; align-items: stretch; margin-left: 26px; }
.tabs a {
  display: flex; align-items: center; padding: 0 20px; color: #d9cfbf;
  font-family: var(--serif); font-size: .9rem; letter-spacing: .1em; text-transform: uppercase;
  border-left: 1px solid transparent; border-right: 1px solid transparent; position: relative;
}
.tabs a:hover { color: #fff; text-decoration: none; }
.tabs a.active {
  color: #fff; background: linear-gradient(180deg, rgba(201, 162, 91, .14), rgba(201, 162, 91, .03));
  border-color: var(--line-hi);
}
.tabs a.active::after {
  content: ""; position: absolute; left: 18%; right: 18%; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-hi), transparent);
  box-shadow: 0 0 12px rgba(236, 210, 154, .7);
}
.top-left { display: flex; align-items: stretch; }
.account-box {
  display: flex; align-items: center; gap: 12px; padding: 0 18px;
  border-left: 1px solid var(--line); color: var(--text);
}
.account-box:hover { text-decoration: none; background: rgba(255, 255, 255, .02); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #3a2f24, #15110e); border: 1px solid var(--gold-dark);
  font-family: var(--serif); color: var(--gold-hi); font-size: 1rem;
}
.account-box .who { display: flex; flex-direction: column; line-height: 1.25; }
.account-box .who b { font-weight: 500; font-size: .92rem; }
.account-box .who span { font-size: .78rem; color: var(--online); }
.account-box .who span.off { color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 4px; padding-left: 8px; }
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer; padding: 6px 10px; }
button.link:hover { color: var(--gold-hi); }

main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 30px 24px 60px; flex: 1; }
main.wide { max-width: 1280px; }
main.home { max-width: none; padding: 0 0 60px; }

/* ---- hero */
.hero {
  position: relative; min-height: 520px; display: flex; align-items: center;
  background: var(--bg) url("/img/hero.jpg") 70% 40% / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 10, 9, .92) 0%, rgba(11, 10, 9, .7) 30%, rgba(11, 10, 9, .15) 55%, transparent 75%),
    linear-gradient(0deg, var(--bg) 0%, transparent 22%);
}
.hero-inner { position: relative; width: 100%; max-width: 1180px; margin: 0 auto; padding: 40px 24px; }
.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.6rem); font-weight: 400; letter-spacing: .12em; text-transform: uppercase; margin: 6px 0 4px;
  background: linear-gradient(180deg, #fff6e3 0%, #e9cf98 45%, #b98d4a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, .7));
}
.hero .tagline { font-family: var(--serif); letter-spacing: .28em; text-transform: uppercase; font-size: .95rem; color: #dcd1bd; margin-bottom: 26px; }
.hero .lead { max-width: 470px; font-size: 1.05rem; color: #e9e1d2; margin-bottom: 26px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 12px 28px; border-radius: 2px; border: 1px solid #d3a964;
  background: linear-gradient(180deg, var(--bronze-a), var(--bronze-b));
  color: #fff7e8; font: 400 .95rem var(--serif); letter-spacing: .12em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 236, 196, .35), 0 6px 18px rgba(0, 0, 0, .45);
}
.btn:hover { filter: brightness(1.12); color: #fff; text-decoration: none; }
.btn.bright { background: linear-gradient(180deg, #e9c47a, #b8883e); color: #1c140b; border-color: #f1d494; font-weight: 700; }
.btn.small { padding: 7px 16px; font-size: .78rem; }
.btn.ghost { background: rgba(255, 255, 255, .02); border-color: var(--line-hi); color: var(--text); box-shadow: none; }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn.danger { background: linear-gradient(180deg, #8b2f2f, #5c1d1d); border-color: #b04848; }
.btn .arrow { font-family: var(--sans); }

/* ---- home grid */
.home-grid { display: grid; grid-template-columns: 1fr 330px; gap: 26px; max-width: 1180px; margin: 30px auto 0; padding: 0 24px; }
.featured {
  position: relative; display: grid; grid-template-columns: 270px 1fr; min-height: 200px;
  border: 1px solid var(--line-hi); border-radius: 3px; overflow: hidden;
  background: linear-gradient(90deg, rgba(14, 11, 9, .2), var(--panel-solid) 30%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); margin-bottom: 30px;
}
.featured .art { background: url("/img/realm.jpg") center / cover; position: relative; }
.featured .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, var(--panel-solid)); }
.featured .art .count { position: absolute; left: 16px; bottom: 12px; z-index: 1; font-size: 1rem; color: #f3ead9; text-shadow: 0 1px 6px #000; }
.featured .body { padding: 20px 24px; display: flex; flex-direction: column; }
.featured h3 { font-size: 1.7rem; letter-spacing: .08em; text-transform: uppercase; margin: 8px 0 2px; }
.featured .sub { font-family: var(--serif); font-size: .78rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.featured .desc { color: #d7cebf; font-size: .95rem; max-width: 460px; }
.featured .foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: auto; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: .75rem; padding: 3px 9px; border: 1px solid var(--line-hi); border-radius: 2px; color: #d8cfc0; background: rgba(0, 0, 0, .3); }

.server-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.server-card {
  position: relative; min-height: 138px; padding: 14px 18px; border: 1px solid var(--line-hi); border-radius: 3px; overflow: hidden;
  background: var(--panel-solid) center / cover; display: flex; flex-direction: column; justify-content: flex-end;
}
.server-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 8, 7, .95) 25%, rgba(10, 8, 7, .45)); }
.server-card > * { position: relative; }
.server-card .badge { position: absolute; top: 12px; left: 16px; }
.server-card h4 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: .07em; margin: 0; }
.server-card .meta { color: var(--muted); font-size: .86rem; }
.server-card .players { margin-top: 6px; font-size: .9rem; }

.side-panel { border: 1px solid var(--line); background: var(--panel); border-radius: 3px; padding: 16px 18px; margin-bottom: 18px; }
.news-item { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 8px 0; }
.news-item img { width: 96px; height: 52px; object-fit: cover; border: 1px solid var(--line); }
.news-item b { display: block; font-weight: 500; font-size: .9rem; line-height: 1.3; color: #ece4d6; }
.news-item span { font-size: .78rem; color: var(--muted); }
.quick a { display: flex; align-items: center; gap: 12px; padding: 7px 0; color: #ddd4c5; font-size: .9rem; }
.quick a::after { content: "↗"; margin-left: auto; color: var(--muted); }
.quick a:hover { color: var(--gold-hi); text-decoration: none; }
.quick .ico { width: 18px; text-align: center; color: var(--gold); }

/* ---- generic panels (account, forms, staff) */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-top: 1px solid var(--line-hi);
  border-radius: 3px; padding: 26px 30px; margin-bottom: 22px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.panel.narrow { max-width: 470px; margin-left: auto; margin-right: auto; }
.panel.narrow-left form { max-width: 420px; }
.prose h2 { font-size: 1.05rem; color: var(--gold); margin-top: 1.3em; }
.steps { padding-left: 1.2em; }
.steps li { margin: .3em 0; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: .93rem; }
label small { color: var(--muted); font-size: .8rem; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
input, select, textarea {
  background: #0d0b0a; color: var(--text); border: 1px solid #3a3029; border-radius: 2px; padding: 10px 12px; font: inherit;
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201, 162, 91, .2); }
.row input { flex: 1; min-width: 200px; }
fieldset { border: 1px solid var(--line); border-radius: 2px; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; margin: 0; }
legend { padding: 0 6px; color: var(--gold); font-family: var(--serif); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--gold); }

.notice { padding: 11px 15px; border-radius: 2px; margin-bottom: 16px; border: 1px solid; }
.notice.error { background: #261111; border-color: #6d2a2a; color: #f0c9c9; }
.notice.ok { background: #13200f; border-color: #3b5a2a; color: #cfe5c1; }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 3px; border: 1px solid;
  font-family: var(--serif); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
}
.badge.on { color: #b9e6c1; border-color: #3f7a4b; background: rgba(40, 90, 52, .55); }
.badge.soon { color: #f1cf96; border-color: #8a6430; background: rgba(110, 72, 24, .55); }
.badge.off { color: #c9c0b2; border-color: #4a423b; background: rgba(40, 36, 32, .7); }
.tag { font-size: .72rem; padding: 1px 7px; border-radius: 2px; border: 1px solid var(--gold-dark); color: var(--gold); }
.tag.bad { border-color: #8a2a32; color: #e58a90; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
tr:hover td { background: rgba(255, 255, 255, .02); }
.facts { display: grid; grid-template-columns: 140px 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats div { background: #0d0b0a; border: 1px solid var(--line); padding: 14px; text-align: center; }
.stats b { display: block; font: 1.8rem var(--serif); color: var(--gold-hi); }
.stats span { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.character h3 { font-size: 1.6rem; letter-spacing: .06em; }
.character h4 { color: var(--gold); margin: 1em 0 .3em; font-size: .95rem; letter-spacing: .12em; text-transform: uppercase; }
.backstory { white-space: pre-wrap; background: #0d0b0a; border-left: 2px solid var(--gold-dark); padding: 12px 16px; color: #d5ccbd; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

/* ---- footer */
footer { border-top: 1px solid var(--line); padding: 26px 22px; text-align: center; font-size: .85rem; background: #090807; }
footer p { margin: .25em 0; }
footer .motto { font-family: var(--serif); letter-spacing: .3em; text-transform: uppercase; color: #bcae97; font-size: .8rem; margin-bottom: 8px; }

@media (max-width: 960px) {
  .home-grid { grid-template-columns: 1fr; }
  .featured { grid-template-columns: 1fr; }
  .featured .art { min-height: 160px; }
  .tabs { display: none; }
}
@media (max-width: 640px) {
  .server-row, .stats, .row2 { grid-template-columns: 1fr; }
  .hero { background-size: cover; }
  .account-box .who { display: none; }
}

.server-card.art-night { background-image: url("/img/night.jpg"); }
.server-card.art-realm { background-image: url("/img/realm.jpg"); }

/* Roleplay staff pages: ledger amounts */
td.neg { color: #e06060; }
td.pos { color: #8fbf7a; }

/* Housing: property definition form, alerts in property logs */
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; align-items: end; }
.grid-form label.wide { grid-column: 1 / -1; }
tr.alert td { background: #1c0f0f; }
/* Staff live map (ops) */
.live-map { width: 100%; max-width: 900px; margin: 0 auto 1rem; border: 1px solid rgba(201, 162, 39, 0.35); }
.live-map-svg { display: block; width: 100%; height: auto; background: #14110d; }
.map-bg { fill: #14110d; }
.map-grid { stroke: rgba(201, 162, 39, 0.18); stroke-width: 1; }
.map-grid-label { fill: rgba(232, 220, 196, 0.5); font-size: 12px; }
.map-player { fill: #e0b84a; stroke: #1a1510; stroke-width: 2; }
.map-player.stale { fill: #8a7a5a; }
.map-heading { stroke: #e0b84a; stroke-width: 2; }
.map-label { fill: #f3ead6; font-size: 14px; paint-order: stroke; stroke: #14110d; stroke-width: 3px; }
ul.notifications { list-style: none; padding: 0; }
ul.notifications li { padding: 0.35rem 0; border-bottom: 1px solid rgba(201, 162, 39, 0.15); }
