/* Mirror Muse — self-contained styles. Everything is scoped under .mm-root. */

.mm-root {
  --mm-bg: #fdf9f2;
  --mm-fg: #4a3b39;
  --mm-muted: #8a7570;
  --mm-gold: #d3b476;
  --mm-min-height: 100vh;

  position: relative;
  box-sizing: border-box;
  min-height: var(--mm-min-height);
  overflow: hidden;
  background: var(--mm-bg);
  color: var(--mm-fg);
  font-family: "Karla", ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
  isolation: isolate;
}

.mm-root *,
.mm-root *::before,
.mm-root *::after {
  box-sizing: border-box;
}

.mm-root p,
.mm-root h1 {
  margin: 0;
}

.mm-root img {
  display: block;
  max-width: 100%;
  height: auto;
}

.mm-root button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  margin: 0;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
  border-radius: 0;
}

.mm-root button:hover,
.mm-root button:focus {
  background: none;
  box-shadow: none;
}

/* --- closet photography --- */
.mm-root .mm-closet {
  position: absolute;
  top: 0;
  height: 100%;
  width: 26%;
  object-fit: cover;
  opacity: 0.95;
  pointer-events: none;
  display: none;
  z-index: 0;
}

.mm-root .mm-closet-left {
  left: 0;
  -webkit-mask-image: linear-gradient(to right, #000 15%, #000 65%, transparent);
  mask-image: linear-gradient(to right, #000 15%, #000 65%, transparent);
}

.mm-root .mm-closet-right {
  right: 0;
  -webkit-mask-image: linear-gradient(to left, #000 15%, #000 65%, transparent);
  mask-image: linear-gradient(to left, #000 15%, #000 65%, transparent);
}

@media (min-width: 768px) {
  .mm-root .mm-closet {
    display: block;
  }
}

/* --- layout --- */
.mm-inner {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: var(--mm-min-height);
  max-width: 48rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  text-align: center;
}

.mm-eyebrow {
  font-size: 0.7rem;
  text-transform: lowercase;
  letter-spacing: 0.42em;
  color: var(--mm-muted);
}

.mm-heading {
  margin-top: 1rem !important;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--mm-fg);
}

.mm-intro {
  margin-top: 0.9rem !important;
  max-width: 30rem;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--mm-muted);
}

.mm-stage {
  position: relative;
  width: 100%;
  max-width: 28rem;
  margin-top: 3rem;
}

/* --- mirror --- */
.mm-frame {
  border-radius: 50% / 40%;
  padding: 16px;
  background: linear-gradient(150deg, #efdfb8, #c2a469 45%, #eaddb7);
  box-shadow:
    0 30px 60px -30px rgba(90, 60, 45, 0.45),
    0 0 0 1px rgba(190, 160, 100, 0.5);
}

@media (min-width: 640px) {
  .mm-frame {
    padding: 20px;
  }
}

.mm-glass-outer {
  position: relative;
  overflow: hidden;
  border-radius: 50% / 40%;
  border: 1px solid rgba(253, 249, 242, 0.6);
}

.mm-glass {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  min-height: 22rem;
  padding: 3.5rem 2.5rem;
  text-align: center;
  background:
    radial-gradient(120% 90% at 50% 10%, rgba(255, 255, 255, 0.75), rgba(238, 232, 245, 0.55) 55%, rgba(238, 219, 222, 0.5)),
    linear-gradient(160deg, rgba(233, 240, 247, 0.6), rgba(230, 240, 232, 0.5));
  box-shadow:
    inset 0 2px 30px rgba(255, 255, 255, 0.85),
    inset 0 -20px 60px rgba(226, 187, 190, 0.35);
}

@media (min-width: 640px) {
  .mm-glass {
    min-height: 26rem;
    padding: 3.5rem 4rem;
  }
}

.mm-shimmer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.85) 50%, transparent 65%);
  animation: mm-sweep 900ms ease-out;
}

