:root {
  --ink: #31332f;
  --muted-ink: #6e7066;
  --paper: #fffdf6;
  --accent: #9b5c46;
  --accent-dark: #754230;
  --glass: rgba(219, 238, 233, 0.22);
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(ellipse at 50% 112%, rgba(130, 102, 72, 0.11), transparent 42%),
    radial-gradient(circle at 8% 12%, rgba(255, 255, 255, 0.76), transparent 23rem),
    radial-gradient(circle at 94% 44%, rgba(211, 190, 158, 0.16), transparent 26rem),
    linear-gradient(145deg, #e9e1d6 0%, #f6f2eb 50%, #e1d6c7 100%);
}

.atmosphere,
.atmosphere::before,
.atmosphere::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.atmosphere { overflow: hidden; }

.atmosphere::before,
.atmosphere::after {
  content: "";
  z-index: 0;
  background: radial-gradient(circle, rgba(255, 250, 227, 0.5) 0 1px, transparent 2px);
  background-size: 93px 93px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  opacity: 0.14;
  animation: drift-background 24s ease-in-out infinite alternate;
}

.atmosphere::after { opacity: 0.07; transform: scale(1.4) rotate(17deg); animation-delay: -8s; }

.atmosphere span {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 249, 229, 0.48);
  box-shadow: 0 0 10px 3px rgba(216, 192, 151, 0.1);
  animation: float-light 10s ease-in-out infinite;
}

.atmosphere span:nth-child(1) { top: 15%; left: 12%; }
.atmosphere span:nth-child(2) { top: 69%; left: 7%; animation-delay: -4s; }
.atmosphere span:nth-child(3) { top: 24%; left: 87%; animation-delay: -2s; }
.atmosphere span:nth-child(4) { top: 82%; left: 81%; animation-delay: -6s; }
.atmosphere span:nth-child(5) { top: 46%; left: 94%; animation-delay: -1s; }
.atmosphere span:nth-child(6) { top: 90%; left: 29%; animation-delay: -5s; }
.atmosphere span:nth-child(7) { top: 5%; left: 57%; animation-delay: -3s; }
.atmosphere span:nth-child(8) { top: 52%; left: 18%; animation-delay: -7s; }

.experience-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  row-gap: clamp(0.4rem, 1.5vw, 1rem);
  width: min(100% - 2rem, 740px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 5.5rem) 0 2.5rem;
}

.intro {
  max-width: 34rem;
  text-align: center;
  justify-self: center;
  animation: intro-arrives 900ms ease-out both;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-family: Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 { margin: 0; font-size: clamp(2.9rem, 9vw, 4.8rem); font-weight: 400; letter-spacing: -0.06em; }

.intro-copy { margin: 1rem auto 0; color: var(--muted-ink); font-size: clamp(1rem, 2.8vw, 1.15rem); line-height: 1.6; }

.glass-stage {
  display: grid;
  place-items: center;
  padding: 1.5rem 0 1.25rem;
  perspective: 800px;
}

.glass {
  position: relative;
  width: clamp(175px, 46vw, 226px);
  height: clamp(235px, 61vw, 295px);
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-top: 0;
  border-radius: 0 0 42% 42% / 0 0 15% 15%;
  background:
    linear-gradient(102deg, rgba(255, 255, 255, 0.36), rgba(192, 213, 208, 0.13) 37%, rgba(91, 120, 117, 0.09) 64%, rgba(255, 255, 255, 0.24)),
    var(--glass);
  box-shadow:
    inset 20px 0 27px rgba(255, 255, 255, 0.24),
    inset -17px 0 24px rgba(49, 91, 91, 0.09),
    inset 0 -20px 28px rgba(59, 103, 100, 0.07),
    0 20px 25px rgba(82, 59, 38, 0.12),
    0 35px 56px rgba(105, 72, 41, 0.08);
  transform: rotateX(2deg);
  animation: glass-breathe 6s ease-in-out infinite;
}

.glass::before,
.glass::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.glass::before {
  z-index: 5;
  inset: 2px;
  border-radius: 0 0 42% 42% / 0 0 15% 15%;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.glass::after {
  right: 8%;
  bottom: -17px;
  left: 8%;
  height: 19px;
  border-radius: 50%;
  background: rgba(66, 81, 72, 0.18);
  filter: blur(8px);
  z-index: -2;
}

.glass.is-drawing { animation: glass-reacts 700ms cubic-bezier(0.22, 0.82, 0.33, 1) both; }

.glass__halo {
  position: absolute;
  z-index: -1;
  inset: -24% -35% -20%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 241, 211, 0.17), transparent 67%);
  filter: blur(13px);
}

