/*
 * 수험생 10초 챌린지
 * 7단계 UI 스타일시트
 * Mobile-first / PWA-like / iOS & Android safe-area 대응
 */

:root {
  --orange-700: #e85d00;
  --orange-600: #ff6a00;
  --orange-500: #ff7a32;
  --orange-400: #ff9659;
  --orange-300: #ffb477;
  --orange-200: #ffd4b5;
  --orange-100: #ffe9d6;

  --cream-50: #fffdf8;
  --cream-100: #fff9f1;
  --cream-200: #fff4e6;
  --cream-300: #ffe9d1;

  --white: #ffffff;
  --brown-950: #2b1c15;
  --brown-900: #362821;
  --brown-800: #4a3328;
  --brown-700: #665044;
  --brown-600: #76645a;
  --brown-400: #a28f84;
  --brown-200: #d8ccc4;

  --gold-500: #ffc744;
  --gold-300: #ffe08c;
  --red-600: #d94b43;
  --red-500: #f05252;
  --red-100: #ffe4e1;
  --green-600: #278b61;
  --green-500: #39a875;
  --green-100: #daf3e8;
  --blue-100: #eaf4ff;

  --shadow-xs: 0 2px 8px rgba(74, 51, 40, 0.08);
  --shadow-sm: 0 7px 20px rgba(104, 63, 35, 0.12);
  --shadow-md: 0 14px 36px rgba(104, 63, 35, 0.16);
  --shadow-lg: 0 24px 60px rgba(74, 51, 40, 0.22);

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  --screen-max-width: 520px;
  --tap-min: 44px;
  --font: "Noto Sans KR", Pretendard, SUIT, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--cream-200);
}

html {
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  color: var(--brown-900);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  user-select: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
input,
label {
  touch-action: manipulation;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

img,
svg {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3,
dl,
dd {
  margin: 0;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgba(255, 106, 0, 0.38);
  outline-offset: 3px;
}

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

.noscript-notice {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 32px;
  color: var(--brown-900);
  font-weight: 800;
  text-align: center;
  background: var(--cream-200);
}

/* 앱 셸 */
.app-shell {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 196, 145, 0.34), transparent 29%),
    radial-gradient(circle at 92% 22%, rgba(255, 225, 190, 0.7), transparent 32%),
    linear-gradient(180deg, var(--cream-100) 0%, var(--cream-200) 58%, #ffead7 100%);
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.52;
  background-image:
    radial-gradient(circle, rgba(255, 122, 50, 0.16) 0 2px, transparent 2.5px),
    radial-gradient(circle, rgba(255, 199, 68, 0.15) 0 1.5px, transparent 2px);
  background-position: 14px 18px, 42px 52px;
  background-size: 54px 54px, 74px 74px;
  pointer-events: none;
}

.background-decor {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.decor-note {
  position: absolute;
  color: rgba(255, 122, 50, 0.22);
  font-size: clamp(30px, 8vw, 48px);
  font-weight: 900;
  line-height: 1;
  filter: drop-shadow(0 5px 10px rgba(255, 122, 50, 0.08));
  animation: decor-float 5.4s ease-in-out infinite;
}

.decor-note--1 {
  top: calc(var(--safe-top) + 13%);
  left: -2%;
  transform: rotate(-16deg);
}

.decor-note--2 {
  right: -1%;
  bottom: 22%;
  animation-delay: -2.6s;
  transform: rotate(14deg);
}

.decor-dot {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 3px solid rgba(255, 122, 50, 0.19);
  border-radius: 50%;
}

.decor-dot--1 {
  top: 11%;
  right: 8%;
}

.decor-dot--2 {
  left: 7%;
  bottom: 13%;
  width: 9px;
  height: 9px;
}

.decor-wave {
  position: absolute;
  top: 44%;
  right: -45px;
  width: 126px;
  height: 76px;
  opacity: 0.28;
  border: 5px solid transparent;
  border-top-color: var(--orange-300);
  border-radius: 50%;
  transform: rotate(86deg);
}

.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.screen.is-active {
  display: block;
}

.screen__content {
  width: min(100%, var(--screen-max-width));
  height: 100%;
  margin-inline: auto;
  padding-top: max(14px, var(--safe-top));
  padding-right: max(18px, var(--safe-right));
  padding-bottom: max(14px, var(--safe-bottom));
  padding-left: max(18px, var(--safe-left));
}

.screen__content--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* 공통 버튼 */
.primary-button,
.secondary-button,
.secondary-text-button,
.text-button,
.ranking-link-button,
.sound-toggle,
.icon-button,
.sheet-close-button {
  -webkit-appearance: none;
  appearance: none;
}

.primary-button,
.secondary-button {
  position: relative;
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 18px;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.03em;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease,
    opacity 140ms ease;
}

.primary-button {
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 46%),
    linear-gradient(135deg, var(--orange-500), var(--orange-600));
  box-shadow:
    0 9px 0 var(--orange-700),
    0 17px 30px rgba(232, 93, 0, 0.23);
}

.primary-button:not(:disabled):active {
  transform: translateY(6px) scale(0.985);
  box-shadow:
    0 3px 0 var(--orange-700),
    0 8px 18px rgba(232, 93, 0, 0.18);
}

.primary-button:disabled {
  color: #a99589;
  background: #eadfd7;
  box-shadow: 0 5px 0 #d7c9c0;
  opacity: 0.86;
}

.secondary-button {
  color: var(--orange-700);
  border: 2px solid var(--orange-200);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-xs);
}

.secondary-button:active {
  transform: scale(0.985);
  background: var(--orange-100);
}

.text-button,
.secondary-text-button,
.ranking-link-button {
  min-height: var(--tap-min);
  padding: 8px 10px;
  color: var(--brown-700);
  font-weight: 800;
  background: transparent;
}

.text-button {
  color: var(--orange-700);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ranking-link-button {
  width: 100%;
  color: var(--orange-700);
  font-size: 15px;
}

.ranking-link-button::after {
  content: "  ›";
  font-size: 20px;
  vertical-align: -1px;
}

.icon-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 122, 50, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(12px);
}

/* 시작 화면 */
.screen--start {
  overflow: hidden;
}

.start-layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.start-layout::-webkit-scrollbar {
  display: none;
}

.brand-header {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 2px 18px 0;
}

.official-logo {
  width: min(74vw, 320px);
  height: auto;
  max-height: 76px;
  object-fit: contain;
}

.start-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-height: 0;
}

