:root {
  color-scheme: dark;
  --cream: #f7e8c9;
  --ink: #243338;
  --indigo: #19292e;
  --saffron: #ebbc60;
  --rust: #8a342b;
  --textile: url("./assets/ajrakh-textile.png");
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--cream);
  background: var(--indigo);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
[hidden] { display: none !important; }
button, input, summary, a { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button, a, input { font: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
button:disabled { cursor: default; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.background, .shade { position: fixed; inset: 0; width: 100%; height: 100%; }
.background { object-fit: cover; object-position: 59% 50%; }
.shade { background: linear-gradient(90deg, rgb(11 26 31 / 83%), rgb(11 26 31 / 15%) 58%, rgb(11 26 31 / 18%)), linear-gradient(0deg, rgb(11 26 31 / 70%), transparent 37%, rgb(11 26 31 / 20%)); }
.tree-lights { position: fixed; inset: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.branch-plane { position: absolute; }
.branch-light { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #ffd994; box-shadow: 0 0 5px 2px rgb(235 188 96 / 23%), 0 0 12px 4px rgb(235 188 96 / 9%); opacity: 0; transition: opacity 9s ease var(--light-delay, 0s); }
.branch-light.lit { opacity: .58; }
.falling-leaf { position: fixed; z-index: 3; left: 58%; top: 22svh; pointer-events: none; font-size: .875rem; opacity: 0; animation: leaf-fall 7s ease-in-out both; }
@keyframes leaf-fall { 0% { opacity: 0; transform: translate(0, 0) rotate(-20deg); } 12% { opacity: .62; } 35% { transform: translate(-18px, 15svh) rotate(28deg); } 65% { opacity: .5; transform: translate(22px, 30svh) rotate(-18deg); } 100% { opacity: 0; transform: translate(8px, 46svh) rotate(55deg); } }
.textile-edge { position: fixed; z-index: 2; inset: 0; border: 14px solid var(--rust); border-image: var(--textile) 50 / 14px / 0 round; pointer-events: none; box-shadow: inset 0 0 0 1px rgb(235 188 96 / 55%); }
.listening-room { position: relative; min-height: 100svh; padding: clamp(2rem, 4.8vh, 4rem) 4.8vw 1rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 30%); grid-template-rows: auto minmax(2rem, 1fr) auto auto; column-gap: 3rem; row-gap: 1.4rem; }
.canopy-secrets { position: absolute; inset: 0; pointer-events: none; }
.owl-secret, .star-secret { position: absolute; pointer-events: auto; }
.owl-secret { left: 64%; top: 17svh; }
.star-secret { left: 55%; top: 29svh; }
.canopy-trigger { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; background: transparent; color: var(--saffron); }
.canopy-trigger img { display: block; width: 36px; height: 36px; }
.canopy-trigger:hover img, .canopy-trigger:focus-visible img { filter: drop-shadow(0 0 3px rgb(235 188 96 / 75%)); }
.hidden-star { font-size: .5rem; opacity: .62; touch-action: manipulation; user-select: none; }
.hidden-star:hover, .hidden-star:focus-visible { opacity: 1; }
.canopy-message { position: absolute; z-index: 6; top: 100%; left: 50%; width: max-content; max-width: 155px; margin: .1rem 0 0; padding: .35rem .5rem; transform: translateX(-50%); background: rgb(25 41 46 / 92%); color: var(--cream); font: italic .875rem/1.5 Georgia, serif; text-align: center; pointer-events: none; }
.birthday { grid-column: 1; grid-row: 1; align-self: start; }
.date { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .85rem; margin: 0 0 .6rem; font-size: .875rem; letter-spacing: .18em; text-transform: uppercase; color: var(--saffron); }
.date-stamp { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .85rem; max-width: 100%; }
.date-star { font-size: 1.25rem; }
.chapter { text-transform: none; letter-spacing: .08em; white-space: nowrap; }
.room-whisper { font: italic .875rem/1.6 Georgia, serif; letter-spacing: .01em; text-transform: none; }
h1 { margin: 0 0 .25rem -.035em; font: 400 clamp(5.5rem, 10vw, 10rem)/1.05 Georgia, "Times New Roman", serif; letter-spacing: -.055em; text-shadow: 0 4px 40px rgb(0 0 0 / 20%); }
.title-dot { color: var(--saffron); }
.greeting { font: italic clamp(1.25rem, 1.8vw, 1.75rem)/1.5 Georgia, serif; margin: 0; }
.elephant-secret { display: inline-flex; align-items: center; gap: .15rem; vertical-align: middle; }
.micro-trigger { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; padding: .4rem; border: 0; background: transparent; color: inherit; font-size: .625rem; line-height: 1; opacity: .78; }
.micro-trigger:hover, .micro-trigger:focus-visible { opacity: 1; }
.magic-object { margin-left: .45rem; min-width: 36px; min-height: 36px; border: 1px solid rgb(235 188 96 / 45%); border-radius: 50%; background: rgb(247 232 201 / 13%); font-size: 1.15rem; opacity: 1; text-shadow: 0 0 8px rgb(235 188 96 / 60%); vertical-align: middle; touch-action: manipulation; }
.magic-object:hover, .magic-object:focus-visible { background: rgb(235 188 96 / 25%); }
.magic-message { margin: .1rem 0 .65rem; color: var(--saffron); font: italic .95rem/1.6 Georgia, serif; }
.elephant-message { font: .95rem/1.5 Georgia, serif; color: var(--saffron); }
.memory { grid-column: 2; grid-row: 1 / 3; width: 190px; justify-self: end; margin: 1.1rem .35rem 0 0; padding: .7rem .7rem .65rem; background: var(--cream); box-shadow: 0 12px 28px rgb(0 0 0 / 27%); transform: rotate(5deg); color: var(--rust); align-self: start; }
.memory img { display: block; width: 100%; height: auto; }
.memory figcaption { margin-top: .75rem; font: italic 1.05rem/1.25 Georgia, serif; text-align: center; }
.memory-search { display: block; width: 100%; min-height: 28px; margin: .2rem 0 0; padding: .3rem 0; border: 0; background: transparent; color: #826b58; font: .625rem/1.5 Georgia, serif; }
.memory-search:hover, .memory-search:focus-visible { color: var(--rust); }
.soundtrack { grid-column: 1; grid-row: 3; position: relative; width: min(100%, 460px); padding: 1.25rem 1.5rem 1.4rem; background: var(--cream); color: var(--ink); border-radius: 2px; box-shadow: 0 10px 42px rgb(0 0 0 / 26%); border-bottom: 8px solid var(--rust); color-scheme: light; }
.soundtrack::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; background: var(--rust) var(--textile) center / 360px auto; }
.soundtrack-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding-bottom: .9rem; border-bottom: 1px solid rgb(36 51 56 / 24%); }
h2 { margin: 0; font: italic 400 1.1rem/1.4 Georgia, serif; }
.wander-button { flex: none; min-height: 32px; padding: .25rem .1rem; border: 0; background: transparent; color: var(--rust); font: italic .875rem/1.4 Georgia, serif; text-underline-offset: .2em; }
.wander-button:hover:not(:disabled) { text-decoration: underline; }
.wander-button:disabled { opacity: .4; }
.empty { font-size: 1rem; line-height: 1.5; }
.track-position { margin: .75rem 0 .5rem; font-size: .75rem; line-height: 1.5; letter-spacing: .04em; color: var(--rust); }
.closing-line { margin: .85rem 0 1rem; color: var(--rust); font: italic 1.05rem/1.75 Georgia, serif; }
.spotify-frame { min-height: 152px; margin-bottom: .85rem; border-radius: 12px; background: #282828; }
.spotify-frame iframe { display: block; width: 100%; height: 152px; border: 0; border-radius: 12px; }
.playback-note { margin: .8rem 0 0; font-size: .875rem; line-height: 1.5; color: #5a5147; }
.playback-controls { display: grid; grid-template-columns: 1fr minmax(115px, 1.6fr) 1fr; gap: .5rem; align-items: center; }
.playback-controls button { min-height: 48px; border: 0; }
.quiet-button { background: transparent; color: var(--rust); font: italic 1.15rem Georgia, serif; }
.quiet-button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: .25em; }
.quiet-button:disabled { color: #777165; }
#play { background: var(--rust); color: #fff2d9; border-radius: 50% / 100%; font: italic 1.25rem Georgia, serif; transition: background .2s; }
#play:hover:not(:disabled) { background: #64281f; }
#play:disabled { background: #6b5b51; color: #fff2d9; }
.player-status { margin: .8rem 0 0; font-size: .875rem; line-height: 1.5; color: #5a5147; }
.player-status:empty { display: none; }
.restart-feedback { margin: .55rem 0 0; color: var(--rust); font: italic 1rem/1.5 Georgia, serif; text-align: center; }
.restart-link { min-height: 44px; padding: .25rem; border: 0; background: transparent; color: var(--rust); font: italic .75rem Georgia, serif; text-underline-offset: .2em; }
.restart-link:hover { text-decoration: underline; }
.player-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; column-gap: .8rem; margin-top: .5rem; }
.player-footer a, summary { font-size: .875rem; }
#spotify-link { color: var(--rust); display: inline-flex; min-height: 44px; align-items: center; text-underline-offset: .2em; }
details { margin-left: auto; }
summary { min-height: 44px; display: flex; align-items: center; gap: .4rem; list-style: none; text-decoration: underline; text-underline-offset: .2em; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1rem; }
details[open] summary::after { content: "−"; }
#track-list { position: absolute; z-index: 5; left: 0; bottom: calc(100% + .7rem); width: 100%; max-height: min(360px, 48svh); overflow-y: auto; overscroll-behavior: contain; list-style: none; margin: 0; padding: .5rem; background: #f7e8c9; border: 1px solid #b9a487; box-shadow: 0 12px 36px rgb(0 0 0 / 30%); }
.track-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; border-bottom: 1px solid rgb(36 51 56 / 15%); }
.track-source { display: flex; align-items: center; justify-content: center; color: var(--rust); text-decoration: none; min-height: 44px; }
.track-source:hover { background: #ead5b0; }
.track-option { display: flex; align-items: baseline; gap: .8rem; width: 100%; padding: .7rem .55rem; min-height: 44px; color: var(--ink); background: transparent; border: 0; text-align: left; font-size: .875rem; line-height: 1.5; }
.track-option:hover, .track-option[aria-current="true"] { background: #ead5b0; }
.track-option[aria-current="true"] { color: #732a23; font-weight: 600; }
.track-option span:first-child { flex: none; font-size: .75rem; font-variant-numeric: tabular-nums; color: var(--rust); }
.playlist-secrets { display: grid; grid-template-columns: minmax(0, 1fr) 32px 32px; align-items: center; column-gap: .5rem; margin-top: .35rem; }
.synchronicity { justify-self: start; max-width: 100%; min-height: 32px; padding: .35rem 0; border: 0; background: transparent; color: var(--rust); font: .875rem/1.5 Georgia, serif; overflow-wrap: anywhere; }
.synchronicity:hover { text-decoration: underline; text-underline-offset: .2em; }
.frog { justify-self: end; }
.synchronicity-message, .frog-message { grid-column: 1 / -1; margin: .4rem 0 0; font: .95rem/1.7 Georgia, serif; color: var(--rust); }
.frog-message { text-align: right; font-style: italic; }
.winding-key { padding: .25rem; opacity: .22; }
.winding-key img { display: block; width: 20px; height: 20px; }
.music-box-message { grid-column: 1 / -1; margin: .4rem 0 0; color: var(--rust); font: italic .95rem/1.7 Georgia, serif; }
.star-hint { grid-column: 1 / -1; margin: .5rem 0 0; color: #7b6754; font: italic .75rem/1.6 Georgia, serif; }
.birthday-note { grid-column: 2; grid-row: 3; align-self: end; padding: 1rem 0 1.75rem; font-family: "Kohinoor Devanagari", "Nirmala UI", "Noto Serif Devanagari", serif; font-size: clamp(1.05rem, 1.3vw, 1.35rem); font-weight: 400; line-height: 2; text-shadow: 0 2px 16px rgb(0 0 0 / 75%); }
.birthday-note p { margin: 0; }
.birthday-note p + p { margin-top: .55rem; color: var(--saffron); }
.little-secret { grid-column: 1 / -1; grid-row: 4; justify-self: center; text-align: center; min-height: 44px; }
#lost { min-width: 44px; min-height: 44px; padding: .25rem; font: .75rem Georgia, serif; border: 0; background: transparent; color: var(--cream); text-decoration: underline; text-underline-offset: .25em; }
#found { margin: .1rem 0 .65rem; font: 1rem/1.5 Georgia, serif; }
.all-found { margin: .5rem 0; color: var(--cream); font: 1rem/1.5 Georgia, serif; }
.rapid-message { position: fixed; z-index: 10; right: 1.35rem; bottom: 1rem; margin: 0; padding: .2rem .35rem; background: rgb(25 41 46 / 90%); color: var(--saffron); font: .5rem/1.5 Georgia, serif; pointer-events: none; }
.restart-dialog { width: min(340px, calc(100% - 3rem)); padding: 1.5rem; border: 1px solid #b9a487; border-bottom: 7px solid var(--rust); border-radius: 2px; background: var(--cream); color: var(--ink); color-scheme: light; box-shadow: 0 12px 50px rgb(0 0 0 / 35%); }
.restart-dialog::backdrop { background: rgb(11 26 31 / 75%); }
.restart-question { margin: 0; color: var(--rust); font: italic 1.9rem/1.3 Georgia, serif; }
#restart-explanation { margin: .8rem 0 1.3rem; font-size: .875rem; line-height: 1.6; }
.restart-actions { display: flex; justify-content: flex-end; gap: .75rem; }
.restart-actions button { min-width: 80px; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--rust); border-radius: 2px; background: transparent; color: var(--rust); font: italic 1rem Georgia, serif; }
.restart-actions .confirm-restart { background: var(--rust); color: var(--cream); }
@media (min-width: 1000px) and (min-height: 900px) { .listening-room { padding-top: 4rem; padding-bottom: 1.4rem; row-gap: 2rem; } }
@media (max-width: 700px) {
  .textile-edge { border-width: 8px; border-image-width: 8px; }
  .background { height: 72svh; object-position: 57% 44%; }
  .tree-lights { height: 72svh; }
  .shade { background: linear-gradient(180deg, rgb(11 26 31 / 66%), rgb(11 26 31 / 5%) 27svh, rgb(11 26 31 / 5%) 45svh, #19292e 72svh); }
  .listening-room { padding: 1.7rem 1.35rem .8rem; grid-template-columns: minmax(0, 1fr) 105px; grid-template-rows: auto minmax(180px, auto) auto auto auto; column-gap: .75rem; row-gap: 1rem; }
  .canopy-secrets { position: relative; inset: auto; grid-column: 1 / -1; grid-row: 2; }
  .owl-secret { left: 82%; top: .35rem; }
  .star-secret { left: 66%; top: 4.5rem; }
  .owl-secret .canopy-message { left: auto; right: 0; transform: none; }
  .birthday { grid-column: 1 / -1; }
  .date { font-size: .75rem; letter-spacing: .14em; gap: .35rem .85rem; }
  .room-whisper { flex-basis: 100%; }
  h1 { font-size: clamp(4.8rem, 20vw, 7rem); }
  .greeting { font-size: 1.25rem; }
  .memory { grid-column: 1; grid-row: 2; justify-self: start; width: 105px; margin: .1rem .1rem 0 0; padding: .35rem .35rem .4rem; transform: rotate(-5deg); }
  .memory figcaption { margin-top: .4rem; font-size: .875rem; }
  .soundtrack { grid-column: 1 / -1; width: 100%; padding: 1rem 1.15rem; }
  .soundtrack-heading { gap: .5rem; }
  h2 { font-size: 1.05rem; }
  details[open] { flex-basis: 100%; }
  #track-list { position: static; max-height: 320px; box-shadow: none; border-inline: 0; border-bottom: 0; padding: .2rem 0; }
  details[open] summary { justify-content: flex-end; }
  .birthday-note { grid-column: 1 / -1; grid-row: 4; width: 100%; padding: .85rem .5rem .35rem; font-size: 1.05rem; line-height: 2; }
  .little-secret { grid-row: 5; align-self: end; }
}
@media (max-width: 350px) {
  .listening-room { padding-inline: 1rem; }
  .soundtrack { padding-inline: .8rem; }
  .soundtrack-heading { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: no-preference) {
  .birthday, .memory, .soundtrack { animation: arrive .8s ease both; }
  .memory { animation-delay: .12s; }
  .soundtrack { animation-delay: .2s; }
  @keyframes arrive { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
}
@media (prefers-reduced-motion: reduce) {
  .branch-light { transition: none; }
  .falling-leaf { animation: leaf-rest 3s ease both; }
  @keyframes leaf-rest { 0%, 100% { opacity: 0; } 25%, 75% { opacity: .6; } }
}
