﻿:root {
  color-scheme: dark;
  --ink: #231923;
  --paper: #f9e8c2;
  --lime: #e3fb63;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  color: var(--paper);
  background: #21191f;
  font-synthesis: weight;
}
* { box-sizing: border-box }
body {
  margin: 0;
  min-height: 100svh;
  background: radial-gradient(ellipse at 78% 0, #c05e3757, transparent 40rem),
    radial-gradient(ellipse at 3% 100%, #7c2a5c55, transparent 44rem), #21191f;
}
button {
  appearance: none;
  border: 0;
  font: inherit;
  font-weight: 900;
  color: #271928;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  min-height: 48px;
  padding: 10px 21px 12px;
  background: transparent;
  filter: drop-shadow(0 3px 2px #1e11265e);
}
button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 12px;
  background: var(--skin-ticket-paper, linear-gradient(#fff0cf, #dbaa74)) center / 100% 100% no-repeat;
}
button:hover { filter: drop-shadow(0 3px 2px #1e11265e) brightness(1.12) }
button:active { transform: translateY(2px); filter: brightness(.96) }
button:disabled { opacity: .66; cursor: wait }
:focus-visible { outline: 2px solid #fff5dc; outline-offset: 4px }
[hidden] { display: none !important }
.shell { width: min(1136px, calc(100% - 56px)); margin: auto; padding: 19px 0 17px }
@media (min-width: 661px) {
  .shell.playing { width: min(1136px, calc(100% - 56px), max(480px, calc((100svh - 212px) * 16 / 9))) }
}
.mast { min-height: 50px; display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-bottom: 10px }
.playing .mast { display: none }
.sound { font-size: 14px; min-height: 39px; min-width: 108px; padding: 6px 16px 9px }
.audio-actions { display: flex; gap: 6px; align-items: center }
.audio-actions > button { min-width: auto }
.sound[aria-pressed="true"]::before, .play::before { background-image: var(--skin-ticket-lime, linear-gradient(#edff86, #b6c942)) }
.cabinet {
  border-radius: 17px;
  border: 1px solid #ffffff2b;
  background: #261a29;
  box-shadow: 0 27px 70px #10070db8, 0 0 0 5px #140d15;
  overflow: hidden;
}
.status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(170deg, #412e42, #2a1e2d 53%, #241926);
  color: #f7e8cc;
  padding: 8px clamp(12px, 2.1vw, 26px);
  min-height: 51px;
  font-size: 14px;
  font-weight: 850;
}
.hearts { display: flex; gap: 3px; align-items: center }
.hearts i {
  width: 23px;
  height: 22px;
  display: block;
  background: var(--skin-heart) center / contain no-repeat;
  filter: drop-shadow(0 2px 2px #10091299);
}
.hearts i.lost { filter: grayscale(1); opacity: .25 }
.status button { min-height: 31px; padding: 3px 13px 6px; font-size: 12px }
.pause-icon { width: 40px; position: relative }
.pause-icon::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  border-inline: 3px solid #38202e;
}
.stage { position: relative; isolation: isolate; overflow: hidden }
.home { color: var(--ink); display: grid; grid-template-columns: 1fr 1.17fr; min-height: 480px; background: #f7e0ac }
.copy {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: clamp(28px, 5.5vw, 64px) clamp(14px, 2.4vw, 28px) clamp(28px, 5.5vw, 64px) clamp(23px, 5.2vw, 64px);
  background: linear-gradient(120deg, #ffecc8ed, #f9dfb3e8), var(--skin-stage-boil) center / cover;
  box-shadow: inset -8px 0 23px #5d2b2726;
}
h1 { font-size: clamp(60px, 8.4vw, 105px); letter-spacing: -.115em; line-height: .95; margin: 0 0 17px; font-weight: 1000 }
h1 span { display: block; color: #53294e; filter: drop-shadow(0 2px 0 #fff4dc) }
h1 span+span { color: #9a352e }
.actions { display: flex; gap: 9px; flex-wrap: wrap }
.play { font-size: 18px; padding: 12px 24px 14px }
.cover { min-width: 0; position: relative; background: #ee8d3d }
.cover canvas { width: 100%; height: 100%; position: absolute; inset: 0; display: block }
.game { position: relative; background: #1c121f; container-type: inline-size }
#arena { display: block; width: 100%; aspect-ratio: 800/450; touch-action: none; outline-offset: -4px }
.timer {
  position: relative;
  height: 12px;
  background: #150d18;
  border-block: 1px solid #ffffff22;
  overflow: hidden;
}
.timer span {
  height: 100%;
  display: block;
  background: linear-gradient(0deg, #b3ce44, #e8fc86);
  width: 100%;
  transform-origin: left;
}
.timer span.urgent { background: linear-gradient(0deg, #d44151, #ff9562) }
.timer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to right, transparent 0 calc(10% - 2px), #271c2c 0 10%);
}
.fry-meter {
  position: absolute;
  top: calc(12px + 13.8cqw);
  left: 26%;
  width: 48%;
  height: clamp(13px, 3cqw, 27px);
  background: linear-gradient(180deg, #1b131b, #4e3d45);
  border: 2px solid #f0d7a8;
  border-radius: 4px;
  box-shadow: 0 3px 10px #241223b0;
  pointer-events: none;
}
.fry-meter::before,.fry-meter::after { content: ""; position: absolute }
.fry-meter::before {
  inset: 0 auto 0 var(--start);
  width: var(--window);
  background: linear-gradient(180deg, #efff9b, #9db64b);
}
.fry-meter::after {
  inset: -4px auto -4px var(--head);
  width: 4px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: #ff945c;
  box-shadow: 0 0 0 1px #261525, 0 0 7px #fa8a60ad;
}
.round-tag {
  position: absolute;
  left: 50%;
  top: calc(12px + 1.5cqw);
  transform: translateX(-50%) rotate(-4deg);
  font-size: clamp(20px, 4.7cqw, 43px);
  font-weight: 1000;
  color: #231923;
  line-height: 1;
  padding: .37em .88em .44em;
  background: var(--skin-ticket-lime, linear-gradient(#e4ff84, #bcca43)) center / 100% 100% no-repeat;
  filter: drop-shadow(0 4px 5px #29172b80);
  white-space: nowrap;
  pointer-events: none;
}
.veil { position: absolute; inset: 0; display: grid; place-items: center; background: #171019a8; padding: 14px }
.ticket {
  width: min(100%, 440px);
  color: var(--ink);
  background: linear-gradient(135deg, #ffedcfe8, #ebc68ae8), var(--skin-stage-boil) center / cover;
  text-align: center;
  border: 1px solid #fff3d6;
  border-radius: 16px;
  box-shadow: 0 16px 40px #170c20aa;
  padding: clamp(14px, 4vw, 29px);
  max-height: 100%;
  overflow: auto;
}
.ticket h2 { margin: 0 0 10px; font-size: clamp(23px, 5vw, 47px); letter-spacing: -.085em; line-height: 1.1 }
.ticket p { margin: 0 0 17px; font-weight: 750; line-height: 1.55 }
.ticket .actions { justify-content: center }
.sound-editor { border: 0; padding: 0; background: transparent; width: min(510px, calc(100% - 24px)); max-height: calc(100% - 24px) }
.sound-editor::backdrop { background: #171019b8 }
.sound-editor .ticket { width: 100%; max-height: calc(100svh - 24px) }
.sound-editor h2 { font-size: clamp(23px, 6vw, 31px) }
.sound-rows { display: grid; gap: 14px; margin-bottom: 12px; text-align: left }
.sound-row { display: grid; gap: 4px; grid-template-columns: 1fr auto auto; align-items: center }
.sound-row label { font-weight: 900 }
.sound-row input { grid-column: 1 / -1; min-width: 0; width: 100%; color-scheme: light; font: inherit; font-size: 13px }
.sound-row input::file-selector-button { color: #291923; background: #fff2d8; border: 1px solid #765262; border-radius: 4px; padding: 5px 8px; margin-right: 7px; cursor: pointer }
.sound-row button { min-height: 32px; font-size: 12px; padding: 5px 10px 7px }
.sound-row small { grid-column: 1 / -1; min-width: 0; color: #683c4d; overflow-wrap: anywhere }
.practice-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin: 14px 0 }
.practice-list button:last-child { grid-column: 1/-1 }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
@media(max-width:660px) {
  .shell { width: calc(100% - 24px); padding-top: 8px }
  .mast { min-height: 44px }
  .cabinet { border-radius: 12px }
  .home { min-height: 0; display: flex; flex-direction: column }
  .copy { padding: 20px 18px 18px; width: 100% }
  h1 { font-size: clamp(43px, 11.7vw, 77px); margin-bottom: 11px }
  h1 span { display: inline-block }
  .cover { height: clamp(224px, 62vw, 360px) }
  .status { font-size: 12px; padding: 6px 9px; min-height: 42px }
  .hearts i { width: 17px; height: 17px }
}