.title-group {
  position: relative;
  z-index: 3;
  text-align: center;
}

.eyebrow {
  color: var(--orange-700);
  font-size: clamp(11px, 3vw, 13px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
  color: var(--brown-900);
  font-size: clamp(23px, 7.5vw, 36px);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 1.08;
}

.game-title strong {
  color: var(--orange-600);
  font-size: 1.12em;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.85);
}

.game-tagline {
  margin-top: 5px;
  color: var(--brown-700);
  font-size: clamp(13px, 3.5vw, 15px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-characters {
  position: relative;
  z-index: 2;
  display: flex;
  height: clamp(112px, 20.5vh, 170px);
  align-items: flex-end;
  justify-content: center;
  margin: -2px auto -6px;
  width: min(100%, 390px);
}

.hero-character {
  position: absolute;
  bottom: 0;
  width: clamp(142px, 40vw, 195px);
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 13px 16px rgba(91, 51, 28, 0.14));
  transform-origin: center bottom;
}

.hero-character--sori {
  left: 4%;
  animation: hero-bounce 2.8s ease-in-out infinite;
}

.hero-character--jieum {
  right: 3%;
  width: clamp(136px, 38vw, 186px);
  animation: hero-bounce 3.1s ease-in-out -1.4s infinite;
}

.ranking-cutoff-card {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 199, 68, 0.58);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.93), rgba(255, 248, 225, 0.93));
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.ranking-cutoff-card__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  font-size: 24px;
  background: linear-gradient(145deg, #fff8cf, #ffe38e);
  box-shadow: inset 0 0 0 1px rgba(255, 199, 68, 0.35);
}

.ranking-cutoff-card__copy {
  min-width: 0;
}

.ranking-cutoff-card h2 {
  color: var(--brown-600);
  font-size: 12px;
  font-weight: 800;
}

.ranking-cutoff-card__score {
  overflow: hidden;
  color: var(--brown-900);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-form {
  display: grid;
  gap: 9px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
}

.form-field {
  display: grid;
  gap: 5px;
}

.form-field > label {
  padding-left: 2px;
  color: var(--brown-800);
  font-size: 13px;
  font-weight: 900;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  min-height: 49px;
  padding: 12px 48px 12px 14px;
  border: 1.5px solid #e7d8cd;
  border-radius: 15px;
  outline: none;
  color: var(--brown-900);
  font-size: 16px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 2px rgba(74, 51, 40, 0.04);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease;
  user-select: text;
}

.input-wrap input::placeholder {
  color: #ad9d93;
  font-weight: 500;
}

.input-wrap input:focus {
  border-color: var(--orange-500);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(255, 122, 50, 0.13);
}

.input-wrap input[aria-invalid="true"] {
  border-color: var(--red-500);
  box-shadow: 0 0 0 4px rgba(240, 82, 82, 0.1);
}

.input-counter {
  position: absolute;
  top: 50%;
  right: 13px;
  color: var(--brown-400);
  font-size: 12px;
  font-weight: 700;
  transform: translateY(-50%);
}

.field-help,
.field-error {
  padding-left: 2px;
  font-size: 11px;
  line-height: 1.35;
}

.field-help {
  color: var(--brown-600);
}

.field-error {
  color: var(--red-600);
  font-weight: 700;
}

.consent-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 6px;
  align-items: center;
  padding-top: 1px;
}

