@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Cormorant+Garamond:wght@600;700&display=swap");



:root {
  color-scheme: dark;
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #050906;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

button {
  font: inherit;
}

strong {
  color: #d7ff7a;
}

.terminal-shell {
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-shadow: 0 0 8px rgba(69, 255, 98, 0.34);
}

.terminal-panel {
  border: 1px solid rgba(69, 255, 98, 0.34);
  background:
    linear-gradient(180deg, rgba(69, 255, 98, 0.035), rgba(69, 255, 98, 0.01)),
    #020602;
  box-shadow: inset 0 0 18px rgba(69, 255, 98, 0.08), 0 0 18px rgba(69, 255, 98, 0.08);
  padding: 1rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.terminal-button,
.terminal-choice {
  border: 1px solid rgba(69, 255, 98, 0.55);
  background: #020602;
  color: #8cff8c;
  text-align: left;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 0 14px rgba(69, 255, 98, 0.08);
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.terminal-input {
  border: 1px solid rgba(69, 255, 98, 0.45);
  background: #020602;
  color: #8cff8c;
  padding: 0.7rem 0.85rem;
  letter-spacing: 0.08em;
  outline: none;
  box-shadow: inset 0 0 14px rgba(69, 255, 98, 0.08);
}

.terminal-input:focus {
  border-color: rgba(215, 255, 122, 0.8);
  box-shadow: inset 0 0 14px rgba(69, 255, 98, 0.12), 0 0 0 1px rgba(215, 255, 122, 0.45);
}

.terminal-input::placeholder {
  color: rgba(140, 255, 140, 0.35);
}

.terminal-button:hover,
.terminal-choice:hover,
.terminal-button:focus,
.terminal-choice:focus {
  background: rgba(69, 255, 98, 0.12);
  outline: 1px solid rgba(215, 255, 122, 0.7);
}

.terminal-choice {
  padding: 0.72rem 0.85rem;
  line-height: 1.35;
  text-transform: none;
  min-height: 0;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-wrap: anywhere;
  overflow-y: auto;
}

.terminal-choice:focus-visible,
.terminal-button:focus-visible {
  outline: 2px solid rgba(255, 212, 121, 0.84);
  outline-offset: 2px;
}

.terminal-question-block {
  height: clamp(7rem, 18vh, 8.5rem);
  overflow-y: auto;
}

.terminal-answer-grid {
  display: grid;
  grid-template-rows: repeat(5, minmax(4.15rem, 4.15rem));
  gap: 0.55rem;
}

.terminal-message-area {
  min-height: 4.45rem;
}

.terminal-action-bar {
  position: sticky;
  bottom: 0;
  z-index: 24;
  margin-inline: -0.15rem;
  border: 1px solid rgba(69, 255, 98, 0.22);
  background: rgba(2, 6, 2, 0.94);
  padding: 0.55rem;
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.26);
}

.terminal-report-wrap {
  display: grid;
  gap: 1rem;
  min-height: 0;
}

.terminal-report-page {
  min-height: min(620px, calc(100vh - 8.5rem));
  border: 1px solid rgba(69, 255, 98, 0.42);
  background: #020602;
  box-shadow: inset 0 0 28px rgba(69, 255, 98, 0.08), 0 0 24px rgba(69, 255, 98, 0.09);
  padding: clamp(0.9rem, 2.4vw, 1.55rem);
}

.terminal-report-ascii {
  margin: 0;
  overflow-x: auto;
  color: #ffd479;
  font: inherit;
  line-height: 1.35;
  text-shadow: 0 0 8px rgba(255, 212, 121, 0.28);
  white-space: pre;
}

.terminal-report-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1.25rem;
  margin-top: 0.9rem;
  border-top: 1px solid rgba(69, 255, 98, 0.22);
  border-bottom: 1px solid rgba(69, 255, 98, 0.22);
  padding: 0.65rem 0;
  color: rgba(140, 255, 140, 0.68);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.terminal-report-content {
  max-width: 78ch;
  margin-top: 1rem;
  color: #d9ffd9;
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  line-height: 1.62;
  text-shadow: 0 0 7px rgba(69, 255, 98, 0.22);
}

.terminal-report-content p {
  margin: 0 0 0.9rem;
  white-space: pre-line;
}

.terminal-command-bar {
  position: sticky;
  bottom: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 0.5rem;
  border: 1px solid rgba(69, 255, 98, 0.34);
  background: rgba(2, 6, 2, 0.96);
  padding: 0.5rem;
  box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.32);
}

.variant-admin-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  border: 1px dashed rgba(255, 212, 121, 0.42);
  background: rgba(20, 15, 4, 0.58);
  padding: 0.6rem;
  color: #ffd479;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.variant-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.variant-active {
  border-color: rgba(255, 212, 121, 0.86) !important;
  color: #ffd479 !important;
  box-shadow: inset 0 0 14px rgba(255, 212, 121, 0.12), 0 0 0 1px rgba(255, 212, 121, 0.34) !important;
}

