/* =========================================================
   러브 아카데미 — LOVE ACADEMY
   Palette: ash gray base x antique gold (accent)
   Emblem: red heart (♥) — the ONLY place red is used
   Clean modern sans, angular HUD panel
   ========================================================= */

:root {
  --void: #1c1c1e;
  --device-bg: #212123;
  --screen-bg: #242426;
  --line: #3f3f42;

  --ink: #1a1a1b;
  --gray: #9a9a9c;
  --white: #eeeeee;

  --text-main: #eaeaea;
  --text-dim: #98989a;

  --gold: #cda44d;
  --gold-bright: #e8c877;
  --gold-deep: #a8842f;

  /* 대표 문양(하트) 전용 색 — 다른 곳에는 쓰지 않음 */
  --heart-red: #d1453d;
  --heart-red-bright: #e8655c;

  --accent: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  --accent-diag: linear-gradient(135deg, var(--gold-deep), var(--gold-bright));

  --font-body: 'Noto Sans KR', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--void);
  font-family: var(--font-body);
  color: var(--text-main);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* 로그인/계정 만들기 입력창은 정상적으로 선택/편집 가능해야 함 */
input, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

/* ---------- 로딩 화면 ---------- */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--void);
  transition: opacity .4s ease;
}
.loading-screen.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* 대표 문양 — 붉은 하트 */
.loading-mark {
  font-size: 26px;
  color: var(--heart-red);
  text-shadow: 0 0 16px rgba(209,69,61,0.55);
  animation: loading-pulse 1.6s ease-in-out infinite;
}
@keyframes loading-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1.06); }
}

.loading-bar {
  width: 150px;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}
.loading-bar__fill {
  position: absolute;
  top: 0; left: -40%;
  width: 40%;
  height: 100%;
  background: var(--accent);
  animation: loading-slide 1.1s ease-in-out infinite;
}
@keyframes loading-slide {
  0% { left: -40%; }
  100% { left: 100%; }
}

.loading-text {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin: 0;
}

/* 로딩 끝나기 전까진 실제 화면을 투명하게 숨겨둠 */
.stage {
  opacity: 0;
  transition: opacity .5s ease;
}
.stage.is-visible {
  opacity: 1;
}

/* ---------- Outer stage: everything outside the "terminal" is ash gray ---------- */
.stage {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201,164,77,0.06), transparent 60%),
    var(--void);
  padding: 24px 0;
}

/* ---------- Device frame (mobile-size viewport) ---------- */
.device {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: min(844px, 92vh);
  background: var(--device-bg);
  padding: 12px;
  clip-path: polygon(
    22px 0, 100% 0,
    100% calc(100% - 22px), calc(100% - 22px) 100%,
    0 100%, 0 22px
  );
  box-shadow:
    0 0 0 1px rgba(154,154,156,0.25),
    0 0 50px rgba(201,164,77,0.05),
    0 20px 60px rgba(0,0,0,0.7);
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--screen-bg);
  overflow: hidden;
  clip-path: polygon(
    16px 0, 100% 0,
    100% calc(100% - 16px), calc(100% - 16px) 100%,
    0 100%, 0 16px
  );
  box-shadow: inset 0 0 0 1px var(--line);
}

/* signature element: 상단 황금 HUD 라인 */
.screen__hud-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright), var(--gold-deep));
  z-index: 4;
}

/* 은은한 스캔라인 텍스처 */
.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(150,150,152,0.02) 0px,
    rgba(150,150,152,0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 2;
}

/* ---------- Panels (login / signup / menu) ---------- */
.panel {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  justify-content: center;
}
.panel.is-active { display: flex; }