.check-row {
  display: flex;
  min-height: var(--tap-min);
  align-items: center;
  gap: 9px;
  color: var(--brown-700);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.check-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.custom-check {
  position: relative;
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  border: 2px solid #cbb9ad;
  border-radius: 8px;
  background: var(--white);
  transition: all 150ms ease;
}

.check-row input:checked + .custom-check {
  border-color: var(--orange-600);
  background: var(--orange-600);
  box-shadow: 0 4px 10px rgba(255, 106, 0, 0.22);
}

.check-row input:checked + .custom-check::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 7px;
  width: 5px;
  height: 9px;
  border: solid var(--white);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.check-row input:focus-visible + .custom-check {
  outline: 3px solid rgba(255, 106, 0, 0.28);
  outline-offset: 3px;
}

.required-label {
  margin-left: 3px;
  color: var(--orange-700);
  font-size: 10px;
}

.consent-area > .field-error {
  grid-column: 1 / -1;
}

.participant-form .primary-button {
  margin-top: 1px;
}

.start-footer {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  padding-inline: 2px;
}

.secondary-text-button,
.sound-toggle {
  min-height: var(--tap-min);
  color: var(--brown-600);
  font-size: 13px;
  font-weight: 800;
  background: transparent;
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
}

/* 로딩 / 검증 */
.loading-character,
.verifying-character,
.offline-character {
  position: relative;
  width: clamp(150px, 45vw, 210px);
  filter: drop-shadow(0 18px 22px rgba(89, 53, 32, 0.15));
}

.loading-character {
  animation: loading-character 1.65s ease-in-out infinite;
}

.loading-title,
.screen--verifying h2,
.screen--offline h1 {
  margin-top: 16px;
  color: var(--brown-900);
  font-size: clamp(22px, 6.5vw, 30px);
  font-weight: 900;
  letter-spacing: -0.055em;
}

.loading-status,
#verifying-status,
.screen--offline p {
  max-width: 330px;
  margin-top: 10px;
  color: var(--brown-600);
  font-size: 14px;
  font-weight: 600;
}

.music-loader {
  display: flex;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 13px;
}

.music-loader span {
  width: 7px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--orange-500);
  animation: loader-bar 900ms ease-in-out infinite;
}

.music-loader span:nth-child(2) {
  animation-delay: 120ms;
}

.music-loader span:nth-child(3) {
  animation-delay: 240ms;
}

/* 카운트다운 */
.screen--countdown {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.98), rgba(255, 237, 218, 0.96));
}

.countdown-ready {
  color: var(--orange-600);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.countdown-number {
  margin-block: -4px 3px;
  color: var(--brown-900);
  font-size: clamp(112px, 34vw, 176px);
  font-weight: 900;
  letter-spacing: -0.1em;
  line-height: 1;
  text-shadow:
    0 9px 0 var(--white),
    0 17px 30px rgba(255, 122, 50, 0.22);
  transform-origin: center;
  animation: countdown-pop 780ms cubic-bezier(0.2, 0.85, 0.3, 1) both;
}

.countdown-character {
  width: clamp(125px, 38vw, 185px);
  margin-top: -12px;
  object-fit: contain;
  filter: drop-shadow(0 15px 18px rgba(79, 48, 30, 0.14));
}

/* 게임 화면 */
.screen--game {
  background:
    linear-gradient(180deg, #fff9f1 0%, #fff4e6 15%, #fffdf8 100%);
  touch-action: none;
}

.game-layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding-top: max(10px, var(--safe-top));
  padding-right: max(10px, var(--safe-right));
  padding-left: max(10px, var(--safe-left));
  touch-action: none;
}

.game-hud {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 8px;
  min-height: 72px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
}

.hud-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
}

.hud-item--time {
  background: linear-gradient(145deg, var(--orange-100), #fff6ee);
}

.hud-label {
  color: var(--brown-400);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.hud-value {
  color: var(--brown-900);
  font-variant-numeric: tabular-nums;
  font-size: clamp(23px, 7vw, 34px);
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 1.1;
}

.hud-item--time .hud-value {
  color: var(--orange-700);
}

.hud-value.is-bumped {
  animation: score-bump 180ms ease-out;
}

.hud-item--time.is-final {
  background: var(--red-100);
  animation: timer-pulse 520ms ease-in-out infinite alternate;
}

.hud-item--time.is-final .hud-value {
  color: var(--red-600);
}

.game-field {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 152, 90, 0.2);
  border-radius: 30px;
  outline: none;
  background:
    radial-gradient(circle at 20% 16%, rgba(255, 212, 181, 0.3), transparent 25%),
    radial-gradient(circle at 84% 70%, rgba(255, 231, 184, 0.38), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 252, 245, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.8),
    var(--shadow-md);
  touch-action: none;
  contain: strict;
}

.game-field::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.52;
  background-image:
    radial-gradient(circle at 20% 26%, rgba(255, 122, 50, 0.1) 0 2px, transparent 3px),
    radial-gradient(circle at 73% 58%, rgba(255, 199, 68, 0.11) 0 2px, transparent 3px),
    radial-gradient(circle at 48% 82%, rgba(255, 122, 50, 0.08) 0 1.5px, transparent 2px);
  background-size: 82px 82px, 108px 108px, 68px 68px;
  pointer-events: none;
}