.feedback-panel {
  border: 1px solid rgba(69, 255, 98, 0.34);
  background: rgba(2, 6, 2, 0.94);
  padding: 0.9rem;
  box-shadow: inset 0 0 18px rgba(69, 255, 98, 0.08), 0 0 18px rgba(69, 255, 98, 0.08);
}

.feedback-rating {
  display: grid;
  grid-template-columns: repeat(5, minmax(44px, 1fr));
  gap: 0.45rem;
  margin-top: 0.75rem;
  max-width: 420px;
}

.whole-report-view {
  display: grid;
  gap: 1rem;
}

.whole-report-panel {
  border: 1px solid rgba(69, 255, 98, 0.42);
  background: #020602;
  box-shadow: inset 0 0 28px rgba(69, 255, 98, 0.08), 0 0 24px rgba(69, 255, 98, 0.09);
  padding: clamp(0.9rem, 2.4vw, 1.55rem);
}

.whole-report-text {
  margin: 1rem 0 0;
  max-width: 92ch;
  overflow-x: auto;
  white-space: pre-wrap;
  color: #d9ffd9;
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.58;
  text-shadow: 0 0 7px rgba(69, 255, 98, 0.22);
}

.terminal-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.terminal-panel:has(.terminal-answer-grid) {
  display: flex;
  flex-direction: column;
}

.terminal-panel:has(.terminal-answer-grid) .terminal-answer-grid {
  flex: 0 0 auto;
}

.terminal-panel:has(.terminal-answer-grid) .terminal-message-area {
  flex: 0 0 auto;
}

.terminal-panel-compact {
  padding: 0.9rem;
}

.terminal-panel-compact .terminal-choice {
  min-height: 44px;
  padding: 10px 14px;
  line-height: 1.35;
}

.terminal-question-block-compact {
  height: clamp(5.4rem, 15vh, 7rem);
}

.terminal-answer-grid-compact {
  grid-template-rows: repeat(5, minmax(44px, 52px));
  gap: 8px;
}

.resonance-screen {
  min-height: calc(100dvh - 7rem);
  display: grid;
  place-items: center;
  padding: 0.5rem;
}

.resonance-panel {
  width: min(760px, 100%);
  max-height: calc(100dvh - 7.5rem);
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(69, 255, 98, 0.34);
  background:
    linear-gradient(180deg, rgba(69, 255, 98, 0.035), rgba(69, 255, 98, 0.01)),
    #020602;
  box-shadow: inset 0 0 18px rgba(69, 255, 98, 0.08), 0 0 18px rgba(69, 255, 98, 0.08);
  padding: 18px;
}

.resonance-topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(69, 255, 98, 0.2);
  padding-bottom: 8px;
  color: rgba(140, 255, 140, 0.68);
  font-size: 0.8rem;
  line-height: 1.2;
  letter-spacing: 0.14em;
}

.resonance-pattern-title {
  margin: 0;
  color: #ffd479;
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: 0.12em;
}

.resonance-prompt {
  margin: 8px 0 0;
  font-size: 0.95rem;
  line-height: 1.3;
}

.resonance-question {
  margin: 0;
  color: rgba(140, 255, 140, 0.78);
  font-size: 0.95rem;
  line-height: 1.25;
}

.resonance-answers {
  display: grid;
  gap: 6px;
}

.resonance-answer-button {
  min-height: 38px;
  max-height: 48px;
  padding: 8px 12px;
  line-height: 1.25;
  font-size: 0.93rem;
  text-align: left;
  overflow-y: auto;
}

