@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Inter:wght@400;500;600;700&display=swap');
@import url('/css/athelgard-grand-theme.css');

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--cosmic);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.screen-wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  padding: 0 16px 16px;
}

.screen-nav {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  flex-wrap: wrap;
  align-items: center;
}
.screen-nav a, .screen-nav button {
  font: 600 11px/1 Inter, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(212,175,55,0.35);
  background: rgba(12,16,32,0.7);
  color: var(--cyan);
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.screen-nav a.on, .screen-nav button.on {
  border-color: var(--gold);
  color: var(--gold-bright);
  box-shadow: 0 0 16px var(--glow-gold);
}
.screen-nav .spacer { flex: 1; }

.hero-band {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  margin-bottom: 12px;
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212,175,55,0.1), rgba(110,200,255,0.06)), var(--panel);
}
.hero-band img { width: 56px; height: 56px; border-radius: 50%; filter: drop-shadow(0 0 10px var(--glow-cyan)); }
.hero-band h1 {
  margin: 0;
  font: 700 1.15rem/1.2 Cinzel, serif;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
}
.hero-band .sub { margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.hero-band .vision-head { font-size: 13px; color: var(--cyan); margin: 0; }
.hero-band .vision-sub { font-size: 11px; color: var(--muted); margin: 4px 0 0; }

.stat-pills { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pill {
  font-size: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.35);
  color: var(--muted);
}
.pill strong { color: var(--gold-bright); }

.pipeline-strip {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.pipe-step {
  flex: 1;
  min-width: 110px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(12,16,32,0.6);
  text-align: center;
}
.pipe-step.done { border-color: rgba(110,200,255,0.4); background: rgba(110,200,255,0.08); }
.pipe-step.active { border-color: var(--gold); box-shadow: 0 0 12px var(--glow-gold); }
.pipe-step .n { font: 700 9px Cinzel; color: var(--gold); }
.pipe-step .lbl { font: 600 10px Inter; margin-top: 2px; }
.pipe-step .short { font-size: 9px; color: var(--muted); margin-top: 2px; }

.grid-3 {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  gap: 12px;
  flex: 1;
  min-height: 0;
}
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1fr; }
}

.panel {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: var(--panel);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.panel h2 {
  margin: 0 0 10px;
  font: 700 0.72rem/1 Cinzel, serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.panel h3 {
  margin: 0 0 8px;
  font: 600 11px Inter;
  color: var(--cyan);
}

.lay-row { display: grid; grid-template-columns: 90px 1fr 36px; gap: 6px; align-items: center; margin-bottom: 5px; font-size: 10px; }
.lay-row .name { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lay-bar { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.lay-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--cyan)); border-radius: 3px; }
.lay-pct { text-align: right; color: var(--gold-bright); font-weight: 600; }

.crew-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.crew-card {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
  font-size: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.crew-card:hover, .crew-card.on { border-color: var(--cyan); }
.crew-card .nm { font-weight: 600; color: var(--ink); }
.crew-card .meta { color: var(--muted); margin-top: 2px; }
.crew-card .tgt { color: var(--gold); margin-top: 4px; font-size: 9px; }

.loop-strip {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.loop-step {
  flex: 1;
  min-width: 72px;
  text-align: center;
  padding: 6px 4px;
  border-radius: 6px;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 9px;
  transition: all 0.15s;
}
.loop-step .icon { font-size: 14px; }
.loop-step .lbl { font: 700 8px Cinzel; margin-top: 2px; color: var(--gold); }
.loop-step.active { border-color: var(--cyan); background: rgba(110,200,255,0.12); transform: translateY(-1px); }
.loop-step.done { opacity: 0.85; border-color: rgba(110,200,255,0.3); }
.loop-detail { font-size: 11px; color: var(--muted); margin-bottom: 10px; min-height: 32px; }

.monk-spine {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 420px;
  overflow-y: auto;
}
.monk-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.2);
  font-size: 11px;
}
.monk-row.canonical { border-left: 3px solid var(--gold); }
.monk-row.ready { border-left: 3px solid var(--cyan-dim); }
.monk-row.queued { opacity: 0.75; }
.monk-row .issue { font: 700 11px Cinzel; color: var(--gold-bright); }
.monk-row .title { font-weight: 500; line-height: 1.35; }
.monk-row .meta { font-size: 9px; color: var(--muted); margin-top: 3px; }
.monk-row .pts { font-size: 10px; color: var(--cyan); white-space: nowrap; }
.monk-row .stage-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(212,175,55,0.15);
  color: var(--gold);
  font-size: 9px;
  margin-right: 4px;
}

.academy-ladder { display: flex; flex-direction: column; gap: 8px; }
.cert-bar { margin-bottom: 4px; }
.cert-bar .hdr { display: flex; justify-content: space-between; font-size: 10px; margin-bottom: 3px; }
.cert-bar .track { height: 5px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.cert-bar .fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--cyan-dim)); }
.card-chip {
  display: inline-block;
  font-size: 9px;
  padding: 3px 7px;
  margin: 2px 4px 2px 0;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.card-chip.sealed { border-color: rgba(110,200,255,0.5); color: var(--cyan); }

.surface-list { font-size: 10px; line-height: 1.5; }
.surface-list div { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.surface-list strong { color: var(--cyan); display: block; margin-bottom: 2px; }
.surface-list span { color: var(--muted); font-size: 9px; }

.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}
.theme-btn {
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
  color: var(--ink);
  font-size: 9px;
  cursor: pointer;
  text-align: center;
}
.theme-btn.on { border-color: var(--gold); box-shadow: 0 0 10px var(--glow-gold); }
.theme-btn .ico { font-size: 16px; display: block; margin-bottom: 3px; }

input, textarea, select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.35);
  color: var(--ink);
  font: 400 12px Inter, sans-serif;
  margin-bottom: 8px;
}
textarea { min-height: 80px; resize: vertical; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
button.primary {
  font: 600 11px Inter;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--gold);
  background: linear-gradient(135deg, rgba(212,175,55,0.25), rgba(110,200,255,0.12));
  color: var(--gold-bright);
  cursor: pointer;
}
button.ghost {
  font: 600 10px Inter;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
button.primary:hover { box-shadow: 0 0 14px var(--glow-gold); }

.net-item {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  margin-bottom: 6px;
  font-size: 11px;
}
.net-item .st { font-size: 9px; color: var(--muted); }

.grove-meter {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}
.grove-meter div {
  height: 100%;
  background: linear-gradient(90deg, #2d5a27, #6ec8ff);
  border-radius: 4px;
}

.ext-mirror {
  font-size: 10px;
  padding: 10px;
  border-radius: 8px;
  border: 1px dashed rgba(212,175,55,0.35);
  background: rgba(212,175,55,0.05);
}
.ext-mirror .tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.ext-mirror .tab {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
  font-size: 9px;
}
.ext-mirror .tab.on { border-color: var(--cyan); color: var(--cyan); }

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(12,16,32,0.95);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-size: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s;
  z-index: 9999;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

.speak-line {
  font-style: italic;
  font-size: 11px;
  color: var(--cyan);
  padding: 8px;
  border-left: 2px solid var(--gold);
  margin: 8px 0;
  background: rgba(110,200,255,0.05);
}