.object-layer,
.effect-layer,
.game-character-layer {
  position: absolute;
  inset: 0;
}

.object-layer {
  z-index: 4;
}

.effect-layer {
  z-index: 6;
  pointer-events: none;
}

.game-character-layer {
  z-index: 2;
  pointer-events: none;
}

.game-cheer-character {
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: clamp(78px, 22vw, 112px);
  opacity: 0.58;
  object-fit: contain;
  filter: saturate(0.9) drop-shadow(0 8px 12px rgba(79, 48, 30, 0.1));
  transform: rotate(-5deg);
}

.final-rush {
  pointer-events: none;
  position: absolute;
  top: 11%;
  left: 50%;
  z-index: 12;
  padding: 8px 15px 9px;
  color: var(--white);
  border: 3px solid var(--white);
  border-radius: var(--radius-pill);
  font-size: clamp(19px, 6vw, 29px);
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--red-500), var(--orange-600));
  box-shadow:
    0 8px 0 var(--red-600),
    0 16px 30px rgba(217, 75, 67, 0.28);
  transform: translateX(-50%) rotate(-2deg);
  animation: final-rush-in 420ms cubic-bezier(0.15, 0.85, 0.2, 1.15) both;
  white-space: nowrap;
}

.combo-message {
  pointer-events: none;
  position: absolute;
  top: 6px;
  left: 50%;
  z-index: 11;
  padding: 7px 13px;
  color: var(--orange-700);
  border: 2px solid var(--orange-200);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  transform: translateX(-50%);
  animation: combo-message 620ms ease both;
  white-space: nowrap;
}

.game-object {
  position: absolute;
  z-index: 5;
  display: grid;
  width: clamp(50px, 15vw, 66px);
  aspect-ratio: 1;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translate3d(-50%, -50%, 0) scale(0.72);
  will-change: transform, opacity;
  touch-action: none;
  animation: object-spawn 170ms cubic-bezier(0.15, 0.85, 0.25, 1.25) forwards;
}

.game-object__visual {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--white);
  border: 4px solid var(--white);
  border-radius: 50%;
  font-size: clamp(26px, 8vw, 39px);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(145deg, var(--orange-400), var(--orange-600));
  box-shadow:
    0 8px 0 var(--orange-700),
    0 12px 20px rgba(232, 93, 0, 0.24);
}

.game-object__visual::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 12px;
  width: 28%;
  height: 18%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.48);
  transform: rotate(-28deg);
}

.game-object--special {
  width: clamp(46px, 13.5vw, 60px);
}

.game-object--special .game-object__visual {
  color: var(--orange-700);
  border-color: var(--orange-600);
  background: var(--white);
  box-shadow:
    0 7px 0 var(--orange-200),
    0 12px 20px rgba(255, 122, 50, 0.19);
}

.game-object--special .game-object__visual::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 3px solid rgba(255, 122, 50, 0.34);
  border-radius: 50%;
  animation: special-wave 760ms ease-out infinite;
}

.game-object--gold {
  width: clamp(43px, 12.5vw, 56px);
}

.game-object--gold .game-object__visual {
  color: var(--brown-900);
  border-color: #fff8d2;
  background: radial-gradient(circle at 35% 26%, #fff8b4, var(--gold-500) 56%, #f1aa16 100%);
  box-shadow:
    0 7px 0 #dc9312,
    0 0 24px rgba(255, 199, 68, 0.62),
    0 13px 22px rgba(215, 147, 17, 0.22);
  animation: gold-glow 520ms ease-in-out infinite alternate;
}

.game-object--bomb {
  width: clamp(52px, 15vw, 68px);
}

.game-object--bomb .game-object__visual {
  overflow: visible;
  color: transparent;
  border: 0;
  background: center / contain no-repeat url("assets/images/characters/jijik-bomb.png");
  box-shadow: none;
  filter: drop-shadow(0 10px 12px rgba(114, 45, 36, 0.22));
}

.game-object--bomb .game-object__visual::before {
  display: none;
}

.game-object.is-hit {
  pointer-events: none;
  animation: object-hit 270ms ease-out forwards;
}

.touch-burst {
  position: absolute;
  z-index: 8;
  width: 22px;
  height: 22px;
  border: 4px solid var(--orange-500);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: touch-burst 360ms ease-out forwards;
}

.score-float {
  position: absolute;
  z-index: 9;
  color: var(--orange-700);
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0 2px 0 var(--white);
  transform: translate(-50%, -50%);
  animation: score-float 540ms ease-out forwards;
  pointer-events: none;
}

.score-float--negative {
  color: var(--red-600);
}

.game-field.is-shaking {
  animation: field-shake 230ms linear;
}

.game-footer {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
}

/* 타임업 */
.screen--timeup {
  color: var(--white);
  background:
    radial-gradient(circle at center, rgba(255, 166, 92, 0.84), transparent 45%),
    linear-gradient(150deg, var(--orange-600), var(--red-500));
}

.screen--timeup::before,
.screen--timeup::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border: 28px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
}

