:root {
  --bg: #100b16;
  --panel: rgba(29, 18, 38, 0.9);
  --panel-soft: rgba(49, 29, 61, 0.65);
  --purple: #6f3b88;
  --purple-bright: #a65bc4;
  --gold: #d9ab55;
  --gold-bright: #f4d58a;
  --cream: #f7f0df;
  --muted: #bcb0c4;
  --line: rgba(228, 190, 112, 0.22);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--cream);
  background:
    radial-gradient(circle at 75% 15%, rgba(116, 62, 143, 0.25), transparent 33%),
    radial-gradient(circle at 10% 60%, rgba(218, 171, 85, 0.09), transparent 28%),
    var(--bg);
  font-family: "Inter", sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}
a { color: inherit; }
button, textarea { font: inherit; }
.page-shell { max-width: 1500px; margin: 0 auto; overflow: hidden; }
.topbar {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(22px, 5vw, 74px);
  border-bottom: 1px solid var(--line);
  background: rgba(16, 11, 22, 0.78);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-crest {
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-bright);
  font-family: "Cinzel", serif; font-size: 23px; font-weight: 700;
  box-shadow: inset 0 0 0 4px rgba(217,171,85,.08);
}
.brand strong, .brand small { display: block; }
.brand strong { font-family: "Cinzel", serif; letter-spacing: .04em; }
.brand small { color: var(--muted); margin-top: 2px; }
nav { display: flex; gap: 28px; }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
nav a:hover { color: var(--gold-bright); }
.status-pill {
  color: var(--muted); font-size: 13px; border: 1px solid var(--line); padding: 9px 13px; border-radius: 999px;
  white-space: nowrap;
}
.status-pill span { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #74d49a; box-shadow: 0 0 12px #74d49a; }
.hero {
  min-height: 760px;
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
  padding: 72px clamp(22px, 5vw, 74px) 88px;
}
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 700; }
h1, h2, h3 { font-family: "Cinzel", serif; margin: 0; }
h1 { font-size: clamp(48px, 6vw, 86px); line-height: .98; margin: 18px 0 24px; max-width: 760px; }
h2 { font-size: clamp(34px, 4vw, 58px); line-height: 1.05; margin-top: 13px; }
.hero-text { color: var(--muted); font-size: 19px; line-height: 1.7; max-width: 670px; }
.royal-quote {
  margin: 30px 0; padding: 18px 20px; border-left: 3px solid var(--gold); color: var(--gold-bright);
  background: linear-gradient(90deg, rgba(217,171,85,.10), transparent); font-family: "Cinzel", serif;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border-radius: 8px; text-decoration: none; font-weight: 700; }
