/* Planefall RPG Playground - fantasy web interface */
:root {
  --bg: #08050e;
  --panel: rgba(22, 18, 30, 0.86);
  --panel-2: rgba(38, 30, 45, 0.92);
  --ink: #fff5de;
  --ink-soft: #e8d9ba;
  --ink-dim: #b59f79;
  --line: rgba(214, 171, 93, 0.28);
  --line-bright: rgba(255, 218, 132, 0.62);
  --gold: #f4c76d;
  --gold-2: #b98532;
  --ember: #ff7a3d;
  --violet: #8c6cff;
  --aether: #50e5d4;
  --good: #7fe08a;
  --bad: #ff7070;
  --radius: 18px;
  font-size: 15px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 184, 87, 0.22), transparent 30rem),
    radial-gradient(circle at 82% 8%, rgba(92, 232, 216, 0.16), transparent 28rem),
    radial-gradient(circle at 50% 55%, rgba(111, 73, 255, 0.18), transparent 36rem),
    linear-gradient(180deg, #08050e 0%, #14101b 42%, #0a0710 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -3;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.1));
}

body::after {
  z-index: -2;
  background:
    radial-gradient(ellipse at top, transparent 45%, rgba(0, 0, 0, 0.58) 100%),
    linear-gradient(90deg, rgba(7, 4, 13, 0.84), transparent 20%, transparent 80%, rgba(7, 4, 13, 0.86));
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: .015em;
}
h2, h3 { margin: 0 0 .65rem; font-weight: 700; }
h4 { color: var(--gold); margin: 1.15rem 0 .55rem; }
.hidden { display: none !important; }

.sky-vault {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.sky-vault::before {
  content: "";
  position: absolute;
  inset: -25%;
  background:
    conic-gradient(from 120deg at 50% 50%, transparent, rgba(120, 87, 255, .22), transparent, rgba(80, 229, 212, .12), transparent);
  filter: blur(36px);
  animation: driftAura 24s linear infinite;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow:
    10vw 8vh 0 rgba(255, 255, 255, .7),
    22vw 16vh 0 rgba(255, 210, 126, .8),
    37vw 6vh 0 rgba(116, 239, 225, .7),
    58vw 18vh 0 rgba(255, 255, 255, .6),
    74vw 9vh 0 rgba(255, 210, 126, .75),
    91vw 22vh 0 rgba(180, 160, 255, .65);
  opacity: .7;
  animation: twinkle 4.5s ease-in-out infinite;
}
.star-a { left: 2vw; top: 9vh; }
.star-b { left: 8vw; top: 38vh; animation-delay: -1.5s; transform: scale(.7); }
.star-c { left: 4vw; top: 68vh; animation-delay: -3s; transform: scale(1.25); }

@keyframes driftAura {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(360deg) scale(1.05); }
}
@keyframes twinkle {
  0%, 100% { opacity: .28; filter: blur(0); }
  50% { opacity: .95; filter: blur(.2px); }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(19, 14, 27, .92), rgba(14, 10, 20, .72)),
    radial-gradient(circle at 50% 0%, rgba(244, 199, 109, .12), transparent 38rem);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 800;
}