.terminal-dim {
  color: rgba(140, 255, 140, 0.58);
}

.terminal-amber {
  color: #ffd479;
  text-shadow: 0 0 8px rgba(255, 212, 121, 0.28);
}

.cursor-block {
  display: inline-block;
  width: 0.65em;
  height: 1em;
  margin-left: 0.35em;
  vertical-align: -0.12em;
  background: #8cff8c;
  animation: cursor-blink 1s steps(2, start) infinite;
}

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 50%, rgba(0, 0, 0, 0.08) 50%),
    radial-gradient(circle at center, transparent 52%, rgba(0, 0, 0, 0.32));
  background-size: 100% 4px, 100% 100%;
  mix-blend-mode: screen;
  opacity: 0.45;
}

@keyframes cursor-blink {
  0%,
  45% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
  }
}

.ledger-pop {
  animation: ledger-pop 360ms ease-out;
}

.attention-spark {
  animation: spark-rise 420ms ease-out;
}

.spark-flip {
  animation: spark-flip 520ms ease-out;
}

.sheet-highlight {
  animation: sheet-highlight 820ms ease-out;
}

@keyframes ledger-pop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spark-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spark-flip {
  from {
    opacity: 0;
    transform: rotateX(-14deg) scale(0.98);
  }
  to {
    opacity: 1;
    transform: rotateX(0) scale(1);
  }
}

@keyframes sheet-highlight {
  0% {
    box-shadow: 0 0 0 0 rgba(210, 170, 88, 0.5);
    transform: translateY(0);
  }
  35% {
    box-shadow: 0 0 0 5px rgba(210, 170, 88, 0.18);
    transform: translateY(-2px);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(210, 170, 88, 0);
    transform: translateY(0);
  }
}

.calm-mode .ambient-bg {
  background: linear-gradient(180deg, rgba(244, 232, 207, 0.9), rgba(244, 232, 207, 0.9)) !important;
}