.button.primary { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: #21160a; box-shadow: 0 12px 30px rgba(217,171,85,.18); }
.button.secondary { border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 42px; }
.mini-stats div { padding-top: 18px; border-top: 1px solid var(--line); }
.mini-stats strong, .mini-stats span { display: block; }
.mini-stats strong { font-family: "Cinzel", serif; color: var(--gold-bright); }
.mini-stats span { color: var(--muted); font-size: 12px; margin-top: 5px; }
.hero-art-wrap { position: relative; }
.crown-glow { position: absolute; inset: 8% 8% 5%; background: radial-gradient(circle, rgba(217,171,85,.25), transparent 63%); filter: blur(18px); }
.hero-art { position: relative; width: 100%; display: block; border-radius: 18px; border: 1px solid rgba(244,213,138,.25); box-shadow: var(--shadow); }
.art-plaque {
  position: absolute; left: 50%; bottom: -28px; transform: translateX(-50%); width: min(74%, 440px); text-align: center;
  padding: 15px 22px; border: 1px solid var(--gold); background: rgba(22,13,28,.94); box-shadow: 0 18px 45px rgba(0,0,0,.35);
}
.art-plaque span, .art-plaque small { display: block; color: var(--muted); }
.art-plaque strong { display: block; font-family: "Cinzel", serif; font-size: 23px; color: var(--gold-bright); margin: 3px 0; }
section:not(.hero) { padding: 92px clamp(22px, 5vw, 74px); }
.audience-section { background: linear-gradient(180deg, rgba(255,255,255,.018), transparent); }
.section-heading { text-align: center; max-width: 820px; margin: 0 auto 42px; }
.section-heading p { color: var(--muted); line-height: 1.7; }
.chat-card {
  max-width: 1040px; margin: 0 auto; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--panel); box-shadow: var(--shadow);
}
.chat-header { display: flex; align-items: center; gap: 13px; padding: 17px 20px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.025); }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--purple); color: white; font-family: "Cinzel", serif; font-weight: 700; }
.chat-header strong, .chat-header span { display: block; }
.chat-header span { color: var(--muted); font-size: 12px; margin-top: 4px; }
.chat-header i { display: inline-block; width: 7px; height: 7px; background: #74d49a; border-radius: 50%; margin-right: 6px; }
.icon-button { margin-left: auto; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 7px; padding: 8px 11px; cursor: pointer; }
.chat-messages { min-height: 360px; max-height: 560px; overflow-y: auto; padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.message { max-width: 78%; }
.message.user { margin-left: auto; }
.message-name { color: var(--gold); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 6px 4px; }
.message.user .message-name { text-align: right; color: var(--muted); }
.bubble { padding: 14px 16px; border-radius: 13px; line-height: 1.55; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.05); }
.message.user .bubble { background: linear-gradient(135deg, #69407c, #4d2c5c); }
.message.thinking .bubble { color: var(--muted); font-style: italic; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 14px; }
.suggestions button { border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--muted); border-radius: 999px; padding: 8px 12px; cursor: pointer; }
.suggestions button:hover { color: var(--gold-bright); border-color: var(--gold); }
.chat-form { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); }
textarea { flex: 1; resize: none; min-height: 50px; max-height: 160px; border: 1px solid var(--line); border-radius: 9px; padding: 14px 15px; background: #130e19; color: var(--cream); outline: none; }
textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,171,85,.09); }
.send-button { border: 0; border-radius: 9px; padding: 0 20px; background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: #21160a; font-weight: 800; cursor: pointer; }
.send-button:disabled { opacity: .55; cursor: wait; }
.chat-footer { display: flex; justify-content: space-between; gap: 18px; padding: 0 20px 17px; color: var(--muted); font-size: 11px; }
.section-heading.compact { margin-bottom: 34px; }
.decree-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.decree-grid article { padding: 28px; min-height: 260px; border: 1px solid var(--line); background: var(--panel-soft); border-radius: 14px; }
.decree-grid article > span { color: var(--gold); font-family: "Cinzel", serif; }
.decree-grid h3 { font-size: 22px; margin: 42px 0 14px; }
.decree-grid p { color: var(--muted); line-height: 1.65; }
.about-section { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.portrait-panel img { width: 100%; display: block; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.about-copy p { color: var(--muted); line-height: 1.75; font-size: 17px; }
.traits { display: flex; flex-wrap: wrap; gap: 9px; margin: 25px 0; }
.traits span { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--gold-bright); }
blockquote { margin: 30px 0 0; padding: 20px 22px; border-left: 3px solid var(--gold); background: rgba(217,171,85,.07); font-family: "Cinzel", serif; color: var(--gold-bright); }
footer { display: flex; justify-content: space-between; gap: 28px; align-items: end; padding: 34px clamp(22px, 5vw, 74px); border-top: 1px solid var(--line); color: var(--muted); }
footer strong, footer span { display: block; }
footer strong { color: var(--cream); font-family: "Cinzel", serif; }
footer p { margin: 0; text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1050px) {
  nav { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { order: 2; }
  .hero-art-wrap { max-width: 780px; margin: 0 auto; }
  .decree-grid { grid-template-columns: repeat(2, 1fr); }
  .about-section { grid-template-columns: 1fr; }
  .portrait-panel { max-width: 760px; }
}
@media (max-width: 680px) {
  .topbar { min-height: 72px; }
  .status-pill { display: none; }
  .brand small { display: none; }
  .hero { padding-top: 34px; min-height: auto; }
  h1 { font-size: 47px; }
  .mini-stats { grid-template-columns: 1fr; }
  .art-plaque { position: relative; bottom: auto; margin-top: -1px; width: 94%; }
  section:not(.hero) { padding-top: 68px; padding-bottom: 68px; }
  .decree-grid { grid-template-columns: 1fr; }
  .message { max-width: 91%; }
  .chat-form { flex-direction: column; }
  .send-button { min-height: 48px; }
  .chat-footer { flex-direction: column; }
  footer { flex-direction: column; align-items: start; }
  footer p { text-align: left; }
}