.logo {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #241508;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .8rem;
  letter-spacing: .08em;
  background: radial-gradient(circle at 35% 30%, #fff4bf, #f4c76d 44%, #9f6423 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .28), 0 0 24px rgba(244, 199, 109, .38);
}

.brand-copy { white-space: nowrap; }
.brand em { color: var(--aether); font-style: normal; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .55rem; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 34px;
  padding: .32rem .78rem;
  border-radius: 999px;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.pill-on {
  color: #fff0bd;
  border: 1px solid rgba(244, 199, 109, .52);
  background: rgba(118, 73, 17, .34);
  box-shadow: inset 0 0 16px rgba(244, 199, 109, .08);
}
.pill-dim {
  color: var(--ink-dim);
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .045);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
  gap: clamp(1.2rem, 4vw, 3rem);
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(2.4rem, 5vw, 5rem) clamp(1rem, 3vw, 2rem) clamp(1.2rem, 3vw, 2.2rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 1.5rem clamp(1rem, 3vw, 2rem) .2rem;
  border: 1px solid rgba(244, 199, 109, .16);
  border-radius: 34px;
  background:
    linear-gradient(120deg, rgba(244, 199, 109, .08), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(80, 229, 212, .12), transparent 22rem);
  box-shadow: inset 0 0 90px rgba(0,0,0,.22), 0 24px 80px rgba(0,0,0,.16);
  pointer-events: none;
}

.hero-copy,
.hero-oracle {
  position: relative;
  z-index: 1;
}

.eyebrow,
.panel-kicker {
  color: var(--aether);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: .45rem 0 .9rem;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: .9;
  color: #fff4cd;
  text-shadow: 0 0 34px rgba(244, 199, 109, .22), 0 9px 28px rgba(0,0,0,.42);
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.7;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1.45rem;
}

.hero-badges span {
  padding: .52rem .8rem;
  border: 1px solid rgba(244, 199, 109, .28);
  border-radius: 999px;
  color: #fce8b3;
  background: rgba(10, 7, 16, .42);
  box-shadow: inset 0 0 18px rgba(244, 199, 109, .04);
}

.hero-oracle {
  align-self: center;
  min-height: 360px;
  display: grid;
  place-items: center;
}

.oracle-ring {
  position: absolute;
  width: min(330px, 72vw);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(244, 199, 109, .42);
  background:
    repeating-conic-gradient(from 0deg, rgba(244,199,109,.16) 0 8deg, transparent 8deg 18deg),
    radial-gradient(circle, rgba(80,229,212,.1), transparent 62%);
  box-shadow: 0 0 64px rgba(80, 229, 212, .18), inset 0 0 50px rgba(244,199,109,.08);
  animation: slowSpin 34s linear infinite;
}
.oracle-ring::before,
.oracle-ring::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(80, 229, 212, .28);
  border-radius: 50%;
}
.oracle-ring::after {
  inset: 27%;
  border-color: rgba(244, 199, 109, .38);
  transform: rotate(28deg);
}
@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.oracle-core {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  text-align: center;
  border: 1px solid rgba(244, 199, 109, .46);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .16), transparent 28%),
    radial-gradient(circle, rgba(80, 229, 212, .18), rgba(18, 11, 30, .92) 65%);
  box-shadow: 0 16px 60px rgba(0,0,0,.36), inset 0 0 38px rgba(0,0,0,.34);
}
.oracle-core strong {
  font-family: Georgia, "Times New Roman", serif;
  color: #fff3c7;
  font-size: 1.2rem;
}
.oracle-core small {
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: .13em;
}
.oracle-mark {
  color: var(--aether);
  font-size: 2rem;
  text-shadow: 0 0 20px rgba(80,229,212,.9);
}

.stat-runes {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
}
.stat-runes div {
  padding: .75rem .55rem;
  border: 1px solid rgba(244, 199, 109, .25);
  border-radius: 16px;
  text-align: center;
  background: rgba(10, 7, 16, .58);
  backdrop-filter: blur(10px);
}
.stat-runes b {
  display: block;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}
.stat-runes span {
  color: var(--ink-dim);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr) minmax(290px, 340px);
  gap: 1rem;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem) 2rem;
  align-items: start;
}

.panel {
  position: relative;
  overflow: hidden;
  padding: 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 246, 214, .045), transparent 34%),
    linear-gradient(140deg, rgba(65, 44, 45, .72), rgba(15, 11, 22, .88)),
    var(--panel);
  box-shadow: 0 20px 70px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255,255,255,.06);
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(244,199,109,.11), transparent) top / 100% 1px no-repeat,
    radial-gradient(circle at 20% 0%, rgba(244, 199, 109, .08), transparent 18rem);
}
.main-panel { min-height: 650px; }
.char-panel,
.log-panel { position: sticky; top: 82px; }

