/* interpret-panel.css — the House's on-site dream-reading overlay.
 * Reuses the rotunda's CSS custom properties (--gold / --ink / --hairline / fonts …)
 * with hard fallbacks so it still reads correctly if a var is ever missing. GPU
 * transform/opacity only; a hard prefers-reduced-motion off-switch at the bottom. */

#mp-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 4vw, 48px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease, cubic-bezier(0.22, 0.61, 0.36, 1));
}
#mp-overlay.mp-on {
  opacity: 1;
  pointer-events: auto;
}
#mp-overlay[hidden] {
  display: none;
}

.mp-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 50% 40%, rgba(11, 8, 5, 0.82), rgba(4, 3, 1, 0.94));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.mp-panel {
  position: relative;
  width: min(94vw, 560px);
  max-height: 92vh;
  overflow-y: auto;
  padding: clamp(22px, 3.4vw, 40px);
  border: 1px solid var(--hairline, #3a2e20);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(24, 17, 10, 0.94), rgba(15, 10, 6, 0.96));
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9), inset 0 0 60px rgba(6, 4, 2, 0.5);
  color: var(--ink, #f3e9d6);
  transform: translateY(14px);
  transition: transform 0.55s var(--ease, cubic-bezier(0.22, 0.61, 0.36, 1));
}
#mp-overlay.mp-on .mp-panel {
  transform: translateY(0);
}

.mp-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 20px;
  line-height: 1;
  color: var(--ink-muted, #c3b39a);
  background: rgba(11, 8, 5, 0.5);
  border: 1px solid var(--hairline, #3a2e20);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.mp-close:hover {
  color: var(--gold, #e6b45c);
  border-color: var(--gold, #e6b45c);
}

.mp-eyebrow {
  font-family: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold, #e6b45c);
}
.mp-title {
  margin-top: 10px;
  font-family: var(--serif, "Playfair Display", Georgia, serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  line-height: 1.02;
  color: var(--ink, #f3e9d6);
}
.mp-say {
  margin-top: 12px;
  font-family: var(--serif, "Playfair Display", Georgia, serif);
  font-style: italic;
  font-size: clamp(14px, 1.7vw, 16px);
  line-height: 1.5;
  color: var(--teal-bright, #41d6c4);
}
.mp-notice {
  margin-top: 14px;
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-faint, #8a7c68);
}
.mp-notice a {
  color: var(--teal-bright, #41d6c4);
  text-underline-offset: 3px;
}

.mp-form {
  margin-top: 18px;
}
.mp-label {
  display: block;
  font-family: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint, #8a7c68);
}
.mp-textarea {
  margin-top: 10px;
  width: 100%;
  min-height: 7.5rem;
  resize: vertical;
  padding: 14px 15px;
  font-family: var(--serif, "Playfair Display", Georgia, serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink, #f3e9d6);
  background: rgba(30, 21, 12, 0.5);
  border: 1px solid var(--hairline, #3a2e20);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s;
}
.mp-textarea::placeholder {
  color: var(--ink-faint, #8a7c68);
  opacity: 0.7;
}
.mp-textarea:focus {
  border-color: var(--gold, #e6b45c);
}
.mp-textarea:disabled {
  opacity: 0.6;
}

.mp-consent {
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-muted, #c3b39a);
}
.mp-consent input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--teal-bright, #41d6c4);
}

.mp-turnstile {
  margin-top: 16px;
  min-height: 0;
}
.mp-turnstile:empty {
  margin-top: 0;
}

.mp-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--hairline, #3a2e20);
  padding-top: 16px;
}
.mp-count {
  font-family: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint, #8a7c68);
}
.mp-btn {
  flex-shrink: 0;
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  font-weight: 500;
  font-size: 13.5px;
  color: #1a1206;
  padding: 12px 22px;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  background: linear-gradient(180deg, var(--gold-glow, #f6ce7c), var(--gold, #e6b45c));
  box-shadow: 0 6px 20px rgba(230, 180, 92, 0.38);
  transition: transform 0.2s, opacity 0.2s;
}
.mp-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}
.mp-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.mp-status {
  margin-top: 18px;
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-muted, #c3b39a);
}
.mp-status.mp-err {
  color: var(--gold-glow, #f6ce7c);
}

.mp-reading {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline, #3a2e20);
}
.mp-reading[hidden] {
  display: none;
}
.mp-reading .mp-read-eyebrow {
  font-family: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold, #e6b45c);
  opacity: 0.9;
}
.mp-reading p {
  margin-top: 14px;
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--ink, #f3e9d6);
}
.mp-caret {
  display: inline-block;
  margin-left: 2px;
  color: var(--gold, #e6b45c);
  animation: mp-blink 1s steps(2, start) infinite;
}
@keyframes mp-blink {
  50% {
    opacity: 0.2;
  }
}

.mp-cta {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline, #3a2e20);
}
.mp-cta[hidden] {
  display: none;
}
.mp-cta p {
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-muted, #c3b39a);
}
.mp-cta .mp-tg {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  font-weight: 500;
  font-size: 13px;
  color: #1a1206;
  padding: 11px 20px;
  border-radius: 22px;
  text-decoration: none;
  background: linear-gradient(180deg, var(--gold-glow, #f6ce7c), var(--gold, #e6b45c));
  box-shadow: 0 4px 18px rgba(230, 180, 92, 0.4);
}
.mp-cta .mp-tg svg {
  width: 15px;
  height: 15px;
}
.mp-cta .mp-priv {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--ink-faint, #8a7c68);
}

@media (prefers-reduced-motion: reduce) {
  #mp-overlay,
  .mp-panel,
  .mp-btn {
    transition: none;
  }
  .mp-caret {
    animation: none;
  }
}
