:root {
  --cathedral-gold: #d8bd72;
  --cathedral-gold-dim: rgba(216, 189, 114, 0.34);
  --cathedral-stone: rgba(12, 8, 14, 0.91);
  --cathedral-crimson: #b51f3e;
}

html {
  background: #020104;
}

body {
  background: transparent;
}

.cathedral-canvas {
  position: fixed;
  z-index: -8;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  pointer-events: none;
}

body[data-avatar-wheel-focus="true"] {
  cursor: zoom-in;
}

.ritual-canvas {
  z-index: -7;
  opacity: 0.48;
  mix-blend-mode: screen;
}

.world-scanlines {
  opacity: 0.26;
}

.world-vignette {
  opacity: 0.32;
}

.frame-corner {
  border-color: var(--cathedral-gold);
  opacity: 0.52;
  filter: drop-shadow(0 0 0.6rem var(--cathedral-gold-dim));
}

.app-bar {
  font-family: var(--lab-mono);
}

.brand-lockup,
.connection-status,
.settings-panel,
.inspect-panel {
  background:
    repeating-linear-gradient(135deg, rgba(216, 189, 114, 0.012) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, rgba(34, 18, 28, 0.38), transparent 42%),
    rgba(4, 3, 7, 0.86);
  box-shadow:
    inset 0 0 2.8rem rgba(0, 0, 0, 0.65),
    inset 0 0 0 1px rgba(216, 189, 114, 0.035);
}

.brand-lockup {
  border-right-color: var(--cathedral-gold-dim);
  border-bottom-color: rgba(216, 189, 114, 0.24);
}

.brand-lockup::before {
  content: "";
  position: absolute;
  left: 0.42rem;
  right: 0.42rem;
  bottom: 0.28rem;
  height: 3px;
  border-top: 1px solid var(--cathedral-gold-dim);
  border-bottom: 1px solid rgba(216, 189, 114, 0.1);
}

.brand-lockup::after {
  content: "UNOFFICIAL OPENROUTER RITUAL CLIENT";
  color: rgba(216, 189, 114, 0.4);
}

.brand-lockup h1,
.panel-title h2,
.chat-toolbar h2,
.model-picker-header h2 {
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
}

.brand-lockup h1 {
  color: #f7edcf;
  font-size: 1.3rem;
  text-shadow:
    0 1px 0 #000,
    0 0 1rem rgba(216, 189, 114, 0.24);
}

.brand-mark {
  border-color: var(--cathedral-gold);
  background:
    linear-gradient(45deg, rgba(181, 31, 62, 0.18), transparent),
    #08060a;
  box-shadow:
    0 0 1.3rem rgba(216, 189, 114, 0.2),
    inset 0 0 0 3px rgba(216, 189, 114, 0.035),
    inset 0 0 1rem rgba(181, 31, 62, 0.12);
}

.brand-mark::before {
  background: var(--cathedral-crimson);
}

.brand-mark::after {
  background: var(--cathedral-gold);
}

.eyebrow,
.panel-kicker {
  color: var(--cathedral-gold);
  text-shadow: 0 0 0.8rem rgba(216, 189, 114, 0.28);
}

.header-model {
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  border: 1px solid rgba(216, 189, 114, 0.32);
  border-left: 4px solid var(--cathedral-crimson);
  background:
    repeating-linear-gradient(135deg, rgba(216, 189, 114, 0.015) 0 1px, transparent 1px 8px),
    linear-gradient(90deg, rgba(181, 31, 62, 0.15), transparent 32%),
    rgba(4, 2, 7, 0.88);
  box-shadow:
    0 0 3rem rgba(0, 0, 0, 0.75),
    inset 0 0 2rem rgba(216, 189, 114, 0.025),
    inset 0 -1px 0 rgba(216, 189, 114, 0.16);
}

.header-model::before {
  content: "EXTERNAL INTELLIGENCE LINK";
  color: rgba(216, 189, 114, 0.5);
}

.header-model::after {
  background: linear-gradient(90deg, transparent, var(--cathedral-gold));
  box-shadow: 0 0 0.8rem var(--cathedral-gold-dim);
}

.model-launcher-kicker {
  color: #ff4365;
  text-shadow: 0 0 0.7rem rgba(255, 54, 93, 0.45);
}

.header-model strong {
  color: #fff6dd;
  font-family: Georgia, "Yu Mincho", serif;
  font-size: 1.18rem;
  text-shadow:
    0 1px 0 #000,
    0 0 1rem rgba(216, 189, 114, 0.2);
}

