/*
 * style.css — Windows XP (Luna 파란 테마) 창 스킨.
 *   ※ 비주얼 스킨만 교체한다. 레이아웃(위치·크기·정렬·간격·계층)과 동작은 원본 그대로 유지.
 *   ※ --perfect/--great/--good/--miss/--accent 는 게임 캔버스가 읽으므로 유효 색으로 유지.
 *   레퍼런스: docs/Ref/윈도우xp.png (XP 탐색기 창 + 속성 대화상자)
 */
:root {
  /* 본문/토큰 — XP Luna 는 밝은 클라이언트 + 어두운 텍스트 */
  --bg: #ece9d8;
  --bg2: #ffffff;
  --surface: #f8f7f0;
  --fg: #1a1a1a;            /* 밝은 면 위 어두운 텍스트 */
  --muted: #444444;
  --dim: #706b5b;
  --accent: #2f6fe0;        /* 캔버스/강조 (유지 필요) */
  --accent2: #b06cff;
  --perfect: #5ce1e6;       /* 캔버스 판정색 — 원본 유지 */
  --great: #7cff9e;
  --good: #ffd166;
  --miss: #ff5c7a;
  --line: #b3ad97;
  /* XP UI 고증: 라틴=Tahoma, 한글=굴림/돋움(비트맵 힌팅 → 픽셀 느낌). 전용 픽셀폰트는 파일 번들 필요 */
  --font: Tahoma, Gulim, "굴림", Dotum, "돋움", "Malgun Gothic", sans-serif;

  /* ===== 타입 스케일 (규칙적인 단계) ===== */
  --fs-display: 60px;  /* 브랜드 대제목 */
  --fs-xl: 36px;       /* 타일 제목 */
  --fs-title: 30px;    /* 화면/창 제목, 기본 CTA */
  --fs-h: 26px;        /* 섹션 헤더 */
  --fs-body: 24px;     /* 본문·입력·컨트롤 기본 */
  --fs-label: 22px;    /* 라벨 */
  --fs-sub: 20px;      /* 보조/설명 */
  --fs-xs: 18px;       /* 미세 */
  /* 아이콘 글리프 크기 */
  --is-lg: 44px;
  --is-md: 34px;
  --is-sm: 30px;

  /* XP Luna 팔레트 */
  --client: #ece9d8;             /* 창 클라이언트(대화상자) 면색 */
  --panel: #fbfaf6;              /* 그룹박스/패널 */
  --title-blue: #245edb;         /* 창 프레임 파랑 */
  --sel: #316ac5;                /* 선택 강조(정품 XP 선택색) */
  --sel-bd: #2657b0;
  --btn-border: #003c74;         /* 버튼 진파랑 외곽선 */
  --field-border: #7f9db9;       /* 입력필드 파란회색 테두리 */
  --link: #0033cc;               /* 링크 파랑 */
  --xp-green: #177a17;           /* 완료/상태 텍스트, 진행바 */
  --groove-dk: #aca899;          /* 음각 홈 어두운선 */
  --groove-lt: #ffffff;          /* 음각 홈 밝은선 */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* 편집 잠금(배포 버전): UI 는 유지하되 비활성(흐림+잠금)으로 표시 */
.locked { opacity: .5; filter: grayscale(60%); pointer-events: none; cursor: not-allowed; }
.lock-note { font-size: var(--fs-sub); color: var(--dim); margin: 4px 0 10px; display: flex; gap: 6px; align-items: center; }
html, body {
  height: 100%;
  color: var(--fg);
  font-family: var(--font);
  overflow: hidden;
}
/* 레터박스(프레임 바깥) = XP 데스크톱: Bliss 배경 이미지 (런타임 에셋, 배포에 포함) */
body {
  background: #5a9fe0
    url("../assets/background.jpg")
    center / cover no-repeat fixed;
}

/* 고정 1080×1920 설계 표면. 반응형 아님 — app.js 가 transform 으로 균일 스케일만 적용. */
/* XP 창: 파란 프레임 + 상단만 둥근 모서리 + 베이지 클라이언트 + 데스크톱 드롭섀도 */
#frame {
  position: absolute;
  top: 0; left: 0;
  width: 1080px;
  height: 1920px;
  transform-origin: top left;
  background: var(--client);
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.5),      /* 데스크톱에 드리우는 그림자 */
    0 6px 16px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px #5b8ae8,             /* 프레임 바깥 밝은 파랑 라인 */
    inset 0 0 0 4px var(--title-blue),   /* 파란 창 프레임 본체 */
    inset 0 0 0 5px #0f3fb0;             /* 프레임 안쪽 진한 파랑 라인 */
}

/* ===== 창 타이틀바 (XP Luna 파란 글로시 바). 상단 전체 폭 ===== */
#frame::before {
  content: "리듬뚱땅 Rhythm-DDoong-DDang";
  position: absolute;
  top: 0; left: 0; right: 0; height: 56px;
  z-index: 10;
  display: flex; align-items: center;
  padding-left: 20px;
  padding-right: 132px;  /* 우측 창 버튼 자리 */
  font: 700 24px/1 var(--font);
  color: #ffffff; letter-spacing: -0.3px;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-radius: 7px 7px 0 0;
  /* Luna 액티브 타이틀 그라데이션(위 글로시 → 짙은 파랑 → 하단 밝은 라인) */
  background:
    linear-gradient(to bottom,
      #2b74e8 0%, #1c66e0 3%, #4b93f2 12%, #1a63dd 42%, #0d51cf 92%, #3a80f0 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -2px 3px rgba(0, 0, 0, 0.3);
}
/* 우측 창 버튼: 최소화(파랑) · 최대화(파랑) · 닫기(빨강). 버튼은 1:1 정사각. 장식용(클릭 동작 없음) */
#frame::after {
  content: "";
  position: absolute;
  top: 13px; right: 16px; width: 100px; height: 30px;
  z-index: 11;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='30' viewBox='0 0 78 24'><defs><linearGradient id='b' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%236aa6f5'/><stop offset='.45' stop-color='%233f83ec'/><stop offset='.55' stop-color='%232f6fd8'/><stop offset='1' stop-color='%235a97f2'/></linearGradient><linearGradient id='r' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23f0a488'/><stop offset='.45' stop-color='%23e07050'/><stop offset='.55' stop-color='%23cf4a2c'/><stop offset='1' stop-color='%23e88a68'/></linearGradient></defs><g stroke='%23dfe9fb' stroke-opacity='.9'><rect x='1' y='1' width='22' height='22' rx='3' fill='url(%23b)'/><rect x='27' y='1' width='22' height='22' rx='3' fill='url(%23b)'/><rect x='55' y='1' width='22' height='22' rx='3' fill='url(%23r)' stroke='%23f6cfc0'/></g><g stroke='%23fff' stroke-width='2.2' fill='none' stroke-linecap='round'><path d='M6 16h12'/><rect x='32' y='6' width='12' height='11' rx='1'/><path d='M60 7l12 10M72 7l-12 10'/></g></svg>") no-repeat center / contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}
