*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --cream: #fff6e6;
  --card: #fffdf7;
  --ink: #3f2d1c;
  --ink-soft: #7a6650;
  --line: #e7d3ae;
  --gold: #f5a623;
  --green: #2f9e44;
  --green-d: #268a3b;
  --red: #e8453c;
  --blue: #1f7ae0;
  --shadow: 0 10px 30px rgba(40,24,10,.28);
  --navh: 64px;
  font-size: 16px;
}
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: #000;
  user-select: none;
}

/* 스플래시(검정 배경 + splash.png, 3초) — 이미지는 배경으로 넣어 로드 실패 시에도 엑박이 안 뜨게 함 */
#splash {
  position: fixed; inset: 0; z-index: 999;
  background: #000 center / min(68vw, 460px) auto no-repeat url("../assets/images/splash.png");
  transition: opacity .5s ease;
}
#splash.hide { opacity: 0; pointer-events: none; }

/* 무대: 화면 전체 검정, 게임 상자를 가운데 배치 */
#stage {
  position: fixed; inset: 0;
  background: #000;
  display: flex; align-items: center; justify-content: center;
}
/* 게임 상자: 배경(16:9) 비율 고정 — 모든 HUD/버튼이 이 안에 들어간다 */
#app {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  overflow: hidden;
  background: #cdbfa7;
}
#game {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: none;
  background: #cdbfa7;
}
/* 시작 전에는 타이틀 배경 */
body:not(.in-game) #game { display: none; }
body:not(.in-game) #app {
  background: #241a10 center/cover no-repeat url("../assets/images/title.png");
}

/* ================= HUD ================= */
#hud, .hud-quest, .hud-held, .hud-tip, .order-rail, #navbar { display: none; }
body.in-game #hud { display: flex; }
body.in-game .hud-quest { display: flex; }
body.in-game .order-rail { display: flex; }
body.in-game #navbar { display: flex; }

/* 하단 내비게이션 바 */
#navbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 22;
  padding: 8px 10px;
  gap: 8px;
  background: linear-gradient(to top, rgba(28,17,7,.96), rgba(28,17,7,.9));
  border-top: 2px solid rgba(255,255,255,.12);
}
.navbtn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.14);
  border-radius: 14px; padding: 9px 4px;
  color: #fff; font-family: inherit; cursor: pointer;
  min-height: 56px;
}
.navbtn:active { background: rgba(255,255,255,.2); transform: translateY(2px); }
.navbtn .ni { font-size: 22px; line-height: 1; }
.navbtn .nl { font-size: 12px; font-weight: 800; }
body.modal-open #navbar, body.modal-open .hud-quest, body.modal-open .hud-held, body.modal-open .hud-tip { opacity: 0; pointer-events: none; }
/* 제작대(ws) 모달 중에는 주문표를 계속 보여줌 — 뭘 만들어야 하는지 보면서 작업 가능 */
body.modal-open:not([data-modal-kind="ws"]) .order-rail { opacity: 0; pointer-events: none; }