.panel-heading {
  position: relative;
  z-index: 1;
  margin-bottom: .9rem;
}
.panel-heading h2 {
  margin: .1rem 0 0;
  color: #fff0bf;
}
.main-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.char-head {
  position: relative;
  margin: .15rem 0 1rem;
  padding: .8rem;
  border: 1px solid rgba(244,199,109,.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, .035);
}
.char-name {
  color: #fff4c8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 800;
}
.char-sub { color: var(--ink-dim); font-size: .92rem; }
.bar-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: .55rem;
  margin: .55rem 0;
}
.bar-row label {
  color: var(--gold);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.bar {
  height: 14px;
  overflow: hidden;
  border: 1px solid rgba(244,199,109,.22);
  border-radius: 999px;
  background: rgba(0,0,0,.34);
  box-shadow: inset 0 1px 8px rgba(0,0,0,.65);
}
.bar-fill { height: 100%; width: 100%; transition: width .35s ease; }
.bar-fill.hp { background: linear-gradient(90deg, #8d1c2a, #f15b43, #ffc27a); }
.bar-fill.xp { background: linear-gradient(90deg, #4c33c9, var(--violet), var(--aether)); }
.bar-fill.foe { background: linear-gradient(90deg, #602559, #b34a7e, #ffc06b); }
.bar-text {
  min-width: 58px;
  color: var(--ink-dim);
  font-size: .75rem;
  text-align: right;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: .45rem;
  margin: 1rem 0;
}
.stat {
  padding: .55rem .35rem;
  border: 1px solid rgba(244,199,109,.2);
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, .04);
}
.stat-k {
  display: block;
  color: var(--ink-dim);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .12em;
}
.stat-v {
  color: #fff1c8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 800;
}
.signature {
  padding: .62rem .72rem;
  border: 1px solid rgba(80, 229, 212, .32);
  border-radius: 14px;
  background: rgba(80, 229, 212, .08);
  font-size: .88rem;
}
.sig-label {
  color: var(--aether);
  margin-right: .4rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.derived {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .75rem;
  color: var(--ink-dim);
  font-size: .82rem;
}
.derived > span {
  padding: .35rem .5rem;
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(0,0,0,.22);
}

.tabs {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0 0 1.1rem;
  padding: .55rem;
  border: 1px solid rgba(244,199,109,.18);
  border-radius: 18px;
  background: rgba(0,0,0,.22);
}
.tab {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink-dim);
  background: transparent;
  padding: .52rem .78rem;
  cursor: pointer;
  font-size: .86rem;
  font-weight: 800;
  letter-spacing: .03em;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.tab:hover {
  color: var(--ink);
  border-color: rgba(244,199,109,.22);
  background: rgba(255,255,255,.045);
  transform: translateY(-1px);
}
.tab.active {
  color: #211306;
  border-color: rgba(255,255,255,.28);
  background: linear-gradient(135deg, #ffe9a1, #d99a3d 62%, #8d5521);
  box-shadow: 0 8px 22px rgba(217,154,61,.16);
}
.tabpane {
  position: relative;
  z-index: 1;
  display: none;
}
.tabpane.active { display: block; animation: fadeUp .28s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.hint {
  color: var(--ink-dim);
  font-size: .9rem;
  line-height: 1.55;
  margin: 0 0 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: .8rem;
}
.card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  min-height: 118px;
  padding: .86rem;
  border: 1px solid rgba(244,199,109,.2);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.06), transparent 38%),
    radial-gradient(circle at 85% 10%, rgba(80,229,212,.08), transparent 9rem),
    rgba(20, 16, 27, .72);
  box-shadow: 0 12px 28px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.05);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(244,199,109,.16), transparent) top / 100% 1px no-repeat;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(244,199,109,.48);
  box-shadow: 0 16px 36px rgba(0,0,0,.34), 0 0 28px rgba(244,199,109,.06);
}
.card.complete {
  border-color: rgba(127,224,138,.64);
  background: linear-gradient(145deg, rgba(127,224,138,.16), rgba(20,16,27,.78));
}
.card.depleted { opacity: .58; filter: grayscale(.2); }
.card-icon { font-size: 2rem; line-height: 1; }
.card-title {
  color: #fff0bf;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
}
.card-meta {
  color: var(--ink-dim);
  font-size: .8rem;
  line-height: 1.42;
}
.card select {
  width: 100%;
  padding: .48rem .58rem;
  border: 1px solid rgba(244,199,109,.22);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(0,0,0,.35);
  font-size: .82rem;
}
.trade-card { min-width: 240px; }
.codex-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .65rem;
  margin-bottom: 1rem;
}
.codex-tile {
  padding: .75rem .6rem;
  border: 1px solid rgba(244,199,109,.22);
  border-radius: 16px;
  text-align: center;
  background: rgba(0,0,0,.24);
}
.codex-tile b {
  display: block;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}
.codex-tile span {
  color: var(--ink-dim);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.codex-card {
  min-height: 136px;
}

.arena {
  margin-top: 1.2rem;
  padding: 1rem;
  border: 1px solid rgba(255,112,112,.32);
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,122,61,.16), transparent 16rem),
    linear-gradient(180deg, rgba(65, 24, 35, .68), rgba(14, 10, 19, .9));
  box-shadow: inset 0 0 40px rgba(0,0,0,.28);
}
.foe-name {
  color: #ffd4b5;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 800;
}
.foe-meta { color: var(--ink-dim); font-size: .82rem; margin-top: .4rem; }
.dice-zone {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1rem;
}
.die {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 2px solid rgba(244,199,109,.68);
  border-radius: 20px;
  color: #fff0bf;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.85rem;
  font-weight: 900;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.16), transparent 30%),
    linear-gradient(145deg, rgba(78, 42, 91, .9), rgba(16, 9, 24, .94));
  box-shadow: 0 0 28px rgba(244,199,109,.2), inset 0 0 26px rgba(0,0,0,.5);
}
.die.crit {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 38px rgba(244,199,109,.62);
}
.die.fumble {
  border-color: var(--bad);
  color: var(--bad);
  box-shadow: 0 0 34px rgba(255,112,112,.48);
}

