/* 위드엠알오 3D 홍보관 — 그라데이션 · 원색 없이 네이비 · 그레이 · 화이트 */
@font-face { font-family: 'NanumSquareNeo'; font-weight: 400; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/nanumsquareneo@0.0.5/woff2/NanumSquareNeoTTF-bRg.woff2') format('woff2'); }
@font-face { font-family: 'NanumSquareNeo'; font-weight: 700; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/nanumsquareneo@0.0.5/woff2/NanumSquareNeoTTF-cBd.woff2') format('woff2'); }
@font-face { font-family: 'NanumSquareNeo'; font-weight: 800; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/nanumsquareneo@0.0.5/woff2/NanumSquareNeoTTF-dEb.woff2') format('woff2'); }
@font-face { font-family: 'NanumSquareNeo'; font-weight: 900; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/nanumsquareneo@0.0.5/woff2/NanumSquareNeoTTF-eHv.woff2') format('woff2'); }

:root {
  --navy: #1B2F5B;
  --navy-d: #14244A;
  --ink: #17202E;
  --sub: #5B6576;
  --line: #DCE3ED;
  --bg: #F3F6FA;
  --paper: #FBF7EE;
  --paper-line: #E6DCC6;
  --ok: #3E7D5A;
  --err: #A33A3A;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #E9E6E1; }
body {
  font-family: 'NanumSquareNeo', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }

/* ---------- 공통 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--navy);
  background: #fff; color: var(--navy); font-weight: 800; font-size: 15px; cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s;
}
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-d); }
.btn--line:hover { background: var(--bg); }
.btn--lg { min-height: 52px; font-size: 17px; padding: 0 28px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.link-btn { background: none; border: 0; padding: 0; color: var(--navy); font-weight: 700; font-size: 13px; text-decoration: underline; cursor: pointer; }

/* ---------- 로딩 · 입장 ---------- */
.layer { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
#loader { background: #EEF1F5; }
.loader__box { width: min(320px, 100%); text-align: center; }
.loader__logo { width: 180px; height: auto; }
.loader__title { margin: 22px 0 14px; font-weight: 800; font-size: 16px; color: var(--navy); }
.loader__bar { height: 6px; background: #D6DCE5; border-radius: 3px; overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 0; background: var(--navy); transition: width .2s; }
.loader__pct { margin: 10px 0 0; font-size: 13px; color: var(--sub); }

#intro { background: rgba(23, 32, 46, .55); }
.intro__box { width: min(460px, 100%); background: #fff; border-radius: 18px; padding: 30px 26px 26px; text-align: center; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.intro__tag { display: inline-block; margin: 0; padding: 6px 12px; border-radius: 20px; background: var(--bg); color: var(--navy); font-weight: 800; font-size: 13px; }
.intro__title { margin: 14px 0 18px; font-size: 22px; line-height: 1.45; font-weight: 800; letter-spacing: -.02em; }
.intro__title b { color: var(--navy); font-weight: 900; }
.intro__keys { list-style: none; margin: 0 0 22px; padding: 14px 16px; background: var(--bg); border-radius: 12px; text-align: left; font-size: 14px; line-height: 1.5; }
.intro__keys li { padding: 4px 0; color: #334; }
.intro__keys b { display: inline-block; min-width: 64px; color: var(--navy); font-weight: 800; }
.mo-only { display: none; }
body.is-touch .pc-only { display: none; }
body.is-touch .mo-only { display: list-item; }

/* ---------- 상단 바 ---------- */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  pointer-events: none;
}
#topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(255,255,255,.94); border-radius: 12px; text-decoration: none; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.brand img { height: 20px; width: auto; display: block; }
.brand span { font-weight: 800; font-size: 13px; color: var(--navy); white-space: nowrap; }
.topbar__btns { display: flex; gap: 8px; }
.tb-btn { white-space: nowrap; height: 40px; min-width: 40px; padding: 0 14px; border-radius: 12px; border: 0; background: rgba(255,255,255,.94); color: var(--navy); font-weight: 800; font-size: 14px; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.tb-btn--fill { background: var(--navy); color: #fff; }

#menuPanel {
  position: fixed; z-index: 21; top: 60px; right: 16px; width: 260px; max-height: calc(100% - 80px); overflow: auto;
  background: #fff; border-radius: 14px; box-shadow: 0 12px 34px rgba(0,0,0,.2); padding: 8px;
}
#menuList { list-style: none; margin: 0; padding: 0; }
#menuList button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 10px; background: none; border: 0; border-radius: 10px; text-align: left; font-weight: 700; font-size: 15px; cursor: pointer; }
#menuList button:hover, #menuList button:focus-visible { background: var(--bg); }
#menuList i { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-style: normal; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* ---------- 부스 카드 ---------- */
#boothCard {
  position: fixed; z-index: 15; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%);
  width: min(440px, calc(100% - 32px)); background: #fff; border-radius: 16px; padding: 16px 16px 14px;
  box-shadow: 0 12px 34px rgba(0,0,0,.2); animation: up .25s ease-out;
}
@keyframes up { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.bc__head { display: flex; align-items: center; gap: 12px; }
.bc__no { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 900; font-size: 17px; display: flex; align-items: center; justify-content: center; }
.bc__en { margin: 0; font-size: 11px; letter-spacing: .08em; color: var(--sub); font-weight: 700; }
.bc__title { margin: 2px 0 0; font-size: 18px; font-weight: 900; letter-spacing: -.02em; }
.bc__desc { margin: 10px 0 12px; font-size: 14px; line-height: 1.55; color: #3A4352; }
.bc__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.bc__btns .btn { flex: 1; }
.bc__btns .btn[hidden] { display: none; }

#hint {
  position: fixed; z-index: 14; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translateX(-50%);
  margin: 0; padding: 8px 14px; border-radius: 20px; background: rgba(23,32,46,.72); color: #fff; font-size: 13px; white-space: nowrap; pointer-events: none;
}

/* ---------- 조이스틱 ---------- */
#joy { position: fixed; z-index: 16; left: 20px; bottom: calc(24px + var(--safe-b)); width: 112px; height: 112px; border-radius: 50%; background: rgba(255,255,255,.35); border: 2px solid rgba(255,255,255,.75); touch-action: none; }
#joyKnob { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: rgba(27,47,91,.85); }
body.card-open #joy { bottom: calc(210px + var(--safe-b)); }

/* ---------- 모달 공통 ---------- */
.modal { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(23,32,46,.5); }
.modal__box { position: relative; width: min(560px, 100%); max-height: calc(100% - 24px); overflow: auto; background: #fff; border-radius: 18px; padding: 26px 24px 22px; box-shadow: 0 18px 50px rgba(0,0,0,.28); }
.modal__close { position: absolute; z-index: 5; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--bg); font-size: 24px; line-height: 1; cursor: pointer; color: #334; }

/* 자세히 보기 */
.dt__en { margin: 0; font-size: 12px; letter-spacing: .08em; color: var(--sub); font-weight: 700; }
.dt__title { margin: 4px 40px 10px 0; font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.dt__desc { margin: 0 0 14px; font-size: 15px; line-height: 1.6; color: #3A4352; }
.dt__items { list-style: none; margin: 0 0 16px; padding: 12px 14px; background: var(--bg); border-radius: 12px; display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.dt__items li::before { content: '·'; margin-right: 6px; color: var(--navy); font-weight: 900; }
.dt__gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.dt__gallery:empty { display: none; }
.dt__gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; background: var(--bg); }
.dt__btns { display: grid; gap: 8px; }

/* AI 상담 */
.modal--side { justify-content: flex-end; align-items: stretch; padding: 0; background: rgba(23,32,46,.25); }
.chat__box { width: min(420px, 100%); max-height: none; height: 100%; border-radius: 0; padding: 0; display: flex; flex-direction: column; }
.chat__head { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px; padding-top: max(16px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
.chat__head h2 { margin: 0; font-size: 17px; font-weight: 900; }
.chat__head p { margin: 2px 0 0; font-size: 12px; color: var(--sub); display: flex; align-items: center; gap: 5px; }
.chat__head .modal__close { top: 50%; margin-top: -20px; right: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }
.chat__avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 900; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.chat__log { flex: 1; overflow-y: auto; padding: 16px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.msg--bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg--me { align-self: flex-end; background: var(--navy); color: #fff; border-top-right-radius: 4px; }
.msg--wait { color: var(--sub); }
.msg__act { display: block; margin-top: 8px; }
.msg__mode { display: block; margin-top: 6px; font-size: 11px; font-weight: 700; color: #8A93A0; }
.chat__quick { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px 0; scrollbar-width: none; }
.chat__quick::-webkit-scrollbar { display: none; }
.chat__quick button { flex: none; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 700; color: var(--navy); cursor: pointer; white-space: nowrap; }
.chat__form { display: flex; gap: 8px; padding: 10px 16px; }
.chat__form input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1px solid #C7D0DC; border-radius: 10px; font-size: 16px; }
.chat__form input:focus { outline: 2px solid var(--navy); outline-offset: -1px; }
.chat__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 16px 14px; padding-bottom: max(14px, var(--safe-b)); font-size: 12px; color: var(--sub); }

/* 편지 */
.letter__box { width: min(600px, 100%); background: var(--paper); border: 1px solid var(--paper-line); }
.letter__box .modal__close { background: #F1EADB; }
.lt__to { margin: 0; font-size: 14px; color: #7A6A4C; font-weight: 700; }
.lt__title { margin: 4px 40px 16px 0; font-size: 22px; font-weight: 900; color: #3B3324; }
.lt__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.lt__f { display: block; }
.lt__f span, .lt__file span, .lt__chips legend { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 800; color: #5A4E36; }
.lt__f em { color: var(--err); font-style: normal; }
.lt__f input, .lt__f textarea {
  width: 100%; border: 0; border-bottom: 1.5px solid #CDBE9E; background: transparent; padding: 8px 2px; font-size: 16px; border-radius: 0;
}
.lt__f textarea { resize: vertical; min-height: 120px; line-height: 1.7; border: 1.5px solid #CDBE9E; border-radius: 8px; padding: 10px; background: #FFFDF8; }
.lt__f input:focus, .lt__f textarea:focus { outline: none; border-color: var(--navy); }
.lt__f--msg { margin-top: 12px; }
.lt__chips { border: 0; padding: 0; margin: 14px 0 0; }
#ltInterests { display: flex; flex-wrap: wrap; gap: 6px; }
#ltInterests label { position: relative; }
#ltInterests input { position: absolute; opacity: 0; width: 1px; height: 1px; }
#ltInterests span { display: inline-block; padding: 7px 11px; border-radius: 16px; border: 1px solid #CDBE9E; background: #FFFDF8; font-size: 13px; font-weight: 700; color: #5A4E36; cursor: pointer; }
#ltInterests input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
#ltInterests input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
.lt__file { display: block; margin-top: 12px; }
.lt__file input { font-size: 13px; max-width: 100%; }
.lt__chatnote { margin: 10px 0 0; font-size: 13px; color: var(--ok); font-weight: 700; }
.lt__agree { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; font-size: 14px; }
.lt__agree input { width: 18px; height: 18px; accent-color: var(--navy); }
.lt__policy { margin: 6px 0 0; padding: 10px 12px; background: #F4EEDF; border-radius: 8px; font-size: 12.5px; line-height: 1.6; color: #5A4E36; }
.lt__err { min-height: 20px; margin: 10px 0 8px; font-size: 13.5px; color: var(--err); font-weight: 700; }
.lt__sign { margin: 12px 0 0; text-align: right; font-size: 12.5px; color: #7A6A4C; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* 결과 안내 */
.notice__box { width: min(380px, 100%); text-align: center; }
.notice__box h2 { margin: 6px 0 10px; font-size: 20px; font-weight: 900; }
.notice__box p { margin: 0 0 20px; font-size: 15px; line-height: 1.6; color: #3A4352; }

/* 토스트 */
#toast { position: fixed; z-index: 60; left: 50%; top: 70px; transform: translateX(-50%); padding: 10px 16px; border-radius: 20px; background: rgba(23,32,46,.88); color: #fff; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; white-space: nowrap; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis; }
#toast.on { opacity: 1; }

body.cine #boothCard, body.cine #joy, body.cine #hint { display: none !important; }
body.is-touch #hint { bottom: calc(150px + var(--safe-b)); }

/* ---------- 작은 화면 (360px 까지) ---------- */
@media (max-width: 520px) {
  .brand span { display: none; }
  .brand img { height: 18px; }
  #topbar { padding-left: 12px; padding-right: 12px; }
  .tb-btn { padding: 0 12px; font-size: 13.5px; }
  #menuPanel { right: 12px; left: 12px; width: auto; }
  #boothCard { width: calc(100% - 24px); padding: 14px 14px 12px; bottom: calc(12px + var(--safe-b)); }
  .bc__title { font-size: 16.5px; }
  .bc__desc { font-size: 13.5px; margin: 8px 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .bc__btns .btn { min-height: 42px; font-size: 14px; padding: 0 10px; }
  #joy { left: 14px; width: 100px; height: 100px; }
  body.card-open #joy { bottom: calc(190px + var(--safe-b)); }
  .modal { padding: 10px; }
  .modal__box { padding: 22px 16px 18px; border-radius: 16px; }
  .modal--side { padding: 0; }
  .chat__box { width: 100%; border-radius: 0; padding: 0; }
  .lt__grid { grid-template-columns: 1fr; gap: 6px; }
  .dt__gallery { grid-template-columns: repeat(2, 1fr); }
  .intro__box { padding: 24px 18px 20px; }
  .intro__title { font-size: 19px; }
  .intro__keys { font-size: 13px; }
  .intro__keys b { min-width: 58px; }
}

/* ---------- 닉네임 · 캐릭터 ---------- */
.intro__box { max-height: calc(100% - 8px); overflow-y: auto; }
.profile { margin: 0 0 16px; text-align: left; }
.profile__nick { display: flex; align-items: center; gap: 10px; }
.profile__nick span, .profile__label { flex: none; font-size: 14px; font-weight: 800; color: var(--navy); }
.profile__nick input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid #C7D0DC; border-radius: 10px; font-size: 16px; }
.profile__nick input:focus { outline: 2px solid var(--navy); outline-offset: -1px; }
.profile__label { margin: 14px 0 8px; }
.profile__chars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }   /* 12종 → 2줄 */
.pc { position: relative; cursor: pointer; }
.pc input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pc span { display: flex; flex-direction: column; align-items: center; padding: 4px 2px 6px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); }
.pc img { width: 100%; max-width: 72px; aspect-ratio: 120 / 140; object-fit: contain; display: block; }
.pc b { font-size: 12.5px; font-weight: 800; color: #3A4352; margin-top: 2px; white-space: nowrap; letter-spacing: -0.02em; }
.pc input:checked + span { border-color: var(--navy); background: #fff; }
.pc input:checked + span b { color: var(--navy); }
.pc input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ---------- 방문자 수 ---------- */
.topbar__left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.visitors { display: flex; align-items: center; gap: 6px; margin: 0; height: 40px; padding: 0 12px; border-radius: 12px; background: rgba(255,255,255,.94); box-shadow: 0 2px 10px rgba(0,0,0,.12); font-size: 13px; font-weight: 800; color: var(--navy); white-space: nowrap; }
.visitors em { font-style: normal; }
.visitors i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.visitors.off i { background: #9AA0A7; }

/* ---------- 방명록 ---------- */
.note__box { width: min(420px, 100%); }
.note__title { margin: 0 40px 14px 0; font-size: 20px; font-weight: 900; }
.nf { display: block; border: 0; padding: 0; margin: 0 0 12px; }
.nf span, .nf legend { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 5px; font-size: 13px; font-weight: 800; color: #3A4352; }
.nf small { font-weight: 700; color: var(--sub); font-size: 12px; }
.nf input, .nf textarea { width: 100%; padding: 10px 12px; border: 1px solid #C7D0DC; border-radius: 10px; font-size: 16px; background: #fff; }
.nf textarea { resize: none; line-height: 1.6; }
.nf input:focus, .nf textarea:focus { outline: 2px solid var(--navy); outline-offset: -1px; }
#nwColors { display: flex; gap: 10px; }
#nwColors label { position: relative; cursor: pointer; }
#nwColors input { position: absolute; opacity: 0; width: 1px; height: 1px; }
#nwColors span { display: block; width: 36px; height: 36px; border-radius: 8px; border: 2px solid rgba(0,0,0,.08); }
#nwColors input:checked + span { border-color: var(--navy); box-shadow: 0 0 0 2px #fff inset; }
#nwColors input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
/* ---------- 관리자 ---------- */
.tb-btn--icon { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; }
.tb-btn--icon svg { display: block; }
.tb-btn--icon.is-on { background: var(--navy); color: #fff; }
.adm-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); border: 1.5px solid #fff; }
.adm__who { margin: 0 0 10px; font-size: 15px; }
.adm__who b { color: var(--navy); }
.adm__list { margin: 0 0 16px; padding: 12px 14px 12px 28px; background: var(--bg); border-radius: 10px; font-size: 13.5px; line-height: 1.6; color: #3A4352; }
.nf__ai { margin: -2px 0 12px; font-size: 12.5px; color: var(--sub); }
.nv__paper { margin: 8px 0 14px; padding: 22px 20px 16px; border-radius: 6px; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.nv__text { margin: 0 0 16px; font-size: 17px; line-height: 1.7; font-weight: 700; color: #2F3540; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; min-height: 80px; }
.nv__meta { margin: 0; display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: #5B6576; }
.nv__meta b { color: #2F3540; }
.nv__btns { display: flex; gap: 8px; }
.nv__btns .btn { flex: 1; }

@media (max-width: 520px) {
  .visitors { height: 36px; padding: 0 10px; font-size: 12.5px; }
  .visitors em { display: none; }
  .profile__chars { gap: 5px; }
  .pc span { padding: 3px 1px 5px; }
  .pc b { font-size: 11px; }
}
@media (max-width: 430px) {   /* 390px 폭 휴대폰(아이폰 등)에서도 상단 바가 겹치지 않게 */
  .brand { padding: 8px 9px; }
  .brand img { height: 15px; }
  .tb-btn { padding: 0 10px; font-size: 13px; }
  .tb-btn--icon { padding: 0 8px; }
  .sm-hide { display: none; }
  .topbar__left { gap: 6px; }
  .visitors { padding: 0 8px; }
  .topbar__btns { gap: 6px; }
}

/* ---------- 실시간 상담 ---------- */
.msg--sys { align-self: center; max-width: 92%; background: #E8ECF2; color: #3A4352; font-size: 13px; text-align: center; border-radius: 10px; }
.msg--staff { border-color: #B9C7DA; background: #F7FAFD; }
.dot--off { background: #9AA0A7; }
.chat__links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; }
.adm__btns { display: grid; gap: 8px; }
.la__list { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fff; min-height: 64px; scrollbar-width: thin; }
.la__item { position: relative; flex: none; width: 168px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; display: grid; gap: 2px; }
.la__item b { font-size: 13.5px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.la__item b small { font-weight: 700; color: var(--sub); }
.la__item span { font-size: 11.5px; color: var(--sub); }
.la__item i { font-style: normal; font-size: 12px; color: #3A4352; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.la__item em { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #A33A3A; color: #fff; font-style: normal; font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.la__item.is-sel { border-color: var(--navy); background: #fff; box-shadow: 0 0 0 1px var(--navy) inset; }
.la__item.is-closed { opacity: .6; }
.la__empty { margin: auto; font-size: 13px; color: var(--sub); text-align: center; }
.la-fab { position: fixed; z-index: 17; right: 16px; bottom: calc(18px + var(--safe-b)); height: 48px; padding: 0 18px; border: 0; border-radius: 24px; background: var(--navy); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 8px 22px rgba(0,0,0,.25); cursor: pointer; display: flex; align-items: center; gap: 8px; }
.la-fab b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #fff; color: var(--navy); font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; }
body.card-open .la-fab { bottom: calc(200px + var(--safe-b)); }

/* ---------- 다른 방문자 · 의자 메뉴 ---------- */
.vmenu { position: fixed; z-index: 25; min-width: 200px; padding: 12px; background: #fff; border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.25); }
.vm__title { margin: 0 28px 10px 2px; font-size: 14px; font-weight: 800; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vm__btns { display: flex; gap: 6px; }
.vm__btns .btn { flex: 1; min-height: 40px; padding: 0 12px; font-size: 14px; white-space: nowrap; }
.vm__close { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: var(--bg); font-size: 18px; line-height: 1; cursor: pointer; color: #334; }

@media (max-width: 520px) {
  .la__item { width: 148px; }
  .la-fab { right: 12px; height: 44px; font-size: 14px; padding: 0 14px; }
  body.card-open .la-fab { bottom: calc(185px + var(--safe-b)); }
}

/* ---------- 상담 종료 · 지난 상담 · 아이디 저장 ---------- */
.end-btn { flex: none; height: 34px; padding: 0 12px; margin-right: 46px; border: 1px solid #C9A0A0; border-radius: 8px; background: #fff; color: var(--err); font-weight: 800; font-size: 13px; cursor: pointer; white-space: nowrap; }
.end-btn:hover { background: #FBF1F1; }
.chat__head > div { min-width: 0; flex: 1; }
.adm__save { display: flex; align-items: center; gap: 6px; margin: -2px 0 10px; font-size: 14px; color: #3A4352; cursor: pointer; }
.adm__save input { width: 18px; height: 18px; accent-color: var(--navy); }
.la__tabs { display: flex; border-bottom: 1px solid var(--line); background: #fff; }
.la__tab { flex: 1; height: 42px; border: 0; border-bottom: 3px solid transparent; background: none; font-weight: 800; font-size: 14px; color: var(--sub); cursor: pointer; }
.la__tab.is-on { color: var(--navy); border-bottom-color: var(--navy); }
.la__search { display: flex; gap: 6px; padding: 10px 16px 0; background: #fff; }
.la__search input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #C7D0DC; border-radius: 10px; font-size: 15px; }
.la__search .btn { min-height: 40px; padding: 0 14px; font-size: 14px; }
.la__past { max-height: 38%; overflow-y: auto; padding: 8px 16px 10px; background: #fff; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.lp__item { text-align: left; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; display: grid; gap: 2px; }
.lp__item.is-sel { border-color: var(--navy); background: #fff; box-shadow: 0 0 0 1px var(--navy) inset; }
.lp__item b { font-size: 13.5px; font-weight: 800; }
.lp__item span { font-size: 12px; color: var(--sub); }
.lp__item i { font-style: normal; font-size: 12.5px; color: #3A4352; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp__more { justify-self: center; }
/* 지난 상담 — 상담 종류 배지 · 종류 고르기 (2026-11-05) */
.la__search select { flex: none; height: 40px; padding: 0 8px; border: 1px solid #C7D0DC; border-radius: 10px; background: #fff; font: inherit; font-size: 14px; font-weight: 700; color: var(--navy); }
.lp__kind { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 6px; font-style: normal; font-size: 11px; font-weight: 900; vertical-align: 1px; }
.lp__kind--live { background: var(--navy); color: #fff; }
.lp__kind--ai { background: #E9C77A; color: #3A2C08; }
.msg--ai { background: #F6EED9; color: #2F3540; }
.msg--ai .msg__mode { color: #8A6A1E; }
.la__hint { font-size: 12px; color: var(--sub); }
@media (max-width: 520px) {
  .end-btn { height: 32px; padding: 0 9px; font-size: 12.5px; margin-right: 44px; }
}
.chat__head p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chat__head p .dot { flex: none; }

/* ---------- 입장 창: 높이가 짧은 휴대폰 화면 (주소창 · 하단 버튼 때문에 보이는 높이가 짧음) ---------- */
@media (max-height: 760px) {
  .intro__box { padding: 18px 16px 16px; }
  .intro__tag { padding: 4px 10px; font-size: 12px; }
  .intro__title { margin: 8px 0 12px; font-size: 18px; line-height: 1.35; }
  .profile { margin-bottom: 10px; }
  .profile__nick input { height: 40px; }
  .profile__label { margin: 10px 0 6px; }
  .profile__chars { gap: 6px; }
  .pc span { padding: 2px 2px 4px; }
  .pc img { max-width: 50px; }
  .pc b { font-size: 11.5px; }
  .intro__keys { margin-bottom: 12px; padding: 8px 12px; font-size: 12.5px; line-height: 1.4; }
  .intro__keys li { padding: 2px 0; }
  .intro__keys b { min-width: 56px; }
  .btn--lg { min-height: 46px; font-size: 16px; }
}
@media (max-height: 640px) {
  .intro__keys li:nth-last-child(-n+2) { display: none; }   /* 상담 · 방명록 안내는 줄임 (입장 후 부스 카드로 안내) */
}

/* ---------- 실시간 상담 요청 (데스크 종) ---------- */
.cl__desc { margin: 0 0 14px; font-size: 14px; line-height: 1.6; color: #3A4352; word-break: keep-all; }
.cl__desc b { color: var(--navy); }
.bc__btns .bc__call { flex-basis: 100%; }   /* 요청 버튼은 아래 한 줄 */

/* ---------- 담당자 입장 · 실시간 상담 요청 차례 알림 띠 ---------- */
.lbanner { position: fixed; z-index: 18; top: calc(70px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); width: min(600px, calc(100% - 24px)); display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; background: #fff; border: 2px solid var(--navy); border-radius: 14px; box-shadow: 0 10px 28px rgba(0,0,0,.2); animation: lbIn .35s ease-out; }
.lbanner[hidden] { display: none; }
.lbanner .dot { flex: none; animation: lbDot 1.2s ease-in-out infinite; }
.lbanner p { flex: 1; min-width: 0; margin: 0; font-size: 14px; line-height: 1.5; color: #2F3540; word-break: keep-all; overflow-wrap: anywhere; }
.lbanner p b { color: var(--navy); font-weight: 900; }
.lbanner p small { color: var(--sub); font-size: 12.5px; }
.lbanner .btn { flex: none; min-height: 40px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
.lbanner .btn[hidden] { display: none; }
.lbanner__x { flex: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--bg); font-size: 18px; line-height: 1; color: #334; cursor: pointer; }
.lbanner[data-kind="turn"] { border-color: var(--ok); }
@keyframes lbIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes lbDot { 50% { opacity: .35; } }
@media (max-width: 520px) {
  .lbanner { top: calc(62px + env(safe-area-inset-top, 0px)); flex-wrap: wrap; padding: 10px 10px 10px 14px; }
  .lbanner p { flex-basis: calc(100% - 60px); font-size: 13.5px; }
  .lbanner .btn { flex: 1 0 100%; order: 3; }
}

/* 관리자: 실시간 상담 요청 대기 */
.la__calls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 16px; background: #FFF8E8; border-bottom: 1px solid var(--line); font-size: 13px; color: #3A4352; }
.la__calls[hidden] { display: none; }
.la__calls b { color: var(--navy); font-weight: 900; }
.la__calls span { white-space: nowrap; }
.la__calls small { color: var(--sub); }
.la__calls .is-turn { font-weight: 800; color: var(--navy); }

/* ===================== 이용 안내서 (매뉴얼 책) — 2026-11-05 ===================== */
.tb-btn--book { gap: 6px; padding: 0 12px; }
.tb-btn--book .tb-txt { font-size: 14px; font-weight: 800; }
@media (max-width: 600px) { .tb-btn--book .tb-txt { display: none; } .tb-btn--book { padding: 0 9px; } }
/* 매뉴얼 버튼이 늘어난 상단 바 — 휴대폰에서 방문자 수와 겹치지 않게 */
@media (max-width: 430px) {
  .tb-btn { height: 36px; min-width: 36px; }
  .tb-btn--icon, .tb-btn--book, #btnHelp { padding: 0 8px; }
  .tb-btn--icon svg { width: 18px; height: 18px; }
  .topbar__btns { gap: 5px; }
}
@media (max-width: 380px) {
  .brand { padding: 8px 7px; }
  .brand img { height: 13px; }
  .visitors { padding: 0 7px; gap: 4px; }
  .tb-btn { padding: 0 8px; }
}
@media (max-width: 350px) {   /* 폴드 접은 화면(344px) */
  #topbar { padding-left: 8px; padding-right: 8px; }
  .topbar__left, .topbar__btns { gap: 4px; }
  .brand { padding: 8px 6px; }
  .brand img { height: 11px; }
  .visitors { padding: 0 6px; font-size: 12px; }
  .tb-btn--fill { padding: 0 7px; font-size: 12px; }
  .tb-btn { min-width: 34px; }
  .tb-btn--icon, .tb-btn--book, #btnHelp { padding: 0 7px; }
}
#book { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(15, 22, 35, .72); }
#book[hidden] { display: none; }
.book__stage { position: relative; opacity: 0; transform: translateY(26vh) scale(.32) rotate(-8deg); transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .45s; }
.book__stage.is-in { opacity: 1; transform: none; }
.book__stage.is-out { opacity: 0; transform: translateY(24vh) scale(.3) rotate(6deg); transition: transform .48s cubic-bezier(.6, 0, .8, .4), opacity .4s .06s; }
#bkHolder { position: relative; transition: transform .7s cubic-bezier(.3, .6, .3, 1); filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .45)); }
#bkHolder.is-shut { transform: translateX(calc(var(--bk-w) * -0.5)); }
.book__close { position: absolute; top: 14px; right: 16px; z-index: 3; height: 42px; padding: 0 16px; border: 0; border-radius: 12px; background: #fff; color: var(--navy); font: inherit; font-size: 15px; font-weight: 900; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.book__close span { font-size: 20px; vertical-align: -2px; margin-left: 2px; }
.book__nav { display: flex; align-items: center; gap: 14px; color: #fff; font-weight: 800; font-size: 14px; }
.book__nav button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: var(--navy); font-size: 28px; font-weight: 900; line-height: 1; cursor: pointer; }
.book__nav button:disabled { opacity: .35; cursor: default; }
#bkCnt { min-width: 96px; text-align: center; }
.book__loading { position: absolute; left: 0; right: 0; top: 50%; margin: 0; text-align: center; color: #fff; font-weight: 800; }
body.book-open #hint, body.book-open #joy { visibility: hidden; }

/* 페이지 — 420×594 고정, 화면에 맞춰 안쪽만 축소 */
.bk-page { background: #FFFDF8; overflow: hidden; }
.bk-pg { width: 420px; height: 594px; transform-origin: 0 0; transform: scale(var(--bk-s, 1)); display: flex; flex-direction: column; padding: 30px 28px 16px; background: #FFFDF8; color: #17202E; font-family: 'NanumSquareNeo', 'Malgun Gothic', sans-serif; font-size: 12.5px; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; text-align: left; }
.bk-measure { position: fixed; left: -10000px; top: 0; visibility: hidden; pointer-events: none; }
.bk-measure .bk-page { width: 420px; height: 594px; }
.bk-measure .bk-pg { transform: none; }
.bk-body { flex: 1; min-height: 0; overflow: hidden; }
.bk-foot { flex: none; display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 6px; border-top: 1px solid #E6E1D5; font-size: 10px; font-weight: 700; color: #8A93A0; }
.bk-foot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-body > :first-child { margin-top: 0; }
.bk-body h1 { margin: 10px 0 6px; font-size: 22px; font-weight: 900; line-height: 1.3; letter-spacing: -0.02em; }
.bk-body h2 { margin: 0 0 10px; font-size: 18px; font-weight: 900; line-height: 1.35; letter-spacing: -0.02em; }
.bk-body h3 { margin: 14px 0 6px; font-size: 14px; font-weight: 900; color: var(--navy); }
.bk-body p { margin: 6px 0; }
.bk-body a { color: var(--navy); }
.bk-body .sec__no { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 7px; margin-right: 7px; border-radius: 8px; background: var(--navy); color: #fff; font-size: 13px; vertical-align: 2px; }
.bk-body img { display: block; max-width: 100%; height: auto; }
.bk-body > img, .bk-body .banner img { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; }
.bk-body .banner { margin: 0 0 10px; }
.bk-body .hero__tag { display: inline-block; margin-top: 12px; padding: 2px 10px; border-radius: 999px; background: #EEF2F8; color: var(--navy); font-size: 11px; font-weight: 800; }
.bk-body .hero__url { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; font-weight: 800; font-size: 12px; }
.bk-body .hero__url a { text-decoration: none; }
.bk-body figure { margin: 8px 0; }
.bk-body figure img { width: auto; max-width: 100%; max-height: 210px; margin: 0 auto; border: 1px solid #DCE3ED; border-radius: 8px; background: #F3F6FA; }
.bk-body figcaption { margin-top: 3px; font-size: 10.5px; color: #5B6576; text-align: center; }
.bk-body .pair { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; align-items: start; }
.bk-body .pair:not(.pair--phone) { grid-template-columns: 1fr 1fr; }
.bk-body .pair--split { grid-template-columns: 1fr; }
.bk-body .phone img { max-height: 210px; }
.bk-body .tbl { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 11.5px; }
.bk-body .tbl th, .bk-body .tbl td { border: 1px solid #DCE3ED; padding: 5px 7px; text-align: left; vertical-align: top; }
.bk-body .tbl th { background: #F3F6FA; color: var(--navy); font-weight: 900; }
.bk-body .tbl td.c { text-align: center; font-weight: 900; color: var(--navy); white-space: nowrap; }
.bk-body ol.steps { margin: 6px 0; padding: 0; list-style: none; counter-reset: s; }
.bk-body ol.steps > li { position: relative; padding: 2px 0 6px 30px; counter-increment: s; }
.bk-body ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 21px; height: 21px; border-radius: 50%; border: 2px solid var(--navy); color: var(--navy); font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.bk-body ul.dots { margin: 6px 0; padding-left: 16px; }
.bk-body .note { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: #F3F6FA; border-left: 4px solid var(--navy); font-size: 11.5px; }
.bk-body .note b { color: var(--navy); }
.bk-body .note--warn { border-left-color: #8C4B55; background: #FBF4F4; }
.bk-body .note--ok { border-left-color: #3E7D5A; background: #F1F7F3; }
.bk-body .kbd { display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid #C7D0DC; border-bottom-width: 2px; border-radius: 5px; background: #fff; font-size: 10.5px; font-weight: 800; text-align: center; line-height: 1.5; white-space: nowrap; }
.bk-body .btnlike { display: inline-block; padding: 0 7px; border-radius: 6px; background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; line-height: 1.7; white-space: nowrap; }
.bk-body .btnlike--line { background: #fff; color: var(--navy); border: 1px solid var(--navy); }
.bk-body .bk-qa { margin: 8px 0; padding: 8px 10px; border: 1px solid #DCE3ED; border-radius: 8px; background: #fff; }
.bk-body .bk-q { margin: 0; font-weight: 900; color: var(--navy); }
.bk-body .bk-a { margin: 4px 0 0; }
/* 목차 */
.bk-toc h2 { font-size: 22px; margin-bottom: 14px; }
.bk-toc ol { margin: 0; padding: 0; list-style: none; }
.bk-toc a { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px dashed #DCD6C8; color: #17202E; text-decoration: none; font-size: 14px; font-weight: 800; }
.bk-toc a:hover { color: var(--navy); background: #F3F6FA; }
.bk-toc i { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--navy); color: #fff; font-style: normal; font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.bk-toc span { flex: 1; }
.bk-toc b { color: #8A93A0; font-size: 12px; }
/* 표지 */
.bk-cover .bk-pg { background: var(--navy); color: #fff; justify-content: center; align-items: center; text-align: center; padding: 40px 34px; }
.bk-cover__in { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bk-cover__logo { display: inline-block; padding: 10px 20px; border-radius: 999px; background: #fff; }
.bk-cover__logo img { display: block; height: 32px; width: auto; }
.bk-cover__tag { margin: 18px 0 0; font-size: 11px; font-weight: 800; letter-spacing: .18em; color: #C9B27A; }
.bk-cover h1 { margin: 6px 0 0; font-size: 30px; font-weight: 900; line-height: 1.3; letter-spacing: -0.03em; }
.bk-cover h2 { margin: 6px 0 0; font-size: 24px; font-weight: 900; }
.bk-cover__sub { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: #D6DDEA; }
.bk-cover__url { margin: 40px 0 0; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px; font-size: 12px; font-weight: 800; }
.bk-back .bk-cover__tag { margin: 0 0 6px; }
.bk-back__certs { margin: 4px 0 0; font-size: 11.5px; font-weight: 700; color: #D6DDEA; }
.bk-back__info { margin: 26px 0 0; display: grid; grid-template-columns: auto auto; gap: 6px 14px; text-align: left; font-size: 13px; }
.bk-back__info dt { color: #C9B27A; font-weight: 800; }
.bk-back__info dd { margin: 0; font-weight: 800; }
.bk-blank .bk-pg { justify-content: center; align-items: center; }
.bk-blank__in span { font-size: 12px; font-weight: 800; letter-spacing: .3em; color: #D6D0C2; }
/* 라이브러리를 못 불러왔을 때 — 한 쪽씩 */
#bkHolder.is-fallback .bk-page { display: none; width: var(--bk-w); height: 100%; }
#bkHolder.is-fallback .bk-page.is-cur { display: block; margin: 0 auto; animation: bkFade .35s ease; }
@keyframes bkFade { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .book__close { top: 10px; right: 10px; height: 38px; padding: 0 12px; font-size: 14px; }
  .book__nav button { width: 40px; height: 40px; }
}