.moon-widget {
  min-width: 6.7rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.45rem;
  border-left: 1px solid rgba(216, 189, 114, 0.22);
  border-right: 1px solid rgba(216, 189, 114, 0.22);
  color: var(--cathedral-gold);
}

.moon-widget > i {
  position: relative;
  width: 1.7rem;
  height: 1.7rem;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--cathedral-gold);
  border-radius: 50%;
  background: #fff2c3;
  box-shadow:
    0 0 0.7rem rgba(216, 189, 114, 0.36),
    0 0 0 3px rgba(216, 189, 114, 0.05);
}

.moon-widget > i::before {
  content: "";
  position: absolute;
  inset: 0.18rem;
  border: 1px dotted rgba(5, 3, 8, 0.36);
  border-radius: 50%;
}

.moon-widget > i::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: #050308;
  box-shadow: 0 0 0.3rem rgba(0, 0, 0, 0.8);
  transform: translateX(var(--moon-shadow-offset, 0px));
  transition: transform 500ms ease;
}

.moon-widget > span {
  display: grid;
  gap: 0.15rem;
}

.moon-widget small {
  color: rgba(216, 189, 114, 0.5);
  font-size: 0.43rem;
}

.moon-widget b {
  color: #fff1c5;
  font-size: 0.58rem;
  font-weight: 650;
  white-space: nowrap;
  text-shadow: 0 0 0.55rem rgba(216, 189, 114, 0.45);
}

.model-launcher-meta {
  border-color: rgba(216, 189, 114, 0.46);
  background: rgba(216, 189, 114, 0.07);
  color: #ffe887;
}

.connection-status {
  border-color: rgba(216, 189, 114, 0.26);
  border-right-color: var(--cathedral-crimson);
}

.connection-status::after {
  content: "RITUAL LINK / 01";
  color: rgba(216, 189, 114, 0.4);
}

.settings-panel,
.inspect-panel {
  border-color: rgba(216, 189, 114, 0.2);
}

.settings-panel::after,
.inspect-panel::before {
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--cathedral-gold) 14%, var(--cathedral-crimson) 76%, transparent);
  box-shadow:
    0 0 0.8rem rgba(216, 189, 114, 0.34),
    0 0 1.4rem rgba(181, 31, 62, 0.12);
}

.panel-title,
.chat-toolbar {
  border-bottom: 1px solid rgba(216, 189, 114, 0.22);
  background:
    repeating-linear-gradient(135deg, rgba(216, 189, 114, 0.018) 0 1px, transparent 1px 7px),
    linear-gradient(90deg, rgba(181, 31, 62, 0.08), transparent),
    rgba(5, 3, 8, 0.84);
}

.panel-title::before,
.chat-toolbar::before {
  content: "\2726";
  position: absolute;
  top: 50%;
  right: 0.8rem;
  color: rgba(216, 189, 114, 0.25);
  font-size: 1.45rem;
  transform: translateY(-50%);
}

.panel-title::after,
.chat-toolbar::after {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cathedral-crimson), var(--cathedral-gold));
  box-shadow: 0 0 0.7rem rgba(216, 189, 114, 0.24);
}

.panel-title h2,
.chat-toolbar h2 {
  color: #f4e7c3;
  font-size: 1.15rem;
  text-shadow: 0 1px 0 #000, 0 0 0.8rem rgba(216, 189, 114, 0.2);
}

.settings-section {
  margin: 0.5rem 0.38rem;
  padding: 0.95rem 0.78rem 1rem;
  border: 1px solid rgba(216, 189, 114, 0.12);
  border-left-color: rgba(216, 189, 114, 0.3);
  background:
    linear-gradient(90deg, rgba(216, 189, 114, 0.025), transparent 52%),
    rgba(3, 2, 6, 0.38);
  clip-path: polygon(0 0, calc(100% - 0.65rem) 0, 100% 0.65rem, 100% 100%, 0.65rem 100%, 0 calc(100% - 0.65rem));
}

.settings-section::before {
  color: rgba(216, 189, 114, 0.5);
}

.settings-section h3 {
  color: #f4e7c3;
  font-family: Georgia, "Yu Mincho", serif;
}

label {
  color: #9bd9df;
}

input,
select,
textarea {
  border-color: rgba(124, 204, 215, 0.34);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 4px),
    rgba(1, 1, 3, 0.85);
}