.panel__inner {
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------- Brand / logo block ---------- */
.brand { text-align: center; margin-bottom: 4px; }
/* 브랜드 글리프도 대표 문양(하트)과 같은 붉은색 */
.brand__glyph {
  display: block;
  color: var(--heart-red);
  font-size: 20px;
  margin-bottom: 10px;
  text-shadow: 0 0 14px rgba(209,69,61,0.5);
}
.brand__title {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: 1px;
  margin: 0;
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand__title-sub {
  font-size: 16px;
  letter-spacing: 4px;
  opacity: 0.85;
}
.brand__title--sm { font-size: 20px; letter-spacing: 2px; }
.brand__sub {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin: 10px 0 0;
}

/* ---------- Form fields ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field__label {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
  font-weight: 500;
}
.field__label em {
  font-style: normal;
  color: #4d4d50;
  font-size: 10px;
}

.field__input {
  background: #1e1e20;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-main);
  letter-spacing: 1px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field__input::placeholder { color: #46464a; }
.field__input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(205,164,77,0.18);
}

/* ---------- Buttons ---------- */
.btn {
  border: none;
  border-radius: 7px;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform .08s, filter .15s, box-shadow .15s;
}
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 0 24px rgba(205,164,77,0.3);
}
.btn--primary:hover { filter: brightness(1.08); }

.btn--link {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 6px 4px;
}
.btn--link:hover { color: var(--gold-bright); }

.error {
  min-height: 14px;
  font-size: 11px;
  color: var(--gold-bright);
  text-align: center;
  margin: 0;
}

.link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.guest-note {
  text-align: center;
  font-size: 10px;
  color: #4d4d50;
  margin: -6px 0 0;
}
.ai-notice {
  text-align: center;
  font-size: 9px;
  color: #4d4d50;
  margin: 18px 0 0;
  letter-spacing: 0.3px;
}

/* ---------- 허브 화면 계정 정보 표시줄 ---------- */
.hub-menu-account {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}
.hud__badge {
  background: rgba(205,164,77,0.12);
  color: var(--gold-bright);
  border: 1px solid rgba(205,164,77,0.4);
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}
.hud__badge.is-member {
  color: var(--ink);
  background: var(--accent);
  border-color: transparent;
}
.hud__name {
  color: var(--text-main);
  font-weight: 500;
  font-size: 12px;
}

.menu__item {
  background: rgba(28,28,30,0.55);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  color: var(--text-main);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  padding: 14px 16px;
  border-radius: 8px;
  transition: border-color .15s, color .15s, background .15s;
}
.menu__item:disabled { opacity: 0.35; cursor: not-allowed; }
.menu__item:not(:disabled):hover { border-color: var(--gold); }
.menu__item--main {
  color: var(--ink);
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 0 20px rgba(205,164,77,0.35);
}
.menu__item--danger { color: var(--text-dim); border-color: var(--line); width: 100%; margin-top: 4px; }
.menu__item--danger:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ---------- 전체 화면형 패널 (스테이지 선택 / 게임) ---------- */
.panel--full {
  padding: 22px 0 16px;
  justify-content: flex-start;
}

/* ---------- 허브 화면 (하단 탭바 구조) ---------- */
.hub-screen {
  padding: 0;
  overflow: hidden;
}

.hub-menu-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(28,28,30,0.6);
  color: var(--text-main);
  font-size: 16px;
  cursor: pointer;
}
.hub-menu-btn:hover { border-color: var(--gold); }

.hub-tab-content {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: 60px 0 76px; /* 위: 메뉴 버튼 여백, 아래: 탭바 높이만큼 여백 */
}
.hub-tab-content.is-active { display: flex; }

/* 메인 화면 탭: 배경 이미지만, 여백 없이 꽉 채움 */
.hub-tab-content--home { padding: 0; }
.hub-home-bg {
  position: absolute;
  inset: 0;
  background-image: url('main_menu.webp');
  background-size: cover;
  background-position: center;
}

.hub-tab-header {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-main);
  padding-bottom: 14px;
}

.piece-count-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Edge/IE */
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 22px;
}
.piece-count-list::-webkit-scrollbar { display: none; } /* Chrome/Safari */

/* 하단 탭바 */
.hub-tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  background: rgba(24,24,26,0.92);
  backdrop-filter: blur(6px);
}
.hub-tabbar__btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 16px 0;
  cursor: pointer;
}
.hub-tabbar__btn.is-active { color: var(--gold-bright); }

/* 하단 탭바 가운데 - 메인 화면으로 가는 원형 버튼 (금색 배지 위에 붉은 하트 문양) */
.hub-tabbar__home-btn {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  margin-top: -18px;
  border-radius: 50%;
  border: 3px solid var(--device-bg);
  background: var(--accent-diag);
  color: var(--heart-red);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(205,164,77,0.4);
}
.hub-tabbar__home-btn.is-active { box-shadow: 0 0 22px rgba(205,164,77,0.65); }