.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: .7rem;
}
.inv-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .28rem;
  min-height: 150px;
  padding: .75rem;
  border: 1px solid rgba(244,199,109,.2);
  border-radius: 16px;
  text-align: center;
  background: rgba(20, 16, 27, .74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.inv-icon { font-size: 2.05rem; line-height: 1; }
.inv-name { color: #fff0bf; font-size: .84rem; font-weight: 800; }
.inv-qty { color: var(--gold); font-size: .82rem; font-weight: 800; }
.inv-type {
  color: var(--ink-dim);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.log {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  max-height: calc(100vh - 170px);
  overflow-y: auto;
  padding-right: .15rem;
  font-size: .86rem;
}
.log-line {
  padding: .56rem .68rem;
  border: 1px solid rgba(244,199,109,.13);
  border-left: 3px solid rgba(244,199,109,.28);
  border-radius: 12px;
  color: var(--ink-soft);
  background: rgba(0,0,0,.2);
}
.log-line.good { border-left-color: var(--good); }
.log-line.bad { border-left-color: var(--bad); }
.log-line.crit {
  border-left-color: var(--gold);
  color: var(--gold);
  background: rgba(244,199,109,.08);
}
.log-line.level {
  border-left-color: var(--violet);
  color: #d9ceff;
  font-weight: 700;
}
.log-line.loot { border-left-color: var(--aether); }

.btn {
  border: 1px solid rgba(244,199,109,.24);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255,255,255,.055);
  padding: .56rem .92rem;
  cursor: pointer;
  font-size: .86rem;
  font-weight: 800;
  transition: transform .08s ease, filter .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(244,199,109,.48);
  background: rgba(255,255,255,.09);
}
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn-primary {
  color: #241508;
  border-color: rgba(255,255,255,.22);
  background: linear-gradient(135deg, #fff0ac, #f0b755 54%, #a36524);
  box-shadow: 0 10px 28px rgba(244,199,109,.16);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-ghost { background: rgba(0,0,0,.14); }
.btn-small {
  align-self: flex-start;
  padding: .42rem .72rem;
  font-size: .78rem;
}
.btn-tiny {
  padding: .3rem .54rem;
  font-size: .72rem;
}

.empty-state {
  color: var(--ink-dim);
  font-size: .94rem;
  line-height: 1.55;
  text-align: center;
  padding: 1.1rem .4rem;
}
.empty-state .btn { margin-top: .7rem; }

.field { display: block; margin: .8rem 0; }
.inline-field { max-width: 290px; margin-top: 0; }
.field span {
  display: block;
  color: var(--gold);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: .35rem;
  text-transform: uppercase;
}
.field input,
.field select {
  width: 100%;
  padding: .65rem .75rem;
  border: 1px solid rgba(244,199,109,.24);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(0,0,0,.33);
  font-size: .95rem;
  outline: none;
}
.field input:focus,
.field select:focus {
  border-color: rgba(80,229,212,.55);
  box-shadow: 0 0 0 3px rgba(80,229,212,.1);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(4, 3, 8, .78);
  backdrop-filter: blur(12px);
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  padding: 1.55rem;
  border: 1px solid rgba(244,199,109,.34);
  border-radius: 24px;
  background:
    radial-gradient(circle at 80% 0%, rgba(80,229,212,.14), transparent 14rem),
    linear-gradient(145deg, rgba(48,34,43,.96), rgba(13,9,19,.98));
  box-shadow: 0 28px 90px rgba(0,0,0,.56), inset 0 1px 0 rgba(255,255,255,.08);
}
.modal-card h2 {
  color: #fff0bf;
  margin-top: .25rem;
}
.modal-sigil {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(244,199,109,.4);
  border-radius: 50%;
  color: var(--aether);
  background: rgba(0,0,0,.26);
  box-shadow: 0 0 24px rgba(80,229,212,.18);
}
.class-preview {
  margin: .7rem 0 1rem;
  padding: .85rem;
  border: 1px solid rgba(244,199,109,.18);
  border-radius: 14px;
  color: var(--ink-soft);
  background: rgba(0,0,0,.2);
  font-size: .88rem;
}
.cp-arch { color: var(--aether); text-transform: capitalize; }
.cp-stats { margin: .4rem 0; }
.cp-hp { color: var(--ink-dim); }
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: flex-end;
}

@media (max-width: 1180px) {
  .layout { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); }
  .log-panel { grid-column: 1 / -1; position: relative; top: auto; }
  .log { max-height: 320px; }
}

@media (max-width: 900px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar-actions { justify-content: flex-start; }
  .hero { grid-template-columns: 1fr; }
  .hero-oracle { min-height: 300px; }
  .layout { grid-template-columns: 1fr; }
  .char-panel { position: relative; top: auto; }
}

@media (max-width: 560px) {
  .hero { padding-top: 2rem; }
  .hero h1 { font-size: 3rem; }
  .stat-runes { grid-template-columns: repeat(2, 1fr); }
  .oracle-ring { width: 250px; }
  .oracle-core { width: 155px; height: 155px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tab { white-space: nowrap; }
  .card-grid { grid-template-columns: 1fr; }
}