.credit-widget {
  border-top-color: rgba(216, 189, 114, 0.36);
  border-bottom-color: rgba(216, 189, 114, 0.36);
  background:
    repeating-linear-gradient(135deg, rgba(216, 189, 114, 0.025) 0 1px, transparent 1px 7px),
    linear-gradient(110deg, rgba(216, 189, 114, 0.1), transparent 72%),
    rgba(5, 3, 8, 0.72);
}

.credit-widget::after {
  content: "MACCA RESERVE";
  color: rgba(216, 189, 114, 0.16);
}

.credit-balance strong {
  color: #fff4c7;
  text-shadow: 0 0 0.8rem rgba(216, 189, 114, 0.52), 0 0 2rem rgba(216, 189, 114, 0.18);
}

.credit-balance span,
.credit-usage small,
.generation-settings output {
  color: #ffe46f;
}

.chat-panel {
  border-right-color: rgba(216, 189, 114, 0.18);
  background: rgba(1, 1, 3, 0.08);
}

.summoning-chamber {
  top: 58%;
  opacity: 0.24;
  filter: drop-shadow(0 0 1.8rem rgba(216, 189, 114, 0.1));
}

.ring-outer {
  color: var(--cathedral-gold);
}

.ring-middle {
  color: var(--cathedral-crimson);
}

.ring-inner {
  color: var(--entity-primary);
}

.fusion-slots {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 10.7rem;
  width: min(calc(100% - 3rem), 48rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  opacity: 0.32;
  pointer-events: none;
  transform: translateX(-50%) perspective(38rem) rotateX(7deg) scale(0.96);
  transition: opacity 280ms ease, transform 350ms ease, filter 350ms ease;
}

.fusion-slots > em {
  color: var(--cathedral-gold);
  font-family: Georgia, serif;
  font-size: 1.45rem;
  font-style: normal;
  text-shadow: 0 0 0.7rem var(--cathedral-gold-dim);
}

.fusion-slot {
  position: relative;
  min-width: 0;
  min-height: 3.8rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(102, 246, 255, 0.38);
  border-left: 3px solid var(--entity-primary);
  background: rgba(2, 2, 5, 0.84);
  box-shadow: inset 0 0 1rem rgba(102, 246, 255, 0.04), 0 0 1rem rgba(0, 0, 0, 0.7);
  clip-path: polygon(0 0, calc(100% - 0.55rem) 0, 100% 0.55rem, 100% 100%, 0 100%);
}

.fusion-slot > i {
  grid-row: 1 / 3;
  align-self: center;
  color: rgba(102, 246, 255, 0.5);
  font-family: var(--lab-mono);
  font-size: 0.54rem;
  font-style: normal;
}

.fusion-slot small {
  color: rgba(241, 244, 242, 0.45);
  font-family: var(--lab-mono);
  font-size: 0.48rem;
}

.fusion-slot b {
  min-width: 0;
  overflow: hidden;
  color: #d7fbff;
  font-family: var(--lab-mono);
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-b {
  border-color: rgba(181, 31, 62, 0.46);
  border-left-color: var(--cathedral-crimson);
}

.material-b > i,
.material-b b {
  color: #ff8da1;
}

.fusion-result {
  border-color: rgba(216, 189, 114, 0.48);
  border-left-color: var(--cathedral-gold);
  background: rgba(18, 13, 6, 0.86);
}

.fusion-result > i,
.fusion-result b {
  color: #ffe99a;
}

body[data-cathedral-state="sending"] .fusion-slots,
body[data-cathedral-state="waiting"] .fusion-slots,
body[data-cathedral-state="thinking"] .fusion-slots,
body[data-cathedral-state="streaming"] .fusion-slots {
  opacity: 0.9;
  filter: drop-shadow(0 0 0.8rem rgba(102, 246, 255, 0.18));
  transform: translateX(-50%) perspective(38rem) rotateX(0deg) scale(1);
}

body[data-cathedral-state="complete"] .fusion-slots {
  opacity: 0.7;
}

body[data-cathedral-state="complete"] .fusion-result {
  box-shadow: 0 0 1.5rem rgba(216, 189, 114, 0.25), inset 0 0 1rem rgba(216, 189, 114, 0.08);
}

body[data-cathedral-state="error"] .fusion-slots {
  opacity: 0.95;
  filter: drop-shadow(0 0 1rem rgba(255, 16, 54, 0.42));
  animation: fusion-accident 180ms steps(2, jump-none) 5;
}

.manor-master-label {
  position: absolute;
  z-index: 1;
  top: 45%;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  color: rgba(216, 189, 114, 0.44);
  pointer-events: none;
  transform: translate(-50%, -50%);
  text-align: center;
  text-shadow: 0 0 0.8rem rgba(216, 189, 114, 0.18);
}

.manor-master-label::before,
.manor-master-label::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cathedral-gold-dim));
}