.screen--timeup::before {
  top: -95px;
  left: -80px;
}

.screen--timeup::after {
  right: -100px;
  bottom: -90px;
}

.timeup-title {
  position: relative;
  z-index: 2;
  font-size: clamp(48px, 15vw, 78px);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 1;
  text-shadow: 0 8px 0 rgba(121, 43, 24, 0.2);
  animation: timeup-pop 520ms cubic-bezier(0.15, 0.8, 0.25, 1.18) both;
}

.timeup-score-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 3px;
  margin-top: 32px;
  padding: 18px 36px 22px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.timeup-score-wrap span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.timeup-score-wrap strong {
  font-variant-numeric: tabular-nums;
  font-size: clamp(58px, 18vw, 86px);
  font-weight: 900;
  line-height: 1;
}

/* 결과 화면 */
.screen--result {
  background:
    radial-gradient(circle at 84% 5%, rgba(255, 199, 68, 0.22), transparent 26%),
    linear-gradient(180deg, #fff9ee, #fff3e3);
}

.result-layout {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.result-layout::-webkit-scrollbar {
  display: none;
}

.result-header {
  padding-top: 4px;
  text-align: center;
}

.record-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  color: var(--brown-900);
  border: 1px solid var(--gold-300);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 900;
  background: #fff7cf;
  box-shadow: var(--shadow-xs);
}

.result-title {
  margin-top: 3px;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.result-main {
  display: grid;
  gap: 10px;
  padding-bottom: 10px;
}

.final-score-card {
  display: grid;
  place-items: center;
  min-height: 132px;
  padding: 16px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(255, 248, 231, 0.96));
  box-shadow: var(--shadow-md);
}

.final-score-card > span {
  color: var(--brown-400);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.final-score-card > strong {
  color: var(--orange-600);
  font-variant-numeric: tabular-nums;
  font-size: clamp(58px, 18vw, 82px);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 1;
  text-shadow: 0 6px 0 var(--orange-100);
}

.best-score-comparison {
  margin-top: 5px;
  color: var(--brown-600);
  font-size: 12px;
  font-weight: 700;
}

.rank-summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border: 1px solid rgba(255, 122, 50, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.77);
  box-shadow: var(--shadow-xs);
}

.rank-summary span {
  color: var(--brown-600);
  font-size: 13px;
  font-weight: 800;
}

.rank-summary strong {
  color: var(--brown-900);
  font-size: 22px;
  font-weight: 900;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.stat-card {
  display: grid;
  min-width: 0;
  min-height: 76px;
  place-items: center;
  align-content: center;
  padding: 9px 5px;
  border: 1px solid rgba(255, 122, 50, 0.13);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-xs);
}

.stat-card span {
  color: var(--brown-500, var(--brown-600));
  font-size: 10px;
  font-weight: 800;
}

.stat-card strong {
  overflow: hidden;
  max-width: 100%;
  color: var(--brown-900);
  font-variant-numeric: tabular-nums;
  font-size: clamp(17px, 5vw, 23px);
  font-weight: 900;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top10-status-card {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 104px;
  padding: 11px 13px 11px 8px;
  overflow: hidden;
  border: 2px solid var(--gold-300);
  border-radius: 22px;
  background:
    linear-gradient(135deg, #fffef6, #fff4c9);
  box-shadow: var(--shadow-sm);
}

.top10-status-card::after {
  content: "";
  position: absolute;
  top: -42px;
  right: -32px;
  width: 100px;
  height: 100px;
  border: 17px solid rgba(255, 199, 68, 0.14);
  border-radius: 50%;
}

.top10-status-card.is-not-top10 {
  border-color: var(--orange-200);
  background: linear-gradient(135deg, #fffdf9, #fff0e4);
}

.result-character {
  position: relative;
  z-index: 2;
  width: 82px;
  max-height: 89px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(90, 53, 29, 0.12));
}

.top10-status-card h2 {
  position: relative;
  z-index: 2;
  color: var(--brown-900);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.top10-status-card p {
  position: relative;
  z-index: 2;
  margin-top: 4px;
  color: var(--brown-600);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.final-top10-notice {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 122, 50, 0.17);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.notice-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  font-size: 22px;
  background: var(--orange-100);
}

.final-top10-notice h2 {
  font-size: 14px;
  font-weight: 900;
}

.final-top10-notice p {
  margin-top: 3px;
  color: var(--brown-600);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.45;
}

.result-feedback {
  padding: 10px 12px;
  color: var(--green-600);
  border: 1px solid rgba(57, 168, 117, 0.24);
  border-radius: 14px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  background: var(--green-100);
}

.result-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 9px;
}

.result-actions .primary-button,
.result-actions .secondary-button {
  min-height: 52px;
  padding-inline: 12px;
  font-size: 14px;
}

/* 오프라인 */
.stacked-actions {
  display: grid;
  gap: 13px;
  width: min(100%, 340px);
  margin-top: 28px;
}

/* 방향 전환 */
.orientation-lock {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  place-items: center;
  padding: max(24px, var(--safe-top)) max(24px, var(--safe-right)) max(24px, var(--safe-bottom)) max(24px, var(--safe-left));
  color: var(--brown-900);
  background:
    radial-gradient(circle at center, var(--white), var(--cream-200));
}

.orientation-lock__content {
  max-width: 380px;
  text-align: center;
}

.orientation-icon {
  font-size: 72px;
  animation: phone-rotate 1.8s ease-in-out infinite;
}

.orientation-lock h2 {
  margin-top: 18px;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.055em;
}

.orientation-lock p {
  margin-top: 10px;
  color: var(--brown-600);
  font-size: 14px;
  font-weight: 600;
}

/* 바텀시트 */
dialog {
  color: inherit;
}

.bottom-sheet,
.notice-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.bottom-sheet::backdrop,
.notice-dialog::backdrop {
  background: rgba(43, 28, 21, 0.48);
  backdrop-filter: blur(4px);
}

.bottom-sheet[open] {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bottom-sheet__panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(100%, 560px);
  max-height: min(88dvh, 760px);
  padding: 8px max(18px, var(--safe-right)) max(18px, var(--safe-bottom)) max(18px, var(--safe-left));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 30px 30px 0 0;
  background: var(--cream-50);
  box-shadow: var(--shadow-lg);
  animation: sheet-up 280ms cubic-bezier(0.2, 0.78, 0.25, 1) both;
}

.bottom-sheet__handle {
  width: 42px;
  height: 5px;
  margin: 2px auto 8px;
  border-radius: var(--radius-pill);
  background: var(--brown-200);
}

.bottom-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0 14px;
  border-bottom: 1px solid #eee2d9;
}

.bottom-sheet__header h2 {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.sheet-close-button {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--brown-600);
  border-radius: 50%;
  font-size: 31px;
  font-weight: 400;
  line-height: 1;
  background: var(--cream-200);
}

.bottom-sheet__body {
  min-height: 0;
  padding: 16px 1px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.bottom-sheet__footer {
  padding-top: 10px;
  border-top: 1px solid #eee2d9;
}

.privacy-copy dl {
  display: grid;
  gap: 11px;
}

.privacy-copy dl > div {
  padding: 13px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-xs);
}

.privacy-copy dt {
  color: var(--orange-700);
  font-size: 12px;
  font-weight: 900;
}

.privacy-copy dd {
  margin-top: 4px;
  color: var(--brown-700);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.object-guide-list {
  display: grid;
  gap: 9px;
}

.object-guide {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 122, 50, 0.12);
  border-radius: 17px;
  background: var(--white);
  box-shadow: var(--shadow-xs);
}

.object-guide img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.object-guide > div:last-child {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
}

.object-guide strong {
  font-size: 14px;
  font-weight: 900;
}

.object-guide span {
  color: var(--orange-700);
  font-size: 13px;
  font-weight: 900;
}

.guide-object {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 4px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  font-size: 27px;
  font-weight: 900;
  background: linear-gradient(145deg, var(--orange-400), var(--orange-600));
  box-shadow:
    0 6px 0 var(--orange-700),
    0 8px 14px rgba(232, 93, 0, 0.18);
}

.guide-object--special {
  color: var(--orange-700);
  border-color: var(--orange-500);
  background: var(--white);
  box-shadow: 0 6px 0 var(--orange-200);
}

.guide-object--gold {
  color: var(--brown-900);
  background: radial-gradient(circle at 35% 25%, #fff9b5, var(--gold-500));
  box-shadow: 0 6px 0 #d99a1d;
}

.tutorial-summary {
  margin-top: 15px;
  padding: 14px;
  border-radius: 17px;
  color: var(--brown-700);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  background: var(--orange-100);
}

.tutorial-summary p + p {
  margin-top: 4px;
}

/* 랭킹 */
.ranking-body {
  min-height: 240px;
}

.ranking-loading,
.ranking-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: var(--brown-600);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.ranking-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  grid-template-areas:
    "rank nickname score"
    "rank combo score";
  gap: 1px 10px;
  align-items: center;
  min-height: 64px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 122, 50, 0.11);
  border-radius: 17px;
  background: var(--white);
  box-shadow: var(--shadow-xs);
}

.ranking-item:nth-child(1) {
  border-color: var(--gold-500);
  background: linear-gradient(135deg, #fffdf4, #fff3bc);
}

.ranking-item:nth-child(2) {
  border-color: #d2d7df;
  background: linear-gradient(135deg, #fff, #f2f4f7);
}

.ranking-item:nth-child(3) {
  border-color: #e9b17b;
  background: linear-gradient(135deg, #fffaf5, #ffe5ca);
}

.ranking-item.is-me {
  outline: 3px solid rgba(255, 122, 50, 0.32);
  background: var(--orange-100);
}

.ranking-item__rank {
  grid-area: rank;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--brown-900);
  border-radius: 13px;
  font-size: 15px;
  font-weight: 900;
  background: var(--cream-200);
}

.ranking-item:nth-child(1) .ranking-item__rank::before {
  content: "🏆 ";
}

.ranking-item__name {
  grid-area: nickname;
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-item__score {
  grid-area: score;
  color: var(--orange-700);
  font-size: 18px;
  font-weight: 900;
}

.ranking-item__combo {
  grid-area: combo;
  color: var(--brown-500, var(--brown-600));
  font-size: 10px;
  font-weight: 700;
}

.ranking-footer {
  display: grid;
  gap: 3px;
}

.ranking-footer p {
  color: var(--brown-600);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
}

.ranking-footer .secondary-button {
  min-height: 48px;
  margin-top: 7px;
}

/* 공지 다이얼로그 */
.notice-dialog[open] {
  display: grid;
  place-items: center;
  padding: max(18px, var(--safe-top)) max(18px, var(--safe-right)) max(18px, var(--safe-bottom)) max(18px, var(--safe-left));
}

.notice-dialog__panel {
  display: grid;
  width: min(100%, 380px);
  place-items: center;
  padding: 24px 20px 20px;
  border-radius: 26px;
  text-align: center;
  background: var(--cream-50);
  box-shadow: var(--shadow-lg);
  animation: notice-pop 240ms cubic-bezier(0.2, 0.8, 0.25, 1.14) both;
}

.notice-dialog__panel img {
  width: 112px;
  height: 112px;
  object-fit: contain;
}

.notice-dialog__icon {
  font-size: 48px;
}

.notice-dialog__panel h2 {
  margin-top: 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.notice-dialog__panel p {
  margin-top: 9px;
  color: var(--brown-600);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.notice-dialog__panel .primary-button {
  margin-top: 19px;
}

/* 토스트 / Confetti */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(max(22px, var(--safe-bottom)) + 12px);
  z-index: 11000;
  max-width: min(calc(100% - 36px), 420px);
  padding: 11px 16px;
  color: var(--white);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  background: rgba(54, 40, 33, 0.93);
  box-shadow: var(--shadow-lg);
  transform: translateX(-50%);
  animation: toast-in 220ms ease-out both;
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 9000;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: -24px;
  width: 9px;
  height: 16px;
  border-radius: 3px;
  background: var(--orange-500);
  animation: confetti-fall 1.85s linear forwards;
}

/* 상태 애니메이션 */
.screen.entering {
  animation: screen-in 260ms ease-out both;
}

.screen.leaving {
  animation: screen-out 190ms ease-in both;
}

/* 작은 높이 최적화 */
@media (max-height: 760px) {
  .screen__content {
    padding-top: max(9px, var(--safe-top));
    padding-bottom: max(9px, var(--safe-bottom));
  }

  .official-logo {
    max-height: 54px;
  }

  .hero-characters {
    height: clamp(94px, 17vh, 122px);
    margin-bottom: -10px;
  }

  .start-main {
    gap: 7px;
  }

  .participant-form {
    gap: 7px;
    padding: 11px;
  }

  .input-wrap input {
    min-height: 45px;
    padding-block: 10px;
  }

  .field-help {
    display: none;
  }

  .primary-button,
  .secondary-button {
    min-height: 51px;
  }

  .ranking-cutoff-card {
    min-height: 54px;
    padding-block: 7px;
  }

  .start-footer {
    min-height: 38px;
  }

  .result-layout {
    gap: 5px;
  }

  .result-main {
    gap: 7px;
  }

  .final-score-card {
    min-height: 105px;
    padding: 10px;
  }

  .top10-status-card {
    min-height: 91px;
  }

  .final-top10-notice {
    padding: 9px;
  }
}

@media (max-height: 650px) {
  .hero-characters {
    display: none;
  }

  .game-tagline {
    margin-top: 2px;
  }

  .participant-form {
    padding: 9px;
  }

  .check-row {
    min-height: 38px;
  }

  .result-stats {
    gap: 5px;
  }

  .stat-card {
    min-height: 62px;
  }
}

@media (max-width: 360px) {
  .screen__content {
    padding-right: max(13px, var(--safe-right));
    padding-left: max(13px, var(--safe-left));
  }

  .participant-form {
    border-radius: 19px;
  }

  .game-title {
    gap: 4px;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  .result-actions .secondary-button {
    min-height: 48px;
  }
}

/* 태블릿 및 데스크톱 미리보기 */
@media (min-width: 700px) and (orientation: portrait) {
  .app-shell {
    background-color: #f3e6db;
  }

  .screen__content {
    height: calc(100% - 30px);
    margin-top: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 36px;
    background: rgba(255, 249, 241, 0.82);
    box-shadow: var(--shadow-lg);
  }

  .game-layout {
    border-radius: 36px;
  }
}

/* 가로 모드에서는 자동으로 회전 안내 표시 */
@media (orientation: landscape) and (max-height: 600px) {
  .orientation-lock,
  .orientation-lock[hidden] {
    display: grid !important;
  }
}

/* 접근성: 모션 최소화 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* 애니메이션 */
@keyframes decor-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

@keyframes hero-bounce {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-5px) rotate(1deg); }
}

@keyframes loading-character {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes loader-bar {
  0%, 100% { height: 9px; opacity: 0.6; }
  50% { height: 27px; opacity: 1; }
}

@keyframes countdown-pop {
  0% { opacity: 0; transform: scale(0.44) rotate(-7deg); }
  48% { opacity: 1; transform: scale(1.1) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes score-bump {
  0% { transform: scale(1); }
  55% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

@keyframes timer-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.035); }
}

@keyframes final-rush-in {
  0% { opacity: 0; transform: translateX(-50%) scale(0.55) rotate(-8deg); }
  72% { opacity: 1; transform: translateX(-50%) scale(1.08) rotate(2deg); }
  100% { opacity: 1; transform: translateX(-50%) scale(1) rotate(-2deg); }
}

@keyframes combo-message {
  0% { opacity: 0; transform: translate(-50%, -12px) scale(0.8); }
  22% { opacity: 1; transform: translate(-50%, 0) scale(1.06); }
  72% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -10px) scale(0.96); }
}

@keyframes object-spawn {
  from { opacity: 0; transform: translate3d(-50%, -50%, 0) scale(0.58) rotate(-8deg); }
  to { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1) rotate(0); }
}

@keyframes object-hit {
  0% { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1); }
  45% { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1.28) rotate(8deg); }
  100% { opacity: 0; transform: translate3d(-50%, -70%, 0) scale(0.35) rotate(18deg); }
}

