:root {
  --ink: #6b4a3a;
  --cream: #fff8ee;
  --pink: #f6a9bb;
  --mint: #a9dcc3;
  --shadow: 0 6px 18px rgba(120, 80, 60, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #cfe7f7;
  font-family: 'Jua', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--ink);
}

#app, #app canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.hud {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.hud__title {
  margin: 0;
  padding: 8px 18px 6px;
  font-weight: 400;
  font-size: 24px;
  background: var(--cream);
  border-radius: 999px;
  box-shadow: var(--shadow);
  pointer-events: auto;
}
.hud__title span { color: #e98aa2; }

.hud__views { display: flex; flex-wrap: wrap; gap: 8px; pointer-events: auto; }

.hud__views button {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 8px 14px 6px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 248, 238, 0.88);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.hud__views button:hover { transform: translateY(-2px); }
.hud__views button.is-active,
.hud__views button[aria-pressed='true'] { background: var(--pink); color: #fff; }

.loading {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  background: linear-gradient(#bfe0f5, #fde8de);
  font-size: 20px;
  transition: opacity 0.6s ease;
  z-index: 10;
}
.loading.is-done { opacity: 0; pointer-events: none; }
.loading__dot {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 12px solid var(--pink);
  border-top-color: var(--mint);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  .hud__title { font-size: 19px; }
  .hud__views button { font-size: 13px; padding: 7px 11px 5px; }
}

/* ---------- 3인칭 플레이 HUD ---------- */
.hud__views .hud__play { background: #e98aa2; color: #fff; }
body.is-playing .hud__views button:not(.hud__play) { display: none; }

.play { position: fixed; inset: 0; pointer-events: none; }
.play[hidden] { display: none; }
.play__help {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 16px 6px;
  font-size: 14px;
  background: rgba(255, 248, 238, 0.85);
  border-radius: 999px;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.play__help b { color: #d9789a; font-weight: 400; }

.prompt {
  position: fixed;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 8px;
  font-size: 18px;
  background: var(--cream);
  border-radius: 999px;
  box-shadow: var(--shadow);
  animation: pop 0.25s ease;
}
.prompt[hidden] { display: none; }
.prompt.is-passive { padding-left: 18px; opacity: 0.85; }
.prompt.is-passive .prompt__key { display: none; }
.prompt__key {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding-top: 3px;
  border-radius: 10px;
  background: var(--pink);
  color: #fff;
}
@keyframes pop { from { transform: translate(-50%, 8px); opacity: 0; } }

/* 터치 조작: 터치 기기에서만 표시 */
.joy, .act, .jumpbtn { display: none; pointer-events: auto; touch-action: none; }
@media (pointer: coarse) {
  .joy {
    display: block;
    position: fixed;
    left: 28px;
    bottom: 28px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 248, 238, 0.55);
    box-shadow: var(--shadow), inset 0 0 0 3px rgba(255, 255, 255, 0.7);
  }
  .joy__knob {
    position: absolute;
    left: 35px;
    top: 35px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--cream);
    box-shadow: var(--shadow);
  }
  .act {
    display: grid;
    place-items: center;
    position: fixed;
    right: 28px;
    bottom: 40px;
    width: 76px;
    height: 76px;
    border: none;
    border-radius: 50%;
    font: inherit;
    font-size: 26px;
    color: #fff;
    background: rgba(233, 138, 162, 0.55);
    box-shadow: var(--shadow);
  }
  .act.is-ready { background: #e98aa2; transform: scale(1.06); }
  /* 점프 버튼: 상호작용(E) 버튼 왼쪽 아래 — 이동 중에도 엄지로 누르기 쉬운 크기 */
  .jumpbtn {
    display: grid; place-items: center; position: fixed; right: 114px; bottom: 22px;
    width: 62px; height: 62px; border: none; border-radius: 50%;
    font: inherit; font-size: 15px; color: #7a4f3a; background: rgba(255, 246, 232, 0.88); box-shadow: var(--shadow);
  }
  .jumpbtn:active { transform: scale(0.94); background: #fde9c8; }
  .play__help { display: none; }
  .prompt { bottom: 170px; }
  .prompt__key { display: none; }
  .prompt { padding-left: 18px; }
}

/* 상호작용 알림 · 게시판 패널 */
.toast {
  position: fixed;
  left: 50%;
  top: 84px;
  transform: translateX(-50%);
  margin: 0;
  max-width: min(92vw, 560px);
  padding: 10px 20px 8px;
  font-size: 17px;
  text-align: center;
  background: var(--cream);
  border-radius: 18px;
  box-shadow: var(--shadow);
  animation: pop 0.25s ease;
}
.toast[hidden], .board[hidden] { display: none; }
.board {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 440px);
  padding: 22px 24px 18px;
  background: #fbe3c2;
  border: 6px solid #e3b47c;
  border-radius: 26px;
  box-shadow: var(--shadow);
  pointer-events: auto;
}
.board h2 { margin: 0 0 12px; font-weight: 400; text-align: center; color: #8a5530; }
.board ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.board li { display: grid; gap: 2px; padding: 10px 14px 8px; background: #fff8ee; border-radius: 14px; }
.board li span { font-size: 14px; opacity: 0.75; }
.board button {
  display: block;
  margin: 14px auto 0;
  padding: 8px 22px 6px;
  font: inherit;
  color: #fff;
  background: #e98aa2;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

/* 실내 입장 · 퇴장 전환 */
.fade {
  position: fixed;
  inset: 0;
  background: #fbe9d4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 5;
}
.fade.is-on { opacity: 1; }

/* 빵 만들기 패널 (하단 시트, 터치 대응)
 * 상단 단계 탭 = 현재 위치 + 지난 단계로 돌아가기, 진행은 하단 큰 버튼 */
body.is-baking .play__help, body.is-baking .prompt, body.is-baking .joy, body.is-baking .act, body.is-baking .jumpbtn, body.is-baking .toast { display: none !important; }
.bake-guide {
  position: fixed; left: 50%; top: 72px; transform: translateX(-50%);
  margin: 0; max-width: calc(100vw - 24px); padding: 8px 16px 6px;
  font-size: 14px; color: #7a4f3a; text-align: center;
  background: rgba(255, 248, 238, 0.92); border-radius: 999px; box-shadow: var(--shadow);
  pointer-events: none;
}
.bake-guide[hidden] { display: none; }
.bake {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(600px, calc(100vw - 24px)); max-height: 48vh; overflow-y: auto;
  padding: 12px 16px 14px; border-radius: 26px;
  background: rgba(255, 248, 238, 0.96);
  box-shadow: var(--shadow), inset 0 0 0 3px rgba(255, 255, 255, 0.8);
  pointer-events: auto; touch-action: manipulation; color: #7a4f3a;
  animation: bakeIn 0.28s ease;
}
.bake[hidden] { display: none; }
@keyframes bakeIn { from { transform: translate(-50%, 24px); opacity: 0; } }
.bake button { font: inherit; color: inherit; border: none; cursor: pointer; transition: transform 0.12s, background 0.12s, opacity 0.12s; }
.bake button:disabled { cursor: default; }
.bake__head { display: flex; align-items: center; gap: 10px; }
.bake__steps { display: flex; gap: 4px; flex: 1; }
.bake__step { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 4px 0 2px; border-radius: 999px; font-size: 12px; background: transparent; }
.bake__step b { display: grid; place-items: center; width: 18px; height: 18px; padding-top: 2px; border-radius: 50%; font-size: 11px; font-weight: 400; background: #eadccd; color: #fff; }
.bake__step.is-future { color: #cdb8a6; }
.bake__step.is-done { color: #a7643c; background: #fbe6d4; }
.bake__step.is-done b { background: #e9a35e; }
.bake__step.is-done:hover { background: #f8d6bd; }
.bake__step.is-on { color: #fff; background: #e98aa2; }
.bake__step.is-on b { background: #fff; color: #e98aa2; }
.bake__close { width: 34px; height: 34px; border-radius: 50%; font-size: 15px; color: #a7643c !important; background: #f4e4d2; }
.bake__title { margin: 10px 0 8px; font-size: 21px; font-weight: 400; text-align: center; }
.bake__title small { display: block; font-size: 12px; color: #c4a48d; margin-bottom: 2px; }
.bake__next { margin: 10px 0 0; text-align: center; font-size: 13px; color: #d9789a; }
.bake__rotmode.is-on { background: #e98aa2; color: #fff !important; }
.bake__label { margin: 8px 0 6px; font-size: 14px; color: #a7643c; }
.bake__label small { color: #c4a48d; }
.bake__seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: #f4e4d2; margin-bottom: 8px; }
.bake__segbtn { flex: 1; white-space: nowrap; min-height: 36px; padding: 5px 8px 3px; border-radius: 999px; font-size: 14px; background: transparent; }
.bake__segbtn.is-on { background: #fff; color: #d9789a !important; box-shadow: 0 2px 0 #ead2bf; }
.bake__segbtn:disabled { opacity: 0.55; }
.bake__segbtn small { font-size: 11px; color: #c4a48d; }
.bake__cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.bake__card { display: grid; justify-items: center; gap: 4px; padding: 10px 4px 8px; border-radius: 18px; font-size: 14px; background: #fff; box-shadow: inset 0 0 0 3px #f4e4d2; }
.bake__icon { font-size: 30px; line-height: 1; }
.bake__row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.bake__row--even > * { flex: 1; justify-content: center; }
.bake__row--tools { margin-top: 10px; }
.bake__chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 13px 4px; border-radius: 999px; font-size: 15px; background: #fff; box-shadow: inset 0 0 0 2px #f4e4d2; }
.bake__chip i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08); }
.bake__chip i.bake__size { background: #d9789a; box-shadow: none; }
.bake__chip:disabled { opacity: 0.5; }
.bake__card.is-on, .bake__chip.is-on { background: #fde2e8; box-shadow: inset 0 0 0 3px #e98aa2; transform: translateY(-2px); }
.bake__swatch { width: 36px; height: 36px; border-radius: 50%; box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.08); }
.bake__swatch.is-on { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #e98aa2; }
.bake__sep { width: 1px; height: 26px; margin: 0 3px; background: #ead7c4; }
.bake__mini { min-height: 36px; padding: 5px 12px 3px; border-radius: 12px; font-size: 14px; background: #f4e4d2; }
.bake__mini:active { transform: translateY(2px); }
.bake__foot { display: flex; gap: 10px; margin-top: 12px; }
.bake__btn { flex: 1; min-height: 50px; padding: 8px 12px 6px; border-radius: 999px; font-size: 18px; color: #fff !important; background: #e98aa2; box-shadow: 0 4px 0 #d06f89; }
.bake__btn.is-ghost { flex: 0.55; font-size: 16px; color: #a7643c !important; background: #f4e4d2; box-shadow: 0 4px 0 #e6cdb4; }
.bake__btn:not(:disabled):active { transform: translateY(3px); box-shadow: none; }
.bake__btn:disabled { background: #e9c3cd; box-shadow: 0 4px 0 #d9aab6; }
.bake__btn[hidden] { display: none; }
.bake__bar { height: 16px; margin: 10px 4px 0; border-radius: 999px; background: #f4e4d2; overflow: hidden; }
.bake__bar.is-idle { opacity: 0.5; }
.bake__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f7c27a, #e98a5a); }
.bake__hint { margin: 8px 0 0; text-align: center; font-size: 14px; color: #a7643c; }
.bake__result { margin: 4px 0 0; text-align: center; font-size: 22px; color: #d9789a; }
.bake__saved { margin: 8px 0 0; text-align: center; font-size: 14px; color: #5fa883; }
@media (max-width: 480px) {
  .bake { bottom: 8px; padding: 10px 10px 10px; max-height: 54vh; }
  .bake-guide { top: 64px; font-size: 13px; }
  .bake__step { font-size: 12px; gap: 3px; }
  .bake__title { font-size: 18px; margin: 8px 0 6px; }
  .bake__cards { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .bake__card { font-size: 13px; padding: 8px 2px 6px; }
  .bake__icon { font-size: 26px; }
  .bake__row { gap: 5px; }
  .bake__chip { min-height: 38px; padding: 5px 10px 3px; font-size: 14px; }
  .bake__swatch { width: 32px; height: 32px; }
  .bake__segbtn { font-size: 13px; padding: 5px 4px 3px; }
}

/* 카페테리아 좌석 메뉴 */
body.is-seated .play__help, body.is-seated .prompt { display: none !important; }
.seat {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(560px, calc(100vw - 24px)); padding: 12px 14px;
  border-radius: 24px; background: rgba(255, 248, 238, 0.95);
  box-shadow: var(--shadow), inset 0 0 0 3px rgba(255, 255, 255, 0.8);
  pointer-events: auto; color: #7a4f3a; animation: bakeIn 0.25s ease;
}
.seat[hidden] { display: none; }
.seat__title { margin: 0 0 8px; text-align: center; font-size: 17px; }
.seat__acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.seat button { font: inherit; color: inherit; border: none; cursor: pointer; }
.seat__act { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 6px; border-radius: 16px; font-size: 14px; background: #fff; box-shadow: inset 0 0 0 2px #f4e4d2; }
.seat__act span { font-size: 22px; line-height: 1.1; }
.seat__act small { font-size: 11px; color: #c4a48d; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat__act.is-on { background: #fde2e8; box-shadow: inset 0 0 0 3px #e98aa2; }
.seat__act:disabled { opacity: 0.5; cursor: default; }
.seat__hint { margin: 8px 0 6px; text-align: center; font-size: 12px; color: #c4a48d; }
.seat__hint b { color: #d9789a; font-weight: 400; }
.seat__stand { width: 100%; min-height: 42px; border-radius: 999px; font-size: 16px; color: #a7643c !important; background: #f4e4d2; box-shadow: 0 3px 0 #e6cdb4; }
@media (pointer: coarse) { .seat { bottom: 160px; } .seat__hint b { display: none; } }

/* 포토부스 '빵컷 스튜디오' */
body.is-photo .play__help, body.is-photo .prompt, body.is-photo .joy, body.is-photo .act, body.is-photo .jumpbtn, body.is-photo .toast { display: none !important; }
.photo { position: fixed; inset: 0; pointer-events: none; color: #7a4f3a; }
.photo[hidden] { display: none; }
.photo button, .photo a { font: inherit; color: inherit; border: none; cursor: pointer; text-decoration: none; }
.photo__frame { position: fixed; border-radius: 22px; box-shadow: 0 0 0 9999px rgba(60, 30, 40, 0.28), inset 0 0 0 3px rgba(255, 255, 255, 0.9); }
.photo__frame[hidden] { display: none; }
.photo__frame::before, .photo__frame::after { content: ''; position: absolute; width: 34px; height: 34px; border: 4px solid #fff; }
.photo__frame::before { left: 12px; top: 12px; border-right: none; border-bottom: none; border-radius: 10px 0 0 0; }
.photo__frame::after { right: 12px; bottom: 12px; border-left: none; border-top: none; border-radius: 0 0 10px 0; }
.photo__rec { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); padding: 3px 12px 1px; font-size: 13px; color: #fff; background: rgba(233, 138, 162, 0.85); border-radius: 999px; white-space: nowrap; }
.photo__count { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); font-size: 120px; color: #fff; text-shadow: 0 6px 0 #e98aa2, 0 0 30px rgba(0, 0, 0, 0.2); }
.photo__count[hidden] { display: none; }
.photo__flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.photo__flash.is-on { animation: phFlash 0.55s ease-out; }
@keyframes phFlash { 0% { opacity: 0.95; } 100% { opacity: 0; } }
.photo__panel {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%);
  width: min(520px, calc(100vw - 24px)); padding: 10px 14px 10px; border-radius: 24px;
  background: rgba(255, 248, 238, 0.96); box-shadow: var(--shadow); pointer-events: auto;
}
.photo__panel[hidden] { display: none; }
.photo.is-counting .photo__panel { opacity: 0.5; pointer-events: none; }
.photo__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 16px; }
.photo__head b { font-weight: 400; color: #d9789a; }
.photo__x { width: 32px; height: 32px; border-radius: 50%; background: #f4e4d2; }
.photo__poses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.photo__poses button { display: grid; justify-items: center; gap: 2px; padding: 7px 2px 5px; border-radius: 14px; font-size: 13px; background: #fff; box-shadow: inset 0 0 0 2px #f4e4d2; }
.photo__poses button span { font-size: 22px; line-height: 1.1; }
.photo__poses button.is-on { background: #fde2e8; box-shadow: inset 0 0 0 3px #e98aa2; }
.photo__row { display: flex; gap: 8px; margin-top: 10px; align-items: stretch; }
.photo__move { width: 56px; border-radius: 16px; font-size: 18px; background: #f4e4d2; }
.photo__shoot { flex: 1; min-height: 52px; border-radius: 999px; font-size: 20px; color: #fff !important; background: #e98aa2; box-shadow: 0 4px 0 #d06f89; }
.photo__shoot:active { transform: translateY(3px); box-shadow: none; }
.photo__hint { margin: 8px 0 0; text-align: center; font-size: 12px; color: #c4a48d; }
.photo__result { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(60, 30, 40, 0.45); pointer-events: auto; padding: 12px; }
.photo__result[hidden] { display: none; }
.photo__card { width: min(380px, 100%); padding: 14px; border-radius: 24px; background: #fff8ee; box-shadow: var(--shadow); }
.photo__card img { display: block; width: 100%; max-height: 62vh; object-fit: contain; border-radius: 12px; }
.photo__card .photo__row > * { flex: 1; display: grid; place-items: center; min-height: 46px; border-radius: 999px; font-size: 15px; background: #f4e4d2; }
.photo__card .photo__save { color: #fff !important; background: #e98aa2; }
@media (max-width: 480px) { .photo__poses button { font-size: 12px; } .photo__count { font-size: 96px; } }
/* 망빵한컷 확장: 함께 찍기 · 움직일 대상 칩, 구도 버튼, 촬영 전용 조이스틱 */
.photo__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 7px; }
.photo__chips[hidden] { display: none; }
.photo__lbl { font-size: 12px; color: #c4a48d; margin-right: 2px; }
.photo__chips button { padding: 5px 10px 3px; border-radius: 999px; font-size: 13px; background: #fff; box-shadow: inset 0 0 0 2px #f4e4d2; }
.photo__chips button.is-on { background: #fde2e8; box-shadow: inset 0 0 0 2px #e98aa2; color: #c25e7e; }
.photo__poses.is-buddy { grid-template-columns: repeat(3, 1fr); }
.photo__fit { font-size: 12px; line-height: 1.15; }
.photo__row .photo__move { flex: none; }
.photo__joy { display: none; position: fixed; left: 22px; width: 104px; height: 104px; bottom: calc(var(--photo-panel-h, 230px) + 24px); border-radius: 50%; background: rgba(255, 248, 238, 0.6); box-shadow: var(--shadow), inset 0 0 0 3px rgba(255, 255, 255, 0.8); pointer-events: auto; touch-action: none; }
.photo__joy i { position: absolute; left: 30px; top: 30px; width: 44px; height: 44px; border-radius: 50%; background: var(--cream); box-shadow: var(--shadow); }
.photo__joy[hidden] { display: none !important; }
@media (pointer: coarse) { .photo__joy { display: block; } .photo__hint { display: none; } }

/* 망빵즈 NPC 대화 */
body.is-talking .play__help, body.is-talking .prompt { display: none !important; }
.npc-panel .seat__acts { grid-template-columns: repeat(3, 1fr); }
.npc-bubble {
  position: fixed; z-index: 30; transform: translate(-50%, -100%);
  max-width: min(280px, 80vw); margin: 0; padding: 9px 14px 7px; border-radius: 18px;
  background: #fff8ee; color: #7a4f3a; font-size: 15px; line-height: 1.35; text-align: center;
  box-shadow: 0 6px 18px rgba(122, 79, 58, 0.18); pointer-events: none;
}
.npc-bubble[hidden] { display: none; }
.npc-bubble::after { content: ''; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); border: 8px solid transparent; border-bottom: 0; border-top-color: #fff8ee; }

/* 캐릭터 꾸미기 */
body.is-playing .hud__views button.hud__custom { display: inline-block; } /* 꾸미기 · 내 빵 보관함 메뉴는 플레이 중에도 보임 (button 까지 지정해야 위 숨김 규칙보다 우선) */
body.is-photo .hud__views button.hud__custom, body.is-modal .hud__views button.hud__vault { visibility: hidden; }
body.is-customizing .play, body.is-customizing .npc-bubble { visibility: hidden; }
.cz { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(90, 55, 40, 0.35); font-family: Jua, "Apple SD Gothic Neo", sans-serif; color: #7a4f3a; }
.cz[hidden] { display: none; }
.cz button { font: inherit; color: inherit; border: none; cursor: pointer; }
.cz__card { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(300px, 1.15fr); width: min(940px, 100%); height: min(620px, calc(100vh - 32px)); border-radius: 28px; overflow: hidden; background: #fff8ee; box-shadow: 0 18px 50px rgba(90, 55, 40, 0.25); }
.cz__stage { position: relative; background: radial-gradient(circle at 50% 40%, #fff6ec, #f6e2d2); touch-action: none; }
.cz__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.cz__tip { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); margin: 0; padding: 4px 12px 2px; border-radius: 999px; font-size: 13px; background: rgba(255, 248, 238, 0.85); white-space: nowrap; pointer-events: none; }
.cz__side { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 16px; overflow-y: auto; }
.cz__head { display: flex; align-items: center; justify-content: space-between; font-size: 20px; }
.cz__head b { font-weight: 400; }
.cz__x { width: 34px; height: 34px; border-radius: 50%; background: #f4e4d2; }
.cz__tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.cz__tabs button { padding: 6px 12px 4px; border-radius: 999px; font-size: 14px; background: #f4e4d2; }
.cz__tabs button.is-on { background: #e98aa2; color: #fff; }
.cz__opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.cz__opt { display: grid; justify-items: center; gap: 3px; padding: 10px 4px 8px; border-radius: 16px; font-size: 14px; background: #fff; box-shadow: inset 0 0 0 2px #f4e4d2; }
.cz__opt span { font-size: 24px; line-height: 1.1; }
.cz__opt.is-on { background: #fde2e8; box-shadow: inset 0 0 0 3px #e98aa2; }
.cz__label { margin: 2px 0 6px; font-size: 14px; color: #a7643c; }
.cz__colorsWrap[hidden] { display: none; }
.cz__colors { display: flex; flex-wrap: wrap; gap: 8px; }
.cz__sw { width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08); }
.cz__sw.is-on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #e98aa2; }
.cz__note { margin: 0; font-size: 13px; color: #b08a73; min-height: 1.2em; }
.cz__sum { margin: 0; font-size: 13px; color: #8d6a57; }
.cz__foot { display: flex; gap: 8px; margin-top: auto; }
.cz__foot button { flex: 1; min-height: 46px; border-radius: 999px; font-size: 15px; background: #f4e4d2; box-shadow: 0 3px 0 #e6cdb4; }
.cz__foot .is-main { color: #fff !important; background: #e98aa2; box-shadow: 0 3px 0 #d06f89; }
@media (max-width: 720px) {
  .cz { padding: 8px; }
  .cz__card { grid-template-columns: 1fr; grid-template-rows: 40% 60%; height: calc(100vh - 16px); }
  .cz__opts { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
  .cz__opt { font-size: 12px; }
}

/* 외부 링크 팝업 (게시판 · 게임기) */
body.is-modal .play__help, body.is-modal .prompt, body.is-modal .joy, body.is-modal .act, body.is-modal .jumpbtn { visibility: hidden; }
.lk { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(90, 55, 40, 0.35); font-family: Jua, "Apple SD Gothic Neo", sans-serif; color: #7a4f3a; }
.lk[hidden] { display: none; }
.lk__card { position: relative; width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px 18px 16px; border-radius: 26px; background: #fff8ee; box-shadow: 0 16px 40px rgba(90, 55, 40, 0.25), inset 0 0 0 4px #f6d9c4; }
.lk__x { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border: none; border-radius: 50%; font: inherit; color: #a7643c; background: #f4e4d2; cursor: pointer; }
.lk__title { margin: 0 0 4px; text-align: center; font-size: 22px; font-weight: 400; color: #8a5530; }
.lk__sub { margin: 0 0 14px; text-align: center; font-size: 13px; color: #b08a73; }
.lk__list { display: grid; gap: 10px; }
.lk__item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 2px #f4e4d2; }
.lk__item.is-big { grid-template-columns: auto 1fr; padding: 14px; }
.lk__item.is-big .lk__go { grid-column: 1 / -1; justify-self: stretch; text-align: center; min-height: 50px; font-size: 18px; }
.lk__icon { font-size: 28px; }
.lk__text { display: grid; gap: 2px; }
.lk__text b { font-weight: 400; font-size: 16px; }
.lk__text small { font-size: 12.5px; color: #a58670; font-family: "Apple SD Gothic Neo", sans-serif; }
.lk__go { display: inline-grid; place-items: center; min-height: 42px; padding: 6px 14px 4px; border-radius: 999px; color: #fff; background: #e98aa2; box-shadow: 0 3px 0 #d06f89; text-decoration: none; white-space: nowrap; font-size: 15px; }
.lk__go:active { transform: translateY(2px); box-shadow: none; }
.lk__close { display: block; width: 100%; min-height: 44px; margin-top: 12px; border: none; border-radius: 999px; font: inherit; font-size: 15px; color: #a7643c; background: #f4e4d2; cursor: pointer; }
@media (max-width: 420px) { .lk__item { grid-template-columns: auto 1fr; } .lk__go { grid-column: 1 / -1; } }
/* 망빵즈 소식함: 사진 카드 + 인기 빵 카드 */
.lk__feed { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lk__photo { margin: 0; padding: 8px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 2px #f4e4d2; }
.lk__photo img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; }
.lk__photo figcaption { margin-top: 6px; font-size: 13px; text-align: center; color: #c25e7e; }
.lk__bread { display: grid; align-content: center; justify-items: center; gap: 4px; padding: 12px 8px; border-radius: 18px; text-align: center; background: #fff3d6; box-shadow: inset 0 0 0 2px #f4e4d2; }
.lk__bread span { font-size: 46px; }
.lk__bread b { font-weight: 400; font-size: 18px; }
.lk__bread small { font-size: 12px; color: #a58670; }

/* ---------- 빵 결과 화면 (.br) · 내 빵 보관함 (.bv) — js/play/breadResult.js ---------- */
.br, .bv { position: fixed; inset: 0; z-index: 62; display: grid; place-items: center; padding: 12px; background: rgba(90, 55, 40, 0.38); font-family: Jua, "Apple SD Gothic Neo", sans-serif; color: #7a4f3a; }
.br[hidden], .bv[hidden], .br [hidden], .bv [hidden] { display: none !important; }
.br__card, .bv__card { position: relative; width: min(460px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px 14px; border-radius: 26px; background: #fff8ee; box-shadow: 0 16px 40px rgba(90, 55, 40, 0.25), inset 0 0 0 4px #f6d9c4; }
.br__x { position: absolute; right: 12px; top: 12px; z-index: 2; width: 36px; height: 36px; border: none; border-radius: 50%; font: inherit; color: #a7643c; background: #f4e4d2; cursor: pointer; }
.br__title, .bv__title { margin: 0 40px 10px; text-align: center; font-size: 21px; font-weight: 400; color: #8a5530; }
.br__title small { display: block; font-size: 13px; color: #e0789a; }
.br__stage { position: relative; height: min(42dvh, 340px); min-height: 200px; border-radius: 20px; overflow: hidden; touch-action: none; cursor: grab; background: radial-gradient(circle at 50% 38%, #fffdf8 0%, #ffeef0 62%, #ffdbe5 100%); }
.br__stage.is-drag { cursor: grabbing; }
.br__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.br__hint { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); padding: 3px 10px 2px; border-radius: 999px; font-size: 12px; color: #a5735a; background: rgba(255, 255, 255, 0.8); white-space: nowrap; pointer-events: none; }
.br__form { display: grid; gap: 8px; margin-top: 12px; }
.br__field { position: relative; display: grid; gap: 4px; font-size: 14px; }
.br__field small { font-size: 11.5px; color: #b08a73; }
.br__field input, .br__field textarea, .br__share textarea { width: 100%; box-sizing: border-box; padding: 9px 12px; border: 2px solid #f4d9c6; border-radius: 14px; font: 16px "Apple SD Gothic Neo", sans-serif; color: #6b4433; background: #fff; resize: none; }
.br__field input:focus, .br__field textarea:focus { outline: none; border-color: #e98aa2; }
.br__count { position: absolute; right: 10px; bottom: 6px; }
.br__view { margin-top: 12px; text-align: center; }
.br__name { margin: 0; font-size: 22px; color: #d9789a; }
.br__message { margin: 4px 0 0; font: 15px "Apple SD Gothic Neo", sans-serif; color: #8a6450; white-space: pre-wrap; word-break: break-all; }
.br__meta { margin: 8px 0 0; text-align: center; font-size: 12.5px; color: #a58670; }
.br__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.br__btn { min-height: 46px; padding: 6px 10px 4px; border: none; border-radius: 999px; font: inherit; font-size: 15px; color: #fff; background: #e98aa2; box-shadow: 0 3px 0 #d06f89; cursor: pointer; }
.br__btn.is-main { grid-column: 1 / -1; min-height: 50px; font-size: 17px; }
.br__btn.is-ghost { color: #a7643c; background: #f4e4d2; box-shadow: 0 3px 0 #e6cdb6; }
.br__btn.is-warn { color: #fff; background: #e0675f; box-shadow: 0 3px 0 #c24f48; }
.br__btn:disabled { opacity: 0.75; cursor: default; background: #9fcfb5; box-shadow: 0 3px 0 #83b89c; }
.br__notice { min-height: 1.3em; margin: 8px 0 0; text-align: center; font-size: 13px; color: #5fa883; }
.br__notice[data-kind="warn"] { color: #d07a3a; }
.br__notice[data-kind="err"] { color: #d0504a; }
.br__share { display: grid; gap: 6px; margin-top: 6px; padding: 10px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 2px #f4e4d2; font-size: 13px; }
.br__share p { margin: 0; }
.br__note { margin: 10px 0 0; font: 11.5px/1.45 "Apple SD Gothic Neo", sans-serif; color: #b39a88; text-align: center; }
.bv__sub { margin: 0 0 12px; text-align: center; font-size: 13px; color: #b08a73; min-height: 1.2em; }
.bv__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.bv__item { display: grid; gap: 2px; padding: 8px 8px 6px; border: none; border-radius: 18px; font: inherit; color: inherit; background: #fff; box-shadow: inset 0 0 0 2px #f4e4d2; cursor: pointer; text-align: center; }
.bv__item:hover, .bv__item:focus-visible { box-shadow: inset 0 0 0 3px #e98aa2; outline: none; }
.bv__thumb { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; overflow: hidden; font-size: 40px; background: #ffeef0; }
.bv__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bv__item b { font-weight: 400; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bv__item small { font-size: 11.5px; color: #b08a73; }
.bv__empty { display: grid; gap: 4px; padding: 26px 12px; border-radius: 18px; text-align: center; background: #fff; box-shadow: inset 0 0 0 2px #f4e4d2; }
/* 보관함 ↔ 진열: 진열중 표시 · 진열 버튼 · 자리 고르기 */
.bv__item { position: relative; }
.bv__item.is-shown { box-shadow: inset 0 0 0 3px #9fcfb5; }
.bv__open { display: grid; gap: 2px; padding: 0; border: none; font: inherit; color: inherit; background: none; cursor: pointer; text-align: center; min-width: 0; }
.bv__open .bv__thumb { position: relative; }
.bv__tag { position: absolute; left: 6px; top: 6px; padding: 3px 8px 1px; border-radius: 999px; font-size: 11.5px; color: #fff; background: #6fb592; }
.bv__tag.is-soft { background: rgba(167, 100, 60, 0.75); }
.bv__act { margin-top: 4px; min-height: 34px; border: none; border-radius: 999px; font: inherit; font-size: 13px; color: #fff; background: #e98aa2; box-shadow: 0 2px 0 #d06f89; cursor: pointer; }
.bv__act.is-ghost { color: #a7643c; background: #f4e4d2; box-shadow: 0 2px 0 #e6cdb6; }
.bv__slot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; padding: 8px 10px; border-radius: 16px; background: #eef8f2; font-size: 14px; }
.bv__slot .br__btn { min-height: 36px; font-size: 13px; }
.bv__slot b { font-weight: 400; color: #4f8f78; }
.bv__ctitle { margin: 0 0 10px; text-align: center; font-size: 15px; }
.bv__slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 10px; }
.bv__slots button { display: grid; gap: 2px; padding: 10px 8px 8px; border: none; border-radius: 16px; font: inherit; color: inherit; background: #fff; box-shadow: inset 0 0 0 2px #f6c9d4; cursor: pointer; }
.bv__slots button.is-full { box-shadow: inset 0 0 0 2px #f4e4d2; }
.bv__slots button.is-here { box-shadow: inset 0 0 0 3px #9fcfb5; cursor: default; }
.bv__slots b { font-weight: 400; font-size: 14px; }
.bv__slots small { font-size: 12px; color: #b08a73; }
.br__status { grid-column: 1 / -1; margin: 0; text-align: center; font-size: 14px; color: #b08a73; }
.br__status.is-ok { color: #4f9a76; }
.br__btn.is-wide { grid-column: 1 / -1; }
.bv__empty b { font-weight: 400; font-size: 17px; }
.bv__empty span { font-size: 13px; color: #a58670; }
.bv__close { display: block; width: 100%; margin-top: 10px; }
@media (max-width: 480px) { .br__stage { height: min(34dvh, 300px); } .br__card, .bv__card { padding: 16px 12px 12px; } }
@media (max-height: 640px) { .br__stage { height: 34dvh; min-height: 170px; } }

/* ---------- 빵 상세보기 (.bd) — js/play/breadResult.js ---------- */
.bd { position: fixed; inset: 0; z-index: 62; display: grid; place-items: center; padding: 12px; background: rgba(90, 55, 40, 0.38); font-family: Jua, "Apple SD Gothic Neo", sans-serif; color: #7a4f3a; }
.bd[hidden], .bd [hidden] { display: none !important; }
.bd__card { position: relative; width: min(500px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 14px 14px 12px; border-radius: 26px; background: #fff8ee; box-shadow: 0 16px 40px rgba(90, 55, 40, 0.25), inset 0 0 0 4px #f6d9c4; }
.bd__stage { position: relative; height: min(52vh, 420px); border-radius: 20px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #fffaf3, #fbe3e8); touch-action: none; cursor: grab; }
.bd__stage.is-drag { cursor: grabbing; }
.bd__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bd__stage .br__hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 1; white-space: nowrap; }
.bd__reset { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 6px 12px 4px; border: none; border-radius: 999px; font: inherit; font-size: 13px; color: #a7643c; background: rgba(255, 248, 238, 0.9); box-shadow: 0 2px 0 #ecd6c2; cursor: pointer; }
.bd__info { padding: 10px 6px 2px; text-align: center; }
.bd__tag { margin: 0; font-size: 12px; color: #b08a73; }
.bd__name { margin: 4px 0 2px; font-size: 22px; font-weight: 400; color: #8a5530; }
.bd__msg { margin: 6px 0 0; font-size: 15px; color: #c25e7e; }
.bd__author { margin: 6px 0 0; font-size: 13px; color: #9a8070; }
.bd__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.bd__btns .is-main { grid-column: 1 / -1; }
/* 트레이 들고 다니기 HUD */
.tray-hud { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; border-radius: 999px; background: rgba(255, 248, 238, 0.95); box-shadow: var(--shadow); font-family: Jua, "Apple SD Gothic Neo", sans-serif; font-size: 14px; color: #7a4f3a; pointer-events: auto; }
.tray-hud[hidden], body.is-photo .tray-hud, body.is-modal .tray-hud, body.is-baking .tray-hud { display: none; }
.tray-hud button { padding: 6px 12px 4px; border: none; border-radius: 999px; font: inherit; font-size: 13px; color: #fff; background: #e98aa2; box-shadow: 0 2px 0 #d06f89; cursor: pointer; }
/* 망빵한컷: 캐릭터 고르기 · 발판 · 구도 프리셋 */
.photo__targets .is-me { background: #fff3d6; box-shadow: inset 0 0 0 2px #f2cf87; }
.photo__targets .is-me.is-on { background: #ffe9b8; box-shadow: inset 0 0 0 2px #e7b04e; color: #9a6a1c; }
.photo__buddyctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -2px 0 8px; padding: 6px 8px; border-radius: 14px; background: #fff3f5; }
.photo__buddyctl[hidden] { display: none; }
.photo__status { flex: 1 1 100%; font-size: 12.5px; color: #c25e7e; }
.photo__buddyctl button { padding: 6px 12px 4px; border-radius: 999px; font-size: 13px; background: #fff; box-shadow: inset 0 0 0 2px #f6c9d4; }
.photo__buddyctl button.is-on { background: #e98aa2; color: #fff !important; box-shadow: none; }
.photo__cams { margin-top: 8px; margin-bottom: 0; }
.photo__free { display: inline-flex; gap: 4px; }
.photo__free[hidden] { display: none; }
.photo__free button { min-width: 34px; }
.photo__row .photo__shoot { flex: 1; }

/* 구역 안내 (카메라 시야 기반, js/play/areaLabels.js): 메인 = 반투명 캡슐 + 아래 포인터 / 보조 = 배경 없는 화살표 + 글자 */
.area-ui { position: fixed; inset: 0; pointer-events: none; z-index: 4; font-family: Jua, "Apple SD Gothic Neo", sans-serif; }
.area-tag { position: absolute; left: 0; top: 0; will-change: transform; }
.area-tag__in {
  position: absolute; left: 0; bottom: 9px; transform: translate(-50%, 6px);
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: rgba(255, 251, 244, 0.78); border: 1px solid rgba(160, 120, 90, 0.14);
  box-shadow: 0 2px 8px rgba(120, 80, 50, 0.08);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  color: #7a4f3a; font-size: 16px; line-height: 1;
  opacity: 0; visibility: hidden;
  transition: opacity 0.26s ease, transform 0.26s ease, visibility 0s linear 0.26s;
}
.area-tag__in::after { /* 아래 작은 삼각형 포인터 */
  content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  border: 6px solid transparent; border-bottom: 0; border-top-color: rgba(255, 251, 244, 0.85);
}
.area-tag__icon { font-size: 15px; }
.area-tag.is-on .area-tag__in { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s; }
.area-hint {
  position: absolute; top: 46%; color: rgba(255, 252, 246, 0.95); font-size: 14px; white-space: nowrap;
  text-shadow: 0 1px 3px rgba(110, 70, 45, 0.45); opacity: 0; transition: opacity 0.28s ease;
}
.area-hint[data-side='l'] { left: 18px; }
.area-hint[data-side='r'] { right: 18px; }
.area-hint.is-on { opacity: 0.62; transition: opacity 0.22s ease; }
@media (max-width: 600px) { .area-tag__in { font-size: 13px; padding: 4px 11px 4px 8px; } .area-hint { font-size: 12px; } }

/* 카페: 트레이 빵을 다 먹은 뒤 한마디 카드 (cafeActs.js) — 빵 메시지가 없으면 '망빵즈의 응원'으로 구분 */
.eat-card { position: fixed; left: 50%; top: 14%; transform: translateX(-50%); z-index: 30; width: min(360px, calc(100vw - 32px)); padding: 14px 16px 12px; border-radius: 22px; background: rgba(255, 250, 243, 0.97); box-shadow: var(--shadow); text-align: center; color: #7a4f3a; pointer-events: auto; animation: bakeIn 0.25s ease; }
.eat-card[hidden] { display: none; }
.eat-card__title { margin: 0 0 8px; font-size: 16px; }
.eat-card__msg { margin: 0 0 6px; font-size: 18px; line-height: 1.4; color: #a8603c; word-break: keep-all; }
.eat-card__from { margin: 0 0 10px; font-size: 12px; color: #c4a48d; }
.eat-card__ok { font: inherit; border: none; cursor: pointer; padding: 6px 22px; border-radius: 999px; background: #f6b6c4; color: #fff; }

/* 계산대 '주문·포장하기' (counterActs.js) */
.counter-panel { z-index: 25; }
.counter__tray { margin: -2px 0 10px; text-align: center; font-size: 13px; color: #a8806a; word-break: keep-all; }
.counter__styles { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.counter__style { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 2px #f4e4d2; font-size: 13px; }
.counter__style i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.counter__style.is-on { background: #fde2e8; box-shadow: inset 0 0 0 3px #e98aa2; }
.counter__preview { position: relative; width: min(220px, 52vw); aspect-ratio: 1; margin: 0 auto 8px; border-radius: 16px; overflow: hidden; background: #fff3e6; }
.counter__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.counter__preview span { position: absolute; inset: 0; display: none; place-items: center; font-size: 13px; color: #c4a48d; background: rgba(255, 246, 236, 0.8); }
.counter__preview.is-loading span { display: grid; }
.counter__row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.counter__note { margin: 8px 0 4px; text-align: center; font-size: 11px; color: #c4a48d; }
.counter-panel .seat__stand.is-ghost { margin-top: 4px; background: transparent; }
.counter-panel [hidden] { display: none !important; } /* .seat__acts 의 display:grid 가 hidden 을 덮지 않게 */

/* 보관함 · 진열 나눔 안내 (breadResult.js / breadDisplay.js) */
.bv__notice { margin: -2px 0 10px; padding: 7px 12px; border-radius: 14px; background: #fff3e6; font-size: 13px; color: #a8705a; text-align: center; word-break: keep-all; }
.bv__notice small { display: block; font-size: 11px; color: #c4a48d; }
.bv__cnote { margin: -4px 0 10px; font-size: 12px; color: #c27b8e; text-align: center; word-break: keep-all; }
.bv__share { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-style: normal; font-size: 11px; background: #e8f6ee; color: #4f9a77; }
.bv__share.is-done { background: #f1ece6; color: #a8907e; }

/* 꾸미기: 상위 탭 5개 아래 하위 카테고리 (얼굴: 눈 · 입 / 옷: 상의 · 하의 · 한벌옷 / 액세서리: 안경 · 머리 장식) */
.cz__subs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; padding: 4px; border-radius: 999px; background: #fbf1e6; width: fit-content; }
.cz__subs[hidden] { display: none; }
.cz__subs button { padding: 4px 12px 3px; border-radius: 999px; font-size: 13px; background: transparent; color: #a8806a; }
.cz__subs button.is-on { background: #fff; color: #c25e7e; box-shadow: 0 1px 4px rgba(150, 100, 70, 0.15); }

/* 외부 광장 콘텐츠 패널 (간식 · 무대 · 쿠키 링 던지기) — 카페 좌석 패널(.seat)과 같은 모양 */
.pz__aim { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 2px 0 8px; }
.pz__aim .seat__act { padding: 6px 14px; font-size: 16px; }
.pz__meter { position: relative; height: 18px; margin: 4px 6px 8px; border-radius: 10px; background: #fbe6d6; box-shadow: inset 0 0 0 2px #f4dcc6; overflow: hidden; }
.pz__meter i { position: absolute; top: 0; bottom: 0; background: #bfe6cf; }
.pz__meter em { position: absolute; top: -2px; bottom: -2px; width: 6px; margin-left: -3px; border-radius: 3px; background: #e86a78; }
.pz__row { display: flex; gap: 8px; }
.pz__row .seat__stand { flex: 1; }
.pz__ghost { background: #fff !important; box-shadow: inset 0 0 0 2px #f4e4d2; }
.pz__result { margin: -2px 0 6px; text-align: center; font-size: 15px; color: #b9705a; }
.pz__result.is-ok { color: #4f9e78; }

/* 멀티플레이 접속 상태 (로고 아래, 버튼을 가리지 않는 작은 캡슐) */
.mp-badge { position: fixed; top: 66px; left: 16px; z-index: 5; padding: 5px 12px 4px; border-radius: 999px; font-size: 13px; color: #7a4f3a; background: rgba(255, 246, 232, 0.9); box-shadow: var(--shadow); pointer-events: auto; }
.mp-badge[data-status="online"] { color: #3f8f6a; }
.mp-badge[data-status="error"], .mp-badge[data-status="retrying"] { color: #b9705a; }
body.is-photo .mp-badge, body.is-baking .mp-badge { display: none; }
/* 이모트 */
.hud__emote { display: none; }
.emote-bar { position: fixed; top: 64px; right: 16px; z-index: 6; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: min(460px, calc(100vw - 32px)); padding: 8px; border-radius: 22px; background: rgba(255, 248, 238, 0.95); box-shadow: var(--shadow); }
.emote-bar[hidden] { display: none; }
.emote-bar button { display: grid; justify-items: center; gap: 1px; min-width: 56px; padding: 6px 6px 5px; border: none; border-radius: 14px; font: inherit; font-size: 12px; color: #7a4f3a; background: #fff; box-shadow: inset 0 0 0 2px #f4e4d2; cursor: pointer; }
.emote-bar button span { font-size: 20px; line-height: 1.1; }
body:not(.is-playing) .emote-bar { display: none; }

/* ===================== HUD 리파인 (2026-11-30, 사용자 시안 기준) =====================
 * 범위: 상단 HUD · 접속 상태 · 메뉴 · 조작 가이드 · 감정표현 버튼만 (다른 팝업은 건드리지 않음)
 * 위계: 1순위 꾸미기 · 빵 보관함(텍스트 버튼, 가장 진한 배경) / 2순위 메뉴 · 감정표현(아이콘 버튼) / 3순위 접속 상태 · 조작 가이드(작고 옅게)
 * 공통: 아이보리 배경(알파만 조절) · 브라운 글자 · 핑크는 타이틀 강조와 포커스 링에만 · 얇은 그림자 · 라운드 14px 계열 */
:root {
  --hud-bg: rgba(255, 248, 238, 0.94);
  --hud-bg-2: rgba(255, 248, 238, 0.86);
  --hud-bg-3: rgba(255, 248, 238, 0.74);
  --hud-ink: #6b4a3a;
  --hud-ink-soft: #8a6a58;
  --hud-pink: #e98aa2;
  --hud-shadow: 0 2px 8px rgba(110, 72, 52, 0.12);
  --hud-h: 40px;
}
.hud { top: max(14px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right)); align-items: flex-start; }
.hud__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: auto; }
.hud__title { height: var(--hud-h); padding: 1px 16px 0; font-size: 21px; line-height: calc(var(--hud-h) - 1px); letter-spacing: -0.2px; background: rgba(255, 248, 238, 0.84); border-radius: 18px; box-shadow: var(--hud-shadow); }
.hud__title span { color: var(--hud-pink); }
.hud__status { margin: 0 0 0 4px; padding: 4px 10px 3px; font-size: 12.5px; line-height: 1.3; color: var(--hud-ink-soft); background: rgba(255, 248, 238, 0.72); border-radius: 10px; white-space: nowrap; transition: background 0.2s ease; }
.hud__views { gap: 8px; align-items: center; }
.hud .hud-ico { width: 18px; height: 18px; flex: none; display: block; }
/* 1순위: 꾸미기 · 빵 보관함 */
.hud__views button.hud__primary { display: none; align-items: center; gap: 6px; height: var(--hud-h); padding: 0 14px 0 11px; font-size: 15px; line-height: 1; color: var(--hud-ink); background: var(--hud-bg); border-radius: 14px; box-shadow: var(--hud-shadow); transition: background 0.15s ease, transform 0.12s ease; }
body.is-playing .hud__views button.hud__primary { display: inline-flex; }
.hud__views button.hud__primary span { padding-top: 2px; }
/* 2순위: 메뉴 (아이콘 전용 · 조금 작게 · 조금 옅게) */
.hud__views button.hud__menu { display: grid; place-items: center; width: var(--hud-h); height: var(--hud-h); padding: 0; color: var(--hud-ink); background: var(--hud-bg-2); border-radius: 14px; box-shadow: var(--hud-shadow); transition: background 0.15s ease, transform 0.12s ease; }
body.is-playing .hud__views button.hud__menu { display: grid; }
.hud__views button.hud__primary:hover, .hud__views button.hud__menu:hover { transform: none; background: #fffdf8; }
.hud__views button.hud__primary:active, .hud__views button.hud__menu:active { transform: scale(0.97); }
.hud__views button.hud__menu.is-on { background: #fff; }
.hud__views button:focus-visible, .emote-btn:focus-visible, .guide__toggle:focus-visible, .hud-menu button:focus-visible { outline: 2px solid var(--hud-pink); outline-offset: 2px; }
/* 메뉴 펼침 */
.hud-menu { position: fixed; top: calc(max(14px, env(safe-area-inset-top)) + var(--hud-h) + 8px); right: max(14px, env(safe-area-inset-right)); z-index: 7; display: flex; flex-direction: column; min-width: 184px; padding: 6px; background: rgba(255, 248, 238, 0.97); border-radius: 14px; box-shadow: 0 6px 18px rgba(110, 72, 52, 0.16); animation: hudIn 0.16s ease; }
.hud-menu[hidden] { display: none; }
.hud-menu button { height: 38px; padding: 0 12px; border: none; border-radius: 10px; font: inherit; font-size: 14px; text-align: left; color: var(--hud-ink); background: transparent; cursor: pointer; }
.hud-menu button:hover { background: #fdeee6; }
@keyframes hudIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* 3순위: 조작 가이드 (아래 가운데, 기본 접힘) */
.play__help { display: none !important; } /* 예전 한 줄 안내 → 아래 접는 가이드로 대체 */
.guide { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.guide__toggle { display: inline-flex; align-items: center; gap: 7px; height: 46px; padding: 0 14px 0 13px; border: none; border-radius: 14px; font: inherit; font-size: 14px; color: var(--hud-ink-soft); background: var(--hud-bg-3); box-shadow: var(--hud-shadow); cursor: pointer; pointer-events: auto; transition: background 0.15s ease; }
.guide__toggle:hover { background: var(--hud-bg); color: var(--hud-ink); }
.guide__toggle > span:nth-child(2) { padding-top: 2px; }
.guide__ico .hud-ico { width: 20px; height: 20px; display: block; }
.guide__chev .hud-ico { width: 16px; height: 16px; display: block; }
.guide__panel { pointer-events: auto; padding: 10px 14px; max-width: min(720px, calc(100vw - 32px)); background: var(--hud-bg); border-radius: 14px; box-shadow: var(--hud-shadow); opacity: 0; transform: translateY(6px); visibility: hidden; transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s; }
.guide.is-open .guide__panel { opacity: 1; transform: none; visibility: visible; transition: opacity 0.18s ease, transform 0.18s ease; }
.guide__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.guide__list li { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--hud-ink); white-space: nowrap; }
.guide__list kbd { display: inline-block; min-width: 24px; padding: 3px 7px 2px; font: inherit; font-size: 12.5px; text-align: center; color: #b4607a; background: #fde7ec; border-radius: 7px; box-shadow: inset 0 -1.5px 0 rgba(180, 96, 122, 0.22); }
.guide__list--touch { display: none; }
body.guide-open .prompt { bottom: 128px; } /* 펼친 가이드와 E 안내가 겹치지 않게 */

/* 2순위: 감정표현 (오른쪽 아래 아이콘 전용 48×48) */
.emote-btn { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 5; display: none; place-items: center; width: 48px; height: 48px; padding: 0; border: none; border-radius: 16px; color: var(--hud-ink); background: var(--hud-bg-2); box-shadow: var(--hud-shadow); cursor: pointer; pointer-events: auto; transition: background 0.15s ease, transform 0.12s ease; }
body.is-playing .emote-btn { display: grid; }
.emote-btn .hud-ico { width: 24px; height: 24px; display: block; }
.emote-btn:hover, .emote-btn.is-on { background: #fffdf8; }
.emote-btn:active { transform: scale(0.96); }
.emote-btn::after { content: attr(data-tip); position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); padding: 4px 9px 3px; font-size: 12.5px; white-space: nowrap; color: var(--hud-ink); background: rgba(255, 248, 238, 0.96); border-radius: 8px; box-shadow: var(--hud-shadow); opacity: 0; pointer-events: none; transition: opacity 0.12s ease; }
@media (hover: hover) { .emote-btn:hover::after { opacity: 1; } }
.emote-bar { top: auto; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 58px); } /* 메뉴는 그대로, 버튼 바로 위에 */

/* 숨김 상황 (예전 한 줄 안내와 같은 규칙) */
body.is-baking .guide, body.is-photo .guide, body.is-seated .guide, body.is-talking .guide, body.is-modal .guide, body.is-customizing .guide,
body.is-baking .emote-btn, body.is-photo .emote-btn, body.is-modal .emote-btn, body.is-customizing .emote-btn, body.is-pz .emote-btn { display: none !important; }
body.is-photo .hud__status, body.is-baking .hud__status { visibility: hidden; }

/* 작은 노트북 · 좁은 화면 */
@media (max-width: 760px) {
  .hud__title { font-size: 18px; padding: 1px 13px 0; }
  .hud__views button.hud__primary { padding: 0 11px 0 9px; font-size: 14px; }
}
@media (max-width: 520px) {
  :root { --hud-h: 40px; }
  .hud__views button.hud__primary span { display: none; } /* 아주 좁으면 아이콘만 (접근성 레이블은 title) */
  .hud__views button.hud__primary { width: var(--hud-h); padding: 0; justify-content: center; }
  .hud__title { font-size: 16px; }
}
/* 터치 기기: 실제 터치 조작 안내 · 이동/점프/E 버튼과 겹치지 않게 감정표현을 E 버튼 위로 */
@media (pointer: coarse) {
  .guide__list--pc { display: none; }
  .guide__list--touch { display: flex; }
  .guide { bottom: max(14px, env(safe-area-inset-bottom)); }
  .guide__toggle { height: 44px; }
  .emote-btn { right: max(42px, env(safe-area-inset-right)); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 120px); }
  .emote-bar { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 178px); }
}
/* 좁은 터치 화면(세로 모바일): 아래쪽은 조이스틱 · 점프 · E 버튼이 차지 → 조작 가이드를 접속 상태 아래(왼쪽 위)로, 펼치면 아래로 열림 */
@media (pointer: coarse) and (max-width: 640px) {
  .guide { left: 14px; top: 92px; bottom: auto; transform: none; flex-direction: column-reverse; align-items: flex-start; }
  .guide__toggle { height: 36px; font-size: 13px; padding: 0 12px 0 11px; }
  .guide__chev { transform: rotate(180deg); }
  .guide__panel { max-width: calc(100vw - 28px); transform: translateY(-6px); }
  .guide.is-open .guide__panel { transform: none; }
  body.guide-open .prompt { bottom: 170px; }
}
/* 유수풀 탑승 중: 터치 E 버튼이 '내리기' (같은 원형 버튼 · 글자만 작게) */
.act.is-exit { font-size: 16px; letter-spacing: -0.02em; }