.manor-master-label::before {
  right: calc(100% + 0.8rem);
}

.manor-master-label::after {
  left: calc(100% + 0.8rem);
  transform: rotate(180deg);
}

.manor-master-label span {
  color: rgba(244, 231, 195, 0.68);
  font-family: "Yu Mincho", Georgia, serif;
  font-size: 0.7rem;
}

.manor-master-label b {
  font-family: var(--lab-mono);
  font-size: 0.5rem;
  font-weight: 600;
}

.manor-master-label i {
  color: rgba(181, 31, 62, 0.52);
  font-family: var(--lab-mono);
  font-size: 0.42rem;
  font-style: normal;
}

.vrm-contract-status {
  position: absolute;
  z-index: 2;
  top: 62%;
  left: 50%;
  min-width: min(18rem, calc(100% - 2rem));
  display: grid;
  justify-items: center;
  gap: 0.18rem;
  padding: 0.5rem 1.4rem 0.56rem;
  border-block: 1px solid rgba(216, 189, 114, 0.35);
  background:
    linear-gradient(90deg, transparent, rgba(3, 2, 7, 0.88) 16% 84%, transparent),
    repeating-linear-gradient(90deg, transparent 0 13px, rgba(216, 189, 114, 0.04) 13px 14px);
  color: #f5e7bd;
  pointer-events: none;
  transform: translate(-50%, -50%);
  text-align: center;
  text-shadow: 0 0 0.8rem rgba(216, 189, 114, 0.32);
  transition: border-color 300ms ease, color 300ms ease, filter 300ms ease, opacity 300ms ease;
  clip-path: polygon(0.8rem 0, calc(100% - 0.8rem) 0, 100% 50%, calc(100% - 0.8rem) 100%, 0.8rem 100%, 0 50%);
}

.vrm-contract-status::before,
.vrm-contract-status::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 4rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
  opacity: 0.5;
}

.vrm-contract-status::before {
  right: 100%;
}

.vrm-contract-status::after {
  left: 100%;
  transform: rotate(180deg);
}

.vrm-contract-status span {
  color: rgba(216, 189, 114, 0.6);
  font-family: "Yu Mincho", Georgia, serif;
  font-size: 0.54rem;
}

.vrm-contract-status b {
  max-width: 100%;
  overflow: hidden;
  font-family: var(--lab-mono);
  font-size: 0.58rem;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vrm-contract-status[data-state="loading"] {
  border-color: rgba(102, 246, 255, 0.42);
  color: #9ef8ff;
  animation: contract-gate 1.35s steps(3, jump-none) infinite;
}

.vrm-contract-status[data-state="ready"] {
  border-color: rgba(216, 189, 114, 0.65);
  color: #fff0aa;
  filter: drop-shadow(0 0 0.75rem rgba(102, 246, 255, 0.16));
}

.vrm-contract-status[data-state="error"] {
  border-color: rgba(255, 43, 78, 0.72);
  color: #ff8197;
  filter: drop-shadow(0 0 0.8rem rgba(255, 16, 54, 0.3));
}

body[data-cathedral-state="sending"] .vrm-contract-status,
body[data-cathedral-state="waiting"] .vrm-contract-status,
body[data-cathedral-state="thinking"] .vrm-contract-status,
body[data-cathedral-state="streaming"] .vrm-contract-status {
  border-color: var(--entity-primary);
  color: #d9fdff;
  filter: drop-shadow(0 0 1rem color-mix(in srgb, var(--entity-primary) 38%, transparent));
}

body[data-cathedral-state="error"] .vrm-contract-status {
  border-color: #ff1638;
  color: #ffd5dc;
  animation: fusion-accident 180ms steps(2, jump-none) 5;
}

.system-drawer {
  border-bottom-color: rgba(181, 31, 62, 0.38);
  background:
    repeating-linear-gradient(135deg, rgba(181, 31, 62, 0.018) 0 1px, transparent 1px 8px),
    linear-gradient(90deg, rgba(181, 31, 62, 0.1), transparent 45%),
    rgba(4, 2, 7, 0.88);
}

.system-drawer summary {
  color: #f0d486;
}

.run-banner {
  border-bottom-color: rgba(216, 189, 114, 0.22);
  background: rgba(3, 2, 6, 0.86);
}

.messages {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.18));
}