/* 허브 메뉴 오버레이 (설정 + 로그아웃) */
.hub-menu-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20,20,22,0.72);
  backdrop-filter: blur(3px);
}
.hub-menu-overlay.is-visible { display: flex; }
.hub-menu-box {
  width: 86%;
  max-width: 320px;
  background: var(--device-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px 26px;
}

.hub-menu-box .link-row {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.hub-menu-box .link-row a { text-decoration: none; }

/* ---------- 게임 화면 (택배 상자 정렬 보드) ---------- */
.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 10px;
}
.game-header__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-main);
}

/* 세로줄(컬럼) 개수 = 선택한 색깔 수 + 여유 줄 1개. 한 줄은 상자 5칸 고정.
   가로줄(행) 하나에는 세로줄을 최대 6개까지만 두고, 그보다 많으면 두 줄로 나눠 배치함 */
.sort-board {
  position: relative;
  flex: 1;
  min-height: 0;
  max-height: 520px;
  margin: 10px auto 16px;
  width: min(360px, 94%);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.sort-board__row {
  flex: 1;
  min-height: 0;
  max-height: 250px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 8px 6px;
}
.sort-board__column {
  position: relative;
  display: flex;
  flex-direction: column-reverse; /* 아래부터 위로 쌓임 */
  gap: 3px;
  min-height: 0;
  min-width: 0;
  padding: 3px;
  border-bottom: 2px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s, box-shadow .12s;
}
.sort-board__column.is-selected {
  background: rgba(205,164,77,0.14);
  box-shadow: inset 0 0 0 2px var(--gold);
}
.sort-board__column.is-target {
  box-shadow: inset 0 0 0 2px rgba(61,220,120,0.85);
}
.sort-board__slot {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
}
.sort-board__box {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  pointer-events: none;
}
.sort-board__box.is-moving-source { visibility: hidden; }
.sort-board__move-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.sort-board__moving-box {
  position: absolute;
  will-change: transform;
}
.sort-board.is-moving .sort-board__column { cursor: default; }
.sort-board__complete-flash {
  position: absolute;
  inset: -3px;
  z-index: 4;
  pointer-events: none;
  border: 2px solid #fff0bc;
  border-radius: 8px;
  background: linear-gradient(115deg, rgba(255,240,188,0.08), rgba(255,226,145,0.38), rgba(255,240,188,0.08));
  box-shadow: 0 0 22px rgba(255,217,120,0.75), inset 0 0 18px rgba(255,240,188,0.4);
}
.sort-board__complete-flash::before,
.sort-board__complete-flash::after {
  content: '✦';
  position: absolute;
  color: #fff9e6;
  font-size: 24px;
  line-height: 1;
  text-shadow: 0 0 8px #ffd978;
}
.sort-board__complete-flash::before { top: 18%; left: 12%; }
.sort-board__complete-flash::after { bottom: 20%; right: 10%; font-size: 18px; }

/* 하단 중앙에 고정하며 결과 안내가 떠 있어도 되돌릴 수 있다. */
.game-controls {
  position: relative;
  z-index: 7;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding: 8px 18px 0;
}
.game-undo-btn {
  min-width: 136px;
  min-height: 44px;
  border: 1px solid var(--gold-deep);
  background: var(--device-bg);
  color: var(--gold-bright);
}
.game-undo-btn:hover:not(:disabled) { border-color: var(--gold-bright); }
.game-undo-btn:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.game-undo-btn:disabled { opacity: 0.35; cursor: default; }

/* ---------- 클리어 / 막힘 모달 ---------- */
.game-modal {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20,20,22,0.72);
  backdrop-filter: blur(3px);
}
.game-modal.is-visible { display: flex; }
.game-modal__box {
  width: 82%;
  max-width: 280px;
  background: var(--device-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px 20px;
  text-align: center;
}
.game-modal__title {
  font-size: 18px;
  font-weight: 900;
  margin: 0 0 8px;
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.game-modal__desc {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0 0 20px;
  word-break: keep-all;
}
.game-modal__actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- 튜토리얼 안내 말풍선 (보드 위) ---------- */
.tutorial-hint {
  display: none;
  margin: 4px 18px 0;
  background: rgba(28,28,30,0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
}
.tutorial-hint.is-visible { display: block; }
.tutorial-hint__text {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-main);
  word-break: keep-all;
}
.tutorial-hint__tap {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-dim);
  text-align: right;
}

/* ---------- 스토리 모드: 에피소드 선택 ---------- */
.episode-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Edge/IE */
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 20px;
}
.episode-list::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.episode-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  background: #1e1e20;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color .15s;
}
.episode-btn:hover { border-color: var(--gold); }
.episode-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.episode-btn:disabled:hover { border-color: var(--line); }
.episode-btn__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
}
.episode-btn__title--read { color: var(--text-dim); }
.episode-btn__marker {
  display: inline-block;
  margin-right: 4px;
  color: var(--gold-bright);
  font-size: 11px;
}
.episode-btn__desc {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
  word-break: keep-all;
}
.episode-btn__badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
  background: var(--accent);
  border-radius: 4px;
  padding: 2px 7px;
  vertical-align: middle;
}