.glass__rim {
  position: absolute;
  z-index: 7;
  top: -9px;
  left: -5%;
  width: 110%;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.83);
  border-bottom-color: rgba(105, 157, 155, 0.25);
  border-radius: 50%;
  background: linear-gradient(to bottom, rgba(247, 255, 253, 0.68), rgba(174, 209, 207, 0.2));
  box-shadow: 0 5px 9px rgba(46, 79, 77, 0.14), inset 0 3px 3px rgba(255, 255, 255, 0.78);
}

.glass__shine {
  position: absolute;
  z-index: 6;
  top: 27px;
  left: 13%;
  width: 15%;
  height: 67%;
  border-radius: 50%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.03));
  filter: blur(1px);
  transform: rotate(5deg);
}

.glass__reflection {
  position: absolute;
  z-index: 6;
  top: 14%;
  right: 12%;
  width: 16%;
  height: 38%;
  border-radius: 50%;
  border-right: 2px solid rgba(255, 255, 255, 0.31);
  transform: rotate(-24deg);
}

.glass__notes { position: absolute; z-index: 3; right: 10%; bottom: 7%; left: 10%; height: 55%; }

.glass__notes span {
  position: absolute;
  width: 51%;
  height: 28%;
  border: 1px solid rgba(111, 82, 54, 0.07);
  border-radius: 3px;
  box-shadow: 0 5px 7px rgba(64, 47, 31, 0.17);
}