@keyframes mm-sweep {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

.mm-prompt {
  min-height: 6rem;
  text-wrap: balance;
  color: var(--mm-fg);
}

.mm-quiet {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 300;
  font-style: italic;
  color: var(--mm-muted);
}

/* prompt voices */
.mm-voice {
  display: block;
  animation: mm-rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes mm-rise {
  from { opacity: 0; transform: translateY(10px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

.mm-voice-romantic {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.875rem;
  line-height: 1.35;
}

.mm-voice-hand {
  font-family: "Caveat", cursive;
  font-size: 1.875rem;
  line-height: 1.35;
}

.mm-voice-mono {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 1.125rem;
  line-height: 1.65;
  letter-spacing: -0.01em;
}

.mm-voice-poster {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.mm-voice-mythic {
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  line-height: 1.35;
}

@media (min-width: 640px) {
  .mm-voice-romantic,
  .mm-voice-hand { font-size: 2.25rem; }
  .mm-voice-mono { font-size: 1.25rem; }
  .mm-voice-poster { font-size: 3rem; }
  .mm-voice-mythic { font-size: 1.5rem; }
}

/* --- buttons --- */
.mm-ask {
  border-radius: 9999px;
  border: 1px solid rgba(197, 165, 100, 0.6);
  background: rgba(253, 249, 242, 0.6);
  padding: 0.625rem 1.75rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--mm-fg);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: all 300ms ease;
}

.mm-ask:hover {
  background: rgba(253, 249, 242, 0.95);
  letter-spacing: 0.36em;
}

.mm-ask:active {
  transform: scale(0.96);
}

.mm-ask[disabled] {
  opacity: 0.6;
  cursor: default;
}

.mm-done {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--mm-muted);
}

/* --- navigation --- */
.mm-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.mm-nav[hidden],
.mm-save-row[hidden],
.mm-done[hidden],
.mm-shimmer[hidden] {
  display: none;
}

.mm-prev,
.mm-next {
  padding: 0.25rem 0.5rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--mm-muted);
  transition: color 200ms ease;
}

.mm-prev:hover,
.mm-next:hover {
  color: var(--mm-fg);
}

.mm-prev[disabled],
.mm-next[disabled] {
  opacity: 0.25;
  cursor: default;
}

.mm-dots {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.mm-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 9999px;
  border: 1px solid rgba(197, 165, 100, 0.7);
  background: transparent;
  opacity: 0.4;
  transition: all 300ms ease;
}

.mm-dot.is-available {
  opacity: 1;
  background: rgba(197, 165, 100, 0.3);
}

.mm-dot.is-current {
  opacity: 1;
  background: var(--mm-gold);
  transform: scale(1.25);
}

.mm-dot[disabled] {
  cursor: default;
}

/* --- save --- */
.mm-save-row {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.mm-save {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(197, 165, 100, 0.5);
  background: rgba(253, 249, 242, 0.5);
  padding: 0.5rem 1.25rem;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--mm-muted);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: all 300ms ease;
}

.mm-save:hover {
  color: var(--mm-fg);
  letter-spacing: 0.32em;
}

.mm-save[disabled] {
  opacity: 0.5;
  cursor: default;
}

.mm-flower {
  font-size: 0.85rem;
  line-height: 1;
  color: var(--mm-gold);
}

/* --- countdown --- */
.mm-countdown {
  margin-top: 1.25rem !important;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: rgba(138, 117, 112, 0.85);
  text-align: center;
}

.mm-footer {
  margin-top: 3.5rem !important;
  max-width: 24rem;
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--mm-muted);
}

/* --- vase --- */
.mm-vase {
  position: absolute;
  left: -0.75rem;
  bottom: -1rem;
  width: 5rem;
  pointer-events: none;
  animation: mm-float 6s ease-in-out infinite;
}

@media (min-width: 640px) {
  .mm-vase {
    left: -6rem;
    bottom: -2.5rem;
    width: 8rem;
  }
}

@keyframes mm-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

/* --- cat --- */
.mm-cat-wrap {
  position: absolute;
  right: 0.5rem;
  bottom: 10rem;
  width: 6rem;
  z-index: 20;
  pointer-events: none;
}

@media (min-width: 640px) {
  .mm-cat-wrap {
    bottom: 0.5rem;
    width: 10rem;
  }
}

.mm-cat-breathe {
  transform-origin: bottom center;
  animation: mm-cat-breathe 5.5s ease-in-out infinite;
}

.mm-cat {
  width: 100%;
  opacity: 0.95;
}

.mm-cat.is-blinking {
  animation: mm-cat-blink 0.85s ease-in-out;
}

@keyframes mm-cat-breathe {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.012) translateY(-1px); }
}

@keyframes mm-cat-blink {
  0%, 100% { opacity: 0.95; }
  50% { opacity: 0.88; }
}

@media (prefers-reduced-motion: reduce) {
  .mm-root * {
    animation: none !important;
  }
}
