/* ============ A Little World for Houda — V2 overrides ============ */
:root { --scene-h: 62%; }
.is-long { --scene-h: 50%; }

/* layered scenes (each depth is its own composited layer) */
.scene-cam { position: absolute; inset: 0; transform-origin: 50% 55%; }
svg.layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: block; will-change: transform; pointer-events: none; }
svg.layer .hit { pointer-events: auto; cursor: pointer; }

/* softer, bluer frame: no heavy black areas */
.vignette { background: radial-gradient(125% 95% at 50% 40%, transparent 62%, rgba(8, 20, 46, .38) 100%); }
.panel { top: calc(var(--scene-h) - 7%);
  background: linear-gradient(to bottom, rgba(12, 30, 66, 0) 0%, rgba(12, 30, 66, .5) 13%, rgba(11, 27, 60, .76) 38%, rgba(10, 25, 56, .86) 100%); }
.lines p { font-size: clamp(19.5px, 5.15vw, 24px); line-height: 2;
  text-shadow: 0 1px 2px rgba(6, 14, 32, .85), 0 0 18px rgba(6, 14, 32, .8); }
.ch-label { font-size: 15.5px; }
.ch-title { font-size: clamp(30px, 8vw, 46px); }

/* cover */
.cover-front { padding: 11% 10% 11% 12%; }
.cover-emblem { width: 34%; margin-bottom: 3%; }
.cover-title { font-family: var(--f-latin); font-style: italic; font-weight: 600; display: flex; flex-direction: column; align-items: center;
  line-height: 1.02; font-size: clamp(25px, 7.6vw, 36px); letter-spacing: .01em; }
.cover-title .l1 { font-size: 1.32em; }
.cover-rule { margin: 5% 0; }
.cover-sub { font-size: clamp(12.5px, 3.45vw, 15px); line-height: 1.8; }
.cover-sub span { display: block; }
.sound-hint { margin: 4px 0 0; font-size: 15px; color: var(--powder); text-shadow: 0 1px 8px rgba(6, 14, 32, .8); animation: hint-pulse 3.2s ease-in-out infinite; }

/* hud & mixer */
.hud { position: absolute; }
.icon-btn.small { width: 38px; height: 38px; }
.icon-btn.sound { width: 46px; height: 46px; }
.icon-btn.sound svg { width: 21px; height: 21px; }
.icon-btn.sound[aria-pressed="false"] { border-color: rgba(197, 222, 244, .5); }
.mixer { position: absolute; top: calc(var(--hud-h) + 4px); left: 12px; width: min(270px, 82vw); padding: 14px 16px 12px; border-radius: 18px;
  background: rgba(12, 28, 62, .94); border: 1px solid rgba(216, 187, 130, .4); box-shadow: 0 18px 44px rgba(4, 9, 22, .5);
  display: grid; gap: 10px; z-index: 35; pointer-events: auto; }
.mixer label { display: grid; gap: 2px; font-size: 15px; color: var(--ivory); }
.mixer input[type=range] { width: 100%; accent-color: var(--gold); direction: ltr; height: 28px; }

/* garden wish card */
.wish-card { position: absolute; z-index: 22; left: 50%; top: calc(var(--hud-h) + 4px); width: min(92vw, 460px);
  transform: translate(-50%, -10px); padding: 12px 20px 14px; border-radius: 20px; text-align: center;
  background: linear-gradient(160deg, rgba(25, 52, 104, .9), rgba(12, 28, 62, .92)); border: 1px solid rgba(216, 187, 130, .55);
  box-shadow: 0 18px 50px rgba(4, 9, 22, .45), inset 0 0 0 1px rgba(245, 242, 236, .06);
  opacity: 0; pointer-events: none; transition: opacity .9s var(--ease-soft), transform .9s var(--ease-soft); }
.wish-card.on { opacity: 1; transform: translate(-50%, 0); }
.wish-card .wish-title { font-family: var(--f-title); color: var(--gold-hi); font-size: clamp(25px, 7vw, 34px); margin: 0; line-height: 1.35; }
.wish-card .wish-text { font-size: clamp(18.5px, 4.9vw, 22px); line-height: 1.8; margin: 2px 0 0; }

/* finale */
.signoff { text-align: left; margin-top: 1em; }
.signoff .sig { font-size: clamp(28px, 7.6vw, 38px); }

/* character life */
.blink { transform-box: fill-box; transform-origin: 50% 50%; animation: blink 5.4s infinite; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.breath { transform-box: fill-box; transform-origin: 50% 100%; animation: breath 4.6s ease-in-out infinite; }
@keyframes breath { 50% { transform: scale(.997, 1.012); } }
.arm-a, .arm-b { transform-box: fill-box; transform-origin: 50% 0%; }
.walking .arm-a { animation: leg .62s ease-in-out infinite alternate-reverse; }
.walking .arm-b { animation: leg .62s ease-in-out infinite alternate; }

/* water, birds, light */
.ripple { transform-box: fill-box; transform-origin: 50% 50%; animation: ripple 3.9s ease-out infinite var(--dl, 0s); }
@keyframes ripple { from { transform: scale(.2); opacity: .9; } to { transform: scale(1); opacity: 0; } }
.flow { stroke-width: 3.2; stroke-dasharray: 7 9; animation: flow .7s linear infinite var(--dl, 0s); }
@keyframes flow { to { stroke-dashoffset: -32; } }
.bwing { transform-box: fill-box; transform-origin: 50% 70%; animation: bflap .34s ease-in-out infinite alternate; }
@keyframes bflap { from { transform: scaleY(1); } to { transform: scaleY(-.55); } }
.glow-hint { animation: glow-hint 2.4s ease-in-out infinite; }
@keyframes glow-hint { 0%, 100% { opacity: .25; } 50% { opacity: .85; } }
.flutter { transform-box: fill-box; transform-origin: 50% 50%; animation: flutter var(--f, 1.4s) ease-in-out infinite alternate; }
@keyframes flutter { from { transform: scaleX(1); } to { transform: scaleX(-.4); } }
.sway-soft { transform-box: fill-box; transform-origin: 50% 100%; animation: sway-soft var(--d, 6s) ease-in-out infinite var(--dl, 0s); }
@keyframes sway-soft { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.4deg); } }

@media (min-aspect-ratio: 1/1) and (min-width: 700px) {
  .panel { top: 0; background: linear-gradient(to left, rgba(10, 25, 56, .88) 0%, rgba(11, 27, 60, .74) 58%, rgba(12, 30, 66, 0) 100%); }
  .wish-card { left: 28.5%; top: 7%; width: min(46vw, 500px); }
  .mixer { left: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .flow, .ripple, .bwing, .blink, .breath { animation: none !important; }
}

/* ---------- V2.1 polish ---------- */
.ch-title { margin-bottom: 4px; }
.ch-title::after { content: ''; display: block; width: 92px; height: 10px; margin: 6px 0 10px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent) center / 100% 1px no-repeat,
              radial-gradient(circle, var(--gold-hi) 0 2.4px, transparent 3px) center / 10px 10px no-repeat; opacity: .85; }
.lines p { letter-spacing: 0; word-spacing: .04em; }