#hud {
  position: absolute; left: 0; right: 0;
  top: 0;
  padding: 8px 10px;
  gap: 8px; align-items: center;
  z-index: 20;
}
.hud-chip.urgent {
  background: var(--red);
  animation: chip-urgent .7s steps(1) infinite;
}
@keyframes chip-urgent { 50% { background: rgba(38,24,12,.82); } }
.hud-chip {
  display: flex; align-items: center; gap: 5px;
  background: rgba(38,24,12,.82); color: #fff;
  border: 1.5px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 7px 13px;
  font-weight: 800; font-size: 15px;
  backdrop-filter: blur(3px);
  min-height: 38px;
}
.hud-chip.gold span { color: #ffd873; }
.hud-chip.combo { color: #ffb3a0; }
.hud-chip.sat span { color: #b6f2c4; }
.hud-chip.sat.low span { color: #ffb3a0; }
.hud-chip.sat.low { border-color: rgba(232,69,60,.5); }
.hud-spacer { flex: 1; }
.hud-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(38,24,12,.82); border: 1.5px solid rgba(255,255,255,.14);
  font-size: 19px; color: #fff; cursor: pointer;
}

.hud-quest {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: 54px;
  align-items: center; gap: 8px;
  background: rgba(38,24,12,.8); color: #fff;
  border-radius: 999px; padding: 6px 14px;
  font-size: 13.5px; max-width: 94vw;
  z-index: 20;
}
.hud-quest .qlabel {
  background: var(--gold); color: #3f2d1c; font-weight: 900;
  border-radius: 999px; padding: 2px 9px; font-size: 12px; flex: none;
}
.hud-quest .qtext { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-quest .qnum { font-weight: 900; color: #ffd873; flex: none; }

.hud-held {
  position: absolute; left: 50%; transform: translate(-50%, 12px);
  bottom: calc(var(--navh) + 12px);
  background: var(--gold); color: #3f2d1c;
  font-weight: 900; font-size: 15px;
  padding: 9px 18px; border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0; transition: opacity .2s, transform .2s;
  z-index: 20;
}
body.in-game .hud-held.show { display: block; opacity: 1; transform: translate(-50%, 0); }

.hud-tip {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--navh) + 56px);
  background: rgba(38,24,12,.9); color: #fff;
  padding: 9px 16px; border-radius: 12px;
  font-size: 13px; text-align: center; max-width: 90vw;
  opacity: 0; transition: opacity .4s; z-index: 20; pointer-events: none;
}
body.in-game .hud-tip.show { display: block; opacity: 1; }

/* 손님 주문표 레일: 화면 상단, 진행 중인 주문을 항상 한눈에 */
/* 주문표: 화면 왼쪽에 세로로 쌓임 (앉은 손님만) */
.order-rail {
  position: absolute; left: 8px; right: auto;
  top: 88px;
  gap: 5px; padding: 0;
  display: flex; flex-direction: column; align-items: flex-start; flex-wrap: nowrap;
  max-height: calc(100% - 156px); overflow: hidden;
  z-index: 19; pointer-events: none;
}
.order-rail:empty { display: none; }
.orderticket {
  flex: none; display: flex; align-items: center; gap: 6px;
  background: #fffdf7; border: 2px solid var(--line); border-radius: 999px;
  padding: 3px 11px 3px 3px; box-shadow: 0 3px 9px rgba(40,24,10,.22);
  font-size: 12.5px; font-weight: 800; color: var(--ink); line-height: 1;
}
.orderticket .tface {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background-color: var(--cream); background-repeat: no-repeat;
  border: 2px solid var(--line); image-rendering: auto;
}
.orderticket .tface.vipface {
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; background-color: #fff3dd;
}
.orderticket .tnum {
  flex: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--cream); border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 900; margin-left: -16px; margin-top: 19px;
  box-shadow: 0 0 0 2px #fffdf7;
}
.orderticket .ttext { white-space: nowrap; }
.orderticket.imp { border-color: var(--red); color: #c92a2a; }
.orderticket.vip { border-color: var(--gold); background: #fff8e6; }
.orderticket .pring { flex: none; width: 16px; height: 16px; }
.orderticket.warn { animation: ticket-pulse .8s infinite; }
@keyframes ticket-pulse { 50% { box-shadow: 0 0 0 3px rgba(232,69,60,.35); } }

/* ================= 모달 ================= */
#modal-root:empty, #toast-root:empty { display: none; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(20,12,4,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal {
  width: min(520px, 100%);
  max-height: min(92vh, 900px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* 넓은 모달: 게임 방법 / 가게 업그레이드 — 가로로 길게, 2열로 한 화면에 */
body[data-modal-kind="intro"] .modal { width: min(880px, 96%); }
body[data-modal-kind="shop"] .modal  { width: min(720px, 96%); }
.panel, .start {
  background: var(--card);
  border: 3px solid #fff;
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.panel h2, .start h1 {
  font-size: 21px; color: var(--ink); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 14px; line-height: 1.5; }
.err { color: var(--red); font-weight: 800; font-size: 14px; min-height: 20px; margin: 8px 0; }
.err:empty { min-height: 0; margin: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: 12.5px; }

/* 버튼 */
.btnrow { display: flex; gap: 10px; margin-top: 16px; }
.btnrow.wrap { flex-wrap: wrap; }
.bigbtn, .ghostbtn, .warnbtn {
  flex: 1; border: none; border-radius: 14px;
  padding: 15px 16px; font-weight: 900; font-size: 16px;
  cursor: pointer; font-family: inherit; min-height: 52px;
}
.bigbtn { background: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-d); }
.bigbtn:active { transform: translateY(3px); box-shadow: none; }
.ghostbtn { background: #efe0c6; color: var(--ink); }
.warnbtn { background: #fff; color: var(--red); border: 2px solid var(--red); }
.linkbtn { background: none; border: none; color: var(--ink-soft); font-weight: 800; cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:active { color: var(--ink); }

/* ================= 시작 화면 ================= */
.start { text-align: center; }
.start .titlemark {
  display: block; font-size: 40px; line-height: 1; margin-bottom: 2px;
  filter: drop-shadow(0 3px 6px rgba(245,166,35,.35));
}
.start h1 {
  font-size: 30px; justify-content: center; color: var(--gold);
  letter-spacing: -0.5px;
  text-shadow: 0 2px 0 #fff, 0 4px 10px rgba(245,166,35,.28);
}
.start .sub { text-align: center; margin: 8px auto 4px; }
.start.intro h1 { font-size: 22px; color: var(--ink); text-shadow: none; }

.startrow { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.startrow.row { flex-direction: row; }
.startrow.row .bigbtn { flex: 2; }
.start .bigbtn {
  font-size: 18px; padding: 17px;
  box-shadow: 0 5px 0 var(--green-d), 0 12px 22px rgba(47,158,68,.26);
}
.start .ghostbtn {
  background: #fff; border: 2px solid var(--line); color: var(--ink);
  box-shadow: 0 3px 0 var(--line);
}
.start .ghostbtn:active { transform: translateY(3px); box-shadow: none; }

/* 게임 방법: 아이콘 칩 + 설명 행 */
.howto { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 2px; text-align: left; }
.howto .step {
  display: flex; align-items: center; gap: 12px;
  background: var(--cream); border: 2px solid var(--line);
  border-radius: 14px; padding: 11px 13px;
}
.howto .step .ico {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  background: #fff; border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.howto .step .desc { font-size: 13px; line-height: 1.45; color: var(--ink-soft); }
.howto .step .desc b { color: var(--ink); font-weight: 800; }

/* 게임 방법: 2열(5:5) — 한 화면에 */
.start.intro h1 { margin-bottom: 4px; }
.start.intro .intronick { text-align: center; margin: 0 0 12px; font-size: 13px; }
.start.intro .intronick b { color: var(--ink); }
.howto.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.howto.grid2 .step { padding: 10px 12px; gap: 10px; }
.howto.grid2 .step .ico { width: 34px; height: 34px; font-size: 18px; border-radius: 10px; }
.howto.grid2 .step .desc { font-size: 12px; }
@media (max-width: 620px) { .howto.grid2 { grid-template-columns: 1fr; } .startrow.row { flex-direction: column; } }

/* 음식점 고르기 */
.start h1.pickh { font-size: 22px; color: var(--ink); text-shadow: none; }
.modegrid { display: flex; flex-direction: column; gap: 12px; margin: 14px 0 4px; }
.modecard {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  text-align: left; position: relative;
  background: linear-gradient(#ffffff, var(--cream));
  border: 2.5px solid var(--gold); border-radius: 18px;
  padding: 16px 18px; cursor: pointer; font-family: inherit;
  box-shadow: 0 5px 0 #e8c979;
}
.modecard:active { transform: translateY(3px); box-shadow: none; }
.modecard.locked { border-color: var(--line); background: #f4efe4; box-shadow: 0 4px 0 var(--line); cursor: default; opacity: .8; }
.modecard .memoji { font-size: 30px; line-height: 1; }
.modecard .metitle { font-size: 18px; font-weight: 900; color: var(--ink); }
.modecard .medesc { font-size: 12.5px; color: var(--ink-soft); }
.modecard .mebadge {
  position: absolute; top: 12px; right: 14px;
  background: var(--ink-soft); color: #fff; font-size: 11px; font-weight: 900;
  border-radius: 999px; padding: 3px 10px;
}

.nickpick.big { flex-direction: column; padding: 20px; margin: 16px 0; }
.nickpick.big .nickval { font-size: 22px; }

.tabs.shapetabs { margin-bottom: 8px; }
.tabs.shapetabs .tab.on { border-color: var(--green); background: #e9f8ee; }

.legalrow { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.legalrow .dot { color: var(--line); }
.copyright { margin-top: 8px; color: var(--ink-soft); font-size: 11px; line-height: 1.7; opacity: .85; }
.copyright p { margin: 0; }

.legal .legalbody { text-align: left; font-size: 13px; line-height: 1.7; color: var(--ink); max-height: 52vh; overflow-y: auto; }
.legal .legalbody h3 { font-size: 13.5px; margin: 12px 0 4px; color: var(--ink); }
.legal .legalbody h3:first-child { margin-top: 0; }
.legal .legalbody ul { padding-left: 18px; }
.legal .legalbody p { margin: 4px 0; }
.legal .legalbody .muted { color: var(--ink-soft); font-size: 12px; }

.nickpick {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(#ffffff, var(--cream));
  border: 2px dashed var(--gold); border-radius: 16px;
  padding: 13px 14px; margin-top: 14px;
}
.nickpick .nlabel { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.nickpick .nickval { font-size: 18px; font-weight: 900; color: var(--ink); }
.dicebtn {
  border: none; background: var(--gold); color: #3f2d1c; border-radius: 12px;
  width: 42px; height: 42px; font-size: 19px; cursor: pointer;
  box-shadow: 0 3px 0 #cf8712;
}
.dicebtn:active { transform: translateY(2px); box-shadow: none; }

/* chips */
.chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 800; margin: 3px 4px 0 0; }
.chip-side { background: #e5f0ff; color: #1560b0; }
.chip-angle { background: #e3f8e8; color: #217a37; }

/* ===== 제작대 ===== */
.wsorder { background: var(--cream); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; font-size: 15px; }
.wsorder.muted { color: var(--ink-soft); font-size: 13.5px; }
.wsgrid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.wsright { display: flex; align-items: center; gap: 12px; background: var(--cream); border-radius: 14px; padding: 10px; }
.previewbox { width: 96px; height: 96px; flex: none; display: flex; align-items: center; justify-content: center; background: #fff; border: 2px solid var(--line); border-radius: 12px; }
.previewbox svg { width: 84px; height: 84px; }
.wsstatus { font-size: 14px; font-weight: 800; }
.wsstatus.good { color: var(--green); }
.wsstatus.bad { color: var(--red); }
.wslabel { font-weight: 900; font-size: 13.5px; margin: 6px 0; color: var(--ink-soft); }
.slots { display: flex; gap: 10px; justify-content: center; }
.slot {
  flex: 1; max-width: 88px; height: 64px; border-radius: 14px;
  border: 3px dashed #c9ad7d; background: #fff;
  font-size: 16px; font-weight: 900; cursor: pointer; color: var(--ink);
}
.slot.filled { border-style: solid; border-color: var(--green); background: #e9f8ee; }
.slot.locked { opacity: .6; }
.pieces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.piecebtn {
  border: 2px solid #e0b877; background: #fff6e6; border-radius: 12px;
  padding: 14px 4px; font-weight: 900; font-size: 15px; cursor: pointer; color: var(--ink);
  min-height: 50px;
}
.piecebtn:active { background: #ffe9c6; }
.piecebtn:disabled { opacity: .35; }
.seg { display: flex; flex-direction: column; gap: 8px; }
.segbtn {
  text-align: left; border: 2px solid var(--line); background: #fff;
  border-radius: 12px; padding: 13px 14px; font-weight: 800; font-size: 14px; cursor: pointer; color: var(--ink);
}
.segbtn.on { border-color: var(--green); background: #e9f8ee; }
.recipes { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.reclabel { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.recbtn { border: 1.5px solid var(--line); background: #f6ead2; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; }

/* ===== 테이블 / 퀴즈 ===== */
.pbar { height: 12px; background: #eee2c8; border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.pbar i { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .2s linear; }
.orderline { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.heldview { display: flex; align-items: center; gap: 12px; background: var(--cream); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; }
.heldview svg { width: 60px; height: 60px; flex: none; }
.heldview.muted { color: var(--ink-soft); }
.quizq { font-size: 18px; font-weight: 800; margin: 10px 0 16px; line-height: 1.4; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choicebtn { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 15px; font-weight: 800; font-size: 16px; cursor: pointer; color: var(--ink); min-height: 54px; }
.choicebtn:active { background: var(--cream); }

/* ===== 상점 ===== 2열로 한 화면에 */
.shopgold { font-weight: 900; font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.shoplist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shopitem { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--cream); border: 2px solid var(--line); border-radius: 12px; padding: 9px 10px; }
.sname { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px; }
.lvl { font-size: 11px; color: var(--ink-soft); font-weight: 700; }
.sdesc { font-size: 11px; color: var(--ink-soft); margin-top: 2px; line-height: 1.35; }
.buybtn { border: none; background: var(--gold); color: #3f2d1c; border-radius: 11px; padding: 9px 12px; font-weight: 900; font-size: 13px; cursor: pointer; box-shadow: 0 3px 0 #cf8712; flex: none; }
@media (max-width: 620px) { .shoplist { grid-template-columns: 1fr; } }
.buybtn:active { transform: translateY(2px); box-shadow: none; }
.maxed { color: var(--ink-soft); font-weight: 900; flex: none; }

/* ===== 랭킹 ===== */
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab { flex: 1; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 11px; font-weight: 800; cursor: pointer; color: var(--ink); }
.tab.on { border-color: var(--gold); background: #fff3dd; }
.lbbody { min-height: 140px; }
.myrank { margin-top: 10px; padding: 9px 12px; background: var(--cream); border: 2px solid var(--line); border-radius: 12px; font-size: 13px; text-align: center; }
.myrank b { color: var(--gold); }
.lbtable { width: 100%; border-collapse: collapse; font-size: 15px; }
.lbtable th, .lbtable td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.lbtable th { font-size: 12px; color: var(--ink-soft); }
.lbtable td:last-child, .lbtable th:last-child { text-align: right; font-weight: 900; }
.lbtable tr:nth-child(-n+3) td { font-weight: 800; }

/* ===== 결과 ===== */
.results { text-align: center; }
.bigscore { display: flex; flex-direction: column; align-items: center; margin: 6px 0 16px; }
.bigscore span { color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.bigscore b { font-size: 52px; color: var(--gold); text-shadow: 0 2px 0 #fff; line-height: 1; }
.breakdown { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.brow { display: flex; justify-content: space-between; font-size: 14.5px; padding: 7px 2px; border-bottom: 1px dashed var(--line); }
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0; }
.statgrid div { background: var(--cream); border: 2px solid var(--line); border-radius: 12px; padding: 10px 4px; }
.statgrid b { display: block; font-size: 20px; color: var(--gold); }
.statgrid span { font-size: 10.5px; color: var(--ink-soft); }
.ranknote { text-align: center; font-weight: 800; margin-top: 6px; font-size: 14.5px; }

.nickinput { width: 100%; padding: 14px; border: 2px solid var(--line); border-radius: 12px; font-size: 17px; font-family: inherit; }

/* ===== 토스트 ===== */
#toast-root { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--navh) + 76px); display: flex; flex-direction: column; gap: 8px; z-index: 80; align-items: center; width: max-content; max-width: 92%; }
.toast {
  background: rgba(38,24,12,.94); color: #fff;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 800; font-size: 14px; text-align: center;
  opacity: 0; transform: translateY(12px);
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-good { background: var(--green); }
.toast-warn { background: var(--gold); color: #3f2d1c; }
.toast-tip { background: var(--blue); }

/* 데스크톱: 모달 가운데 카드 유지, 모바일: 바텀시트 */
@media (max-width: 560px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-height: 90vh; }
  .panel, .start { border-radius: 22px 22px 0 0; border-bottom: none; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
}
