/* /event/hmn-2027: the National Music Day event page.
   Base colours and type come from /page.css. --tint is the event colour (#8E44AD, EVENT_HMN_2027.md §1.6).
   The "stage" blocks (hero, pianika, dress-up) are dark purple in both themes; text blocks follow light/dark.
   Motion: transform and opacity only, all of it off under prefers-reduced-motion. Interactive parts are [hidden]
   in the HTML and shown by hmn-2027.js, so the page reads completely without JavaScript. */
:root { --tint: #8e44ad; --tint-soft: #e6d2f0; --night: #2b1840; --night-2: #432a63; --curtain: #c0394b; --curtain-2: #8f2233; --gold: #f8d87d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tint: #d3a6e6; --tint-soft: #3a2a48; } }
:root[data-theme="dark"] { --tint: #d3a6e6; --tint-soft: #3a2a48; }

body.hmn main { max-width: none; padding: 0; }
body.hmn [hidden] { display: none !important; } /* grid/flex blocks below must still obey [hidden] (no-JS view) */
.inner { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.inner.wide { max-width: 980px; }
.top .crumb { margin-left: auto; white-space: nowrap; font-size: 15px; font-weight: 800; color: var(--tint); text-decoration: none; padding: 8px 4px; }
.top .crumb:hover { text-decoration: underline; }
.top .crumb + .lang { margin-left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn:focus-visible, a:focus-visible, .lang:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
kbd { display: inline-block; min-width: 1.6em; padding: 0 .35em; border-radius: 6px; background: rgba(255, 255, 255, .14); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25); font: 800 .85em/1.6 "Baloo 2", system-ui; text-align: center; }

/* ---------- hero: a stage with a valance, lights and a curtain that opens once ---------- */
.hero { position: relative; overflow: hidden; color: #fff; padding: 46px 0 34px;
  background: radial-gradient(70% 60% at 50% 0%, rgba(211, 166, 230, .35), transparent 70%), linear-gradient(180deg, var(--night-2), var(--night)); }
.valance { position: absolute; inset: 0 0 auto; height: 26px; background: var(--curtain-2);
  background-image: radial-gradient(circle at 20px 12px, var(--gold) 4px, transparent 5px); background-size: 52px 26px; box-shadow: 0 6px 0 rgba(0, 0, 0, .18); }
.hero .eyebrow { margin: 8px 0 0; font-weight: 800; color: var(--gold); font-size: 15px; letter-spacing: .02em; }
.hero h1 { color: #fff; font-size: clamp(34px, 7vw, 54px); margin: 6px 0 10px; text-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.hero p { color: #f2e8f8; }
.hero .lead { font-size: 19px; color: #fff; }
.hero-stage { position: relative; margin: 20px 0 8px; border-radius: 22px; overflow: hidden; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .6); background: var(--night-2); }
.hero-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.curtain { position: absolute; top: 0; bottom: 0; width: 51%; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--curtain) 0 22px, var(--curtain-2) 22px 34px, var(--curtain) 34px 48px);
  animation: curtain 1.5s cubic-bezier(.7, 0, .2, 1) .35s forwards; }
.curtain-l { left: 0; transform-origin: left; }
.curtain-r { right: 0; transform-origin: right; animation-name: curtain-r; }
@keyframes curtain { to { transform: translateX(-102%); } }
@keyframes curtain-r { to { transform: translateX(102%); } }
.floaters { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.floaters i { position: absolute; bottom: 12%; font-style: normal; font-size: clamp(18px, 3.4vw, 30px); color: var(--gold); opacity: 0;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .35); animation: float 6s ease-in-out infinite; }
.floaters i:nth-child(1) { left: 48%; animation-delay: 1.8s; }
.floaters i:nth-child(2) { left: 58%; animation-delay: 2.8s; color: #9fe0ff; }
.floaters i:nth-child(3) { left: 68%; animation-delay: 3.6s; color: #ffb3c7; }
.floaters i:nth-child(4) { left: 78%; animation-delay: 4.6s; }
.floaters i:nth-child(5) { left: 86%; animation-delay: 5.4s; color: #b6f0b0; }
.floaters i:nth-child(6) { left: 53%; animation-delay: 6.6s; color: #fff; }
@keyframes float { 0% { opacity: 0; transform: translate(0, 0) rotate(-8deg); } 15% { opacity: 1; } 80% { opacity: .9; } 100% { opacity: 0; transform: translate(18px, -190px) rotate(10deg); } }
.weeks-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 0; }
.weeks-nav a { display: flex; flex-direction: column; padding: 12px 16px; border-radius: 18px; text-decoration: none; color: #fff; font-weight: 600;
  background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18); transition: transform .15s ease, background-color .15s ease; }
.weeks-nav a b { color: var(--gold); font-size: 14px; }
.weeks-nav a:hover { background: rgba(255, 255, 255, .18); transform: translateY(-2px); }

/* ---------- pianika ---------- */
.play { padding: 44px 0 36px; }
.play h2, .week h2, .prizes h2, .closing h2 { font-size: clamp(26px, 4.4vw, 34px); line-height: 1.2; margin: 0 0 6px; color: var(--tint); }
.play .sub { margin: 0 0 18px; color: var(--text-2); }
.play .sub kbd { background: var(--tint-soft); color: var(--text); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12); }
.pk-card { position: relative; border-radius: 28px; padding: 18px 16px 16px; color: #fff;
  background: radial-gradient(60% 80% at 50% 0%, rgba(211, 166, 230, .28), transparent 70%), linear-gradient(180deg, var(--night-2), var(--night));
  box-shadow: 0 24px 50px -24px rgba(43, 24, 64, .7); }
.pk-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-mode { flex: 1 1 200px; min-height: 48px; padding: 8px 16px; border: 0; border-radius: 999px; cursor: pointer; font: 800 16px/1.2 "Baloo 2", system-ui;
  color: #fff; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22); }
.pk-mode[aria-pressed="true"] { background: var(--gold); color: #3a2154; box-shadow: 0 4px 0 #d9b24f; }
.pk-top { display: flex; align-items: flex-end; gap: 12px; margin: 14px 0 10px; min-height: 92px; }
.pk-alpa { position: relative; flex: 0 0 auto; width: 74px; aspect-ratio: 443.592 / 612.558; }
.pk-alpa .pose { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .15s ease; }
.pk-alpa .pose-sing { opacity: 0; }
.pk-card.singing .pose-sing { opacity: 1; }
.pk-card.singing .pose-idle { opacity: 0; }
.pk-card.cheer .pk-alpa { animation: hop .5s ease 2; }
@keyframes hop { 50% { transform: translateY(-14px) rotate(-4deg); } }
.pk-bubble { position: relative; flex: 1; margin: 0 0 14px; padding: 10px 14px; border-radius: 18px; background: #fff; color: #3a2154; font-weight: 700; line-height: 1.35; min-height: 48px; }
.pk-bubble::before { content: ""; position: absolute; left: -8px; bottom: 12px; border: 8px solid transparent; border-right-color: #fff; border-left: 0; }
.pk-strip { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 2px; margin: 0 0 10px; padding: 10px 10px; border-radius: 16px; background: rgba(0, 0, 0, .22); }
.pk-strip li { position: relative; min-width: 26px; padding: 2px 4px; border-radius: 8px; text-align: center; font: 800 19px/1.3 "Baloo 2", system-ui; color: rgba(255, 255, 255, .62); transition: transform .12s ease, background-color .12s ease; }
.pk-strip li.bar { min-width: 10px; padding: 2px 0; color: rgba(255, 255, 255, .35); }
.pk-strip li.done { color: var(--gold); }
.pk-strip li.now { background: var(--gold); color: #3a2154; transform: translateY(-2px) scale(1.12); }
.pk-strip .dot, .pk-key .dot { position: absolute; top: 0; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: currentColor; }
.pk-strip li .dot { top: 1px; }
.pk-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.pk-actions .btn { padding: 10px 20px; }
.pk-keys { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; padding: 12px 10px 14px; border-radius: 20px; background: #1d1030; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .06); touch-action: none; user-select: none; -webkit-user-select: none; }
.pk-key { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0; height: clamp(150px, 30vw, 210px); padding: 0 0 12px;
  border: 0; border-radius: 0 0 12px 12px; cursor: pointer; color: #2d2440; background: linear-gradient(180deg, #f3eef8, #fff 30%);
  box-shadow: inset 0 -8px 0 #ddd3e8, 0 3px 0 #0e0718; transition: transform .06s ease, box-shadow .06s ease; -webkit-tap-highlight-color: transparent; }
.pk-key b { position: relative; font: 800 clamp(22px, 4.6vw, 32px)/1 "Baloo 2", system-ui; padding-top: 8px; }
.pk-key small { font-size: 13px; font-weight: 700; color: #6b5a82; }
.pk-key.down { transform: translateY(3px); box-shadow: inset 0 -3px 0 #ddd3e8, 0 0 0 #0e0718; background: linear-gradient(180deg, #e9dcf5, #f7f0fd 40%); }
.pk-key.target { background: linear-gradient(180deg, #fff3c4, var(--gold) 70%); box-shadow: inset 0 -8px 0 #e3b94a, 0 3px 0 #0e0718, 0 0 0 3px var(--gold); animation: glow 1.1s ease-in-out infinite; }
.pk-key.hint { background: linear-gradient(180deg, #e7d5f5, #c9a6e6); }
.pk-key.miss { animation: nudge .28s ease; }
@keyframes glow { 50% { box-shadow: inset 0 -8px 0 #e3b94a, 0 3px 0 #0e0718, 0 0 0 6px rgba(248, 216, 125, .55); } }
@keyframes nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.spark { position: absolute; z-index: 3; pointer-events: none; font-style: normal; font-weight: 800; font-size: 22px; animation: spark .9s ease-out forwards; }
@keyframes spark { from { opacity: 1; transform: translate(-50%, 0) scale(.7); } to { opacity: 0; transform: translate(calc(-50% + var(--dx)), -120px) rotate(var(--r)) scale(1.25); } }
.pk-source { margin: 12px 2px 0; font-size: 14px; color: #e3d4ef; line-height: 1.45; }

/* ---------- weeks ---------- */
.week { padding: 40px 0 8px; }
.week .when { margin: 0 0 2px; font-weight: 800; color: var(--tint); }
.composers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0 6px; }
.composer { position: relative; padding: 20px 20px 18px; border-radius: 26px; background: var(--surface); border-top: 6px solid var(--tint);
  box-shadow: 0 2px 0 rgba(4, 98, 77, .08), 0 12px 32px -12px rgba(14, 58, 48, .28); transition: transform .18s ease; }
.composer:hover { transform: translateY(-3px) rotate(-.6deg); }
.composer .emblem { width: 56px; height: 56px; color: var(--tint); }
.composer h3 { margin: 6px 0 8px; font-size: 22px; color: var(--text); }
.songs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.songs li { line-height: 1.4; }
.chip { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--tint-soft); color: var(--text); white-space: nowrap; }
.try-song { margin-left: 2px; padding: 3px 12px; border: 0; border-radius: 999px; cursor: pointer; font: 800 13px/1.6 "Baloo 2", system-ui; background: var(--gold); color: #3a2154; box-shadow: 0 2px 0 #d9b24f; }

.table-wrap { overflow-x: auto; margin: 12px 0 4px; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text-2); font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
td:first-child { font-weight: 800; }

/* map: stylised islands (not an official map), pins from the table above */
.map-wrap { margin: 14px 0 6px; }
.map-hint { margin: 0 0 8px; color: var(--text-2); font-weight: 600; }
.map { position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 1000 / 440;
  background: radial-gradient(80% 90% at 50% 40%, #7fc4ea, #4a95c9); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .25), 0 18px 40px -22px rgba(14, 58, 48, .5); }
.map-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.isles path, .isles ellipse { fill: #8fd6a6; stroke: #4f9f73; stroke-width: 3; stroke-linejoin: round; }
.route { stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 12; opacity: .9; }
.pins { position: absolute; inset: 0; }
.pin { position: absolute; width: 44px; height: 44px; margin: -40px 0 0 -22px; padding: 0; border: 0; background: none; cursor: pointer; }
.pin::before { content: ""; position: absolute; left: 7px; top: 2px; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--curtain); box-shadow: 0 3px 0 var(--curtain-2); transition: transform .18s ease, background-color .18s ease; }
.pin span { position: absolute; left: 0; right: 0; top: 7px; text-align: center; color: #fff; font: 800 15px/1 "Baloo 2", system-ui; }
.pin[aria-pressed="true"]::before { background: var(--gold); box-shadow: 0 3px 0 #d9b24f; transform: rotate(-45deg) scale(1.18); }
.pin[aria-pressed="true"] span { color: #3a2154; }
.pin.visited:not([aria-pressed="true"])::before { background: var(--tint); box-shadow: 0 3px 0 #5e2a76; }
.walker { position: absolute; left: 0; top: 0; width: clamp(34px, 6vw, 56px); height: auto; pointer-events: none; z-index: 2;
  transition: transform .9s cubic-bezier(.5, 0, .3, 1); filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .25)); }
.map-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; }
.map-chips button { min-height: 44px; padding: 6px 14px; border: 0; border-radius: 999px; cursor: pointer; font: 800 15px/1.2 "Baloo 2", system-ui;
  background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 2px var(--line); }
.map-chips button b { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%; background: var(--curtain); color: #fff; font-size: 13px; }
.map-chips button[aria-pressed="true"] { background: var(--gold); color: #3a2154; box-shadow: 0 3px 0 #d9b24f; }
.map-chips button[aria-pressed="true"] b { background: #3a2154; }
.song-card { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; margin: 12px 0 0; padding: 16px 18px; border-radius: 22px;
  background: var(--surface); border-left: 6px solid var(--tint); box-shadow: 0 2px 0 rgba(4, 98, 77, .08), 0 12px 32px -12px rgba(14, 58, 48, .28); min-height: 96px; }
.song-card .num { grid-row: span 3; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--tint-soft); color: var(--tint); font: 800 24px/1 "Baloo 2", system-ui; }
.song-card h3 { margin: 0; font-size: 22px; line-height: 1.2; color: var(--text); }
.song-card p { margin: 0; color: var(--text-2); }
.song-card .nav { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 8px; }
.song-card .nav button { min-height: 40px; padding: 4px 14px; border: 0; border-radius: 999px; cursor: pointer; font: 800 15px/1 "Baloo 2", system-ui; background: var(--tint-soft); color: var(--text); }
.song-card .nav button:disabled { opacity: .45; cursor: default; }
.song-card.pop { animation: pop .35s ease; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: .4; } }

/* ---------- prizes: dress Alpanica up ---------- */
.prizes { padding: 40px 0 8px; }
.dress { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: center; margin: 16px 0 6px; padding: 18px; border-radius: 28px; color: #fff;
  background: radial-gradient(55% 70% at 30% 20%, rgba(248, 216, 125, .25), transparent 70%), linear-gradient(180deg, var(--night-2), var(--night)); }
.dress-stage { position: relative; }
.dress-alpa { position: relative; width: min(100%, 260px); margin: 0 auto; aspect-ratio: 443.592 / 612.558; z-index: 1; }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .25s ease, transform .45s cubic-bezier(.3, 1.5, .5, 1); }
.l-back, .l-coat, .l-beret, .l-happy { opacity: 0; }
.l-beret { transform: translateY(-26%) rotate(-8deg); }
.l-coat, .l-back { transform: translateY(6%) scale(.96); }
.dress.beret .l-beret { opacity: 1; transform: none; }
.dress.coat .l-coat, .dress.coat .l-back { opacity: 1; transform: none; }
.dress.beret .l-happy, .dress.coat .l-happy { opacity: 1; }
.dress.beret .l-idle, .dress.coat .l-idle { opacity: 0; }
.dress-glow { position: absolute; left: 10%; right: 10%; bottom: 0; height: 18%; border-radius: 50%; background: radial-gradient(closest-side, rgba(248, 216, 125, .55), transparent); }
.dress.bump .dress-alpa { animation: hop .45s ease; }
.dress-q { margin: 0 0 8px; color: #fff; font-weight: 800; }
.dress-btn { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 10px; padding: 8px 14px 8px 8px; border: 0; border-radius: 20px; cursor: pointer; text-align: left;
  font: inherit; color: #fff; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .2); transition: transform .12s ease, background-color .12s ease; }
.dress-btn img { width: 58px; height: auto; border-radius: 14px; background: rgba(255, 255, 255, .9); }
.dress-btn strong { display: block; line-height: 1.2; }
.dress-btn small { color: #e3d4ef; font-weight: 700; }
.dress-btn:active { transform: scale(.98); }
.dress-btn[aria-pressed="true"] { background: var(--gold); color: #3a2154; box-shadow: 0 4px 0 #d9b24f; }
.dress-btn[aria-pressed="true"] small { color: #5e3d7a; }
.dress-msg { margin: 4px 0 0; min-height: 1.6em; color: var(--gold); font-weight: 800; }
.items { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0 0; padding: 0; list-style: none; }
.items li { background: var(--tint-soft); border-radius: 22px; padding: 12px 12px 14px; text-align: center; }
.items img { width: 100%; max-width: 200px; height: auto; display: block; margin: 0 auto 6px; }
.items strong { display: block; color: var(--text); }
.items span.sub { display: block; color: var(--text-2); font-size: 15px; line-height: 1.35; }

/* ---------- closing ---------- */
.closing { padding: 28px 0 8px; }
.closing h2 { margin-top: 28px; }
ol.steps { padding-left: 22px; }
ol.steps li { margin: 4px 0; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 4px; }
.stores .btn { text-align: center; min-width: 190px; }

/* ---------- scroll reveal (only for blocks that start below the fold; added by JS) ---------- */
.pre { opacity: 0; transform: translateY(22px); }
.pre[data-reveal="pop"] { transform: translateY(26px) scale(.94); }
.pre.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .7s cubic-bezier(.2, .9, .3, 1.15); transition-delay: calc(var(--d, 0) * 90ms); }

@media (max-width: 640px) {
  .hero { padding-top: 40px; }
  .composers, .dress { grid-template-columns: 1fr; }
  .dress-alpa { width: min(70%, 220px); }
  .pk-keys { gap: 4px; padding: 10px 6px 12px; }
  .pk-key small { font-size: 11px; }
  .pin { width: 28px; height: 30px; margin: -28px 0 0 -14px; }
  .pin::before { left: 3px; top: 2px; width: 22px; height: 22px; }
  .pin span { top: 5px; font-size: 12px; }
}
@media (max-width: 420px) {
  .weeks-nav { grid-template-columns: 1fr; }
  .stores .btn { flex: 1 1 100%; }
  .items { gap: 10px; }
  .pk-strip li { min-width: 22px; font-size: 17px; }
  .top { gap: 8px; }
  .top > a:first-child { font-size: 18px; gap: 8px; }
  .top .crumb { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .curtain, .floaters { display: none; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .pre { opacity: 1; transform: none; }
}