.message {
  border-color: rgba(216, 189, 114, 0.2);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 7px),
    rgba(4, 3, 7, 0.9);
}

.message.assistant {
  border-color: rgba(102, 246, 255, 0.35);
}

.message.user {
  border-color: rgba(181, 31, 62, 0.46);
}

.message.status {
  border-color: rgba(216, 189, 114, 0.34);
}

.composer {
  border-top: 2px solid rgba(216, 189, 114, 0.24);
  background:
    repeating-linear-gradient(135deg, rgba(216, 189, 114, 0.012) 0 1px, transparent 1px 8px),
    rgba(4, 2, 7, 0.91);
}

.composer::before {
  content: "ORIGIN QUERY / ORACLE COMMAND";
  color: rgba(216, 189, 114, 0.38);
}

.send-button,
.picker-confirm {
  border-color: rgba(255, 229, 151, 0.65);
  background:
    linear-gradient(110deg, #8f1730, #c62c4a 52%, #7a142a),
    var(--cathedral-crimson);
  box-shadow: 0 0 1.4rem rgba(181, 31, 62, 0.34), inset 0 1px 0 rgba(255, 238, 198, 0.32);
}

.inspect-panel {
  background:
    repeating-linear-gradient(135deg, rgba(216, 189, 114, 0.012) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, rgba(32, 16, 24, 0.38), transparent 42%),
    rgba(4, 3, 7, 0.88);
}

.metrics-grid {
  background: rgba(216, 189, 114, 0.14);
}

.metrics-grid > div {
  background:
    linear-gradient(135deg, rgba(216, 189, 114, 0.035), transparent),
    rgba(4, 3, 7, 0.91);
}

.metrics-grid .cost-metric {
  box-shadow: inset 4px 0 0 var(--cathedral-gold);
}

.metrics-grid .cost-metric strong {
  color: #fff4c7;
  text-shadow: 0 0 0.8rem rgba(216, 189, 114, 0.52), 0 0 2rem rgba(216, 189, 114, 0.16);
}

.metrics-grid .cost-metric em {
  color: #ffe46f;
}

.tab-button.active {
  box-shadow: inset 0 -2px 0 var(--cathedral-gold), inset 0 0 1rem rgba(216, 189, 114, 0.05);
}

.model-picker {
  border: 1px solid rgba(216, 189, 114, 0.52);
  border-top: 3px solid var(--cathedral-crimson);
  background:
    repeating-linear-gradient(135deg, rgba(216, 189, 114, 0.012) 0 1px, transparent 1px 9px),
    rgba(3, 2, 6, 0.97);
  box-shadow:
    0 0 7rem rgba(0, 0, 0, 0.96),
    0 0 2rem rgba(181, 31, 62, 0.18),
    inset 0 0 4rem rgba(216, 189, 114, 0.025),
    inset 0 0 0 3px rgba(216, 189, 114, 0.03);
}

.model-picker-header {
  border-bottom-color: rgba(216, 189, 114, 0.3);
  background:
    linear-gradient(90deg, rgba(181, 31, 62, 0.16), transparent 45%),
    repeating-linear-gradient(135deg, rgba(216, 189, 114, 0.018) 0 1px, transparent 1px 7px),
    rgba(5, 3, 8, 0.97);
}

.model-picker-header h2 {
  color: #f7e9c5;
  font-size: 1.55rem;
}

.model-picker-header::after {
  content: "EXTERNAL INTELLIGENCE // HIVE INDEX // REVERSE SEARCH";
  color: rgba(216, 189, 114, 0.36);
}

.entity-stage {
  border-color: rgba(216, 189, 114, 0.34);
  border-left: 3px solid var(--cathedral-crimson);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 4px),
    #020104;
  box-shadow: 0 0 2rem rgba(181, 31, 62, 0.12), inset 0 0 2rem rgba(0, 0, 0, 0.65);
}

.entity-stage-code {
  color: #ff6b82;
}

.model-card {
  border-color: rgba(216, 189, 114, 0.1);
  background:
    linear-gradient(112deg, rgba(216, 189, 114, 0.025), transparent 55%),
    rgba(4, 3, 7, 0.9);
}

.model-card::after {
  border-color: rgba(216, 189, 114, 0.22);
}