/* 게임 무대 중에는 창 크롬 숨김 — 게임플레이 UI 제외 원칙 */
#frame:has(.dd-stage)::before,
#frame:has(.dd-stage)::after { display: none; }
/* 콘텐츠는 타이틀바(56px) 아래 + 좌·우·하 파란 테두리(≈5px) 안쪽에 배치(테두리가 안 가려지도록) */
#app { position: absolute; inset: 56px 5px 5px 5px; }
#app:has(.dd-stage) { inset: 0; }   /* 게임 무대는 창 전체를 그대로 사용(스킨 제외) */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.hidden { display: none !important; }

/* ===== 버튼 공통 ===== */
button { font-family: var(--font); cursor: pointer; border: none; color: var(--fg); background: none; }

/* XP Luna 3D 버튼 (OK/Cancel/Apply 계열). 베이지 그라데이션 + 진파랑 외곽선 */
.tile, .start, .create-skin, .dd-panel button,
.ghost, .icon-btn, .ghost-card {
  border-radius: 3px;
  background: linear-gradient(to bottom, #fdfdfc 0%, #f3f1e6 45%, #e6e1d0 55%, #dcd6c1 100%);
  border: 1px solid var(--btn-border);
  color: #101010;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  box-shadow:
    inset 0 0 0 1px #ffffff,                 /* 안쪽 밝은 하이라이트(볼록) */
    inset 0 -6px 8px rgba(0, 0, 0, 0.05),
    0 1px 2px rgba(0, 0, 0, 0.25);
  transition: background .1s, box-shadow .1s, border-color .1s;
}
.tile:hover, .start:hover, .create-skin:hover, .dd-panel button:hover,
.ghost:hover, .icon-btn:hover {
  background: linear-gradient(to bottom, #ffffff 0%, #fdf6e2 45%, #f6edcf 55%, #f2e6bf 100%);
  border-color: #f0a000;                     /* XP 호버: 주황 강조 외곽선 */
  box-shadow: inset 0 0 0 1px #fffbe6, inset 0 0 4px 1px rgba(255, 180, 40, 0.35), 0 1px 2px rgba(0, 0, 0, 0.25);
}
.tile:active, .start:active, .create-skin:active, .dd-panel button:active,
.ghost:active, .icon-btn:active {
  background: linear-gradient(to bottom, #d7d1bd 0%, #e4dfce 55%, #efebde 100%);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.icon-btn { width: 72px; height: 72px; display: inline-flex; align-items: center; justify-content: center; font-size: var(--is-md); border-radius: 5px; }

/* 툴바 뒤로가기: [초록 오브 아이콘 + '뒤로' 텍스트] 사각 영역 전체가 버튼 */
.back-btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 72px; padding: 4px 18px 4px 14px;
  border: 1px solid transparent; border-radius: 4px;
  background: transparent;
  color: #1a1a1a; font-weight: 700; font-size: var(--fs-body);
  cursor: pointer;
}
.back-btn:hover:not(:disabled) {
  border-color: #f0a000;                            /* XP 호버 강조 */
  background: linear-gradient(to bottom, #fffefb, #fdf1cf);
  box-shadow: inset 0 0 0 1px #fffbe6;
}
.back-btn:active:not(:disabled) {
  background: linear-gradient(to bottom, #f0e2ba, #ece1cc);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}
.back-label { text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }

/* 초록 글로시 오브(원 안 두꺼운 흰 화살표) */
.back-orb {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #ffffff; font-size: 30px;
  border: 1px solid #1c5c17;
  background: radial-gradient(circle at 50% 32%, #9fe87c 0%, #58c045 40%, #2f8f26 74%, #1e6a19 100%);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.65), inset 0 -7px 11px rgba(0, 0, 0, 0.28), 0 2px 4px rgba(0, 0, 0, 0.4);
}
.back-orb .ti {
  --i: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M2.5 12 L11 4 L11 9 L21 9 L21 15 L11 15 L11 20 Z' fill='%23000' stroke='%23000' stroke-width='2.4' stroke-linejoin='round' stroke-linecap='round'/></svg>");
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}
.back-btn:hover:not(:disabled) .back-orb {
  background: radial-gradient(circle at 50% 30%, #b4f291 0%, #6fd05a 40%, #3aa02e 74%, #277e20 100%);
}
.back-btn:active:not(:disabled) .back-orb {
  background: radial-gradient(circle at 50% 60%, #4fb63f 0%, #2f8f26 60%, #1c6317 100%);
  box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
/* 비활성(홈): 회색 오브 + 회색 텍스트 */
.back-btn:disabled { cursor: default; color: #9a9a94; }
.back-btn:disabled .back-label { text-shadow: none; }
.back-btn:disabled .back-orb {
  background: radial-gradient(circle at 50% 32%, #fbfbfa 0%, #e2e2de 45%, #c2c2bc 75%, #a6a6a0 100%);
  border-color: #a6a6a0; color: #9d9d97;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6), 0 1px 2px rgba(0, 0, 0, 0.18);
}
.back-btn:disabled .back-orb .ti { filter: none; }

/* 툴바 구분선(뒤로 버튼 ↔ 우측 여백 경계) — etched 세로선 */
.toolbar-sep {
  flex: 0 0 auto; align-self: center;
  width: 2px; height: 36px;
  background: linear-gradient(to right, #9aa0b0 0 1px, #ffffff 1px 2px);
}

.link {
  background: none; color: var(--link); text-decoration: underline; padding: 0; font-size: var(--fs-body);
  font-weight: 400; text-shadow: none;
}
.link:hover { color: #0a52ff; }
button:disabled { color: #8a8574; cursor: not-allowed; }
button:disabled:hover { border-color: var(--btn-border); box-shadow: inset 0 0 0 1px #ffffff, 0 1px 2px rgba(0,0,0,.25); background: linear-gradient(to bottom, #f3f1e6, #dcd6c1); }

/* 아이콘 — 밝은 면에서 얇은 입체감 */
.ti { filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.6)); }

/* ===== 상단 툴바(뒤로 + 화면명) — Luna 베이지 툴바 ===== */
.topbar {
  display: flex; align-items: center; gap: 10px; padding: 4px;
  background: linear-gradient(to bottom, #f6f4ec 0%, #eae6d6 100%);
  border-bottom: 1px solid var(--groove-dk);
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 0 rgba(0, 0, 0, 0.05);
}
.topbar-title { font-size: var(--fs-title); font-weight: 700; color: #10305e; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }

/* 주소(경로)창 — 툴바 아래. XP 탐색기 주소줄 고증: '주소' 라벨 + 흰 콤보 필드(노란 폴더 + 경로 + 드롭다운) */
.addressbar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 30px 12px;
  background: linear-gradient(to bottom, #efeadb 0%, #e2dcc9 100%);
  border-bottom: 1px solid var(--groove-dk);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.addr-label { font-size: var(--fs-sub); color: #5a564a; white-space: nowrap; }
.addr-field {
  flex: 1; min-width: 0; height: 52px; position: relative;
  display: flex; align-items: center;
  padding: 0 48px 0 52px;   /* 좌: 폴더 아이콘 / 우: 드롭다운 버튼 */
  color: #101010; font-size: var(--fs-body);
  border: 1px solid var(--field-border); border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
  background: #ffffff
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M2 6 L9 6 L11 8 L22 8 L22 19 L2 19 Z' fill='%23f3c34e' stroke='%23c9931f' stroke-width='1' stroke-linejoin='round'/></svg>")
    12px center / 30px no-repeat;
}
.addr-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 경로 구분자 ₩ 만 한글 폰트로(Tahoma 의 굵은 ₩ 대신 한글과 같은 굴림 → 굵기 일치). 나머지는 Tahoma/굴림 폴백 그대로 */
.addr-text .ps { font-family: Gulim, "굴림", Dotum, "돋움", "Malgun Gothic", sans-serif; }
.addr-field::after {
  content: ""; position: absolute; right: 2px; top: 2px; bottom: 2px; width: 38px;
  border-left: 1px solid #c9c6b6; border-radius: 0 2px 2px 0;
  background:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8 11L4 6h8z' fill='%2333497e'/></svg>") center / 14px no-repeat,
    linear-gradient(to bottom, #fbfdff, #dce7fb 50%, #c3d4f0);
}
.scroll { flex: 1; overflow-y: auto; padding: 30px 30px 44px; display: flex; flex-direction: column; gap: 32px; }

/* ===== 홈 ===== */
.home { flex: 1; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 40px; padding: 48px; background: url("../assets/home-bg.png") center bottom / cover no-repeat; }
.brand { position: absolute; left: 0; right: 0; top: 592px; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; text-align: center; }
.brand .logo { font-size: 84px; color: #1857d6; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2)); }
.brand-name {
  font-size: calc(var(--fs-display) * 2.4); font-weight: 800; letter-spacing: -2px; margin-top: 12px;
  color: #ffffff; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}
.brand-tag { color: rgba(255, 255, 255, 0.92); font-size: 55px; font-weight: 700; margin-top: 6px; text-shadow: 0 1px 5px rgba(0, 0, 0, 0.55); }
.home-actions { flex: 0 0 auto; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 24px; width: 100%; margin-bottom: 180px; }
.tile { flex: 1; min-width: 0; aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 40px 44px; text-align: center; }
.tile i { font-size: var(--is-lg); margin-bottom: 12px; color: #1857d6; }
.tile-title { font-size: 50px; font-weight: 800; color: #ffffff; }
.tile-sub { font-size: 28px; color: rgba(255, 255, 255, 0.9); }
/* 비대칭 원: 게임 360 / 음원 240 (3:2). 영문 라벨만, 폭에 가득 차게 */
.tile.to-select { flex: 0 0 auto; width: 360px; height: 360px; padding: 20px; }
.tile.to-songs { flex: 0 0 auto; width: 240px; height: 240px; padding: 8px; }
.tile-sub { white-space: nowrap; }
.to-select .tile-sub { font-size: 60px; }
.to-songs .tile-sub { font-size: 40px; }
/* 홈 타일 2개: 형태는 유지하되 반투명 유리(프루티거 에어로) — 배경이 비쳐 보임 */
.tile {
  background: linear-gradient(to bottom,
    rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.28) 46%,
    rgba(255, 255, 255, 0.12) 54%, rgba(255, 255, 255, 0.30) 100%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    0 4px 16px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px) saturate(1.3);
  -webkit-backdrop-filter: blur(6px) saturate(1.3);
  color: #ffffff; text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
}
.tile:hover {
  background: linear-gradient(to bottom,
    rgba(255, 255, 255, 0.70) 0%, rgba(255, 255, 255, 0.40) 46%,
    rgba(255, 255, 255, 0.22) 54%, rgba(255, 255, 255, 0.44) 100%);
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 6px 20px rgba(0, 0, 0, 0.3);
}
.tile:active {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.20));
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* ===== 섹션/그룹박스 — XP 작업창(파란 헤더 + 밝은 본문) ===== */
.block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px;
  box-shadow: inset 0 0 0 1px #ffffff, 0 1px 3px rgba(0, 0, 0, 0.2);
}
.block-head {
  font-size: var(--fs-h); color: #ffffff; font-weight: 700;
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px;
  padding: 12px 18px;
  border-radius: 4px;
  background: linear-gradient(to bottom, #4f8ae6 0%, #2c6bda 50%, #1f5bd0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}
.block-head i { font-size: var(--is-sm); color: #ffffff; }

/* 드롭존 — 흰 sunken 필드 + 점선 */
.drop {
  display: flex; align-items: center; gap: 22px; padding: 30px;
  border: 2px dashed var(--field-border); border-radius: 4px; cursor: pointer; color: var(--muted); font-size: var(--fs-body);
  background: #ffffff;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.18);
}
.drop i { font-size: var(--is-md); color: #1857d6; }
.drop small { display: block; color: var(--dim); font-size: var(--fs-xs); }
.drop:hover, .drop.over { border-color: var(--sel); background: #eef4fc; color: #10305e; }
.song-status { font-size: var(--fs-sub); color: var(--xp-green); font-weight: 700; min-height: 26px; margin-top: 12px; }
.list { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.empty { color: var(--dim); font-size: var(--fs-label); padding: 14px 4px; }

/* 목록 행 — 흰 리스트 아이템 + XP 파랑 선택 */
.row {
  display: flex; align-items: center; gap: 20px; padding: 20px 22px;
  background: #ffffff;
  border: 1px solid #c9c6b6; border-radius: 3px;
  box-shadow: inset 0 1px 0 #ffffff;
}
.row:hover {
  background: var(--sel);
  border-color: var(--sel-bd);
  color: #ffffff;
}
.row:hover .row-sub, .row:hover > i { color: #dce7ff; }
.row > i { font-size: var(--is-md); color: #1857d6; }
.row-main { flex: 1; min-width: 0; }
.row-name { font-size: var(--fs-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: var(--fs-sub); color: var(--dim); }
.thumb {
  width: 80px; height: 80px; border-radius: 3px; object-fit: cover;
  background: #ffffff;
  border: 1px solid var(--field-border);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 커스텀 스킨 폼 */
.skin-form { display: flex; flex-direction: column; gap: 18px; }
/* 입력창 — 흰 XP 필드 + 파란회색 테두리 + 얕은 sunken */
.skin-name, .field select, .field input:not([type=range]):not([type=checkbox]) {
  height: 72px; padding: 0 22px; border-radius: 2px;
  background: #ffffff;
  border: 1px solid var(--field-border); color: #101010; font-size: var(--fs-body);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
}
.skin-name::placeholder { color: var(--dim); }
.skin-name:focus, .field select:focus { outline: none; border-color: var(--sel); box-shadow: inset 0 1px 2px rgba(0,0,0,.18), 0 0 0 2px rgba(49,106,197,.35); }
.skin-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.slot { font-size: var(--fs-sub); color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.slot input[type=file] { font-size: var(--fs-xs); color: var(--dim); }
.create-skin { padding: 22px; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: var(--fs-body); }
.skin-msg { font-size: var(--fs-sub); color: var(--xp-green); font-weight: 700; min-height: 28px; }

/* 내 사진으로 스킨 생성 (가짜 AI) — 댄스댄스 설정과 동일한 그룹/썸네일 스타일 재사용 */
.pick-thumb[data-thumb="ai"], .pick-thumb[data-thumb="asset"] { background-size: contain; }
/* 썸네일 자체가 업로드 버튼(클릭 → 파일 선택). 비었을 땐 힌트 표시 */
.ai-thumb { cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color .12s, filter .12s; }
.ai-thumb:hover { border-color: var(--sel); filter: brightness(1.08); }
.ai-thumb.over { border-color: var(--sel); filter: brightness(1.12); box-shadow: inset 0 1px 3px rgba(0,0,0,.2), 0 0 0 2px rgba(49,106,197,.35); }
.ai-thumb-hint { display: flex; flex-direction: column; align-items: center; gap: 12px; color: rgba(255, 255, 255, 0.72); pointer-events: none; }
.ai-thumb-hint i { font-size: var(--is-md); }
.ai-thumb-hint span { font-size: var(--fs-sub); }
.ai-thumb.has-img .ai-thumb-hint { display: none; }   /* 사진 올리면 힌트 숨김 */
/* 설명 텍스트: 공간 유지 + 상단 정렬(XP 안내문 스타일) */
.ai-desc { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-start; gap: 12px; padding: 4px 8px 0; }
.ai-desc-sub { font-size: var(--fs-sub); color: var(--muted); line-height: 1.55; }
.ai-actions { align-self: flex-end; display: flex; gap: 12px; }
.ai-actions .ghost { padding: 12px 22px; font-size: var(--fs-body); }
.asset-body { display: flex; flex-direction: column; gap: 32px; }
.asset-actions { align-self: flex-end; display: flex; gap: 12px; }
.asset-actions .ghost { padding: 12px 22px; font-size: var(--fs-body); }

/* 생성 로딩 / 알림 팝업 — XP 고증 대화상자 (Luna 타이틀바) */
.ai-loading, .xp-modal {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 8, 18, 0.35);
}
.xp-dialog {
  width: 720px;
  background: var(--title-blue);        /* 창 프레임 색(테두리 사이로 비침) */
  border-radius: 8px 8px 3px 3px;
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.5),      /* 메인 창과 동일한 드리운 그림자 */
    0 6px 16px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px #5b8ae8,             /* 바깥 밝은 파랑 라인 */
    inset 0 0 0 4px var(--title-blue),   /* 파란 창 프레임 본체 */
    inset 0 0 0 5px #0f3fb0;             /* 안쪽 진한 파랑 라인 */
  overflow: hidden;
}
.xp-dialog-bar {
  height: 56px; display: flex; align-items: center; gap: 12px;
  padding: 0 10px 0 20px;   /* 우: 창 버튼 자리 */
  font: 700 24px/1 var(--font); color: #ffffff; letter-spacing: -0.3px;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
  border-radius: 7px 7px 0 0;
  background:
    linear-gradient(to bottom, #2b74e8 0%, #1c66e0 3%, #4b93f2 12%, #1a63dd 42%, #0d51cf 92%, #3a80f0 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), inset 0 -2px 3px rgba(0, 0, 0, 0.3);
}
.xp-dialog-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 타이틀바 닫기(X) 버튼 — 메인 창 스타일의 빨간 글로시 정사각 버튼 */
.win-btns { flex: 0 0 auto; display: flex; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35)); }
.win-close {
  width: 34px; height: 34px; border-radius: 3px;
  border: 1px solid #f6cfc0;
  background:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M4 4l8 8M12 4l-8 8' stroke='white' stroke-width='2.4' stroke-linecap='round'/></svg>") center / 16px no-repeat,
    linear-gradient(to bottom, #f0a488 0%, #e07050 45%, #cf4a2c 55%, #e88a68 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.win-close:hover { filter: brightness(1.1); }
.win-close:active { filter: brightness(0.9); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4); }

.xp-dialog-body { margin: 0 5px 5px; padding: 30px 30px 34px; background: #ece9d8; }
.xp-dialog-text { font-size: var(--fs-body); color: #101010; margin-bottom: 24px; }
.xp-dialog-sub { font-size: var(--fs-sub); color: var(--muted); margin-top: 18px; }

/* XP 세그먼트 진행바: 흰 sunken 트랙 + 초록 블록(사이 간격) */
.xpbar {
  height: 34px; padding: 3px; border-radius: 2px;
  background: #ffffff;
  border: 1px solid var(--field-border);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
}
.xpbar-fill {
  height: 100%; width: 0;
  transition: width .12s;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 13px, #ece9d8 13px 17px),  /* 블록 사이 간격 */
    linear-gradient(to bottom, #a6e39a 0%, #5cbf4e 48%, #33a02c 100%);              /* 초록 글로시 */
  background-clip: padding-box;
}

/* 생성 로딩 취소 버튼(로딩바 아래) */
.ai-loading-actions { display: flex; justify-content: center; margin-top: 24px; }
.ai-cancel-btn { min-width: 150px; padding: 14px 28px; font-size: var(--fs-body); }

/* XP 알림 메시지 박스 */
.xp-dialog.msg { width: 560px; }
.xp-msg-text { font-size: var(--fs-body); color: #101010; line-height: 1.4; }
.xp-msg-actions { display: flex; justify-content: center; margin-top: 32px; }
.xp-ok { min-width: 150px; padding: 14px 28px; font-size: var(--fs-body); }

/* ===== 게임 선택 ===== */
.games { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 8px; }
.game-start {
  position: relative; min-width: 0; aspect-ratio: 1 / 1; border-radius: 32px; padding: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 12px; text-align: center;
  background: var(--panel) center / cover no-repeat;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px #ffffff, 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: border-color .12s, filter .12s;
  overflow: hidden;
}
.game-start:hover { border-color: var(--sel); }
.game-start:not(.has-thumb):hover { background-color: #eef4fc; }
/* 준비 중(미완성) 게임 버튼: 흐리게 + 비활성 */
.game-start.soon { opacity: 0.55; cursor: default; }
.game-start.soon:hover { border-color: var(--line); }
/* 썸네일 버튼: 이미지 위 하단 스크림 + 흰 텍스트(가독성) */
.game-start.has-thumb::before {
  content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 45%, rgba(255,255,255,0.78) 100%);
}
.game-start.has-thumb > * { position: relative; z-index: 1; }
.game-start.has-thumb .game-name { color: #ffffff; text-shadow: 0 1px 4px rgba(0,0,0,0.8); }
.game-start.has-thumb .game-desc { color: rgba(255,255,255,0.9); text-shadow: 0 1px 4px rgba(0,0,0,0.8); }
.game-start.has-thumb:hover { filter: brightness(1.06); }
.game-assets {
  min-width: 0; border-radius: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #10305e;
  background: linear-gradient(to bottom, #eef4fc, #d8e6f8);
  border: 1px solid #a7c1e8;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: background .12s, border-color .12s;
}
.game-assets:hover { border-color: var(--sel); background: linear-gradient(to bottom, #e3eefb, #cadff5); }
.game-assets i { font-size: var(--is-md); color: #1857d6; }
.game-assets span { font-size: var(--fs-sub); font-weight: 700; }
.game-name { font-size: var(--fs-title); font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 12px; color: #0e2c66; }
.game-name i { color: #1857d6; }
.game-desc { font-size: var(--fs-sub); color: var(--muted); line-height: 1.4; }

/* ===== 설정 필드 ===== */
.field { display: flex; flex-direction: column; gap: 14px; }
.field-label { font-size: var(--fs-label); color: #10305e; }
.field-label b { color: #000000; font-variant-numeric: tabular-nums; }

/* 곡/스킨 선택 — 좌: 1:1 정방형 썸네일(빈 영역) · 우: 스크롤 리스트 */
.pick { display: flex; flex-direction: column; gap: 14px; }
.pick-body { display: flex; gap: 16px; align-items: stretch; }
.pick-thumb {
  flex: 0 0 auto; width: 320px; height: 320px; border-radius: 3px;
  background: #000000 center / cover no-repeat;
  border: 1px solid var(--field-border);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}
/* 스킨 썸네일은 비율 유지하며 영역 안에 맞춤(잘림 없음) */
.pick-thumb[data-thumb="skin"] { background-size: contain; }
.pick-list {
  flex: 1; min-width: 0; height: 320px; overflow-y: auto;
  background: #ffffff; border: 1px solid var(--field-border); border-radius: 3px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
  padding: 6px; display: flex; flex-direction: column; gap: 4px;
}
.pick-item {
  flex: 0 0 auto;   /* 축소 금지: 항목이 많아도 높이 유지 → 넘치면 스크롤(눌려 겹치지 않음) */
  display: flex; align-items: center; gap: 12px;
  text-align: left; padding: 16px 18px; border-radius: 2px;
  background: transparent; border: 1px solid transparent; color: #101010;
  font-size: var(--fs-body); font-weight: 400;
}
.pick-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-time { flex: 0 0 auto; color: #5a6472; font-variant-numeric: tabular-nums; }
.pick-item.selected .pick-time { color: #dce7ff; }

/* XP 그룹박스(시작 및 복구 대화상자 고증): etched 테두리 + 파란 라벨이 테두리에 겹쳐 끊음 */
fieldset.group {
  min-width: 0; margin: 0;
  border: 1px solid #b3ad97; border-radius: 3px;
  padding: 18px 22px 22px;
  display: flex; flex-direction: column; gap: 32px;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}
fieldset.group > legend {
  padding: 0 8px;
  color: #0a3fb5;                 /* XP 파란 그룹 라벨 */
  font-weight: 700; font-size: var(--fs-label);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
/* 그룹 하단 우측 버튼('기본값 사용' · 'AI 스킨 생성') */
.reset-defaults, .ai-skin { align-self: flex-end; padding: 12px 22px; font-size: var(--fs-body); }
/* 액션 버튼 크기 통일 — 가장 긴 '인공지능 스킨 생성'(261px) 기준 */
.ai-skin, .reset-defaults, .ai-actions .ghost, .asset-actions .ghost { min-width: 261px; }
/* '인공지능 스킨 생성' 행: 좌측 안내 문구(배포 잠금) + 우측 버튼 */
.ai-skin-row { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.ai-skin-row .ai-skin { align-self: center; flex: 0 0 auto; }
.ai-skin-note { margin: 0; flex: 0 1 auto; }
/* 필드 라벨 옆 부가 설명(한 줄) */
.field-label small { font-weight: 400; font-size: var(--fs-xs); color: var(--dim); margin-left: 8px; }
.pick-item:hover { background: #eef4fc; }
.pick-item.selected { background: var(--sel); color: #ffffff; border-color: var(--sel-bd); }
/* .pick-list 스크롤바는 하단 통합 XP Luna 스크롤바 규칙(.scroll, .pick-list)에서 처리 */

/* '중간에 끝내기' — 토글 + 숫자 입력 필드 + '초'(한 줄, XP 대화상자 시간 입력형) */
/* 곡 설정: 두 토글을 한 행에 나란히(첫 토글 고정 폭 → 둘째 토글이 일정 위치에서 좌측 정렬) */
.song-toggles { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.song-toggles > .toggle-field { flex: 0 0 300px; }
/* 게임 설정: 토글(좌) + '기본값 사용'(우)을 한 행에 */
.game-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.game-toggle-row .reset-defaults { align-self: center; }
.endsec-field { display: flex; align-items: center; gap: 12px; }
/* 필드 + XP 상하 스피너를 하나의 입력 박스로 */
.endsec-input {
  display: inline-flex; align-items: stretch;
  width: 132px; height: 52px; overflow: hidden;
  background: #ffffff; border: 1px solid var(--field-border); border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}
.endsec-input:focus-within { border-color: var(--sel); box-shadow: inset 0 1px 2px rgba(0,0,0,.2), 0 0 0 2px rgba(49,106,197,.35); }
.in-endsec {
  flex: 1; min-width: 0; height: 100%;
  border: none; background: transparent; box-shadow: none; outline: none;
  padding: 0 6px 0 12px; font-size: var(--fs-body); color: #101010;
  -moz-appearance: textfield; appearance: textfield;
}
.in-endsec::-webkit-outer-spin-button,
.in-endsec::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }  /* 네이티브 스피너 숨김 */
.in-endsec:disabled { color: #9a958a; }
/* XP 스피너 버튼(위/아래, 스크롤바 화살표와 동일 톤) */
.spin { display: flex; flex-direction: column; flex: 0 0 auto; width: 30px; border-left: 1px solid #c9c6b6; }
.spin button {
  flex: 1; min-height: 0; border: none; padding: 0; cursor: pointer;
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-size: 12px auto, auto;
}
.spin .spin-up {
  border-bottom: 1px solid #c9c6b6;
  background-image:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8 5l4 6H4z' fill='%2333497e'/></svg>"),
    linear-gradient(to bottom, #fbfdff, #dce7fb 50%, #c3d4f0);
}
.spin .spin-dn {
  background-image:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8 11L4 6h8z' fill='%2333497e'/></svg>"),
    linear-gradient(to bottom, #fbfdff, #dce7fb 50%, #c3d4f0);
}
.spin button:hover { filter: brightness(1.06); }
.spin button:active { filter: brightness(0.9); }
.endsec-unit { font-size: var(--fs-body); color: #10305e; }
.endsec-field.off .endsec-input { opacity: 0.55; pointer-events: none; }
.endsec-field.off .endsec-unit { opacity: 0.5; }

/* 슬라이더 — XP 트랙바: 얇은 선 트랙 + 사각 포인터 썸 + 스냅 눈금 + 좌우 라벨 */
.slider { display: flex; align-items: center; gap: 12px; }
.slider-track { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.field input[type=range] {
  -webkit-appearance: none; appearance: none;
  height: 28px; background: transparent; width: 100%; margin: 0;
}
.field input[type=range]::-webkit-slider-runnable-track {
  height: 5px; border-radius: 2px;
  background: #ffffff;
  border: 1px solid var(--field-border);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}
.field input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 26px; margin-top: -11px; border-radius: 2px;
  background: linear-gradient(to bottom, #fdfdfc 0%, #eee9da 55%, #d9d3be 100%);
  border: 1px solid #7a7560;
  box-shadow: inset 0 0 0 1px #ffffff, 0 1px 2px rgba(0, 0, 0, 0.4);
}
.field input[type=range]::-moz-range-track {
  height: 5px; border-radius: 2px; background: #ffffff; border: 1px solid var(--field-border);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}
.field input[type=range]::-moz-range-thumb {
  width: 16px; height: 26px; border-radius: 2px;
  background: linear-gradient(to bottom, #fdfdfc, #d9d3be);
  border: 1px solid #7a7560; box-shadow: inset 0 0 0 1px #ffffff, 0 1px 2px rgba(0, 0, 0, 0.4);
}
/* 슬라이더 좌우 라벨(느림/빠름 등) */
.slider-end { flex: 0 0 auto; font-size: var(--fs-sub); color: #5a564a; white-space: nowrap; }

/* 체크박스 — XP 흰 박스 + 초록 체크 */
.toggle-field { display: flex; align-items: center; gap: 14px; cursor: pointer; padding: 4px 0; }
.toggle-field input[type=checkbox] {
  -webkit-appearance: none; appearance: none;
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 2px;
  background: #ffffff;
  border: 1px solid var(--field-border);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative; cursor: pointer;
}
.toggle-field input[type=checkbox]:hover { border-color: var(--sel); }
.toggle-field input[type=checkbox]:checked::after {
  content: ""; position: absolute; left: 11px; top: 4px;
  width: 9px; height: 17px; border: solid #1a8a1a; border-width: 0 4px 4px 0; transform: rotate(43deg);
}
.toggle-field span { font-size: var(--fs-label); color: var(--fg); }
.toggle-field small { display: inline; margin-left: 8px; font-size: var(--fs-xs); color: var(--dim); }
.start { padding: 30px; font-size: var(--fs-h); display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 8px; }
/* 기본(default) 버튼 강조 — XP 파란 포커스 링 */
.start { box-shadow: inset 0 0 0 1px #ffffff, inset 0 -6px 8px rgba(0,0,0,.05), 0 0 0 2px rgba(49,106,197,.5), 0 1px 2px rgba(0,0,0,.25); }

/* 로딩(플레이 진입) — XP 초록 진행 표시줄 */
.play-loading { align-items: center; justify-content: center; }
.load-box { width: 560px; text-align: center; }
.load-title { font-size: var(--fs-title); margin-bottom: 22px; color: #10305e; }
.bar {
  height: 16px; border-radius: 2px; overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--field-border);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}
.bar-fill {
  height: 100%; width: 0;
  background: linear-gradient(to bottom, #a6e39a 0%, #5cbf4e 50%, #33a02c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: width .12s;
}
.load-sub { margin-top: 16px; font-size: var(--fs-sub); color: var(--dim); }

/* ===== 게임 무대 (1080×1920 고정) — 플레이필드는 원본(다크) 유지. HUD 텍스트는 밝게 명시 ===== */
.dd-stage { position: absolute; inset: 0; overflow: hidden; background: #06070f; }
.dd-bg { position: absolute; top: 0; left: 50%; transform: translateX(-50%); height: 100%; width: auto; z-index: 0; }
.dd-bg:not([src]) { display: none; }
.dd-media { position: absolute; inset: 0; z-index: 1; opacity: 1; }
/* 음원영상: 스킨과 동일한 960×960 영역(하단 중앙) 안에서 비율 유지(contain). 영상 자체 불투명도 0.5 (그룹 0.8 × 0.5 = 실효 0.4) */
.dd-video {
  position: absolute; left: 50%; bottom: 410px; transform: translateX(-50%);
  width: 960px; height: 960px;
  object-fit: contain; object-position: center;
  opacity: 0.5; transition: opacity 1s ease;
}
.dd-video:not([src]) { display: none; }
/* 도입 초기: 영상 숨김(즉시). 종료: 영상만 서서히 사라짐(스킨은 유지) */
.dd-stage.dd-video-off .dd-video { opacity: 0; transition: none; }
.dd-stage.dd-outro .dd-video { opacity: 0; transition: opacity 1.2s ease; }
.dd-skin-anchor { position: absolute; left: 50%; bottom: 410px; transform: translateX(-50%); width: 960px; height: 960px; }
.dd-skin { width: 100%; height: 100%; object-fit: contain; object-position: bottom center; transform-origin: 50% 100%; will-change: transform; transition: opacity 0.8s ease; }
.dd-skin:not([src]) { display: none; }
/* 도입 초기: 스킨 숨김(즉시) → 게임 진입 시 가장 먼저 페이드인 */
.dd-stage.dd-skin-off .dd-skin { opacity: 0; transition: none; }
.dd-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; mix-blend-mode: screen; touch-action: none; }
/* 어두운 바닥 레이어: 노트(canvas) 위 · 시간 프레임 아래. 타격지점 아래로 갈수록 노트가 어둡게 보이며 사라짐 */
.dd-floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 340px; z-index: 3;
  background: linear-gradient(to bottom, rgba(4, 6, 14, 0) 0%, rgba(4, 6, 14, 0.55) 45%, rgba(4, 6, 14, 0.92) 100%);
  pointer-events: none;
}
.dd-hud { position: absolute; top: 0; left: 0; right: 0; z-index: 3; padding: 28px 34px; pointer-events: none; }
.dd-hud-row { display: flex; align-items: center; justify-content: space-between; }
.dd-score { font-size: 54px; font-weight: 800; color: #ffffff; font-variant-numeric: tabular-nums; text-shadow: 0 3px 12px rgba(0,0,0,.6); }
.dd-sub { margin-top: 4px; font-size: 26px; color: rgba(255, 255, 255, 0.8); }
/* 타격지점 아래 재생 상태 — 가로 진행바 + 시간 */
.dd-progress {
  position: absolute; left: 60px; right: 60px; bottom: 230px; z-index: 4;
  display: flex; align-items: center; gap: 22px; pointer-events: none;
}
.dd-progress-bar {
  flex: 1; height: 20px; border-radius: 10px; overflow: hidden;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}
.dd-progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(to bottom, #a9d4ff, #4f8ff0 55%, #2f6bd6);
  box-shadow: 0 0 10px rgba(120, 180, 255, 0.6);
}
.dd-progress-time {
  font-size: 30px; color: #ffffff; font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7); white-space: nowrap;
}
.dd-pause { pointer-events: auto; width: 76px; height: 76px; font-size: 36px; }
/* 게임플레이 HUD 는 XP 스킨 제외 — .ghost 를 공유하므로 여기서 무대용 반투명 버튼으로 되돌린다 */
.dd-pause.ghost {
  background: rgba(10, 16, 30, 0.5);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  text-shadow: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.dd-pause.ghost:hover { background: rgba(24, 34, 58, 0.65); border-color: rgba(255,255,255,.5); box-shadow: 0 2px 8px rgba(0,0,0,.45); }
.dd-pause.ghost:active { background: rgba(4, 8, 16, 0.7); box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.55); }
.dd-pause.ghost .ti { filter: none; }
.dd-count { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; font-size: 200px; font-weight: 800; color: #ffffff; text-shadow: 0 0 70px var(--accent); opacity: 0; pointer-events: none; }
.dd-count.show { opacity: 1; }
.dd-count.pop { animation: ddpop .6s ease; }
@keyframes ddpop { from { transform: scale(1.4); opacity: 1; } to { transform: scale(1); opacity: 0; } }
.dd-overlay { position: absolute; inset: 0; z-index: 5; background: rgba(6,8,18,.55); display: flex; align-items: center; justify-content: center; }
/* 일시정지/결과 패널 — XP 대화상자(베이지 + 파란 프레임) */
.dd-panel {
  border-radius: 8px 8px 4px 4px;
  padding: 48px; display: flex; flex-direction: column; gap: 20px; min-width: 400px; text-align: center;
  background: var(--client);
  border: 1px solid #0f3fb0;
  box-shadow: inset 0 0 0 3px var(--title-blue), 0 12px 32px rgba(0, 0, 0, 0.55);
}
.dd-panel h2 { font-size: 40px; margin-bottom: 10px; color: #0e2c66; }
.dd-panel button { padding: 22px 32px; font-size: 28px; }

/* 결과 팝업 */
.dd-result { min-width: 620px; }
.dd-result-rank { font-size: 120px; font-weight: 800; line-height: 1; color: #f0a000; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.dd-result-score { font-size: 72px; font-weight: 800; color: #0e2c66; font-variant-numeric: tabular-nums; }
.dd-result-acc { font-size: var(--fs-h); color: #10305e; }
.dd-result-breakdown { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; font-size: var(--fs-body); font-weight: 700; }
.dd-jr.perfect { color: #148a8e; }
.dd-jr.great { color: #2f9e3f; }
.dd-jr.good { color: #b07d0a; }
.dd-jr.miss { color: #cf3030; }
.dd-result-actions { display: flex; gap: 16px; margin-top: 10px; }
.dd-result-actions button { flex: 1; padding: 22px 24px; font-size: var(--fs-h); }

/* ===== 스크롤바 — Windows XP Luna 고증 (.scroll · .pick-list 공통) ===== */
.scroll::-webkit-scrollbar,
.pick-list::-webkit-scrollbar { width: 20px; height: 20px; }

/* 옅은 청백 트랙 */
.scroll::-webkit-scrollbar-track,
.pick-list::-webkit-scrollbar-track {
  background: #eef2fb;
  box-shadow: inset 1px 0 0 #ffffff, inset -1px 0 0 #ccd6ea;
}
.scroll::-webkit-scrollbar-corner,
.pick-list::-webkit-scrollbar-corner { background: #eef2fb; }

/* 글로시 파란 썸 + 중앙 그립(가로 3선) */
.scroll::-webkit-scrollbar-thumb,
.pick-list::-webkit-scrollbar-thumb {
  border: 1px solid #4f6ba8;
  border-radius: 3px;
  min-height: 40px;
  background:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='10'><g stroke='%235f7cb8' stroke-width='1.4' stroke-linecap='round'><line x1='2' y1='2' x2='12' y2='2'/><line x1='2' y1='5' x2='12' y2='5'/><line x1='2' y1='8' x2='12' y2='8'/></g></svg>") center / 14px no-repeat,
    linear-gradient(to right, #eff4fe 0%, #d0dbf6 44%, #b7c8f0 56%, #d8e1f8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.scroll::-webkit-scrollbar-thumb:hover,
.pick-list::-webkit-scrollbar-thumb:hover {
  background:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='10'><g stroke='%235f7cb8' stroke-width='1.4' stroke-linecap='round'><line x1='2' y1='2' x2='12' y2='2'/><line x1='2' y1='5' x2='12' y2='5'/><line x1='2' y1='8' x2='12' y2='8'/></g></svg>") center / 14px no-repeat,
    linear-gradient(to right, #fbfdff 0%, #dce7fb 44%, #c4d5f6 56%, #e7edfc 100%);
}
.scroll::-webkit-scrollbar-thumb:active,
.pick-list::-webkit-scrollbar-thumb:active {
  background:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='10'><g stroke='%235f7cb8' stroke-width='1.4' stroke-linecap='round'><line x1='2' y1='2' x2='12' y2='2'/><line x1='2' y1='5' x2='12' y2='5'/><line x1='2' y1='8' x2='12' y2='8'/></g></svg>") center / 14px no-repeat,
    linear-gradient(to right, #b7c8f0 0%, #9fb4e6 50%, #c1d0f4 100%);
}

/* 양 끝 화살표 버튼: 기본 버튼(더블 포함) 숨기고 단일버튼만 표시 */
.scroll::-webkit-scrollbar-button,
.pick-list::-webkit-scrollbar-button { display: none; }
.scroll::-webkit-scrollbar-button:single-button,
.pick-list::-webkit-scrollbar-button:single-button {
  display: block; width: 20px; height: 20px;
  border: 1px solid #5f7cb8;
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.scroll::-webkit-scrollbar-button:single-button:vertical:decrement,
.pick-list::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8 5l4 6H4z' fill='%2333497e'/></svg>"),
    linear-gradient(to bottom, #fbfdff, #dce7fb 50%, #c3d4f0);
  background-size: 10px, auto;
}
.scroll::-webkit-scrollbar-button:single-button:vertical:increment,
.pick-list::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8 11L4 5h8z' fill='%2333497e'/></svg>"),
    linear-gradient(to bottom, #fbfdff, #dce7fb 50%, #c3d4f0);
  background-size: 10px, auto;
}
.scroll::-webkit-scrollbar-button:single-button:horizontal:decrement,
.pick-list::-webkit-scrollbar-button:single-button:horizontal:decrement {
  background-image:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M5 8l6-4v8z' fill='%2333497e'/></svg>"),
    linear-gradient(to bottom, #fbfdff, #dce7fb 50%, #c3d4f0);
  background-size: 10px, auto;
}
.scroll::-webkit-scrollbar-button:single-button:horizontal:increment,
.pick-list::-webkit-scrollbar-button:single-button:horizontal:increment {
  background-image:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M11 8l-6 4V4z' fill='%2333497e'/></svg>"),
    linear-gradient(to bottom, #fbfdff, #dce7fb 50%, #c3d4f0);
  background-size: 10px, auto;
}
.scroll::-webkit-scrollbar-button:single-button:hover,
.pick-list::-webkit-scrollbar-button:single-button:hover { filter: brightness(1.06); }
.scroll::-webkit-scrollbar-button:single-button:active,
.pick-list::-webkit-scrollbar-button:single-button:active { filter: brightness(0.94); }