@keyframes special-wave {
  from { opacity: 0.6; transform: scale(0.72); }
  to { opacity: 0; transform: scale(1.22); }
}

@keyframes gold-glow {
  from { transform: scale(0.97) rotate(-2deg); }
  to { transform: scale(1.05) rotate(2deg); }
}

@keyframes touch-burst {
  from { opacity: 0.9; transform: translate(-50%, -50%) scale(0.5); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(2.45); }
}

@keyframes score-float {
  0% { opacity: 0; transform: translate(-50%, -15%) scale(0.7); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
  100% { opacity: 0; transform: translate(-50%, -145%) scale(0.94); }
}

@keyframes field-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

@keyframes timeup-pop {
  0% { opacity: 0; transform: scale(0.52) rotate(-7deg); }
  70% { opacity: 1; transform: scale(1.08) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes sheet-up {
  from { opacity: 0.5; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes notice-pop {
  from { opacity: 0; transform: scale(0.84) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 14px) scale(0.94); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes confetti-fall {
  0% { opacity: 1; transform: translate3d(0, -10px, 0) rotate(0); }
  100% { opacity: 0.8; transform: translate3d(var(--drift, 0px), 110dvh, 0) rotate(720deg); }
}

@keyframes phone-rotate {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(90deg); }
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(7px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes screen-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-5px); }
}

/* 참가자 정보 입력 v1.0: 이름/성별/나이/전화번호 */
.form-row--two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
  gap: 8px;
}

.input-wrap select {
  width: 100%;
  min-height: 49px;
  padding: 12px 36px 12px 14px;
  border: 1.5px solid #e7d8cd;
  border-radius: 15px;
  outline: none;
  color: var(--brown-900);
  font-size: 16px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 2px rgba(74, 51, 40, 0.04);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.input-wrap select:focus {
  border-color: var(--orange-500);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(255, 122, 50, 0.13);
}

.input-wrap select[aria-invalid="true"] {
  border-color: var(--red-500);
  box-shadow: 0 0 0 4px rgba(240, 82, 82, 0.1);
}

.input-wrap--status input {
  padding-right: 46px;
}

.phone-check-indicator {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translateY(-50%);
}

.phone-check-indicator[data-state="checking"] {
  border: 2px solid rgba(255, 106, 0, 0.25);
  border-top-color: var(--orange-600);
  animation: phone-check-spin 700ms linear infinite;
}

.phone-check-indicator[data-state="available"]::after,
.phone-check-indicator[data-state="existing"]::after {
  content: "✓";
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: #2f9e62;
}

.phone-check-indicator[data-state="error"]::after {
  content: "!";
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: var(--red-500);
}

.field-status {
  padding-left: 2px;
  color: #287b50;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.field-status.is-existing {
  color: var(--orange-700);
}

@keyframes phone-check-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

@media (max-width: 359px) {
  .form-row--two {
    grid-template-columns: 1fr;
  }
}