.model-card:hover {
  border-color: rgba(216, 189, 114, 0.28);
  background:
    linear-gradient(112deg, rgba(216, 189, 114, 0.08), rgba(181, 31, 62, 0.05)),
    rgba(6, 3, 9, 0.96);
}

.model-card.is-selected {
  border-color: rgba(216, 189, 114, 0.42);
  background:
    linear-gradient(112deg, rgba(102, 246, 255, 0.12), rgba(181, 31, 62, 0.08)),
    rgba(7, 4, 11, 0.97);
  box-shadow: inset 4px 0 0 var(--entity-primary), 0 0 1.5rem rgba(102, 246, 255, 0.08);
}

.model-card-rank,
.model-rank,
.model-rank[data-rank] {
  color: #ffe177;
}

.model-card-price {
  border-color: rgba(181, 31, 62, 0.48);
}

.model-facts,
.capability-grid {
  background: rgba(216, 189, 114, 0.13);
}

.price-board,
.model-picker-preview .price-board {
  border-color: rgba(216, 189, 114, 0.46);
  background: rgba(216, 189, 114, 0.2);
}

.price-item strong {
  color: #fff4c7;
}

.price-item small {
  color: #ffe46f;
}

.model-picker-footer {
  border-top-color: rgba(216, 189, 114, 0.38);
  background:
    linear-gradient(90deg, rgba(181, 31, 62, 0.1), transparent 48%),
    rgba(3, 2, 6, 0.98);
}

body[data-cathedral-state="error"] .world-overlay::after {
  content: "ORACLE LINK ERROR";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 5px solid rgba(255, 18, 48, 0.72);
  background: repeating-linear-gradient(0deg, rgba(255, 0, 38, 0.05) 0 2px, transparent 2px 8px);
  color: rgba(255, 225, 225, 0.16);
  font-family: var(--lab-mono);
  font-size: clamp(2rem, 8vw, 8rem);
  font-weight: 900;
  text-shadow: 0 0 2rem rgba(255, 0, 38, 0.45);
  animation: accident-overlay 160ms steps(2, jump-none) 5;
}

@media (max-width: 1320px) {
  .moon-widget {
    display: none;
  }

  .header-model {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }
}

@media (max-width: 760px) {
  .cathedral-canvas {
    opacity: 0.82;
  }

  .ritual-canvas {
    opacity: 0.34;
  }

  .brand-lockup h1 {
    font-size: 1.1rem;
  }

  .settings-section {
    margin-inline: 0.25rem;
  }

  .summoning-chamber {
    top: 57%;
    opacity: 0.18;
  }

  .fusion-slots {
    bottom: 9.6rem;
    width: calc(100% - 1rem);
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.24rem;
    opacity: 0.2;
  }

  .fusion-slots > em:nth-of-type(2),
  .fusion-result {
    display: none;
  }

  .fusion-slot {
    min-height: 3.1rem;
    padding: 0.4rem;
  }

  .fusion-slot b {
    font-size: 0.49rem;
  }

  .manor-master-label {
    top: 48%;
    opacity: 0.52;
  }

  .vrm-contract-status {
    top: 61%;
    min-width: min(14rem, calc(100% - 1.25rem));
    padding-inline: 0.9rem;
    opacity: 0.72;
  }

  .vrm-contract-status::before,
  .vrm-contract-status::after {
    width: 1.8rem;
  }

  .manor-master-label::before,
  .manor-master-label::after {
    width: 2.3rem;
  }

  .model-picker-header h2 {
    font-size: 1.18rem;
  }
}

@media (max-width: 520px) {
  .brand-lockup::after {
    display: none;
  }

  .fusion-slots {
    bottom: 9.1rem;
  }

  .manor-master-label {
    top: 50%;
  }
}

@keyframes fusion-accident {
  0% { transform: translateX(-50%) translateX(-3px); }
  50% { transform: translateX(-50%) translateX(4px); filter: brightness(2.2) hue-rotate(-18deg); }
  100% { transform: translateX(-50%); }
}

@keyframes accident-overlay {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

@keyframes contract-gate {
  0%, 100% { opacity: 0.48; filter: brightness(0.82); }
  50% { opacity: 0.92; filter: brightness(1.4) drop-shadow(0 0 0.8rem rgba(102, 246, 255, 0.25)); }
}

@media (prefers-reduced-motion: reduce) {
  .fusion-slots,
  .vrm-contract-status,
  body[data-cathedral-state="error"] .world-overlay::after {
    animation: none !important;
  }
}