/* ---------- 스토리 플레이어 (미연시 화면) ---------- */
.story-player { padding: 0; overflow: hidden; }

.story-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity .6s ease;
  z-index: 1;
}
.story-bg.is-visible { opacity: 1; }

.story-standing {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom;
  opacity: 0;
  transition: none;
  z-index: 2;
  pointer-events: none;
}
.story-standing.is-visible { opacity: 1; }
.story-player.has-story-illustration .story-standing { visibility: hidden; }

/* 삽화(CG) — 배경/스탠딩 위, 대화창 아래. 화면을 완전히 채움 */
.story-illust {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: none;
  z-index: 3;
  pointer-events: none;
}
.story-illust.is-visible { opacity: 1; }

.story-exit-btn,
.story-prev-btn {
  position: absolute;
  top: 14px;
  z-index: 6;
  background: rgba(22,22,24,0.6);
  border-radius: 6px;
  padding: 6px 10px;
  min-height: 44px;
  touch-action: manipulation;
}
.story-exit-btn { right: 14px; }
.story-prev-btn { left: 14px; color: var(--text-main); }
.story-exit-btn:focus-visible,
.story-prev-btn:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.story-prev-btn:disabled { color: var(--text-dim); opacity: 0.4; cursor: default; }
.story-prev-btn:disabled:active { transform: none; }

.dialogue-box {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  height: 168px;
  box-sizing: border-box;
  background: rgba(22,22,24,0.88);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px 20px;
  backdrop-filter: blur(4px);
  cursor: pointer;
  overflow-y: auto;
}
.dialogue-box__speaker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.dialogue-box__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.dialogue-box__next {
  position: absolute;
  right: 16px;
  bottom: 12px;
  font-size: 12px;
  color: var(--text-dim);
  animation: dialogue-bounce 1.2s ease-in-out infinite;
}
@keyframes dialogue-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(3px); opacity: 1; }
}

/* 이지훈(주인공)이 말할 때 — 반투명 골드 톤으로 구분 */
.dialogue-box--player {
  background: rgba(224,216,196,0.62);
  border-color: rgba(205,164,77,0.35);
}
.dialogue-box--player .dialogue-box__speaker { color: #1a1a1b; }
.dialogue-box--player .dialogue-box__text { color: #1a1a1b; }
.dialogue-box--player .dialogue-box__next { color: rgba(26,26,27,0.6); }

.choice-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20,20,22,0.55);
  backdrop-filter: blur(2px);
}
.choice-overlay.is-visible { display: flex; }
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 80%;
}
.choice-btn {
  background: rgba(28,28,30,0.92);
  border: 1px solid var(--line);
  color: var(--text-main);
  border-radius: 8px;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s;
  word-break: keep-all;
}
.choice-btn:hover { border-color: var(--gold); }

/* ---------- 설정 화면 ---------- */
.settings-block {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-bottom: 30px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.settings-row__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
}
.settings-row__value {
  font-size: 12px;
  color: var(--text-main);
  min-width: 26px;
  text-align: right;
}

.settings-toggle {
  border: 1px solid var(--line);
  background: rgba(205,164,77,0.15);
  color: var(--gold-bright);
  border-radius: 20px;
  padding: 6px 16px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
}
.settings-toggle.is-off {
  background: transparent;
  color: var(--text-dim);
}

.settings-row--slider { gap: 10px; }
.settings-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  outline: none;
}
.settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-diag);
  box-shadow: 0 0 8px rgba(205,164,77,0.5);
  cursor: pointer;
}
.settings-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--accent-diag);
  box-shadow: 0 0 8px rgba(205,164,77,0.5);
  cursor: pointer;
}