.calm-mode *,
.calm-mode *::before,
.calm-mode *::after {
  animation: none !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

.calm-mode .shadow-plate {
  box-shadow: 0 8px 22px rgba(29, 37, 36, 0.08);
}

.calm-mode [class*="shadow-[0_0_0_3px"] {
  box-shadow: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 640px) {
  .terminal-question-block {
    height: 7.35rem;
  }

  .terminal-choice {
    padding: 0.68rem 0.78rem;
    font-size: 0.92rem;
  }

  .terminal-answer-grid {
    grid-template-rows: repeat(5, minmax(4.2rem, 4.2rem));
    gap: 0.5rem;
  }

  .terminal-answer-grid-compact {
    grid-template-rows: repeat(5, minmax(48px, 54px));
  }

  .resonance-screen {
    min-height: auto;
    padding: 0;
  }

  .resonance-panel {
    max-height: none;
    padding: 0.9rem;
  }

  .resonance-topbar {
    flex-direction: column;
    gap: 4px;
  }

  .resonance-answer-button {
    max-height: none;
  }

  .terminal-message-area {
    min-height: 4.2rem;
    font-size: 0.9rem;
  }

  .terminal-report-page {
    min-height: auto;
  }

  .terminal-report-meta {
    grid-template-columns: 1fr;
  }

  .terminal-command-bar {
    grid-template-columns: 1fr;
    position: static;
  }

  .terminal-action-bar {
    position: static;
  }
}


/* =========================================================
   MiiRa Entry Portal — two doors, same mirror
   ========================================================= */

.miira-entry-shell {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(0.75rem, 3vw, 2rem);
  color: #edf8f4;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 83, 83, 0.14), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(61, 196, 255, 0.16), transparent 28%),
    radial-gradient(circle at 50% 110%, rgba(35, 166, 136, 0.22), transparent 40%),
    linear-gradient(145deg, #030706, #071713 48%, #05090b);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.miira-entry-noise {
  position: fixed;
  inset: 0;
  z-index: -3;
  opacity: 0.18;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.miira-entry-orbit {
  position: fixed;
  z-index: -2;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  pointer-events: none;
}

.miira-entry-orbit-one {
  width: min(72vw, 850px);
  aspect-ratio: 1;
  left: -28vw;
  top: -35vw;
  box-shadow: 0 0 0 50px rgba(255, 83, 83, 0.018), 0 0 0 100px rgba(255, 83, 83, 0.012);
}

.miira-entry-orbit-two {
  width: min(68vw, 760px);
  aspect-ratio: 1;
  right: -26vw;
  bottom: -34vw;
  box-shadow: 0 0 0 48px rgba(61, 196, 255, 0.018), 0 0 0 96px rgba(61, 196, 255, 0.012);
}

.miira-entry-card {
  width: min(100%, 1080px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1.75rem;
  overflow: hidden;
  padding: clamp(1rem, 3vw, 2rem);
  background:
    linear-gradient(145deg, rgba(10, 31, 27, 0.94), rgba(4, 13, 12, 0.96));
  box-shadow: 0 34px 100px rgba(0,0,0,0.45);
  backdrop-filter: blur(20px);
}

.miira-entry-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.miira-entry-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(245,198,108,0.56);
  border-radius: 50%;
  color: #071713;
  background: linear-gradient(135deg, #f7d38a, #d98b31);
  font-family: Georgia, serif;
  font-size: 1.45rem;
  font-weight: 900;
  box-shadow: 0 0 26px rgba(233,162,59,0.18);
}

.miira-entry-brand p {
  margin: 0;
  color: #f5c66c;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.miira-entry-brand div span {
  display: block;
  margin-top: 0.2rem;
  color: rgba(216,236,228,0.55);
  font-size: 0.62rem;
  letter-spacing: 0.11em;
}

.miira-entry-copy {
  max-width: 800px;
  margin: clamp(1.3rem, 4vh, 2.8rem) auto clamp(1.1rem, 3vh, 2rem);
  text-align: center;
}

.miira-entry-eyebrow {
  margin: 0;
  color: #f5c66c;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.miira-entry-copy h1 {
  margin: 0.55rem 0 0.8rem;
  color: #fff8ea;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 7vw, 5.4rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.miira-entry-copy > p:last-child {
  max-width: 680px;
  margin: 0 auto;
  color: #b9ccc5;
  font-size: clamp(0.95rem, 1.6vw, 1.12rem);
  line-height: 1.55;
}

.miira-door-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.miira-door {
  position: relative;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border-radius: 1.4rem;
  text-align: left;
  color: #edf8f4;
  cursor: pointer;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.miira-door::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -90px;
  bottom: -90px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.12;
  box-shadow: 0 0 0 30px currentColor;
}

.miira-door:hover,
.miira-door:focus-visible {
  transform: translateY(-6px);
  outline: none;
}

.miira-door-signal {
  border: 1px solid rgba(255, 101, 78, 0.38);
  background:
    radial-gradient(circle at 82% 8%, rgba(255, 88, 67, 0.15), transparent 30%),
    linear-gradient(145deg, #19100d, #090a08 60%, #07150e);
  color: #ff866f;
}

.miira-door-signal:hover,
.miira-door-signal:focus-visible {
  border-color: rgba(255, 119, 91, 0.85);
  box-shadow: 0 24px 60px rgba(255, 75, 52, 0.12);
}

.miira-door-clear {
  border: 1px solid rgba(83, 203, 255, 0.38);
  background:
    radial-gradient(circle at 82% 8%, rgba(83, 203, 255, 0.15), transparent 30%),
    linear-gradient(145deg, #0b1b22, #071012 60%, #071511);
  color: #75d9ff;
}

.miira-door-clear:hover,
.miira-door-clear:focus-visible {
  border-color: rgba(100, 216, 255, 0.88);
  box-shadow: 0 24px 60px rgba(47, 180, 235, 0.12);
}

.miira-pill-shape {
  width: 86px;
  height: 40px;
  display: block;
  position: relative;
  margin-bottom: 1.2rem;
  border-radius: 999px;
  transform: rotate(-8deg);
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(255,255,255,0.25), 0 12px 24px rgba(0,0,0,0.35);
}

.miira-pill-shape::after {
  content: "";
  position: absolute;
  inset: 0 50% 0 0;
  border-right: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.11);
}

.miira-pill-shape i {
  position: absolute;
  inset: 5px 10px auto;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
  filter: blur(1px);
}

.miira-pill-signal {
  background: linear-gradient(90deg, #ff4f43, #b51f24);
}

.miira-pill-clear {
  background: linear-gradient(90deg, #56d5ff, #235ccf);
}

.miira-door-number {
  color: currentColor;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.miira-door strong {
  margin-top: auto;
  color: #fff8ea;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.miira-door small {
  margin-top: 0.48rem;
  color: currentColor;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.miira-door p {
  max-width: 470px;
  margin: 0.8rem 0;
  color: #b7c8c2;
  font-size: 0.92rem;
  line-height: 1.48;
}

.miira-door-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.09);
  color: #fff8ea;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.miira-door-action b {
  font-size: 1.25rem;
}

.miira-entry-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  color: rgba(216,236,228,0.58);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.miira-entry-footer p {
  margin: 0;
}

.miira-entry-footer span {
  color: #f5c66c;
  font-weight: 800;
}

/* =========================================================
   Tighter screen fitting
   ========================================================= */

.terminal-shell {
  min-height: 100dvh !important;
  padding: 0.4rem !important;
}

.terminal-shell > div:not(.scanlines) {
  min-height: calc(100dvh - 0.8rem) !important;
  padding: 0.72rem !important;
}

@media (min-width: 641px) and (max-height: 900px) {
  .terminal-shell header {
    margin-bottom: 0.45rem !important;
    padding-bottom: 0.35rem !important;
  }

  .terminal-panel {
    padding: 0.72rem;
  }

  .terminal-question-block {
    height: clamp(4.4rem, 10vh, 5.6rem);
  }

  .terminal-answer-grid {
    grid-template-rows: repeat(5, minmax(3rem, 3.45rem));
    gap: 0.34rem;
  }

  .terminal-choice {
    padding: 0.42rem 0.62rem;
    font-size: 0.84rem;
    line-height: 1.18;
  }

  .terminal-message-area {
    min-height: 3rem;
    margin-top: 0.5rem !important;
    padding: 0.5rem !important;
    font-size: 0.78rem;
  }

  aside.space-y-4 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.55rem !important;
  }
}

@media (min-width: 641px) and (max-height: 720px) {
  .terminal-shell {
    padding: 0.22rem !important;
  }

  .terminal-shell > div:not(.scanlines) {
    min-height: calc(100dvh - 0.44rem) !important;
    padding: 0.48rem !important;
  }

  .terminal-question-block {
    height: 3.8rem;
  }

  .terminal-answer-grid {
    grid-template-rows: repeat(5, minmax(2.5rem, 2.85rem));
    gap: 0.27rem;
  }

  .terminal-choice {
    padding: 0.3rem 0.5rem;
    font-size: 0.74rem;
  }

  .terminal-message-area {
    min-height: 2.45rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 640px) {
  .miira-entry-card {
    padding: 0.85rem;
    border-radius: 1.2rem;
  }

  .miira-entry-brand div span {
    display: none;
  }

  .miira-entry-copy {
    margin: 1.2rem auto 1rem;
  }

  .miira-entry-copy h1 {
    font-size: clamp(2.35rem, 14vw, 3.6rem);
  }

  .miira-door-grid {
    grid-template-columns: 1fr;
  }

  .miira-door {
    min-height: 255px;
    padding: 1rem;
  }

  .miira-pill-shape {
    width: 70px;
    height: 32px;
    margin-bottom: 0.8rem;
  }

  .miira-door strong {
    font-size: 2rem;
  }

  .miira-entry-footer {
    display: block;
    text-align: center;
  }

  .miira-entry-footer span {
    display: block;
    margin-top: 0.35rem;
  }

  .terminal-shell {
    padding: 0.2rem !important;
  }

  .terminal-shell > div:not(.scanlines) {
    min-height: calc(100dvh - 0.4rem) !important;
    padding: 0.55rem !important;
  }

  .terminal-question-block {
    height: auto;
    min-height: 4.2rem;
    max-height: 7rem;
  }

  .terminal-answer-grid,
  .terminal-answer-grid-compact {
    grid-template-rows: none;
    grid-auto-rows: minmax(3.1rem, auto);
    gap: 0.4rem;
  }

  .terminal-choice {
    min-height: 3.1rem;
    height: auto;
    overflow-y: visible;
    padding: 0.56rem 0.62rem;
    font-size: 0.84rem;
    line-height: 1.22;
  }

  .terminal-message-area {
    min-height: 2.9rem;
    margin-top: 0.55rem !important;
    padding: 0.55rem !important;
  }
}

/* =========================================================
   Clear Beta — same app, calmer sensory presentation
   ========================================================= */

.miira-theme-clear {
  background:
    radial-gradient(circle at 12% 0%, rgba(103, 232, 249, 0.16), transparent 30%),
    radial-gradient(circle at 92% 8%, rgba(192, 132, 252, 0.12), transparent 28%),
    linear-gradient(145deg, #f7fbf8, #eef8f5 52%, #f8f5ed) !important;
  color: #123036 !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  text-shadow: none !important;
}

.miira-theme-clear > div:not(.scanlines) {
  border-color: #b7d8d3 !important;
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 20px 55px rgba(18, 48, 54, 0.11) !important;
}

.miira-theme-clear .scanlines {
  display: none;
}

.miira-theme-clear strong {
  color: #0f766e;
}

.miira-theme-clear .terminal-panel,
.miira-theme-clear .resonance-panel,
.miira-theme-clear .terminal-report-page,
.miira-theme-clear .whole-report-panel {
  border-color: #b7d8d3;
  background:
    linear-gradient(180deg, rgba(103, 232, 249, 0.025), rgba(192, 132, 252, 0.018)),
    #ffffff;
  box-shadow: 0 12px 32px rgba(18, 48, 54, 0.075);
}

.miira-theme-clear .terminal-button,
.miira-theme-clear .terminal-choice,
.miira-theme-clear .resonance-answer-button {
  border-color: #9fcfc8;
  background: #f7fbf8;
  color: #123036;
  box-shadow: none;
}

.miira-theme-clear .terminal-button:hover,
.miira-theme-clear .terminal-choice:hover,
.miira-theme-clear .terminal-button:focus,
.miira-theme-clear .terminal-choice:focus,
.miira-theme-clear .resonance-answer-button:hover {
  border-color: #0f766e;
  background: #eaf8f5;
  outline-color: rgba(15, 118, 110, 0.38);
}

.miira-theme-clear .terminal-input {
  border-color: #b7d8d3;
  background: #ffffff;
  color: #123036;
  box-shadow: inset 0 1px 2px rgba(18, 48, 54, 0.04);
}

.miira-theme-clear .terminal-input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.11);
}

.miira-theme-clear .terminal-input::placeholder {
  color: rgba(73, 103, 106, 0.56);
}

.miira-theme-clear .terminal-dim {
  color: #49676a;
}

.miira-theme-clear .terminal-amber,
.miira-theme-clear .terminal-report-ascii,
.miira-theme-clear .resonance-pattern-title {
  color: #b7791f;
  text-shadow: none;
}

.miira-theme-clear .terminal-report-content,
.miira-theme-clear .whole-report-text,
.miira-theme-clear .resonance-question,
.miira-theme-clear .resonance-prompt {
  color: #123036;
  text-shadow: none;
}

.miira-theme-clear .cursor-block {
  background: #0f766e;
}

.miira-theme-clear .terminal-action-bar,
.miira-theme-clear .terminal-command-bar {
  border-color: #b7d8d3;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -8px 22px rgba(18, 48, 54, 0.08);
}

.miira-theme-clear [class*="bg-[#050906]"],
.miira-theme-clear [class*="bg-[#071107]"],
.miira-theme-clear [class*="bg-[#020602]"] {
  background-color: #ffffff !important;
}

.miira-theme-clear [class*="bg-[#140f04]"] {
  background-color: #fff8e8 !important;
}

.miira-theme-clear [class*="text-[#8cff8c]"] {
  color: #123036 !important;
}

.miira-theme-clear [class*="border-[#45ff62]"] {
  border-color: #b7d8d3 !important;
}

.miira-theme-clear [class*="border-[#f4c15d]"] {
  border-color: rgba(183, 121, 31, 0.45) !important;
}

.miira-theme-clear [class*="bg-[#45ff62]"] {
  background-color: #0f766e !important;
}

@media (prefers-reduced-motion: reduce) {
  .miira-entry-shell *,
  .terminal-shell *,
  .terminal-shell *::before,
  .terminal-shell *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}


/* =========================================================
   Abstract entry refinements + tighter viewport fit
   ========================================================= */

.miira-entry-shell {
  padding: clamp(0.45rem, 1.8vw, 1rem);
}

.miira-entry-card {
  width: min(100%, 1040px);
  padding: clamp(0.8rem, 2vw, 1.35rem);
  border-radius: 1.35rem;
}

.miira-entry-brand {
  gap: 0.65rem;
  padding-bottom: 0.7rem;
}

.miira-entry-mark {
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
}

.miira-entry-brand p {
  font-size: 0.64rem;
}

.miira-entry-brand div span {
  margin-top: 0.12rem;
  font-size: 0.54rem;
}

.miira-entry-copy {
  margin: clamp(0.75rem, 2vh, 1.25rem) auto clamp(0.75rem, 1.8vh, 1.15rem);
}

.miira-entry-copy h1 {
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(2.2rem, 5.6vw, 4.35rem);
  line-height: 0.9;
}

.miira-entry-copy > p:last-child {
  font-size: clamp(0.86rem, 1.2vw, 0.98rem);
  line-height: 1.42;
}

.miira-door-grid {
  gap: 0.75rem;
}

.miira-door {
  min-height: 270px;
  padding: clamp(0.95rem, 2vw, 1.3rem);
  border-radius: 1.1rem;
}

.miira-pill-shape {
  width: 72px;
  height: 32px;
  margin-bottom: 0.8rem;
}

.miira-door strong {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
}

.miira-door small {
  margin-top: 0.28rem;
  font-size: 0.6rem;
}

.miira-door p {
  margin: 0.55rem 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.miira-door-action {
  padding-top: 0.6rem;
  font-size: 0.64rem;
}

.miira-entry-footer {
  justify-content: center;
  margin-top: 0.65rem;
  font-size: 0.64rem;
  text-align: center;
}

/* Standard laptop fit */
@media (min-width: 641px) and (max-height: 820px) {
  .miira-entry-card {
    padding: 0.72rem 0.9rem;
  }

  .miira-entry-brand {
    padding-bottom: 0.5rem;
  }

  .miira-entry-mark {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .miira-entry-copy {
    margin: 0.55rem auto 0.65rem;
  }

  .miira-entry-copy h1 {
    margin: 0.22rem 0 0.35rem;
    font-size: clamp(2rem, 4.7vw, 3.65rem);
  }

  .miira-entry-copy > p:last-child {
    font-size: 0.82rem;
  }

  .miira-door {
    min-height: 225px;
    padding: 0.78rem 0.9rem;
  }

  .miira-pill-shape {
    width: 60px;
    height: 26px;
    margin-bottom: 0.5rem;
  }

  .miira-door strong {
    font-size: clamp(1.55rem, 3vw, 2.2rem);
  }

  .miira-door p {
    margin: 0.4rem 0;
    font-size: 0.76rem;
  }

  .miira-entry-footer {
    margin-top: 0.45rem;
  }
}

/* Short laptop and landscape fit */
@media (min-width: 641px) and (max-height: 680px) {
  .miira-entry-brand div span {
    display: none;
  }

  .miira-entry-copy {
    margin: 0.35rem auto 0.45rem;
  }

  .miira-entry-copy h1 {
    font-size: clamp(1.85rem, 4.1vw, 3.1rem);
  }

  .miira-door {
    min-height: 185px;
  }

  .miira-pill-shape {
    width: 52px;
    height: 22px;
    margin-bottom: 0.38rem;
  }

  .miira-door p {
    font-size: 0.7rem;
    line-height: 1.28;
  }

  .miira-entry-footer {
    display: none;
  }
}

/* Phone fit */
@media (max-width: 640px) {
  .miira-entry-shell {
    align-items: start;
    padding: 0.35rem;
  }

  .miira-entry-card {
    padding: 0.7rem;
    border-radius: 0.95rem;
  }

  .miira-entry-brand {
    padding-bottom: 0.5rem;
  }

  .miira-entry-copy {
    margin: 0.75rem auto 0.65rem;
  }

  .miira-entry-copy h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .miira-door-grid {
    gap: 0.55rem;
  }

  .miira-door {
    min-height: 185px;
    padding: 0.78rem;
  }

  .miira-pill-shape {
    width: 54px;
    height: 24px;
    margin-bottom: 0.45rem;
  }

  .miira-door strong {
    font-size: 1.65rem;
  }

  .miira-door p {
    font-size: 0.74rem;
    line-height: 1.3;
  }

  .miira-entry-footer {
    margin-top: 0.45rem;
  }
}


.miira-entry-hook {
  max-width: 720px;
  margin-inline: auto;
  color: #b9ccc5;
}

.miira-entry-hook strong {
  color: #fff8ea;
  font-weight: 800;
}

.miira-theme-clear .miira-entry-hook strong {
  color: #0f766e;
}


/* =========================================================
   READY headline lockup
   ========================================================= */

.miira-entry-copy {
  max-width: 900px;
}

.miira-ready-heading {
  display: grid;
  justify-items: center;
  gap: 0;
  margin: 0.3rem 0 0.8rem !important;
  color: #fff8ea;
  text-align: center;
  text-transform: uppercase;
  line-height: 0.78 !important;
  letter-spacing: 0 !important;
}

.miira-ready-heading > span {
  display: block;
  margin-bottom: 0.1em;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5.2vw, 4.7rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 0.86;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.miira-ready-heading > strong {
  display: block;
  color: #fff8ea;
  font-family: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  font-size: clamp(5rem, 14vw, 11rem);
  font-weight: 400;
  letter-spacing: 0.025em;
  line-height: 0.72;
  text-shadow:
    0 2px 0 rgba(245, 198, 108, 0.28),
    0 12px 34px rgba(0, 0, 0, 0.46);
}

.miira-entry-hook {
  display: grid;
  justify-items: center;
  gap: 0.28rem;
  max-width: 760px;
  margin: 0.9rem auto 0;
  text-align: center;
}

.miira-entry-hook > span {
  color: #b9ccc5;
  font-size: clamp(0.88rem, 1.35vw, 1.05rem);
  line-height: 1.4;
}

.miira-entry-hook > strong {
  display: block;
  color: #f5c66c;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1.15;
}

.miira-theme-clear .miira-ready-heading {
  color: #123036;
}

.miira-theme-clear .miira-ready-heading > strong {
  color: #0f766e;
  text-shadow:
    0 2px 0 rgba(15, 118, 110, 0.12),
    0 12px 30px rgba(18, 48, 54, 0.12);
}

.miira-theme-clear .miira-entry-hook > span {
  color: #49676a;
}

.miira-theme-clear .miira-entry-hook > strong {
  color: #b7791f;
}

/* Keep the headline dramatic without pushing the doors below the viewport. */
@media (min-width: 641px) and (max-height: 820px) {
  .miira-ready-heading {
    margin: 0.12rem 0 0.45rem !important;
  }

  .miira-ready-heading > span {
    font-size: clamp(1.6rem, 3.8vw, 3.2rem);
  }

  .miira-ready-heading > strong {
    font-size: clamp(4rem, 10vw, 7.3rem);
  }

  .miira-entry-hook {
    margin-top: 0.45rem;
    gap: 0.16rem;
  }

  .miira-entry-hook > span {
    font-size: 0.8rem;
  }

  .miira-entry-hook > strong {
    font-size: 1.05rem;
  }
}

@media (min-width: 641px) and (max-height: 680px) {
  .miira-ready-heading > span {
    font-size: clamp(1.35rem, 3.2vw, 2.5rem);
  }

  .miira-ready-heading > strong {
    font-size: clamp(3.4rem, 8.6vw, 6rem);
  }

  .miira-entry-hook > span {
    font-size: 0.72rem;
  }

  .miira-entry-hook > strong {
    font-size: 0.95rem;
  }
}

@media (max-width: 640px) {
  .miira-ready-heading {
    margin: 0.2rem 0 0.55rem !important;
  }

  .miira-ready-heading > span {
    font-size: clamp(1.7rem, 8vw, 2.7rem);
  }

  .miira-ready-heading > strong {
    font-size: clamp(4.5rem, 22vw, 7rem);
  }

  .miira-entry-hook {
    margin-top: 0.45rem;
    gap: 0.2rem;
  }

  .miira-entry-hook > span {
    font-size: 0.78rem;
    line-height: 1.32;
  }

  .miira-entry-hook > strong {
    font-size: 1.02rem;
  }
}