.glass__notes span:nth-child(1) { bottom: 1%; left: 1%; transform: rotate(-13deg); background: linear-gradient(130deg, #e5b993, #f5d7b4); }
.glass__notes span:nth-child(2) { right: 0; bottom: 4%; transform: rotate(11deg); background: linear-gradient(130deg, #eed7a4, #fff0c6); }
.glass__notes span:nth-child(3) { bottom: 24%; left: 25%; transform: rotate(4deg); background: linear-gradient(130deg, #d3d9a4, #ebebc5); }
.glass__notes span:nth-child(4) { top: 16%; right: 7%; transform: rotate(-11deg); background: linear-gradient(130deg, #cbd7c3, #e7ebd8); }
.glass__notes span:nth-child(5) { top: 2%; left: 2%; transform: rotate(13deg); background: linear-gradient(130deg, #e5bcb0, #f5d8d0); }

.glass__base { position: absolute; z-index: 4; right: 9%; bottom: 4px; left: 9%; height: 11px; border-radius: 50%; background: rgba(139, 180, 176, 0.3); box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.6); }

.message-area { display: grid; justify-items: center; animation: message-area-arrives 850ms 160ms ease-out both; }

.note {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 485px);
  min-height: 132px;
  padding: 1.65rem clamp(1.25rem, 5vw, 2.6rem);
  border: 1px solid rgba(167, 140, 94, 0.26);
  background:
    linear-gradient(90deg, rgba(177, 144, 83, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(177, 144, 83, 0.035) 1px, transparent 1px),
    radial-gradient(ellipse at 17% 9%, rgba(255, 255, 255, 0.92), transparent 25%),
    var(--paper);
  background-size: 5px 5px, 5px 5px, auto, auto;
  box-shadow: 0 3px 2px rgba(95, 74, 45, 0.1), 0 18px 32px rgba(60, 48, 36, 0.18);
  text-align: center;
  transform: rotate(-0.6deg);
}

.note[hidden] { display: none; }
.note::before { position: absolute; top: -8px; left: 50%; width: 58px; height: 16px; content: ""; background: rgba(225, 201, 150, 0.34); transform: translateX(-50%) rotate(-1.5deg); }
.note p { margin: 0; font-size: clamp(1.05rem, 3.2vw, 1.25rem); line-height: 1.55; }
.note.is-visible { animation: note-arrives 780ms cubic-bezier(0.19, 0.84, 0.32, 1) both; }

.audio-button {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  margin-top: 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(155, 92, 70, 0.34);
  border-radius: 999px;
  color: var(--accent-dark);
  background: rgba(255, 250, 244, 0.75);
  cursor: pointer;
  font: 700 0.76rem/1 Arial, sans-serif;
  letter-spacing: 0.02em;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.audio-button[hidden] { display: none; }
.audio-button:hover { color: #fffaf4; background: var(--accent); transform: translateY(-1px); }
.audio-button:focus-visible, .draw-button:focus-visible { outline: 3px solid rgba(155, 92, 70, 0.32); outline-offset: 4px; }

.draw-button {
  margin-top: 1.65rem;
  padding: 0.92rem 1.45rem;
  border: 1px solid rgba(255, 242, 219, 0.42);
  border-radius: 999px;
  color: #fffaf4;
  background: linear-gradient(135deg, #ad7055, var(--accent-dark));
  box-shadow: 0 9px 18px rgba(108, 61, 45, 0.25), inset 0 1px rgba(255, 255, 255, 0.23);
  cursor: pointer;
  font: 700 0.9rem/1 Arial, sans-serif;
  letter-spacing: 0.02em;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.draw-button:hover { box-shadow: 0 13px 25px rgba(108, 61, 45, 0.3), inset 0 1px rgba(255, 255, 255, 0.23); filter: brightness(1.04); transform: translateY(-2px); }
.draw-button:disabled { cursor: wait; opacity: 0.7; transform: none; }
.status { min-height: 1.2em; margin: 0.9rem 0 0; color: var(--muted-ink); font: 0.85rem/1.4 Arial, sans-serif; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@keyframes intro-arrives { from { opacity: 0; transform: translateY(13px); } to { opacity: 1; transform: translateY(0); } }
@keyframes message-area-arrives { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes glass-breathe { 0%, 100% { transform: rotateX(2deg) translateY(0); } 50% { transform: rotateX(2deg) translateY(-5px); } }
@keyframes glass-reacts { 0% { transform: rotateX(2deg) rotate(0) scale(1); } 32% { transform: rotateX(4deg) rotate(-2.5deg) scale(1.025); } 66% { transform: rotateX(2deg) rotate(1.8deg) scale(0.99); } 100% { transform: rotateX(2deg) rotate(0) scale(1); } }
@keyframes note-arrives { from { opacity: 0; transform: translateY(24px) rotate(-4deg) scale(0.96); } 63% { opacity: 1; transform: translateY(-5px) rotate(0.7deg) scale(1.01); } to { opacity: 1; transform: translateY(0) rotate(-0.6deg) scale(1); } }
@keyframes float-light { 0%, 100% { opacity: 0.25; transform: translate3d(0, 0, 0) scale(0.8); } 50% { opacity: 0.9; transform: translate3d(8px, -17px, 0) scale(1.25); } }
@keyframes drift-background { from { transform: translateY(-10px); } to { transform: translateY(16px); } }

@media (max-width: 420px) {
  .experience-shell { width: min(100% - 1.35rem, 740px); padding-top: 2rem; }
  .glass-stage { padding: 1.15rem 0; }
  .note { min-height: 126px; }
}

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