:root {
  --cream: rgba(255, 249, 230, 0.94);
  --ink: #5a4632;
  --ink-soft: #9a8468;
  --line: rgba(90, 70, 50, 0.16);
  --accent: #19c8b9;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body.editing .play-ui { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #bfe9ff;
  color: var(--ink);
  font-family: "Jua", system-ui, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  font-size: 15px;
}
button, input { font: inherit; color: inherit; }

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

#labels {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.label {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  will-change: transform;
}
.label .bubble {
  max-width: 230px;
  padding: 7px 14px;
  border-radius: 18px;
  background: #fffbea;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
  word-break: keep-all; overflow-wrap: anywhere;
  box-shadow: 0 2px 0 rgba(90, 70, 50, 0.18);
}
.label .name {
  font-size: 14px;
  color: #fff;
  text-shadow: 0 0 3px #3b2c1c, 0 0 3px #3b2c1c, 0 1px 2px #3b2c1c;
  white-space: nowrap;
}
.label.me .name { color: #ffe566; }

/* 아바타 만들기 */
#editor {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  padding: 36px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--cream);
}
#editor h1 { margin: 0; font-size: 32px; font-weight: 400; }
.field {
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--ink);
  font-size: 20px;
}
.field span { color: var(--ink-soft); padding-right: 4px; }
.field input {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  outline: 0;
  background: transparent;
}
#options { display: flex; flex-direction: column; gap: 16px; }
.opt-title { color: var(--ink-soft); font-size: 14px; margin-bottom: 8px; }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.opt-row.thumbs { gap: 6px; }
.opt-row .thumb {
  width: 68px;
  height: 68px;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 16px;
  background: rgba(90, 70, 50, 0.07);
  cursor: pointer;
}
.opt-row .thumb img { width: 100%; height: 100%; display: block; }
.opt-row .thumb[aria-checked="true"] { border-color: var(--accent); background: #fff; }
.opt-row .swatch {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  outline-offset: 3px;
}
.opt-row .swatch[aria-checked="true"] { outline: 3px solid var(--ink); }
.opt-row .swatch.orig {
  border: 2px solid var(--ink-soft);
  background: linear-gradient(135deg, transparent 45%, var(--ink-soft) 45%, var(--ink-soft) 55%, transparent 55%), #fff;
}
.opt-row .chip {
  padding: 2px 0;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
}
.opt-row .chip[aria-checked="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.actions { display: flex; gap: 10px; margin-top: auto; padding-top: 8px; }
.actions button {
  padding: 12px 20px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: none;
  cursor: pointer;
}
.actions button[type="submit"] { flex: 1; border-color: var(--accent); background: var(--accent); color: #fff; font-size: 18px; }

/* 플레이 화면 */
#edit-avatar, #sound-btn, #card-btn, #tp-btn, #emotes button {
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--cream);
  cursor: pointer;
}
#edit-avatar { position: fixed; top: 16px; left: 16px; }
#sound-btn { position: fixed; top: 16px; left: 132px; }
#card-btn { position: fixed; top: 16px; left: 236px; }
#edit-avatar:hover, #emotes button:hover { background: #fff; }

#online {
  position: fixed;
  top: 16px;
  right: 16px;
  min-width: 170px;
  max-height: 45dvh;
  overflow-y: auto;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--cream);
}
#online-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
#online-count { color: var(--ink-soft); font-size: 14px; }
#ch-btn { padding: 3px 10px; border: 0; border-radius: 999px; background: #0f7f76; color: #fff; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
#ch-btn:hover { background: #3a8059; }
#ch-menu { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 10px; padding: 8px; border-radius: 12px; background: #fff7e8; }
#ch-menu .ch-note { margin: 0 0 4px; color: var(--ink-soft); font-size: 13px; }
#ch-menu .ch-item { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border: 0; border-radius: 8px; background: #fff; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
#ch-menu .ch-item:not(:disabled):hover { background: #e8f4ec; }
#ch-menu .ch-item:disabled { cursor: default; opacity: 0.6; }
#ch-menu .ch-item.here { opacity: 1; background: #e8f4ec; font-weight: 700; }
#ch-menu .ch-n { color: var(--ink-soft); font-size: 14px; }
#ch-menu .ch-new, #ch-menu .ch-copy { justify-content: center; color: #0f7f76; font-size: 14px; }
#booth-meet { margin: 0 0 8px; padding: 6px 14px; border: 0; border-radius: 999px; background: #0f7f76; color: #fff; font: inherit; font-size: 14px; cursor: pointer; }
#online-list { list-style: none; margin: 0; padding: 0; }
#online-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
#online-list .score { color: #d79a00; font-size: 14px; }
#online-list button { padding: 3px 0; border: 0; background: none; cursor: pointer; }
#online-list button:disabled { cursor: default; }
#online-list button:not(:disabled):hover { text-decoration: underline; }

#chat {
  position: fixed;
  left: 16px;
  bottom: 16px;
  width: min(380px, calc(100vw - 32px));
  height: min(300px, 40vh);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: var(--cream);
}
#tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 2px solid var(--line);
  scrollbar-width: none;
}
#tabs .tab {
  display: flex;
  align-items: center;
  flex: none;
  color: var(--ink-soft);
  border-bottom: 3px solid transparent;
}
#tabs .tab.active { color: var(--ink); border-bottom-color: var(--accent); }
#tabs .tab button { padding: 10px 4px 7px 16px; border: 0; background: none; cursor: pointer; }
#tabs .tab button.close { padding: 10px 12px 7px 2px; opacity: 0.6; }
#tabs .tab:first-child button { padding-right: 16px; }
#tabs .unread { color: #e0453f; margin-left: 4px; }
#log {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px;
  line-height: 1.5;
  word-break: keep-all; overflow-wrap: anywhere;
}
#log .m .who { margin-right: 6px; }
#log .m .time { color: var(--ink-soft); font-size: 13px; margin-left: 6px; }
#log .sys { color: var(--ink-soft); font-size: 14px; }
#send { display: flex; border-top: 2px solid var(--line); }
#send input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 0;
  outline: 0;
  background: transparent;
}
#send input::placeholder { color: var(--ink-soft); }
#send button { padding: 0 18px; border: 0; background: none; color: var(--accent); cursor: pointer; }

#emotes {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 8px;
}
#emotes kbd { font: inherit; color: var(--ink-soft); margin-right: 3px; }

/* 입장 인증 */
#gate:empty { display: none; }
#gate {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(25, 200, 185, 0.1);
  line-height: 1.45;
}
#gate p { margin: 0; }
#gate .muted { color: var(--ink-soft); font-size: 14px; }
#gate .err { color: #e0453f; font-size: 14px; }
#gate .ok { color: #0f7f76; }
#gate ol { margin: 0; padding-left: 20px; }
#gate li { margin: 4px 0; }
#gate code {
  padding: 1px 8px;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 17px;
  letter-spacing: 0.06em;
}
#gate input {
  padding: 9px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: #fff;
}
#gate input:focus { border-color: var(--accent); }
.gate-row { display: flex; flex-wrap: wrap; gap: 8px; }
.gate-row a, .gate-row button, .linkish {
  padding: 8px 16px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: #fff;
  color: #0f7f76;
  text-decoration: none;
  cursor: pointer;
}
.gate-row a.primary { background: var(--accent); color: #fff; }
.linkish { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--ink-soft); text-decoration: underline; }
.field input:disabled { color: var(--ink); opacity: 1; }
.badge-v { color: #19c8b9; margin-left: 3px; }

/* 프로필 카드 */
#profile {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(370px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  /* 2026-12-04: 스레드 프로필 임베드는 300px보다 좁으면 오른쪽이 잘린다 (320 → 370) */
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 20px 20px;
  border-radius: 24px;
  background: rgba(255, 249, 230, 0.98);
  box-shadow: 0 6px 0 rgba(90, 70, 50, 0.16);
}
#profile-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: none;
  font-size: 22px;
  cursor: pointer;
}
#profile-img { width: 96px; height: 96px; border-radius: 22px; background: rgba(90, 70, 50, 0.07); }
#profile-name { font-size: 20px; }
#profile-badge { color: var(--ink-soft); font-size: 14px; }
.profile-actions { display: flex; flex-direction: column; align-self: stretch; gap: 8px; margin-top: 8px; }
.profile-actions a, .profile-actions button {
  padding: 10px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: #fff;
  color: #0f7f76;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
#profile-follow { background: var(--accent); color: #fff; }
.profile-sub { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.profile-sub button {
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 14px;
  cursor: pointer;
}
.profile-sub button:hover, .profile-sub button.armed { color: #e0453f; }
#report-reasons { align-self: stretch; text-align: center; }
#report-reasons p { margin: 6px 0; color: var(--ink-soft); font-size: 14px; }
.reason-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.reason-row button {
  padding: 6px 12px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}
.reason-row button:hover { border-color: #e0453f; color: #e0453f; }

/* 처음 안내 */
#tips {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: min(380px, calc(100vw - 32px));
  padding: 24px 26px 22px;
  border-radius: 24px;
  background: rgba(255, 249, 230, 0.98);
  box-shadow: 0 6px 0 rgba(90, 70, 50, 0.16);
}
#tips h2 { margin: 0 0 12px; font-size: 22px; font-weight: 400; }
#tips ul { margin: 0 0 16px; padding: 0; list-style: none; line-height: 1.5; }
#tips li { padding: 4px 0; }
#tips b { display: inline-block; min-width: 56px; font-weight: 400; color: #0f7f76; }
#tips-close {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
}
.post-actions .share { margin-left: auto; padding: 4px 0; color: #0f7f76; text-decoration: none; }
.post-actions .share:hover { text-decoration: underline; }

/* 게시판 */
.label.sign .name {
  padding: 5px 12px;
  border-radius: 999px;
  background: #fffbea;
  color: var(--ink);
  text-shadow: none;
  box-shadow: 0 2px 0 rgba(90, 70, 50, 0.18);
}
#board, #wishes, #popup-card {
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 72px;
  width: min(430px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 249, 230, 0.97);
}
#board > header, #wishes > header, #popup-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 6px 20px;
}
#board h2, #wishes h2, #popup-card h2 { margin: 0; font-size: 24px; font-weight: 400; }
#board-close, #wishes-close, #card-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: none;
  font-size: 24px;
  cursor: pointer;
}
#board-close:hover, #wishes-close:hover, #card-close:hover { background: rgba(90, 70, 50, 0.08); }
#compose, #wish-compose { padding: 4px 20px 14px; border-bottom: 2px solid var(--line); }
#compose textarea, #wish-compose input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: #fff;
  resize: none;
  font: inherit;
  color: inherit;
  line-height: 1.4;
}
#compose textarea:focus, #wish-compose input:focus { border-color: var(--accent); }
.compose-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
#post-count, #wish-count { color: var(--ink-soft); font-size: 14px; }
#compose button, #wish-compose button, .comment-form button {
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
#posts, #wish-list { flex: 1; overflow-y: auto; padding: 4px 20px 16px; }
#posts .empty, #wish-list .empty { padding: 28px 0; color: var(--ink-soft); text-align: center; }
.post { padding: 14px 0 10px; border-bottom: 2px solid var(--line); }
.post:last-child { border-bottom: 0; }
.post-head, .comment-head { display: flex; align-items: baseline; gap: 8px; }
.post-head .time, .comment-head .time { color: var(--ink-soft); font-size: 13px; }
.post .del {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 14px;
  cursor: pointer;
}
.post .del:hover, .post .del.armed { color: #e0453f; }
.post-text { margin: 6px 0 8px; line-height: 1.45; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.post-actions { display: flex; gap: 16px; }
.post-actions button {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
}
.post-actions button:hover { color: var(--ink); }
.post-actions .like[aria-pressed="true"] { color: #e0453f; }
.comments { margin-top: 6px; padding-left: 14px; border-left: 3px solid var(--line); }
.comment { padding: 6px 0; }
.comment-text { margin: 2px 0 0; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
.comment-form { display: flex; gap: 8px; margin: 6px 0 4px; }
.comment-form input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 2px solid var(--line);
  border-radius: 999px;
  outline: 0;
  background: #fff;
}
.comment-form input:focus { border-color: var(--accent); }
.comment-form button { padding: 8px 14px; }

#status {
  position: fixed;
  top: 64px;
  left: 16px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--cream);
  color: #e0453f;
}

@media (max-width: 720px) {
  #editor { top: auto; height: 58vh; padding: 18px 20px; gap: 12px; border-radius: 24px 24px 0 0; }
  #editor h1 { font-size: 24px; }
  .opt-row .thumb { width: 56px; height: 56px; }
  #chat { left: 0; bottom: 0; width: 100vw; height: 32vh; border-radius: 20px 20px 0 0; }
  #emotes { right: 8px; left: 8px; bottom: calc(32vh + 8px); justify-content: space-between; gap: 4px; }
  #emotes button { padding: 8px 10px; }
  #emotes kbd { display: none; }
  #online { top: 8px; right: 8px; padding: 8px 12px; }
  #board, #wishes, #popup-card { top: 8px; right: 8px; left: 8px; bottom: 8px; width: auto; }
  #edit-avatar { top: 8px; left: 8px; }
  #sound-btn { top: 8px; left: 116px; }
  #card-btn { top: 104px; left: 8px; }
}

/* 소원 트리 */
.label.wishtree .name {
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff3c4;
  color: var(--ink);
  text-shadow: none;
  box-shadow: 0 2px 0 rgba(90, 70, 50, 0.18), 0 0 18px rgba(255, 214, 110, 0.55);
}
#wish-count.warn { color: #e0453f; }
.wish { margin: 0 -8px; padding: 12px 8px 10px; border-radius: 12px; }
.wish .post-text::before { content: '★ '; color: #f0b429; }
.wish.flash { animation: wish-flash 1.8s ease-out; }
@keyframes wish-flash {
  0%, 35% { background: rgba(255, 210, 90, 0.38); }
  100% { background: transparent; }
}
#wish-tip {
  position: fixed;
  z-index: 6;
  max-width: 260px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 249, 230, 0.97);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: 0 3px 0 rgba(90, 70, 50, 0.18);
  transform: translate(-50%, calc(-100% - 16px));
  word-break: keep-all; overflow-wrap: anywhere;
}
#wish-tip b { display: block; margin-bottom: 2px; color: var(--ink-soft); font-size: 13px; font-weight: 400; }

/* 12월 팝업 */
#popup-bar {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 16px;
  border-radius: 999px;
  background: rgba(255, 249, 230, 0.95);
  box-shadow: 0 2px 0 rgba(90, 70, 50, 0.18);
  transform: translateX(-50%);
  white-space: nowrap;
}
#popup-bar .pb-title { color: #c62f37; }
#popup-bar .pb-dday { padding: 2px 8px; border-radius: 999px; background: #0f7f76; color: #fff; font-size: 14px; }
#stamp-btn {
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
#card-body { flex: 1; overflow-y: auto; padding: 0 20px 18px; }
#card-body h3 { margin: 16px 0 8px; font-size: 17px; font-weight: 400; }
.card-period { margin: 0; color: var(--ink-soft); font-size: 14px; }
.card-hint { margin: 8px 0 0; color: var(--ink-soft); font-size: 14px; }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.stamp { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; }
.stamp.got { cursor: default; }
.stamp-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 2px dashed rgba(90, 70, 50, 0.35);
  border-radius: 50%;
  font-size: 14px;
}
.stamp.got .stamp-mark {
  border: 3px double #c62f37;
  color: #c62f37;
  background: rgba(198, 47, 55, 0.08);
  transform: rotate(-12deg);
}
.stamp-name { font-size: 13px; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-h { color: var(--ink-soft); font-size: 13px; }
.cal-d { padding: 6px 0; border-radius: 10px; font-size: 14px; }
.cal-d.xmas { color: #c62f37; }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-d.got { background: #c62f37; color: #fff; }
.goods { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 2px solid var(--line); }
.goods-name { flex: 0 0 auto; }
.goods-need { flex: 1; color: var(--ink-soft); font-size: 14px; }
.goods.owned .goods-need { color: #0f7f76; }
.goods button { padding: 6px 14px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; cursor: pointer; }
.goods button:disabled { background: #b9b1a6; cursor: default; }
.chip.locked { opacity: 0.55; }
.opt-note { margin: 6px 0 0; color: #c62f37; font-size: 14px; }
#stamp-toast {
  position: fixed;
  top: 26%;
  left: 50%;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 28px 16px;
  border-radius: 22px;
  background: rgba(255, 249, 230, 0.97);
  box-shadow: 0 4px 0 rgba(90, 70, 50, 0.2);
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  pointer-events: none;
}
#stamp-toast.show { animation: stamp-in 2.2s ease forwards; }
#stamp-toast.toast-reward.show { animation-duration: 4.1s; pointer-events: auto; }
@keyframes stamp-in {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(0.94); }
  18% { transform: translate(-50%, -50%) scale(1); }
  82% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -54%) scale(1); }
}
.toast-mark {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 4px double #c62f37;
  border-radius: 50%;
  color: #c62f37;
  font-size: 20px;
  transform: rotate(-12deg);
}
.toast-reward .toast-mark { border-color: #e0a92e; color: #e0a92e; font-size: 34px; }
.toast-title { font-size: 20px; }
.toast-sub { color: var(--ink-soft); font-size: 14px; }
#stamp-toast button { margin-top: 6px; padding: 7px 16px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; cursor: pointer; }
.photo-label .name { background: #fff3c4 !important; }
#photo {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(20, 24, 46, 0.72);
}
#photo[hidden] { display: none; }
#photo-img { max-width: min(420px, 86vw); max-height: 70dvh; border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); transform: rotate(-1.5deg); }
.photo-actions { display: flex; gap: 8px; }
.photo-actions a, .photo-actions button {
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  background: #fff9e6;
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.photo-actions a#photo-save { background: var(--accent); color: #fff; }
.photo-hint { margin: 0; color: #e9e6f5; font-size: 14px; }
body.flash::after { content: ''; position: fixed; inset: 0; z-index: 10; background: #fff; animation: flash 0.4s ease-out forwards; pointer-events: none; }
@keyframes flash { from { opacity: 0.9; } to { opacity: 0; } }
#board, #wishes, #popup-card { z-index: 6; }
@media (max-width: 700px) {
  #popup-bar { top: 58px; left: 8px; gap: 6px; padding: 4px 4px 4px 6px; font-size: 14px; transform: none; }
  #popup-bar .pb-title { display: none; }
}

/* 서브 퀘스트 · 굿즈 핀 */
.pins { display: flex; gap: 6px; margin-bottom: 6px; }
.pin { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #efe7d8; font-size: 18px; filter: grayscale(1); opacity: 0.45; }
.pin.got { background: #fff3c4; box-shadow: 0 0 0 2px #e0a92e inset; filter: none; opacity: 1; }
.quest { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.quest-badge { width: 22px; text-align: center; }
.quest-name { flex: 1; }
.quest-n { color: var(--ink-soft); font-size: 14px; }
.quest.done .quest-n { color: #0f7f76; }
.quest.done .quest-name { text-decoration: line-through; color: var(--ink-soft); }
.quest button { padding: 4px 10px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-size: 13px; cursor: pointer; }
#profile-goods { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 8px; }
#profile-goods[hidden] { display: none; }
#profile-goods .pin { width: 28px; height: 28px; font-size: 15px; }
.ride-label .name { background: #ffe1e6 !important; }

/* 네컷 부스 */
#fourcut {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 7;
  width: min(420px, calc(100vw - 24px));
  padding: 14px 18px 18px;
  border-radius: 22px;
  background: rgba(255, 249, 230, 0.97);
  box-shadow: 0 4px 0 rgba(90, 70, 50, 0.2);
  transform: translateX(-50%);
}
#fourcut header { display: flex; align-items: center; justify-content: space-between; }
#fourcut h2 { margin: 0; font-size: 22px; font-weight: 400; }
#fourcut p { margin: 6px 0; font-size: 14px; }
#fourcut .fourcut-hint { color: var(--ink-soft); font-size: 13px; }
#fourcut-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; font-size: 22px; cursor: pointer; }
#preset-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
.preset { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.preset.on { border-color: var(--accent); }
.swatch-dot { width: 30px; height: 44px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
#fourcut-start { width: 100%; margin-top: 6px; padding: 10px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-size: 16px; cursor: pointer; }
#shoot-count {
  position: fixed;
  top: 40%;
  left: 50%;
  z-index: 8;
  color: #fff;
  font-size: 120px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
#shoot-count::after { content: attr(data-shot); position: absolute; top: -26px; left: 50%; font-size: 20px; white-space: nowrap; transform: translateX(-50%); }
#shoot-count.pop { animation: count-pop 0.7s ease-out; }
@keyframes count-pop { from { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } 30% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

@media (max-width: 700px) {
  #emotes { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #emotes::-webkit-scrollbar { display: none; }
  #emotes button { flex: 0 0 auto; white-space: nowrap; }
}

/* 창작자 부스 */
.booth-label .name { background: #e8f3ff !important; }
#booth {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 7;
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 16px 20px 18px;
  border-radius: 22px;
  background: rgba(255, 249, 230, 0.98);
  box-shadow: 0 6px 0 rgba(90, 70, 50, 0.2);
  transform: translate(-50%, -50%);
}
#booth header { display: flex; align-items: flex-start; justify-content: space-between; }
#booth h2 { margin: 0; font-size: 26px; font-weight: 400; }
#booth-owner { color: var(--ink-soft); font-size: 14px; }
#booth-close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; font-size: 24px; cursor: pointer; }
#booth-intro { margin: 10px 0; }
#booth:has(.booth-stream-stage) { width: min(620px, calc(100vw - 32px)); box-sizing: border-box; }
#booth-works { --booth-stream-teal: #0f7f76; display: grid; gap: 12px; margin-block: 16px 24px; }
.booth-works-heading, .booth-stream-top, .booth-stream-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.booth-works-title { margin: 0; color: var(--ink); font-size: 18px; }
.booth-stream-stage { position: relative; display: grid; gap: 12px; overflow: hidden; padding: 16px; border: 1px solid #e5d8b9; border-radius: 18px; background: #fff4d9; }
.booth-stream-progress { position: absolute; inset: 0 0 auto; height: 3px; background: #e5dbc5; }
.booth-stream-fill { height: 100%; transform: scaleX(0); transform-origin: left center; background: var(--booth-stream-teal); }
.booth-stream-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; background: var(--booth-stream-teal); color: #fff; font-size: 13px; font-weight: 700; }
.booth-stream-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #f8cd76; }
.booth-stream-stage.is-paused .booth-stream-badge::before { border-radius: 1px; }
.booth-stream-viewport { position: relative; height: clamp(210px, 36dvh, 320px); isolation: isolate; border-radius: 12px; background: #fbf6e8; }
.booth-stream-frame { position: absolute; inset: 0; visibility: hidden; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border-radius: inherit; background: #fbf6e8; }
.booth-stream-frame.is-current { z-index: 2; visibility: visible; }
.booth-stream-frame.is-media { overflow: hidden; scrollbar-gutter: auto; background: #211d1a; }
.booth-stream-frame.is-media :is(video, img) { display: block; width: 100%; height: 100%; object-fit: contain; }
#booth-works .booth-stream-actions .booth-stream-sound { min-height: 28px; padding-inline: 9px; font-size: 12px; }
.booth-stream-nav, .booth-stream-actions { display: flex; align-items: center; gap: 6px; }
.booth-stream-actions { flex-wrap: wrap; margin-inline-start: auto; }
#booth-works :is(button, .booth-stream-actions a) { cursor: pointer; font-family: inherit; }
#booth-works :is(.booth-stream-arrow, .booth-stream-pause, .booth-stream-actions button, .booth-stream-actions a) { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 34px; padding: 5px 12px; margin: 0; border: 1px solid var(--booth-stream-teal); border-radius: 999px; background: #fffdf5; color: #0b625b; font-size: 13px; line-height: 1; text-decoration: none; }
#booth-works .booth-stream-arrow { width: 34px; padding: 0; background: var(--booth-stream-teal); color: #fff; font-size: 24px; }
.booth-stream-dot { display: grid; place-items: center; width: 24px; height: 34px; padding: 0; border: 0; border-radius: 999px; background: transparent; }
.booth-stream-dot::before { content: ''; width: 8px; height: 8px; border: 1px solid var(--booth-stream-teal); border-radius: 50%; }
.booth-stream-dot[aria-current='true']::before { background: var(--booth-stream-teal); }
.booth-stream-playlist { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; }
.booth-stream-card { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; max-width: 145px; min-height: 40px; padding: 6px 10px; border: 1px solid #d9caaa; border-radius: 11px; background: #fffdf5; color: #473923; font-size: 12px; text-align: left; }
.booth-stream-card[aria-current='true'] { border-color: var(--booth-stream-teal); background: #e1f2ec; color: #085850; font-weight: 700; }
.booth-stream-number { flex: none; color: #0b625b; font-weight: 700; }
.booth-stream-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booth-stream-edit { padding: 6px 3px; border: 0; border-radius: 4px; background: none; color: #0b625b; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
#booth-works :is(button, a, .booth-stream-frame):focus-visible { outline: 2px solid var(--booth-stream-teal); outline-offset: 2px; }
#booth-works .booth-stream-frame:focus-visible { outline-offset: -2px; }
#booth:focus { outline: none; }
#booth-meta { margin: 10px 0 6px; color: #0f7f76; font-size: 14px; }
.booth-actions { display: flex; gap: 8px; }
.booth-actions a { flex: 1; padding: 10px; border-radius: 999px; background: var(--accent); color: #fff; text-align: center; text-decoration: none; }
.booth-actions a + a { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.booth-actions a.off { opacity: 0.45; pointer-events: none; }
#booth-note { margin: 8px 0 0; color: var(--ink-soft); font-size: 13px; }

/* 네컷: 포즈 세트, 함께 찍기 */
.fc-label { margin: 10px 0 4px !important; color: var(--ink-soft); font-size: 13px !important; }
#poseset-row { display: flex; flex-direction: column; gap: 5px; max-height: 190px; overflow-y: auto; }
.poseset { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.poseset b { font-weight: 400; }
.poseset span { color: var(--ink-soft); font-size: 12px; }
.poseset.on { border-color: var(--accent); }
.fc-buttons { display: flex; gap: 8px; margin-top: 10px; }
.fc-buttons button { flex: 1; padding: 10px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-size: 15px; cursor: pointer; }
.fc-buttons button + button { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
#fourcut-group { background: #c62f37 !important; color: #fff !important; box-shadow: none !important; }
#wait-members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wait-chip { padding: 4px 10px; border-radius: 999px; background: #fff3c4; font-size: 14px; }
#shoot-invite {
  position: fixed;
  top: 84px;
  left: 50%;
  z-index: 8;
  width: min(360px, calc(100vw - 24px));
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 249, 230, 0.98);
  box-shadow: 0 4px 0 rgba(90, 70, 50, 0.2), 0 0 0 3px #e0a92e inset;
  transform: translateX(-50%);
}
#invite-text { font-size: 16px; }
#invite-sub { margin-top: 2px; color: var(--ink-soft); font-size: 13px; }
#shoot-count::after { white-space: nowrap; }

/* ---------- 크리에이터 카드 ---------- */
.label .field { margin-top: 1px; padding: 0 7px; border-radius: 999px; background: rgba(47, 107, 74, 0.86); color: #fff; font-size: 12px; line-height: 17px; white-space: nowrap; }
.label .field[hidden] { display: none; }
.ccard { --cc: #7a5a44; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 16px; background: #fffdf7; box-shadow: inset 5px 0 0 var(--cc), 0 2px 0 rgba(90, 70, 50, 0.12); text-align: left; }
.ccard-label { color: var(--ink-soft); font-size: 12px; }
.ccard-top { display: flex; align-items: center; gap: 10px; }
.ccard-img { width: 52px; height: 52px; border-radius: 14px; background: rgba(90, 70, 50, 0.07); }
.ccard-name { color: var(--cc); font-size: 18px; }
.ccard-fields { color: #0f7f76; font-size: 14px; }
.ccard-intro { margin: 0; font-size: 15px; line-height: 1.45; }
.ccard-tools { color: var(--ink-soft); font-size: 13px; }
.ccard-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.ccard-acts a, .ccard-acts button { padding: 5px 12px; border: 2px solid var(--accent); border-radius: 999px; background: #fff; color: #0f7f76; font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.ccard-acts button:disabled { border-color: #cfd8d2; color: var(--ink-soft); cursor: default; }
#cards {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 7;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 16px 20px 18px;
  border-radius: 22px;
  background: rgba(255, 249, 230, 0.98);
  box-shadow: 0 6px 0 rgba(90, 70, 50, 0.2);
  transform: translate(-50%, -50%);
}
#cards[hidden] { display: none; }
#cards header { display: flex; align-items: center; justify-content: space-between; }
#cards h2 { margin: 0; font-size: 24px; font-weight: 400; }
#cards-close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; font-size: 24px; cursor: pointer; }
#cards-tabs { display: flex; gap: 6px; margin: 10px 0 12px; }
#cards-tabs button { flex: 1; padding: 8px; border: 2px solid var(--accent); border-radius: 999px; background: #fff; color: #0f7f76; font: inherit; cursor: pointer; }
#cards-tabs button.on { background: var(--accent); color: #fff; }
#cards .muted { color: var(--ink-soft); font-size: 14px; }
.card-form { display: flex; flex-direction: column; gap: 6px; }
.card-form label { margin-top: 4px; color: var(--ink-soft); font-size: 14px; }
.card-form input { padding: 9px 12px; border: 2px solid #e6dcc8; border-radius: 12px; background: #fff; font: inherit; font-size: 15px; }
.card-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.card-chips button { padding: 5px 12px; border: 2px solid #e6dcc8; border-radius: 999px; background: #fff; font: inherit; font-size: 14px; cursor: pointer; }
.card-chips button.on { border-color: #0f7f76; background: #0f7f76; color: #fff; }
.card-preview-label { margin: 14px 0 6px; color: var(--ink-soft); font-size: 14px; }
.card-save { width: 100%; margin-top: 12px; padding: 11px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-size: 16px; cursor: pointer; }
.ccard-list { display: flex; flex-direction: column; gap: 10px; }
#profile-card { align-self: stretch; }
#profile-card[hidden] { display: none; }
#profile-swap { background: #0f7f76 !important; border-color: #0f7f76 !important; color: #fff !important; }
#profile-swap:disabled { background: #fff !important; border-color: #cfd8d2 !important; color: var(--ink-soft) !important; cursor: default; }
#card-ask {
  position: fixed;
  top: 84px;
  left: 50%;
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 24px));
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 249, 230, 0.98);
  box-shadow: 0 4px 0 rgba(90, 70, 50, 0.2), 0 0 0 3px #0f7f76 inset;
  transform: translateX(-50%);
}
#card-ask[hidden] { display: none; }
#card-ask-text { font-size: 16px; }
#card-ask-sub { color: var(--ink-soft); font-size: 13px; }
.card-ask-btns { display: flex; gap: 8px; }
.card-ask-btns button { flex: 1; padding: 9px; border: 2px solid #0f7f76; border-radius: 999px; background: #fff; color: #0f7f76; font: inherit; cursor: pointer; }
#card-ask-yes { background: #0f7f76 !important; color: #fff !important; }
.profile-row { display: flex; gap: 6px; }
.profile-row button { flex: 1; padding: 8px 4px !important; font-size: 14px; }
.profile-row button[hidden] { display: none; }

/* ---------- 스레드 임베드·부스 거리 ---------- */
iframe.th-embed { display: block; width: 100%; min-height: 140px; height: 160px; border: 0; border-radius: 12px; background: #fff; }
.booth-find-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.booth-find-grid > .muted { grid-column: 1 / -1; }
.booth-find-card { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 8px; padding: 10px; background: #fff; border: 1px solid #e6dcc8; border-radius: 14px; }
.booth-find-card img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; }
.booth-find-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booth-find-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; align-self: start; }
.booth-find-chips span { padding: 2px 7px; border-radius: 999px; background: #f5eddf; font-size: 12px; }
.booth-find-card button { grid-column: 1 / -1; align-self: end; min-height: 44px; }
#booth-edit-btn { margin-block: 8px; }
.booth-edit-form { display: grid; gap: 8px; margin-bottom: 14px; }
.booth-edit-form > label { display: grid; gap: 4px; }
.booth-edit-form input:not([type=checkbox]) { box-sizing: border-box; width: 100%; padding: 8px; font: inherit; }
.booth-edit-form fieldset { display: flex; flex-wrap: wrap; gap: 6px 10px; min-width: 0; }
.booth-edit-form fieldset label { display: inline-flex; align-items: center; gap: 3px; }
#booth-remove { margin-top: 10px; padding: 6px 12px; border: 0; background: none; color: #c62f37; font: inherit; font-size: 14px; cursor: pointer; }
#booth-remove.armed { background: #c62f37; color: #fff; border-radius: 999px; }
.cb-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.cb-row { --cc: #7a5a44; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 14px; background: #fffdf7; box-shadow: inset 5px 0 0 var(--cc), 0 2px 0 rgba(90, 70, 50, 0.1); }
.cb-head { display: flex; align-items: center; gap: 10px; }
.cb-head .ccard-img { width: 40px; height: 40px; border-radius: 10px; }
.cb-head .ccard-name { font-size: 16px; }
.cb-embed[hidden] { display: none; }
.cards-search { width: 100%; box-sizing: border-box; padding: 9px 12px; border: 2px solid #e6dcc8; border-radius: 12px; background: #fff; font: inherit; font-size: 15px; }
.card-go { width: 100%; margin-top: 10px; padding: 9px; border: 2px solid #0f7f76; border-radius: 999px; background: #fff; color: #0f7f76; font: inherit; cursor: pointer; }
#profile-card .card-go { margin-top: 6px; }

/* ---------- 광장 안내 마스코트 ---------- */
.label.mascot .name { color: #3da55a; }
#mascot {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 8;
  width: min(560px, calc(100vw - 24px));
  padding: 16px 20px 14px;
  border-radius: 22px;
  background: rgba(255, 249, 230, 0.98);
  box-shadow: 0 6px 0 rgba(90, 70, 50, 0.2), 0 0 0 3px #3da55a inset;
  transform: translateX(-50%);
}
#mascot[hidden] { display: none; }
#mascot-close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; font-size: 22px; cursor: pointer; }
.mascot-head { display: flex; align-items: center; gap: 12px; }
#mascot-img { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; background: #e8f4ec; }
#mascot-name { color: #0f7f76; font-size: 20px; }
#mascot-role { color: var(--ink-soft); font-size: 14px; }
#mascot-text { min-height: 3.2em; margin: 10px 0; font-size: 17px; line-height: 1.55; cursor: pointer; }
#mascot-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#mascot-actions button { padding: 8px 16px; border: 0; border-radius: 999px; background: #0f7f76; color: #fff; font: inherit; cursor: pointer; }
#mascot-actions button.soft { border: 2px solid #0f7f76; background: #fff; color: #0f7f76; }
#mascot-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #d9ccb4; }
#mascot-topics button { padding: 4px 10px; border: 0; border-radius: 999px; background: none; color: var(--ink-soft); font: inherit; font-size: 14px; cursor: pointer; }
#mascot-topics button.on { background: #e8f4ec; color: #0f7f76; }
@media (max-width: 700px) { #mascot { bottom: auto; top: 70px; } #mascot-text { font-size: 15px; } }

/* ---------- 놀이마당 게임 창·건배·카운트다운 ---------- */
#game { position: fixed; top: 70px; left: 16px; z-index: 6; width: min(380px, calc(100vw - 24px)); max-height: calc(100dvh - 400px); overflow-y: auto; padding: 12px 16px; border-radius: 18px; background: rgba(255, 249, 230, 0.97); box-shadow: 0 4px 0 rgba(90, 70, 50, 0.2), 0 0 0 3px #0f7f76 inset; }
#game[hidden] { display: none; }
#game-title { color: #0f7f76; font-size: 19px; }
#game p { margin: 6px 0; }
#game .muted { color: var(--ink-soft); font-size: 14px; }
.game-q { font-size: 17px; }
.game-big { font-size: 22px; color: #c0392b; }
.game-btn { margin-top: 6px; padding: 7px 16px; border: 0; border-radius: 999px; background: #0f7f76; color: #fff; font: inherit; cursor: pointer; }
.game-opts { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.game-opt { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 10px; }
.game-opt.ok { background: #e8f4ec; font-weight: 700; }
.pad-dot { width: 14px; height: 14px; border-radius: 50%; }
.pad0 .pad-dot { background: #e0453f; }
.pad1 .pad-dot { background: #e0a92e; }
.pad2 .pad-dot { background: #3f7fe0; }
.work-crop { height: 260px; overflow: hidden; border-radius: 12px; margin: 6px 0; background: #fff; }
.work-crop iframe.th-embed { margin-top: -72px; min-height: 340px; }
.snow-score { display: flex; justify-content: center; gap: 10px; font-size: 22px; }
.snow-score .team0 { color: #d8343c; }
.snow-score .team1 { color: #2f8a4f; }
.game-rank { margin: 4px 0 0 18px; padding: 0; }
.label.team0 .name { background: rgba(216, 52, 60, 0.9) !important; color: #fff !important; border-radius: 999px; padding: 0 6px; }
.label.team1 .name { background: rgba(47, 138, 79, 0.9) !important; color: #fff !important; border-radius: 999px; padding: 0 6px; }
#countdown { position: fixed; inset: 0; z-index: 9; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
#countdown[hidden] { display: none; }
.cd-num { color: #fff; font-size: 160px; text-shadow: 0 6px 0 rgba(90, 40, 30, 0.45), 0 0 40px rgba(255, 200, 120, 0.8); }
.cd-year { color: #ffe08a; font-size: 140px; text-shadow: 0 6px 0 rgba(90, 40, 30, 0.45), 0 0 50px rgba(255, 200, 120, 0.9); }
.cd-msg { color: #fff; font-size: 40px; text-shadow: 0 3px 0 rgba(90, 40, 30, 0.5); }
@media (max-width: 700px) { #game { top: 150px; left: 50%; transform: translateX(-50%); max-height: 40dvh; } .cd-num { font-size: 110px; } .cd-year { font-size: 96px; } .cd-msg { font-size: 26px; } }

/* ---------- 썰매 경주 ---------- */
#race { position: fixed; top: 70px; left: 16px; z-index: 6; width: min(360px, calc(100vw - 24px)); padding: 12px 16px; border-radius: 18px; background: rgba(255, 249, 230, 0.97); box-shadow: 0 4px 0 rgba(90, 70, 50, 0.2), 0 0 0 3px #3f7fe0 inset; }
#race[hidden] { display: none; }
.race-1 { color: #2d5fb0; font-size: 20px; }
.race-2 { margin-top: 4px; color: var(--ink-soft); font-size: 14px; }
.game-btn.soft { background: #fff; color: #0f7f76; border: 2px solid #0f7f76; }
#race-cd { position: fixed; top: 36%; left: 50%; z-index: 9; transform: translate(-50%, -50%); color: #fff; font-size: 140px; text-shadow: 0 6px 0 rgba(40, 60, 110, 0.5), 0 0 40px rgba(140, 190, 255, 0.9); pointer-events: none; }
#race-cd[hidden] { display: none; }
#race-pad { position: fixed; left: 0; right: 0; bottom: 18px; z-index: 7; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 18px; pointer-events: none; }
#race-pad[hidden] { display: none; }
#race-pad button { pointer-events: auto; width: 84px; height: 84px; border: 0; border-radius: 50%; background: rgba(255, 249, 230, 0.92); font-size: 30px; box-shadow: 0 4px 0 rgba(90, 70, 50, 0.25); touch-action: none; }
#race-pad #race-brake { width: 110px; height: 56px; border-radius: 999px; font: inherit; font-size: 16px; }
@media (max-width: 700px) { #race { top: 150px; left: 50%; transform: translateX(-50%); } }

/* 경주 계기판·바퀴 기록 */
.race-hud .rh-top { color: #2d5fb0; font-size: 20px; }
.race-hud .rh-label { margin-top: 6px; color: var(--ink-soft); font-size: 14px; }
.race-hud .rh-cur { color: #16233d; font-size: 44px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.race-hud .rh-sub { color: #2d5fb0; font-size: 16px; font-variant-numeric: tabular-nums; }
#race-flash { position: fixed; top: 24%; left: 50%; z-index: 9; transform: translateX(-50%); text-align: center; pointer-events: none; }
#race-flash[hidden] { display: none; }
#race-flash .rf-main { color: #fff; font-size: 64px; text-shadow: 0 5px 0 rgba(40, 60, 110, 0.55), 0 0 30px rgba(140, 190, 255, 0.9); font-variant-numeric: tabular-nums; }
#race-flash .rf-sub { color: #ffe08a; font-size: 26px; text-shadow: 0 3px 0 rgba(40, 60, 110, 0.6); }
@media (max-width: 700px) { .race-hud .rh-cur { font-size: 34px; } #race-flash .rf-main { font-size: 42px; } }

/* 안내 문구: 기기별 */
@media (pointer: coarse) { .pc-only { display: none; } }
@media (pointer: fine) { .touch-only { display: none; } }
/* 휴대폰 경주 중: 조작 버튼이 채팅·감정표현과 겹치지 않게 숨긴다 */
body.racing #chat, body.racing #emotes { display: none !important; }

/* UX 검수 반영 (2026-12-01) */
/* 광장 안내 이름표: 눈 위에서도 읽히게 크림색 알약 (소원 트리 이름표와 같은 모양) */
.label.mascot .name { padding: 5px 12px; border-radius: 999px; background: #fff3c4; color: #0f7f76; text-shadow: none; }
@media (max-width: 720px) {
  /* 감정표현 8개가 한 줄에 안 들어가면 옆으로 밀어서 본다 (잘리지 않게) */
  #emotes { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #emotes::-webkit-scrollbar { display: none; }
  #emotes button { flex: 0 0 auto; min-height: 40px; }
  /* 아이폰 홈 표시줄과 겹치지 않게 */
  #chat { padding-bottom: env(safe-area-inset-bottom); }
  /* 접속자 목록이 화면을 반 가까이 덮지 않게 */
  #online { max-height: 28dvh; }
}
@media (pointer: coarse) {
  /* 손가락으로 누르기 쉬운 크기 */
  #ch-btn { min-height: 36px; padding: 6px 14px; }
  #online-list button { min-height: 32px; }
}

/* 네컷 꾸미기 */
#photo-stage { position: relative; display: inline-block; line-height: 0; }
#photo-stickers { position: absolute; inset: 0; overflow: hidden; }
#photo.deco { flex-direction: row; align-items: center; gap: 22px; padding: 16px; }
#photo.deco #photo-img { transform: none; max-height: 86dvh; max-width: 40vw; }
#photo.deco .photo-actions, #photo.deco .photo-hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); }
#photo.deco .photo-hint { display: none; }
#photo-deco { width: min(360px, 90vw); max-height: 80dvh; overflow-y: auto; padding: 14px 16px; border-radius: 20px; background: var(--cream); }
#photo-deco .deco-h { margin: 6px 0 6px; font-size: 15px; }
#photo-deco .deco-h span { margin-left: 6px; color: var(--ink-soft); font-size: 13px; }
#photo-deco .deco-row { display: flex; flex-wrap: wrap; gap: 6px; }
#photo-deco .preset { font-size: 14px; }
.stk-pick { min-width: 44px; height: 44px; padding: 0 6px; border: 0; border-radius: 12px; background: #fff; font-size: 26px; line-height: 1; cursor: pointer; font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif; }
.stk-pick.txt { font-family: Jua, sans-serif; font-size: 15px; }
.stk-pick img { width: 34px; height: 34px; object-fit: contain; }
.stk-pick:hover { background: #fff3c4; }
#deco-tools { display: flex; gap: 6px; margin-top: 10px; }
#deco-tools button { flex: 1; min-height: 40px; border: 0; border-radius: 999px; background: #0f7f76; color: #fff; font: inherit; font-size: 14px; cursor: pointer; }
#deco-tools.off button { background: #cfc8b8; cursor: default; }
.deco-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; }
.stk { position: absolute; line-height: 1; white-space: nowrap; cursor: grab; touch-action: none; user-select: none; }
.stk.txt { font-family: Jua, sans-serif; }
.stk.sel { outline: 2px dashed #fff; outline-offset: 4px; border-radius: 6px; }
@media (max-width: 720px) {
  #photo.deco { flex-direction: column; justify-content: flex-start; gap: 10px; padding: 10px 8px 70px; overflow-y: auto; }
  #photo.deco #photo-img { max-height: 52dvh; max-width: 92vw; }
  #photo-deco { max-height: none; width: 94vw; }
  #photo.deco .photo-actions { position: fixed; bottom: calc(10px + env(safe-area-inset-bottom)); }
}
.photo-actions a, .photo-actions button { white-space: nowrap; }
@media (max-width: 720px) {
  #photo.deco { padding-bottom: 12px; }
  #photo.deco .photo-actions { position: sticky; bottom: 0; left: auto; transform: none; width: 100%; justify-content: center; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: rgba(20, 24, 46, 0.92); }
  #photo.deco #photo-img { max-height: 58dvh; }
}

/* 장소 이동 */
#tp-btn { position: fixed; top: 16px; left: 372px; }
#tp-menu { position: fixed; top: 80px; left: 16px; z-index: 8; width: min(340px, calc(100vw - 16px)); max-height: calc(100dvh - 140px); overflow-y: auto; padding: 12px 16px 14px; border-radius: 20px; background: var(--cream); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); }
#tp-menu[hidden] { display: none; }
#tp-menu header { display: flex; align-items: center; justify-content: space-between; }
#tp-menu h2 { margin: 0; font-size: 18px; }
#tp-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #efe7d8; font-size: 20px; cursor: pointer; }
#tp-menu .tp-h { margin: 10px 0 6px; color: var(--ink-soft); font-size: 14px; }
#tp-menu .tp-row { display: flex; flex-wrap: wrap; gap: 6px; }
#tp-menu .tp-row button { min-height: 40px; padding: 6px 14px; border: 0; border-radius: 999px; background: #fff; font: inherit; font-size: 14px; cursor: pointer; }
#tp-menu .tp-row button:hover { background: #fff3c4; }
@media (max-width: 720px) {
  #tp-btn { top: 104px; left: 136px; }
  #tp-menu { top: 150px; left: 8px; }
}
/* 장소 이동: 그림 버튼 */
#tp-menu { width: min(380px, calc(100vw - 16px)); }
#tp-menu .tp-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
#tp-menu .tp-row button.tp-item { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 0; padding: 8px 4px 8px; border-radius: 16px; background: #fff; font-size: 14px; line-height: 1.2; }
#tp-menu .tp-item img { width: 72px; height: 64px; object-fit: contain; transition: transform 0.15s ease; }
#tp-menu .tp-item:hover img { transform: translateY(-3px) scale(1.06); }
#tp-menu .tp-item span { white-space: nowrap; }
@media (max-width: 720px) {
  #tp-menu .tp-item img { width: 60px; height: 54px; }
  #tp-menu { max-height: calc(100dvh - 230px); }
}
@media (min-width: 721px) {
  #tp-menu { width: 470px; }
  #tp-menu .tp-row { grid-template-columns: repeat(4, 1fr); }
}

/* 눈덩이 게이지 (머리 위) */
#snow-gauge { position: fixed; left: 0; top: 0; z-index: 6; width: 104px; height: 14px; padding: 2px; border-radius: 999px; background: rgba(20, 24, 46, 0.6); pointer-events: none; }
#snow-gauge[hidden] { display: none; }
#snow-gauge i { display: block; width: 0; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #bfe3ff, #ffffff); }
#snow-gauge.hot i { background: linear-gradient(90deg, #ffd36b, #ff7a59); }

/* 1:1 메시지 알림 */
#dm-toast { position: fixed; top: 74px; left: 50%; z-index: 9; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; max-width: min(420px, 90vw); padding: 12px 18px; border: 0; border-radius: 18px; background: #0f7f76; color: #fff; font: inherit; text-align: left; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28); transform: translateX(-50%); cursor: pointer; }
#dm-toast[hidden] { display: none; }
#dm-toast b { font-size: 15px; }
#dm-toast span { font-size: 15px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#dm-toast em { font-size: 13px; font-style: normal; opacity: 0.8; }
#dm-toast.pop { animation: dmpop 0.35s ease-out; }
@keyframes dmpop { from { transform: translate(-50%, -14px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.tab .unread { animation: unreadPulse 1.2s ease-in-out infinite; }
@keyframes unreadPulse { 50% { transform: scale(1.25); box-shadow: 0 0 0 4px rgba(224, 69, 63, 0.25); } }
@media (max-width: 720px) { #dm-toast { top: 150px; } }

/* 프로필 창: 캐릭터 대신 스레드 프로필 (공식 임베드) */
#profile-pic { align-self: stretch; border-radius: 14px; overflow: hidden; background: #fff; }
#profile-pic[hidden] { display: none; }
#profile-pic.head { height: 104px; }
#profile-pic.head iframe.th-embed { min-height: 420px; }

/* 배치 모드 (운영자) */
#layout-btn { position: fixed; top: 64px; left: 16px; padding: 9px 16px; border: 0; border-radius: 999px; background: var(--cream); font: inherit; cursor: pointer; }
#layout-btn.on { background: #ffd36b; }
#layout-panel { position: fixed; top: 112px; left: 16px; z-index: 8; display: flex; flex-direction: column; gap: 8px; width: 270px; padding: 12px 14px; border-radius: 18px; background: var(--cream); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); }
#layout-panel[hidden] { display: none; }
#layout-panel .lrow { display: flex; gap: 6px; }
#layout-panel button, #layout-panel select { flex: 1; min-width: 0; min-height: 36px; padding: 4px 10px; border: 0; border-radius: 999px; background: #fff; font: inherit; font-size: 14px; cursor: pointer; }
#layout-panel button:hover:not(:disabled) { background: #fff3c4; }
#layout-panel button:disabled { opacity: 0.4; cursor: default; }
#layout-sel { color: var(--ink-soft); font-size: 14px; }
#layout-help { color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
@media (max-width: 720px) {
  #layout-btn { top: 152px; }
  #layout-panel { top: 200px; }
}

/* 블라인드 갤러리 */
#blind { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 9; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 14px 16px 16px; border-radius: 22px; background: var(--cream); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25); }
#blind[hidden] { display: none; }
#blind header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
#blind h2 { margin: 0; font-size: 19px; }
#blind-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #efe7d8; font-size: 20px; cursor: pointer; }
#blind-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.blind-info { margin: 0; color: var(--ink-soft); font-size: 14px; }
.blind-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.blind-row button { flex: 1; min-height: 44px; border: 0; border-radius: 999px; font: inherit; font-size: 15px; cursor: pointer; }
.blind-skip { background: #fff; }
.blind-skip:hover { background: #fff3c4; }
.blind-pick { min-height: 46px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-size: 15px; cursor: pointer; }
.blind-who { margin: 0; font-size: 18px; }
.blind-head { height: 104px; overflow: hidden; border-radius: 14px; background: #fff; }
.blind-head iframe.th-embed { min-height: 420px; }
.blind-here { margin: 0; padding: 8px 10px; border-radius: 12px; background: #fff3c4; font-size: 14px; }
.blind-text { min-height: 64px; padding: 10px; border: 2px solid #e7dccb; border-radius: 12px; font: inherit; font-size: 14px; resize: vertical; }
.blind-mine { padding: 8px 10px; border-radius: 12px; background: rgba(90, 70, 50, 0.07); color: var(--ink-soft); font-size: 12.5px; }
.card-blind { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; color: var(--ink-soft); }
.toast-play .toast-mark { background: #3f7fe0; }

/* ================= UI ver2 (2026-12-02) ==========   규칙: 화면 가장자리 16px, 패널 안쪽 20px, 요소 간격 12px. 본문 14px 이상, 보조 12px 이상.
   주 버튼 색 = 청록(--accent) 하나, 보조 = 흰 바탕, 운영자·위험 = 빨강. 모서리: 패널 20px, 버튼 알약, 카드 12px. */
:root { --ink-soft: #7d6a52; }
.v2-hide { display: none !important; }
#menu-btn { position: fixed; top: 16px; left: 16px; z-index: 7; padding: 9px 16px; border: 0; border-radius: 999px; background: var(--cream); font: inherit; cursor: pointer; box-shadow: 0 2px 0 rgba(90, 70, 50, 0.18); }
#menu-btn[aria-expanded="true"] { background: #fff; }
#menu-pop { position: fixed; top: 62px; left: 16px; z-index: 8; display: flex; flex-direction: column; gap: 6px; min-width: 190px; padding: 10px; border-radius: 20px; background: var(--cream); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); }
#invite-banner { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 200; background: #17352d; color: #fff; padding: 12px 24px; border-radius: 12px; pointer-events: none; }
#menu-pop[hidden] { display: none; }
#menu-pop > button { position: static !important; display: block; width: 100%; padding: 10px 14px; border: 0; border-radius: 999px; background: #fff; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
#menu-pop > button[hidden] { display: none; }
#menu-pop > button:hover { background: #fff3c4; }
#menu-pop #layout-btn.on { background: #ffd36b; }
#layout-panel { top: 62px; left: 220px; }
/* 주 버튼 4개 */
#dock { position: fixed; left: 50%; bottom: 16px; z-index: 5; display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: rgba(255, 249, 230, 0.96); box-shadow: 0 4px 16px rgba(60, 40, 20, 0.18); transform: translateX(-50%); }
#dock[hidden], #dock.racing { display: none; }
#dock button { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px; border: 0; border-radius: 999px; background: #fff; font: inherit; font-size: 15px; white-space: nowrap; cursor: pointer; }
#dock button:first-child { background: var(--accent); color: #fff; }
#dock button:hover { filter: brightness(0.97); }
#dock button.on { outline: 3px solid #ffd36b; }
#dock .dk-ico { font-size: 17px; line-height: 1; }
/* 반응: 이모트 접기 */
#react-btn { position: fixed; right: 16px; bottom: 16px; z-index: 5; min-height: 44px; padding: 8px 18px; border: 0; border-radius: 999px; background: var(--cream); font: inherit; font-size: 15px; cursor: pointer; box-shadow: 0 2px 0 rgba(90, 70, 50, 0.18); }
#emotes { bottom: 70px; max-width: 460px; flex-wrap: wrap; justify-content: flex-end; }
#emotes.folded { display: none; }
#emotes:not(.folded) { padding: 8px; border-radius: 20px; background: rgba(255, 249, 230, 0.96); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16); }
/* 채팅: 작게, 접기 */
#chat { height: min(230px, 32vh); }
#chat-fold { align-self: stretch; padding: 6px 14px; border: 0; border-bottom: 2px solid var(--line); background: rgba(255, 255, 255, 0.5); color: var(--ink-soft); font: inherit; font-size: 14px; text-align: right; cursor: pointer; }
#chat-fold.has-new { background: #ffe9a8; color: var(--ink); }
#chat.folded { height: auto; }
#chat.folded #log, #chat.folded #tabs { display: none; }
#chat.folded #chat-fold { border-bottom: 0; }
/* 부스·블라인드 */
.th-open { display: inline-block; align-self: flex-start; margin: 6px 0 10px; padding: 6px 12px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 14px; text-decoration: none; box-shadow: inset 0 0 0 2px #e7dccb; }
.th-open:hover { background: #fff3c4; }
.blind-row { position: sticky; bottom: -16px; z-index: 1; margin: 0 -16px -16px; padding: 10px 16px 14px; background: var(--cream); box-shadow: 0 -8px 12px -8px rgba(60, 40, 20, 0.25); }
/* 휴대폰 */
@media (max-width: 720px) {
  #menu-btn { top: 8px; left: 8px; }
  #menu-pop { top: 54px; left: 8px; }
  #layout-panel { top: 54px; left: 8px; }
  #dock { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); gap: 4px; padding: 4px; transform: none; justify-content: space-between; }
  #dock button { flex: 1; flex-direction: column; gap: 2px; min-height: 52px; padding: 6px 2px; font-size: 13px; white-space: nowrap; text-align: center; line-height: 1.15; }
  #dock .dk-long { display: none; }
  /* 휴대폰: 접속자 이름 목록은 접어 두고 "n명"을 누르면 펼친다 (위 띠와 겹침 방지) */
  #online:not(.open) #online-list { display: none; }
  #online:not(.open) #online-head { margin-bottom: 0; }
  #online-count { cursor: pointer; }
  #online-count::after { content: ' ▾'; }
  #dock .dk-ico { font-size: 18px; }
  #react-btn { right: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); min-height: 40px; padding: 6px 14px; font-size: 14px; }
  #emotes { left: 8px; right: 8px; bottom: calc(124px + env(safe-area-inset-bottom)); max-width: none; justify-content: center; }
  #chat { left: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); width: calc(100vw - 120px); height: 30vh; border-radius: 16px; }
  #chat.folded { height: auto; }
  #chat.folded #send { display: none; }
  #chat-fold { text-align: left; }
}
/* 데스크톱: 주 버튼은 채팅창 오른쪽에 (가운데 두면 채팅과 겹침) */
@media (min-width: 721px) {
  #dock { left: calc(16px + min(380px, 100vw - 32px) + 16px); transform: none; }
}
@media (min-width: 721px) and (max-width: 1199px) {
  #chat { width: 320px; }
  #dock { left: 352px; gap: 6px; }
  #dock button { padding: 8px 12px; font-size: 14px; }
}
#online-list .score { display: none; } /* UI ver2: 선물 개수(경쟁 표시) 숨김 */
/* UI ver2 검수 반영 (2026-12-02): 창이 아래 주 버튼을 덮지 않게, 주 버튼 색 통일 */
#dock button, #dock button:first-child { background: #fff; color: var(--ink); }
#dock button.on { background: #fff3c4; outline: 3px solid #ffd36b; }
#profile, #booth, #cards, #blind { top: calc(50% - 44px); max-height: calc(100dvh - 120px); }
#board, #wishes, #popup-card { bottom: 88px; }
#tp-menu { max-height: calc(100dvh - 160px); background: #fff9e6; }
@media (min-width: 721px) and (max-width: 1199px) {
  #popup-card { top: 112px; width: 360px; }
}
@media (max-width: 720px) {
  #profile, #booth, #cards, #blind { top: 8px; bottom: calc(80px + env(safe-area-inset-bottom)); max-height: none; transform: translateX(-50%); }
  #board, #wishes, #popup-card { bottom: calc(80px + env(safe-area-inset-bottom)); }
  #tp-menu { top: 54px; max-height: calc(100dvh - 150px); }
  #dock button { font-size: 13px; letter-spacing: -0.02em; }
}

/* 실시간 수정 알림 */
#hot-bar { position: fixed; top: 64px; left: 50%; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; border-radius: 999px; background: #0f7f76; color: #fff; font-size: 14px; transform: translateX(-50%); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); }
#hot-bar { white-space: nowrap; }
#hot-bar button { padding: 6px 12px; border: 0; border-radius: 999px; background: #fff; color: #0f7f76; font: inherit; cursor: pointer; }

/* 여는 시간: 닫힌 시간 화면 */
#closed { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(20, 24, 44, 0.55); backdrop-filter: blur(3px); }
#closed[hidden] { display: none; }
.closed-card { display: flex; flex-direction: column; gap: 10px; width: min(420px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 22px 20px; border-radius: 24px; background: var(--cream); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); text-align: center; }
.closed-title { font-size: 24px; }
.closed-hours { margin: 0; font-size: 17px; }
.closed-host, .closed-note { margin: 0; color: var(--ink-soft); font-size: 14px; }
.closed-left { margin: 4px 0; padding: 10px; border-radius: 14px; background: #0f7f76; color: #fff; font-size: 18px; }
.closed-main, .closed-sub { min-height: 46px; border: 0; border-radius: 999px; font: inherit; font-size: 15px; cursor: pointer; }
.closed-main { background: var(--accent); color: #fff; }
.closed-sub { background: #fff; }
.closed-list { display: flex; flex-direction: column; gap: 4px; text-align: left; font-size: 14px; }
.closed-list a { padding: 6px 10px; border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; }

a.closed-main { display: grid; place-items: center; text-decoration: none; }

/* 호스트 애니모 (2026-12-02) */
#options .host-toggle { width: 100%; min-height: 46px; margin: 4px 0 10px; border: 2px dashed #2f8f5c; border-radius: 999px; background: #fff; color: #0f7f76; font: inherit; font-size: 16px; cursor: pointer; }
#options .host-toggle.on { border-style: solid; background: #2f8f5c; color: #fff; }
#options .host-note { margin: 0 4px 8px; color: #5a4632; font-size: 14px; line-height: 1.5; }
.label.host .name { background: #2f8f5c; color: #fff; }

.acc-credit { margin: 10px 2px 0; font-size: 12px; line-height: 1.45; opacity: .62; }
.acc-credit a { color: inherit; }

/* ---------- 검수 11 반영 (2026-12-03) ---------- */
/* B7 주 버튼 대비: 흰 글씨 4.9:1 */
:root { --accent: #0f7f76; --accent-text: #0f7f76; --body-font: "Jua", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif; --title-font: "Jua", system-ui, "Malgun Gothic", sans-serif; }
/* B8 본문은 읽는 글꼴, 제목·버튼·이름표는 Jua */
html, body { font-family: var(--body-font); line-height: 1.5; }
h1, h2, h3, button, button *, summary, .label, #labels, #labels *, .ccard-name, .pb-title, .pb-dday, .blind-who, #tips b, .field input, #near-act { font-family: var(--title-font) !important; }
.badge-v { color: var(--accent-text); }
/* A2 아바타 만들기: 한 줄 소개, 입장 버튼 고정, 꾸미기 접기 */
.editor-intro { margin: -8px 0 0; color: var(--ink-soft); font-size: 15px; }
#editor { padding-bottom: 0; }
#editor .actions { position: sticky; top: 0; z-index: 2; margin: 0 -32px; padding: 10px 32px; background: #fff9e6; box-shadow: 0 -8px 14px -10px rgba(60, 40, 20, 0.35); }
#options:not(.more) .opt-more { display: none; }
.opt-more-btn { align-self: flex-start; padding: 8px 16px; border: 2px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 15px; cursor: pointer; }
@media (max-width: 720px) { #editor .actions { margin: 0 -20px; padding: 10px 20px calc(14px + env(safe-area-inset-bottom)); } .editor-intro { font-size: 14px; } }
/* A3 첫 안내 */
#tips .tips-sub { margin: -4px 0 10px; color: var(--ink-soft); }
#tips .tips-move { margin: 0 0 14px; padding: 8px 12px; border-radius: 12px; background: rgba(90, 70, 50, 0.07); font-size: 14px; }
#tips b { min-width: 72px; color: var(--accent-text); }
/* A4 부스·포토 부스 근처 버튼 */
body.editing #near-act { display: none !important; }
#near-act { position: fixed; left: 50%; bottom: 84px; z-index: 6; min-height: 48px; padding: 10px 24px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-size: 17px; transform: translateX(-50%); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22); cursor: pointer; }
@media (max-width: 720px) { #near-act { bottom: calc(130px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
/* A1 내 카드 */
.card-howto { margin: 6px 0 2px; padding: 8px 12px; border-radius: 12px; background: #eaf6f3; color: var(--ink); font-size: 14px; }
.card-form input:disabled { opacity: 0.5; }
.muted.small { font-size: 14px; }
/* B2 위 띠: 모임 시간, 스탬프는 보조 버튼 */
#stamp-btn { background: #fff !important; color: var(--ink) !important; box-shadow: inset 0 0 0 2px var(--line); }
.together { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.together button { padding: 8px 14px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-size: 15px; cursor: pointer; }
.cal-box { margin: 10px 0; }
.cal-box summary { cursor: pointer; font-size: 16px; padding: 4px 0; }
/* B1 작가 공개 팔로우 */
.blind-follow { align-self: stretch; text-align: center; font-size: 15px; }
/* B6 포토 부스 */
#fourcut-group { background: var(--accent) !important; color: #fff !important; box-shadow: none !important; }
#fourcut-solo { background: #fff !important; color: var(--ink) !important; box-shadow: inset 0 0 0 2px var(--line) !important; }
.fc-buttons #fourcut-group { order: -1; }
.poseset b { flex: 1 0 auto; min-width: 7.5em; white-space: nowrap; }
.poseset span { font-size: 14px; text-align: right; }
body:has(#photo:not([hidden])) #dock, body:has(#photo:not([hidden])) #react-btn, body:has(#photo:not([hidden])) #emotes, body:has(#photo:not([hidden])) #near-act { display: none !important; }
/* B13 연결을 뺏긴 창 */
#kicked-cover { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(40, 30, 20, 0.6); color: #fff; text-align: center; padding: 20px; }
#kicked-cover button { padding: 12px 24px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-size: 17px; cursor: pointer; }
/* B9 휴대폰: 창 뒤가 비치지 않게, 스탬프 카드 제목이 메뉴 버튼 아래로 */
@media (max-width: 720px) {
  #blind, #cards, #booth, #profile, #popup-card, #board, #wishes { background: #fff9e6; }
  #profile, #booth, #cards, #blind { top: 56px; }
  #popup-card, #board, #wishes { top: 56px; max-height: none; }
  #dock button { font-size: 13px; letter-spacing: -0.04em; word-break: keep-all; }
}

/* 네컷 부스: 배경 고르기, 사진 색감 */
.fc-label span { margin-left: 6px; color: var(--ink-soft); font-size: 13px; }
#bd-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
#bd-row .bd { display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
#bd-row .bd img { width: 100%; aspect-ratio: 2.17; object-fit: cover; border-radius: 8px; display: block; }
#bd-row .bd.on { border-color: var(--accent); }
@media (max-width: 480px) { #bd-row { grid-template-columns: repeat(2, 1fr); } }
#deco-tones { display: flex; flex-wrap: wrap; gap: 6px; }
.tone-pick { min-height: 36px; padding: 6px 14px; border: 2px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.tone-pick.on { border-color: var(--accent); color: var(--accent); }

/* 주민카드형 크리에이터 카드 (C-PLZ-014) */
.mc-preview { display: flex; justify-content: center; margin: 4px 0 8px; }
.mc-preview canvas, .pf-cardimg canvas, .cb-face canvas { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 4px 14px rgba(43, 29, 18, 0.18); }
.mc-preview canvas { max-width: 240px; }
.mc-colors { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.mc-colors button { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(43, 29, 18, 0.25); cursor: pointer; padding: 0; }
.mc-colors button.on { outline: 3px solid #0f7f76; outline-offset: 2px; }
.pf-cardimg { max-width: 220px; margin: 0 auto 8px; }
.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 8px; }
.cb-cell { display: flex; flex-direction: column; gap: 6px; }
.cb-face { cursor: pointer; }
.cb-cell .ccard-acts { flex-wrap: wrap; gap: 4px; }
.cb-cell .ccard-acts a, .cb-cell .ccard-acts button { font-size: 13px; }

/* 내 프사 올리기 (내 카드 탭) */
.mc-photo { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: rgba(15, 127, 118, 0.07); }
.mc-photo label { margin-top: 0; }
.mc-photo p { margin: 0; }
.mc-agree { display: flex; align-items: flex-start; gap: 8px; color: var(--ink); font-size: 14px; line-height: 1.45; cursor: pointer; }
.mc-agree input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: #0f7f76; }
.mc-photo-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.mc-photo-btns button { min-height: 40px; padding: 8px 14px; border: 1px solid rgba(43, 29, 18, 0.18); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; }
.mc-photo-btns button.primary { border-color: #0f7f76; background: #0f7f76; color: #fff; }
.mc-photo-btns button:disabled { opacity: 0.45; cursor: default; }
/* 호스트: 프사 승인 */
#cardimg-chip { position: fixed; top: 64px; left: 16px; z-index: 6; padding: 8px 14px; border: 0; border-radius: 999px; background: #ffd36b; color: #2b1d12; font: inherit; font-size: 14px; cursor: pointer; box-shadow: 0 2px 8px rgba(43, 29, 18, 0.18); }
#cardimg-chip[hidden], #cardimg-panel[hidden] { display: none; }
#cardimg-panel { position: fixed; top: 50%; left: 50%; z-index: 30; width: min(560px, calc(100vw - 24px)); max-height: min(82vh, 760px); display: flex; flex-direction: column; transform: translate(-50%, -50%); border-radius: 20px; background: var(--cream); box-shadow: 0 10px 40px rgba(43, 29, 18, 0.3); overflow: hidden; }
#cardimg-panel .ci-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px; }
#cardimg-panel h2 { margin: 0; font-size: 20px; }
#cardimg-panel h3 { margin: 14px 0 6px; font-size: 16px; }
#cardimg-panel .ci-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; font-size: 24px; cursor: pointer; }
#cardimg-panel .ci-body { padding: 0 18px 18px; overflow-y: auto; }
#cardimg-panel .ci-row { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(43, 29, 18, 0.1); }
#cardimg-panel .ci-row img { width: 128px; height: 128px; flex: none; border-radius: 12px; object-fit: cover; background: #fff; }
#cardimg-panel .ci-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#cardimg-panel .ci-info a { color: #0f7f76; font-weight: 600; }
#cardimg-panel .ci-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
#cardimg-panel .ci-acts button, #cardimg-panel .ci-acts select, #cardimg-panel .ci-okcell button { min-height: 38px; padding: 6px 12px; border: 1px solid rgba(43, 29, 18, 0.18); border-radius: 999px; background: #fff; font: inherit; font-size: 14px; cursor: pointer; }
#cardimg-panel .ci-acts button.primary { border-color: #0f7f76; background: #0f7f76; color: #fff; }
#cardimg-panel .ci-ok { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
#cardimg-panel .ci-okcell { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; }
#cardimg-panel .ci-okcell img { width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; }
@media (max-width: 720px) {
  #cardimg-chip { top: 104px; left: 8px; }
  #cardimg-panel .ci-row img { width: 96px; height: 96px; }
}

/* ---------- 스크롤바 (2026-12-03) ----------
   1) 스크롤바가 생기거나 사라져도 내용 여백이 밀리지 않게 양쪽에 자리를 미리 잡는다.
   2) 스크롤바는 광장 UI(크림 창, 갈색 글씨)에 맞춘 얇은 둥근 막대로 그린다. */
.closed-card, #blind, #blind-body, #booth, #card-body, #cardimg-panel .ci-body, #cards, #cards-body,
#editor, #game, #game-body, #log, #online, #photo-deco, #poseset-row, #posts, #wish-list, #profile,
#tp-menu, #tp-list, #layout-panel, #menu-pop, #mascot, #gate form {
  scrollbar-gutter: stable both-edges;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(90, 70, 50, 0.28);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(90, 70, 50, 0.45); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
/* ::-webkit-scrollbar를 모르는 브라우저(파이어폭스)용 */
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: rgba(90, 70, 50, 0.35) transparent; }
}

/* 분야 묶음·카드 그림 고르기 (2026-12-03) */
.card-chips-wrap { display: grid; gap: 6px; }
.card-chips-group { margin-top: 4px; color: var(--ink-soft); font-size: 13px; }
.card-chips button:disabled { opacity: 0.45; cursor: default; }
.card-chips button.on { border-color: var(--accent); background: var(--accent); color: #fff; }
.mc-pic { display: flex; gap: 0; margin: 4px 0 8px; border: 2px solid var(--accent); border-radius: 999px; overflow: hidden; width: fit-content; }
.mc-pic button { min-height: 40px; padding: 8px 18px; border: 0; background: #fff; color: var(--accent-text); font: inherit; cursor: pointer; }
.mc-pic button.on { background: var(--accent); color: #fff; }
.mc-pic button:disabled { color: #b5a891; cursor: default; }
.mc-sub { margin-top: 6px; }

/* 굿즈 가게 진열 창 (2026-12-03) */
#goods-shop { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 20; width: min(720px, calc(100vw - 24px)); max-height: min(86vh, 820px); display: flex; flex-direction: column; background: #fff9e6; border-radius: 24px; box-shadow: 0 18px 48px rgba(43, 29, 18, 0.25); color: var(--ink); }
#goods-shop[hidden] { display: none; }
#goods-shop header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 6px; }
#goods-shop h2 { margin: 0; font-size: 22px; }
#goods-shop h3 { margin: 18px 0 8px; font-size: 17px; }
#goods-shop .gs-close { width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; font-size: 24px; color: var(--ink); cursor: pointer; }
#goods-shop .gs-body { padding: 0 22px 22px; overflow-y: auto; scrollbar-gutter: stable both-edges; }
.gs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gs-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 10px 14px; border-radius: 18px; background: #fff; text-align: center; }
.gs-item:not(.owned) .gs-view { filter: saturate(0.55) brightness(1.04); }
.gs-view { width: 100%; max-width: 160px; aspect-ratio: 1; background: radial-gradient(circle at 50% 50%, #eadcc1 0 58%, transparent 59%); border-radius: 50%; }
.gs-name { font-family: var(--title-font); font-size: 17px; }
.gs-need { color: var(--ink-soft); font-size: 14px; line-height: 1.4; }
.gs-item.owned .gs-need { color: var(--accent-text); }
.gs-item button { min-height: 38px; padding: 6px 16px; border: 1px solid rgba(43, 29, 18, 0.18); border-radius: 999px; background: #fff; color: var(--ink); font-family: var(--title-font); cursor: pointer; }
.gs-item button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.gs-pins { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gs-pin { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px 10px; border-radius: 14px; background: #fff; }
.gs-pin .gs-badge { grid-row: span 2; font-size: 24px; text-align: center; filter: grayscale(1); opacity: 0.55; }
.gs-pin.owned .gs-badge { filter: none; opacity: 1; }
.gs-pin-name { font-size: 14px; font-weight: 600; }
.gs-pin .gs-need { font-size: 12.5px; }
@media (max-width: 720px) {
  #goods-shop { top: auto; bottom: 0; transform: translateX(-50%); width: 100vw; max-height: 82dvh; border-radius: 22px 22px 0 0; }
  .gs-grid { grid-template-columns: repeat(2, 1fr); }
  .gs-pins { grid-template-columns: 1fr; }
}

/* 운영자: 부스 미리 짓기 창 (C-PLZ-015) */
#prebooth-btn[hidden], #prebooth-panel[hidden] { display: none; }
#prebooth-panel { position: fixed; top: 50%; left: 50%; z-index: 30; width: min(480px, calc(100vw - 24px)); max-height: min(82vh, 640px); display: flex; flex-direction: column; transform: translate(-50%, -50%); border-radius: 20px; background: var(--cream); box-shadow: 0 10px 40px rgba(43, 29, 18, 0.3); overflow: hidden; }
#prebooth-panel .ci-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px; }
#prebooth-panel h2 { margin: 0; font-size: 20px; }
#prebooth-panel .ci-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; font-size: 24px; cursor: pointer; }
#prebooth-panel .ci-body { display: flex; flex-direction: column; gap: 10px; padding: 0 18px 18px; overflow-y: auto; }
#prebooth-panel textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid rgba(43, 29, 18, 0.18); border-radius: 12px; background: #fff; font: inherit; font-size: 15px; resize: vertical; }
#prebooth-panel .pb-go { align-self: flex-start; min-height: 42px; padding: 8px 20px; border: 0; border-radius: 999px; background: #0f7f76; color: #fff; font-family: var(--title-font, Jua); font-size: 16px; cursor: pointer; }
#booth .booth-empty { margin: 8px 0 0; font-size: 14px; }

/* ---------- 카드 입력 항목 (2026-12-03) ---------- */
.mc-item { margin: 14px 0 4px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.6); border: 1px solid var(--line); }
.mc-q { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.mc-q span { font-family: var(--title-font, Jua), sans-serif; font-size: 16px; color: var(--ink); }
.mc-q small { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.mc-line { display: flex; align-items: center; gap: 8px; }
.mc-line input { flex: 1; min-width: 0; }
.mc-count { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.mc-ex { margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); }
.mc-tools { margin: 6px 0 8px; }
.mc-tools button:disabled { opacity: 0.55; }
.mc-item > div > input[type="text"] { width: 100%; box-sizing: border-box; }
.mc-flip { display: flex; gap: 6px; justify-content: center; margin: 6px 0; }
.mc-flip button { min-height: 32px; padding: 4px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.mc-flip button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.card-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.65); font-size: 14px; }
.card-facts dt { color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.card-facts dd { margin: 0; color: var(--ink); word-break: keep-all; }
.cb-intro { font-size: 13px; color: var(--ink); opacity: 0.85; margin-top: 2px; }
@media (max-width: 720px) {
  .card-facts { grid-template-columns: 1fr; gap: 0 0; }
  .card-facts dd { margin-bottom: 6px; }
}

/* "새 화면이 있어요" 알림: 위 가운데는 열린 창(카드 색 줄 등)을 가려서 오른쪽 아래 [반응] 위로 옮긴다 (2026-12-03) */
#hot-bar { top: auto; left: auto; right: 16px; bottom: 76px; transform: none; z-index: 30; box-shadow: 0 4px 14px rgba(40, 30, 20, 0.18); }
@media (max-width: 720px) {
  #hot-bar { right: 8px; bottom: auto; top: calc(104px + env(safe-area-inset-top)); }
}

/* ---------- 입력칸 공통 디자인 (2026-12-03) ----------
   크림 바탕 + 따뜻한 갈색 테두리 + 높이 44px. 누르면 진한 청록 테두리와 옅은 빛.
   한 줄 칸은 둥근 알약(pz-field), 여러 줄은 12px 모서리. 채팅 입력은 제외(자체 배치). */
:root {
  --field-bg: #fffaf0;
  --field-line: rgba(90, 70, 50, 0.25);
  --field-ph: #9a8468;
  --field-ink: #3b2c1c;
  --field-focus: #0f7f76;
}
:where(#cards, #board, #wishes, #blind, #prebooth-panel, #gate, #booth, #cardimg-panel, #topic-panel) :is(input[type='text'], input[type='search'], input[type='url'], input:not([type]), textarea):not(.pz-bare):not(#chat *) {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--field-line);
  border-radius: 12px;
  background: var(--field-bg);
  color: var(--field-ink);
  font-family: var(--body-font);
  font-size: 15px;
  line-height: 1.4;
  outline: none;
  box-shadow: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
:where(#cards, #board, #wishes, #blind, #prebooth-panel, #gate, #booth, #cardimg-panel, #topic-panel) textarea:not(.pz-bare) {
  padding: 10px 14px;
  resize: vertical;
}
:where(#cards, #board, #wishes, #blind, #prebooth-panel, #gate, #booth, #cardimg-panel, #topic-panel) input[type='search']:not(.pz-bare) {
  border-radius: 999px;
  padding: 0 18px;
}
:where(#cards, #board, #wishes, #blind, #prebooth-panel, #gate, #booth, #cardimg-panel, #topic-panel) :is(input, textarea)::placeholder { color: var(--field-ph); opacity: 1; }
:where(#cards, #board, #wishes, #blind, #prebooth-panel, #gate, #booth, #cardimg-panel, #topic-panel) :is(input[type='text'], input[type='search'], input[type='url'], input:not([type]), textarea):not(.pz-bare):not(#chat *):focus {
  border-color: var(--field-focus);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 127, 118, 0.18);
}

/* 앞에 @ 같은 글자가 붙는 한 줄 칸 */
.pz-field {
  display: flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  height: 46px;
  padding: 0 5px 0 16px;
  border: 1.5px solid var(--field-line);
  border-radius: 999px;
  background: var(--field-bg);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.pz-field:focus-within { border-color: var(--field-focus); background: #fff; box-shadow: 0 0 0 3px rgba(15, 127, 118, 0.18); }
.pz-prefix { color: var(--field-focus); font-family: var(--title-font, Jua); font-size: 18px; line-height: 1; }
.pz-bare { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; color: var(--field-ink); font-family: var(--body-font); font-size: 15px; outline: none; }
.pz-bare::placeholder { color: var(--field-ph); }
.pz-add { flex: none; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--field-focus); color: #fff; font-family: var(--title-font, Jua); font-size: 14px; cursor: pointer; }
.pz-add:hover { filter: brightness(1.06); }
.pz-hint { margin: 0 4px; color: var(--ink-soft, #7d6a52); font-size: 13px; }
.pz-hint.bad { color: #b3412f; }
.pz-slot { margin: 0; padding: 8px 12px; border-radius: 12px; background: rgba(15, 127, 118, 0.1); color: #0f7f76; font-size: 14px; }
.pz-slot[hidden], .pz-chips[hidden] { display: none; }
.pz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pz-chip { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 4px 0 12px; border-radius: 999px; background: #e4f2ef; color: #0f7f76; font-size: 14px; font-weight: 600; }
.pz-chip-x { width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: #0f7f76; font-size: 17px; line-height: 1; cursor: pointer; }
.pz-chip-x:hover { background: rgba(15, 127, 118, 0.14); }
#prebooth-panel { width: min(420px, calc(100vw - 24px)); }
#prebooth-panel .pb-go:disabled { opacity: 0.45; cursor: default; }

/* "+" 빈 자리에서 연 내 카드: 맨 위 안내 */
.plot-pick { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(15, 127, 118, 0.1); color: #0f7f76; }
.plot-pick b { font-family: var(--title-font, Jua); font-weight: 400; font-size: 16px; }
.plot-pick span { font-size: 13px; }

/* 처음 한 번 부스 짓기 안내 */
:is(#booth-guide,#meet-guide) { position: fixed; left: 50%; bottom: 96px; z-index: 31; width: min(380px, calc(100vw - 24px)); box-sizing: border-box; padding: 16px 18px 14px; border-radius: 20px; background: var(--cream, #fff9e6); box-shadow: 0 10px 30px rgba(40, 30, 20, 0.22); transform: translateX(-50%); }
:is(#booth-guide,#meet-guide) h3 { margin: 0 0 6px; font-family: var(--title-font, Jua); font-weight: 400; font-size: 18px; color: var(--ink, #5a4632); }
:is(#booth-guide,#meet-guide) p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--ink, #5a4632); }
:is(#booth-guide,#meet-guide) .bg-row { display: flex; gap: 8px; justify-content: flex-end; }
:is(#booth-guide,#meet-guide) button { min-height: 40px; padding: 0 16px; border-radius: 999px; font-family: var(--title-font, Jua); font-size: 15px; cursor: pointer; }
:is(#booth-guide,#meet-guide) .bg-later { border: 1.5px solid var(--field-line); background: transparent; color: var(--ink, #5a4632); }
:is(#booth-guide,#meet-guide) .bg-go { border: 0; background: var(--field-focus); color: #fff; }
@media (max-width: 720px) {
  :is(#booth-guide,#meet-guide) { bottom: calc(84px + env(safe-area-inset-bottom)); }
}


/* ---------- 포춘쿠키 창 (2026-12-03, 검수 30) ---------- */
#fortune { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 20; width: min(560px, calc(100vw - 24px)); max-height: min(86vh, 820px); display: flex; flex-direction: column; background: #fff9ec; border-radius: 24px; box-shadow: 0 18px 48px rgba(40, 28, 16, 0.28); color: var(--ink); }
#fortune[hidden] { display: none; }
#fortune header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 6px; }
#fortune h2 { margin: 0; font-family: var(--title-font); font-size: 22px; }
#fortune h3 { margin: 20px 0 8px; font-family: var(--title-font); font-size: 17px; }
#fortune .fc-close { width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; font-size: 24px; color: var(--ink); cursor: pointer; }
#fortune .fc-body { padding: 0 22px 22px; overflow-y: auto; scrollbar-gutter: stable both-edges; }
.fc-cookie-area { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0 4px; text-align: center; }
.fc-lead { margin: 4px 0 0; font-family: var(--title-font); font-size: 18px; }
.fc-sub { margin: 4px 0; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.fc-cookie { position: relative; width: 170px; height: 120px; border: 0; background: none; cursor: pointer; }
.fc-cookie .half { position: absolute; top: 20px; width: 88px; height: 80px; background: radial-gradient(circle at 40% 35%, #f6c978, #d9963f 70%, #b97728); box-shadow: inset -6px -8px 0 rgba(120, 70, 20, 0.18); transition: transform 0.55s cubic-bezier(.3, 1.6, .5, 1); }
.fc-cookie .half.l { left: 6px; border-radius: 80px 10px 10px 80px / 70px 30px 30px 70px; }
.fc-cookie .half.r { right: 6px; border-radius: 10px 80px 80px 10px / 30px 70px 70px 30px; }
.fc-cookie .paper { position: absolute; left: 50%; top: 52px; width: 0; height: 18px; background: #fffdf6; border: 1px solid #e6d9bf; transform: translateX(-50%); transition: width 0.5s 0.25s; }
.fc-cookie:hover .half.l { transform: rotate(-4deg); }
.fc-cookie:hover .half.r { transform: rotate(4deg); }
.fc-cookie.crack .half.l { transform: translate(-26px, 10px) rotate(-28deg); }
.fc-cookie.crack .half.r { transform: translate(26px, 10px) rotate(28deg); }
.fc-cookie.crack .paper { width: 120px; }
.fc-slip { width: 100%; padding: 18px 18px 14px; border-radius: 18px; background: #fffdf6; border: 1.5px dashed rgba(90, 70, 50, 0.25); animation: fc-pop 0.45s ease-out; }
.fc-slip.done { animation: none; }
@keyframes fc-pop { from { transform: scale(0.92); opacity: 0; } to { transform: none; opacity: 1; } }
.fc-text { margin: 4px 0 10px; font-family: var(--title-font); font-size: 21px; line-height: 1.45; }
.fc-cap-title { margin: 10px 0 6px; font-size: 14px; color: var(--ink-soft); }
.fc-capsule { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 10px; border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgba(60, 40, 20, 0.1); text-align: left; }
.fc-capsule b { display: block; font-family: var(--title-font); font-size: 16px; }
.fc-capsule small { color: var(--ink-soft); font-size: 13px; }
.fc-capsule.tier-finish { background: linear-gradient(120deg, #fff6cf, #ffe2f3, #dff3ff); }
.fc-ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #f6ecd8; font-size: 22px; }
.fc-note { margin: 8px 0 0; font-size: 14px; color: var(--ink-soft); }
.fc-row { display: flex; justify-content: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.fc-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--accent, #0f7f76); color: #fff; font-family: var(--title-font); font-size: 15px; text-decoration: none; cursor: pointer; }
.fc-btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid rgba(90, 70, 50, 0.25); }
.fc-tier { margin-bottom: 10px; }
.fc-tier-name { margin: 8px 0 6px; font-weight: 700; font-size: 14px; }
.fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.fc-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; background: #fff; text-align: center; font-size: 13px; }
.fc-cell:not(.owned) { opacity: 0.55; }
.fc-cell:not(.owned) .fc-ico { font-family: var(--title-font); color: var(--ink-soft); }
.fc-mini { min-height: 30px; padding: 0 12px; border: 1.5px solid rgba(90, 70, 50, 0.25); border-radius: 999px; background: #fff; color: var(--ink); font-size: 13px; cursor: pointer; }
.fc-mini.on { background: var(--accent, #0f7f76); border-color: transparent; color: #fff; }
.fc-gift-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; font-size: 14px; }
.fc-gift-list { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-chip { min-height: 34px; padding: 0 14px; border: 1.5px solid rgba(90, 70, 50, 0.25); border-radius: 999px; background: #fff; color: var(--ink); font-size: 14px; cursor: pointer; }
.fc-chip:disabled { opacity: 0.5; cursor: default; }
.fc-odds, .fc-said { margin-top: 14px; padding: 10px 14px; border-radius: 14px; background: #fff; }
.fc-odds summary, .fc-said summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.fc-odds table { width: 100%; margin: 8px 0; border-collapse: collapse; font-size: 14px; }
.fc-odds th, .fc-odds td { padding: 6px 4px; border-bottom: 1px solid rgba(90, 70, 50, 0.12); text-align: left; }
.fc-said ul { margin: 8px 0 0; padding: 0; list-style: none; }
.fc-said li { display: flex; gap: 10px; padding: 6px 0; font-size: 14px; border-bottom: 1px solid rgba(90, 70, 50, 0.1); }
.fc-said li small { flex: none; color: var(--ink-soft); }
.fc-entry { width: 100%; min-height: 46px; margin: 6px 0 4px; border: 1.5px solid rgba(90, 70, 50, 0.2); border-radius: 14px; background: #fff; color: var(--ink); font-family: var(--title-font); font-size: 16px; cursor: pointer; }
.fc-entry.new { background: #fff3d6; border-color: #e0a95a; }
#dock button.fc-new { position: relative; }
#dock button.fc-new::after { content: ''; position: absolute; top: 6px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: #e0453f; }
.preset.lim, .stk-pick.lim { position: relative; }
.preset.lim::after, .stk-pick.lim::after { content: '한정'; position: absolute; top: -6px; right: -4px; padding: 1px 5px; border-radius: 999px; background: #e0a95a; color: #fff; font-size: 10px; line-height: 1.4; }
@media (max-width: 720px) {
  #fortune { top: auto; bottom: 0; transform: translateX(-50%); width: 100vw; max-height: 86dvh; border-radius: 24px 24px 0 0; }
  .fc-text { font-size: 19px; }
}

/* 첫 접속 시험 모드: 시험 뽑기 표시 */
.fc-test { display: inline-block; margin: 0 0 8px; padding: 3px 10px; border-radius: 999px; background: #fff1d6; color: #8a5a00; font-size: 13px; }


/* ---------- 모바일 웹 (2026-12-03): 전체 화면·당겨서 새로고침 막기·길게 누르기 막기 ---------- */
html, body { height: 100%; height: 100dvh; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
#scene, #labels, #dock, #react-btn, #near-act, #menu-btn, #online-head, #popup-bar, #emotes, #fs-btn { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button { touch-action: manipulation; }
@media (pointer: coarse) {
  input, textarea, select { font-size: 16px !important; } /* 아이폰: 16px 아래면 입력할 때 화면이 확대된다 */
}
#fs-btn { position: fixed; top: calc(16px + env(safe-area-inset-top)); left: 112px; z-index: 6; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--cream); color: var(--ink); font-size: 20px; line-height: 1; box-shadow: 0 2px 8px rgba(40, 30, 20, 0.15); cursor: pointer; }
#fs-btn[hidden] { display: none; }
@media (max-width: 720px) { #fs-btn { top: calc(8px + env(safe-area-inset-top)); left: 92px; } }
body.editing #fs-btn { display: none; }
#ios-hint { position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 12; transform: translateX(-50%); width: min(340px, calc(100vw - 24px)); padding: 12px 16px; border-radius: 16px; background: #0f7f76; color: #fff; text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); }
#ios-hint p { margin: 0 0 4px; }
#ios-hint .small { font-size: 13px; opacity: 0.85; }
#ios-hint button { margin-top: 6px; padding: 6px 14px; border: 0; border-radius: 999px; background: #fff; color: #0f7f76; }
body.kb-open #chat { bottom: calc(var(--kb, 0px) + 8px) !important; height: min(30dvh, 220px); }
body.kb-open #dock, body.kb-open #react-btn, body.kb-open #near-act, body.kb-open #emotes, body.kb-open #fs-btn { display: none !important; }
@media (max-height: 480px) and (orientation: landscape) {
  #chat { height: 34dvh; width: min(300px, 38vw); }
  #online:not(.open) #online-list { display: none; }
  #online:not(.open) #online-head { margin-bottom: 0; }
  #online-count { cursor: pointer; }
  #popup-bar .pb-title { display: none; }
  #topic-pill { top: calc(62px + env(safe-area-inset-top)); font-size: 13px; }
  #fireq-card { bottom: calc(76px + env(safe-area-inset-bottom)); }
  #dock { left: auto; right: 8px; width: auto; }
  #dock button { min-height: 44px; padding: 4px 10px; }
  #react-btn { bottom: calc(62px + env(safe-area-inset-bottom)); }
}

/* ---------- 오늘의 주제 · 질문 카드 · 짝 캡슐 (로씨님 조언) ---------- */
#topic-pill { position: fixed; top: calc(70px + env(safe-area-inset-top)); left: 50%; z-index: 5; transform: translateX(-50%); max-width: min(560px, calc(100vw - 24px)); padding: 6px 16px; border-radius: 999px; background: #0f7f76; color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 3px 10px rgba(40, 30, 20, 0.18); pointer-events: none; }
#topic-pill[hidden] { display: none; }
@media (max-width: 720px) { #topic-pill { top: calc(108px + env(safe-area-inset-top)); left: 8px; right: 8px; transform: none; max-width: none; text-align: center; font-size: 13px; } }
.tips-topic { margin: 4px 0 8px; padding: 8px 12px; border-radius: 12px; background: #e6f3ee; color: #1f5a49; font-weight: 600; }
.topic-box { margin: 10px 0; padding: 10px 14px; border-radius: 14px; background: #e6f3ee; }
.topic-box.pair { background: #fff1d6; }
.topic-box p { margin: 2px 0; }
.topic-box .tb-label { font-size: 13px; color: #5a4632; }
.topic-box .tb-text { font-family: var(--title-font, Jua); font-size: 18px; color: #2b1d12; }
#fireq-card { position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 9; transform: translateX(-50%); width: min(420px, calc(100vw - 24px)); padding: 16px 18px 14px; border-radius: 20px; background: #fffaf0; border: 2px solid #e8c063; box-shadow: 0 10px 28px rgba(40, 30, 20, 0.25); text-align: center; }
#fireq-card[hidden] { display: none; }
#fireq-card p { margin: 0 0 6px; }
#fireq-card .fq-head { font-size: 13px; color: #7d6a52; }
#fireq-card .fq-q { font-family: var(--title-font, Jua); font-size: 22px; line-height: 1.35; color: #2b1d12; }
#fireq-card .fq-by { font-size: 13px; color: #7d6a52; }
#fireq-card .fq-again { min-height: 40px; padding: 6px 16px; border: 1.5px solid #0f7f76; border-radius: 999px; background: #fff; color: #0f7f76; cursor: pointer; }
#fireq-card .fq-close { position: absolute; top: 6px; right: 8px; width: 36px; height: 36px; border: 0; background: transparent; font-size: 22px; cursor: pointer; }
#topic-btn[hidden], #topic-panel[hidden] { display: none; }
#topic-panel { position: fixed; top: 50%; left: 50%; z-index: 30; width: min(420px, calc(100vw - 24px)); display: flex; flex-direction: column; transform: translate(-50%, -50%); border-radius: 20px; background: var(--cream); box-shadow: 0 12px 36px rgba(40, 30, 20, 0.25); }
#topic-panel .ci-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px; }
#topic-panel h2 { margin: 0; font-size: 20px; }
#topic-panel .ci-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; font-size: 24px; cursor: pointer; }
#topic-panel .ci-body { display: flex; flex-direction: column; gap: 10px; padding: 0 18px 18px; }
#topic-panel .tpc-actions { display: flex; align-items: center; gap: 12px; }
#topic-panel .pb-go { min-height: 42px; padding: 8px 20px; border: 0; border-radius: 999px; background: #0f7f76; color: #fff; font-family: var(--title-font, Jua); font-size: 16px; cursor: pointer; }

/* 운영자 인증 코드 (C-PLZ-016) */
#vcode-panel[hidden], #vcode-use[hidden], #vcode-btn[hidden], #vcode-use-btn[hidden] { display: none; }
#vcode-panel, #vcode-use { position: fixed; top: 50%; left: 50%; z-index: 30; width: min(440px, calc(100vw - 24px)); max-height: min(82vh, 640px); display: flex; flex-direction: column; transform: translate(-50%, -50%); border-radius: 20px; background: var(--cream); box-shadow: 0 12px 40px rgba(40, 30, 20, 0.28); }
#vcode-use { width: min(360px, calc(100vw - 24px)); }
:is(#vcode-panel, #vcode-use) .ci-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px; }
:is(#vcode-panel, #vcode-use) h2 { margin: 0; font-size: 20px; }
:is(#vcode-panel, #vcode-use) .ci-close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; font-size: 24px; cursor: pointer; }
:is(#vcode-panel, #vcode-use) .ci-body { display: flex; flex-direction: column; gap: 10px; padding: 0 18px 18px; overflow-y: auto; }
#vcode-use .pb-go { align-self: flex-start; min-height: 44px; padding: 8px 22px; border: 0; border-radius: 999px; background: #0f7f76; color: #fff; font-family: var(--title-font, Jua); font-size: 16px; cursor: pointer; }
.vc-input { height: 52px; padding: 0 16px; border: 1.5px solid rgba(90, 70, 50, 0.25); border-radius: 14px; background: #fffaf0; color: #2b1d12; font-family: var(--title-font, Jua); font-size: 26px; letter-spacing: 0.3em; text-align: center; }
.vc-input:focus { outline: none; border-color: #0f7f76; box-shadow: 0 0 0 3px rgba(15, 127, 118, 0.18); }
.vc-made { margin: 0; padding: 10px 12px; border-radius: 12px; background: #e7f3ef; color: #2b1d12; font-size: 15px; }
.vc-made b { font-size: 22px; letter-spacing: 0.12em; color: #0f7f76; }
.vc-made.bad, #vcode-out.bad { background: none; color: #b3261e; }
#vcode-out.good { color: #0f7f76; }
.vc-list { display: flex; flex-direction: column; gap: 6px; }
.vc-row { display: grid; grid-template-columns: 1fr auto auto auto auto; align-items: center; gap: 8px; min-height: 44px; padding: 4px 10px; border-radius: 12px; background: #fff; font-size: 14px; color: #5a4632; }
.vc-row.done { opacity: 0.55; }
.vc-id { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-code { font-size: 17px; letter-spacing: 0.1em; color: #2b1d12; }
.vc-cancel { min-height: 36px; padding: 0 12px; border: 1px solid rgba(90, 70, 50, 0.25); border-radius: 999px; background: #fff; font: inherit; cursor: pointer; }
.vc-link { align-self: flex-start; min-height: 40px; padding: 0 14px; border: 1px solid rgba(15, 127, 118, 0.4); border-radius: 999px; background: #fff; color: #0f7f76; font: inherit; font-size: 14px; cursor: pointer; }
.vc-done { color: #0f7f76; }
@media (max-width: 480px) { .vc-row { grid-template-columns: 1fr auto auto; } .vc-time { display: none; } }

/* ===== UI 점검 38 수정 (2026-12-03, Fable·Neon 교차 점검) ===== */
/* A1 Jua는 굵기 400 하나다: 억지 굵기 끄기 */
html { font-synthesis: none; }
h1, h2, h3, h4, strong, b, th, summary, .fc-tier-name { font-weight: 400; }
/* 한글 줄바꿈: 낱말 단위 */
body { word-break: keep-all; overflow-wrap: break-word; }
/* A2·A3 이름 글씨는 잉크색, 사용자 색은 썸네일 테두리·점으로. 카드 왼쪽 색 줄 없앰 */
.ccard, .cb-row { box-shadow: 0 2px 0 rgba(90, 70, 50, 0.12); border: 1px solid var(--line); }
.ccard-name { color: var(--ink) !important; }
.ccard-img, .cb-row img { box-sizing: border-box; border: 3px solid var(--cc, #7a5a44); border-radius: 50%; background: #fff; }
#online-list .on-name { color: var(--ink) !important; }
#online-list .on-name::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: var(--cc, #7a5a44); vertical-align: 1px; }
#booth-title { color: var(--ink) !important; }
#booth-title::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; background: var(--cc, #7a5a44); vertical-align: 2px; }
/* A4 키보드 초점 */
:is(button, a, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid #0f7f76; outline-offset: 2px; }
#photo :is(button, a):focus-visible, #kicked :is(button, a):focus-visible { outline-color: #ffd36b; }
/* A4 터치 영역 44px */
#ch-btn, #stamp-btn, #chat-fold, #menu-btn, #react-btn, #online-count, .ccard button, .cb-row button, .quest button, .card-go, #cards-tabs button, .card-chips button, .pz-chip { min-height: 44px; }
#ch-btn { padding: 6px 14px; }
:is(#cards, #booth, #blind, #fortune, #goods-shop, #popup-card, #board, #wishes, #fourcut, #tp-menu) header button[aria-label*="닫기"], button[id$="-close"] { min-width: 44px; min-height: 44px; }
#gate button { min-height: 44px; }
/* A5 부스 창 맨 위 프로필 임베드가 안 떠도 빈 검은 상자로 보이지 않게 */
#booth .th-embed, #profile .th-embed { background: #fff9e6; border-radius: 12px; color-scheme: light; }
/* A6 휴대폰 모닥불 일어나기 버튼 (주 버튼 줄 위, 질문 카드 버튼 옆) */
#near-act2 { position: fixed; right: 16px; bottom: 84px; z-index: 6; min-height: 48px; padding: 10px 20px; border: 2px solid #0f7f76; border-radius: 999px; background: #fff; color: #0f7f76; font-family: var(--title-font, Jua); font-size: 16px; cursor: pointer; }
#near-act2[hidden] { display: none; }
@media (max-width: 720px) { #near-act2 { right: 12px; bottom: calc(190px + env(safe-area-inset-bottom)); } }
/* N8 부스 짓기 안내가 다른 창을 덮지 않게 */
:is(#booth-guide,#meet-guide) { z-index: 5; }
body:has(#cards:not([hidden])) :is(#booth-guide,#meet-guide), body:has(#fourcut:not([hidden])) :is(#booth-guide,#meet-guide), body:has(#booth:not([hidden])) :is(#booth-guide,#meet-guide), body:has(#blind:not([hidden])) :is(#booth-guide,#meet-guide), body:has(#photo:not([hidden])) :is(#booth-guide,#meet-guide), body:has(#tp-menu:not([hidden])) :is(#booth-guide,#meet-guide) { display: none; }
/* N9 휴대폰 세로: 채팅을 펴면 아래 누르는 버튼을 채팅 위로 */
@media (max-width: 720px) and (orientation: portrait) {
  body:has(#chat:not(.folded):not([hidden])) #near-act { bottom: calc(46dvh + env(safe-area-inset-bottom)); }
  body:has(#chat:not(.folded):not([hidden])) #near-act2 { bottom: calc(46dvh + 60px + env(safe-area-inset-bottom)); }
}
/* N10 휴대폰 가로: 반응 버튼과 새 화면 알림 자리 나누기, 창 높이 */
@media (max-height: 480px) and (orientation: landscape) {
  #react-btn { bottom: calc(76px + env(safe-area-inset-bottom)); }
  #hot-bar { top: 8px; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); }
  #popup-card, #cards, #booth, #blind, #tp-menu, #fortune, #board, #wishes { top: 8px !important; bottom: 8px !important; max-height: none !important; }
}
/* N11 네컷 버튼: 같이 찍기 = 주 버튼, 혼자 = 보조 */
#fourcut-group { background: var(--accent) !important; color: #fff !important; }
#fourcut-solo { background: #fff !important; color: #0f7f76 !important; box-shadow: inset 0 0 0 2px #0f7f76 !important; }
/* B 같이 할 것: 첫 버튼만 채움 */
.together button.sec { background: #fff; color: #0f7f76; box-shadow: inset 0 0 0 2px #0f7f76; }
.together button { min-height: 44px; }
/* B 주 메뉴 그림 아이콘 */
#dock .dk-svg { display: block; width: 22px; height: 22px; }
#dock .dk-ico { display: inline-flex; align-items: center; justify-content: center; }
/* B 채널 알약: 누르는 것이니 흰 바탕 테두리 버튼 */
#ch-btn { background: #fff; color: #0f7f76; box-shadow: inset 0 0 0 2px #0f7f76; }
/* B 포춘 빈 칸·잠긴 핀·꺼진 버튼이 너무 흐린 것 */
.fc-cell:not(.owned) { opacity: 1; color: #6b5a44; background: #f6efe0; border: 1.5px dashed rgba(90, 70, 50, 0.3); }
.fc-cell:not(.owned) .fc-ico { color: #6b5a44; }
.pin:not(.got) { filter: grayscale(0.6); opacity: 0.8; box-shadow: inset 0 0 0 2px rgba(90, 70, 50, 0.3); }
button:disabled { opacity: 1 !important; color: #8a7a64 !important; background: #f1ead9 !important; border-style: dashed !important; cursor: not-allowed; }
/* B 첫 안내 줄 정렬, 스탬프 이름 */
#tips li { display: grid; grid-template-columns: 5.2em 1fr; gap: 2px 10px; align-items: baseline; }
@media (max-width: 720px) { #tips li { grid-template-columns: 1fr; } }
.stamp-name { word-break: keep-all; font-size: 12px; letter-spacing: -0.02em; }
/* B 네컷 포즈 목록: 이름 윗줄, 설명 아랫줄, 왼쪽 정렬 */
#poseset-row button { text-align: left; }
#poseset-row { max-height: none; overflow: visible; }
/* B 촬영 중에는 이름표·주 버튼 줄 숨김 */
body.shooting #labels, body.shooting #dock, body.shooting #near-act, body.shooting #near-act2, body.shooting #react-btn { visibility: hidden; }
/* B 창이 열리면 위 띠는 흐리게 (데스크톱) */
@media (min-width: 721px) {
  body:has(#cards:not([hidden])) #popup-bar, body:has(#booth:not([hidden])) #popup-bar, body:has(#blind:not([hidden])) #popup-bar { opacity: 0; pointer-events: none; }
}
/* C 보조 글자 대비, 상태 빨강, 움직임 줄이기 */
:root { --ink-soft: #6b5a44; }
.opt-note, #kicked .msg { color: #b3261e; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }
/* 확대: 페이지는 확대 가능, 3D 화면은 손가락 확대·끌기를 화면 이동에 쓴다 */
canvas { touch-action: none; }
#ch-btn { min-height: 44px !important; }
#online-list button { min-height: 40px; }

/* ---------- 가운데 알림 (2026-12-03): 운영자 전체 메시지 · 입장 환영 ---------- */
#center-banner { position: fixed; left: 50%; top: 28%; z-index: 40; max-width: min(560px, calc(100vw - 32px)); padding: 14px 22px; border-radius: 18px; background: rgba(255, 250, 240, 0.97); color: #2b1d12; text-align: center; box-shadow: 0 10px 30px rgba(40, 30, 20, 0.22); opacity: 0; transform: translate(-50%, -8px); transition: opacity 0.3s, transform 0.3s; pointer-events: none; }
#center-banner[hidden] { display: none; }
#center-banner.show { opacity: 1; transform: translate(-50%, 0); }
#center-banner p { margin: 0; line-height: 1.35; word-break: keep-all; }
#center-banner.cb-admin p { font-size: 24px; }
#center-banner.cb-join { padding: 10px 18px; }
#center-banner.cb-join p { font-size: 17px; }
#center-banner .cb-tag { display: inline-block; margin-bottom: 6px; padding: 2px 10px; border-radius: 999px; background: #0f7f76; color: #fff; font-size: 13px; }
@media (max-width: 720px) { #center-banner { top: 22%; } #center-banner.cb-admin p { font-size: 20px; } }
#announce-btn[hidden], #announce-panel[hidden] { display: none; }
#announce-panel { position: fixed; top: 50%; left: 50%; z-index: 30; width: min(420px, calc(100vw - 24px)); display: flex; flex-direction: column; transform: translate(-50%, -50%); border-radius: 20px; background: var(--cream, #fff9e6); box-shadow: 0 12px 36px rgba(40, 30, 20, 0.25); }
#announce-panel .ci-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px; }
#announce-panel h2 { margin: 0; font-size: 20px; }
#announce-panel .ci-close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; font-size: 24px; cursor: pointer; }
#announce-panel .ci-body { display: flex; flex-direction: column; gap: 10px; padding: 0 18px 18px; }
#announce-panel .tpc-actions { display: flex; align-items: center; gap: 12px; }
#announce-panel .pb-go { min-height: 44px; padding: 8px 20px; border: 0; border-radius: 999px; background: #0f7f76; color: #fff; font-family: var(--title-font, Jua); font-size: 16px; cursor: pointer; }
#announce-panel input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 14px; border: 1.5px solid rgba(90, 70, 50, 0.25); border-radius: 12px; background: #fffaf0; font: inherit; font-size: 16px; }
/* 접속자 상자 머리줄: "광장 1 ▾" 알약과 "n명"을 같은 세로 가운데에 (사용자 지적) */
#online-head { align-items: center; }
#online-count { display: inline-flex; align-items: center; min-height: 44px; line-height: 1; }

/* 썰매 경주 대기 창: 화면 가운데, 참가자 목록 (2026-12-03 사용자 요청) */
#race.lobby { top: 30%; left: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 24px)); text-align: center; }
#race.lobby .race-1 { font-size: 20px; }
#race .race-who-head { margin-top: 10px; color: var(--ink-soft, #6b5a44); font-size: 14px; }
#race .race-who { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 6px 0 4px; }
#race .race-chip { padding: 5px 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px rgba(90, 70, 50, 0.22); font-size: 15px; }
#race .race-chip.me { box-shadow: inset 0 0 0 2px #0f7f76; color: #0f7f76; }
#race.lobby .game-btn { margin-top: 8px; }
.race-hud .rh-quit { margin-top: 8px; min-height: 40px; }
@media (max-width: 700px) { #race.lobby { top: 34%; } }

/* 블라인드 갤러리: 벽에 건 액자 느낌 (2026-12-03 사용자 "벽에 걸려 있는 느낌") */
#blind { background:
  radial-gradient(ellipse 70% 34% at 50% 0, rgba(255, 236, 190, 0.85), rgba(255, 236, 190, 0) 72%),
  repeating-linear-gradient(90deg, rgba(120, 90, 60, 0.035) 0 2px, rgba(0, 0, 0, 0) 2px 26px),
  #efe4d1 !important; }
.blind-wall { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 22px 6px 4px; }
.blind-wall::before { content: ''; position: absolute; top: 4px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #6b5a44; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); }
.blind-frame { width: 100%; padding: 11px; border-radius: 3px; background: linear-gradient(145deg, #c79453 0%, #8a5a2b 40%, #b8834c 70%, #7a4c22 100%); box-shadow: 0 14px 26px rgba(50, 30, 12, 0.32), 0 2px 4px rgba(50, 30, 12, 0.25), inset 0 0 0 2px rgba(255, 228, 176, 0.35); }
.blind-mat { padding: 12px; background: #fbf8f1; box-shadow: inset 0 2px 6px rgba(40, 25, 10, 0.22); }
.blind-label { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; padding: 8px 16px; min-width: 60%; border: 1px solid rgba(90, 70, 50, 0.16); border-radius: 2px; background: #fffdf8; box-shadow: 0 2px 6px rgba(50, 30, 12, 0.12); text-align: center; color: var(--ink); }
.blind-label b { font-size: 16px; font-weight: 400; }
.blind-label span { font-size: 13px; color: #6b5a44; }
.blind-label.reveal { align-self: center; margin: 4px 0 6px; }
.blind-label.reveal .blind-who { font-size: 20px; }
#blind .blind-row { background: #efe4d1; }
#blind .blind-mine { background: rgba(255, 253, 248, 0.7); }
@media (max-width: 720px) {
  .blind-frame { padding: 8px; }
  .blind-mat { padding: 8px; }
}

/* 포춘쿠키 깨기: 3D 쿠키 모델(검수 41)을 미리 그린 9장 띠 (2026-12-03) */
.fc-cookie { width: 200px; height: 141px; }
.fc-cookie .fc-cookie-3d { position: absolute; inset: 0; background: url(/assets/fortune/cookie_crack.png) 0 0 / 900% 100% no-repeat; transition: transform 0.3s; }
.fc-cookie:hover .fc-cookie-3d { transform: rotate(-3deg) scale(1.03); }
.fc-cookie.crack .fc-cookie-3d { animation: fc-crack3d 0.6s steps(8, end) forwards; }
@keyframes fc-crack3d { from { background-position: 0 0; } to { background-position: 100% 0; } }
.fc-cookie .paper { top: 92px; z-index: 1; opacity: 0; box-shadow: 0 1px 3px rgba(60, 40, 20, 0.2); }
.fc-cookie.crack .paper { width: 112px; opacity: 1; transition: width 0.45s 0.35s, opacity 0.1s 0.35s; }
@media (prefers-reduced-motion: reduce) { .fc-cookie.crack .fc-cookie-3d { animation: none; background-position: 100% 0; } }

/* ---------- 상호작용 1단계 (2026-12-03): 창 등장, 버튼 눌림 ----------
   창은 hidden이 풀릴 때 아래에서 살짝 올라오며 나타난다(0.2초). 위치용 transform과 겹치지 않게 translate·scale 속성을 쓴다.
   버튼은 누르는 순간 살짝 눌린다. 움직임 줄이기 설정이면 모두 끈다. */
:where(#menu-pop, #blind, #layout-panel, #tp-menu, #profile, #board, #fourcut, #cards, #game, #mascot, #card-ask,
  #shoot-invite, #booth, #photo-deco, #wishes, #tips, #fortune, :is(#booth-guide,#meet-guide), #topic-panel, #prebooth-panel,
  #cardimg-panel, #verify-panel, #broadcast-panel, #goods-panel, #fireq-card) {
  transition: opacity 0.2s ease, translate 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), scale 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@starting-style {
  :where(#menu-pop, #blind, #layout-panel, #tp-menu, #profile, #board, #fourcut, #cards, #game, #mascot, #card-ask,
    #shoot-invite, #booth, #photo-deco, #wishes, #tips, #fortune, :is(#booth-guide,#meet-guide), #topic-panel, #prebooth-panel,
    #cardimg-panel, #verify-panel, #broadcast-panel, #goods-panel, #fireq-card) {
    opacity: 0;
    translate: 0 10px;
    scale: 0.98;
  }
}
/* 메뉴 팝업은 위에서 내려온다 */
@starting-style { #menu-pop, #ch-menu { opacity: 0; translate: 0 -8px; } }
#menu-pop, #ch-menu { transition: opacity 0.16s ease, translate 0.18s ease; }

button, .btn, [role="button"] { transition: scale 0.08s ease, filter 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease; }
button:not(:disabled):active, .btn:active, [role="button"]:active { scale: 0.96; filter: brightness(0.96); }
@media (hover: hover) {
  button:not(:disabled):hover { filter: brightness(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  button:active { scale: none; }
}

/* ---------- PC 넓은 창 (2026-12-03): 휴대폰 폭으로 만든 창이 PC에서 좁고 길게 보이던 것 정리 ---------- */
.mc-side, .mc-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
@media (min-width: 1000px) and (min-height: 600px) {
  #cards { width: min(880px, calc(100vw - 48px)); }
  /* 부스 찾기·카드첩 목록: 한 줄 구조, 2열 */
  .cb-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .cb-row { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .cb-row .cb-head { flex: 1; min-width: 0; }
  .cb-row .ccard-acts { flex-shrink: 0; }
  .cb-row > .cb-embed { flex-basis: 100%; }
  /* 내 카드: 왼쪽 카드 미리보기(따라 내려옴), 오른쪽 입력 */
  .card-form { display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 28px; align-items: start; }
  .card-form > .plot-pick { grid-column: 1 / -1; }
  .mc-side { position: sticky; top: 0; }
  .mc-preview canvas { max-width: 290px; }
}
@media (min-width: 1200px) and (min-height: 760px) {
  /* 놀기·미션: 넓히고 2단, 높이는 내용만큼 */
  #popup-card { width: min(800px, calc(100vw - 32px)); bottom: auto; max-height: calc(100dvh - 104px); }
  #card-body { column-count: 2; column-gap: 28px; column-rule: 1px solid var(--line, #eadfca); }
  #card-body > * { break-inside: avoid; }
  #card-body > h3 { break-after: avoid; }
  #card-body > h3:first-of-type, #card-body > .card-period { margin-top: 6px; }
}

/* 휴대폰 (2026-12-03 모바일 점검): 블라인드 임베드가 액자 안에서 오른쪽이 잘림(274px < 스레드 임베드 최소 326px) → 여백을 줄여 330px 확보 */
@media (max-width: 420px) {
  #blind { width: calc(100vw - 12px) !important; padding-left: 6px !important; padding-right: 6px !important; }
  #blind-body { padding-left: 4px !important; padding-right: 4px !important; }
  .blind-wall { padding-left: 0; padding-right: 0; }
  .blind-frame { padding: 5px; }
  .blind-mat { padding: 2px; }
}
/* 부스 찾기 목록: 휴대폰도 한 줄(얼굴·아이디 왼쪽, [부스 가기] 오른쪽) — 한 칸 높이 약 절반 */
.cb-row { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.cb-row .cb-head { flex: 1; min-width: 0; }
.cb-row .ccard-acts { flex-shrink: 0; }
.cb-row > .cb-embed { flex-basis: 100%; }
.cb-row .cb-intro { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 아이폰 전체 화면 안내 (2026-12-03 사용자: 모바일은 무조건 전체 화면) */
#ios-gate { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: max(20px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
  background: radial-gradient(120% 90% at 50% 0%, #3c4f86 0%, #24305a 55%, #182040 100%); overflow-y: auto; }
#ios-gate .ig-card { width: min(380px, 100%); padding: 24px 22px 18px; border-radius: 24px; background: #fff9e6; color: #5a4632; text-align: center; box-shadow: 0 18px 50px rgba(10, 14, 30, 0.45); }
#ios-gate img { width: 72px; height: 72px; border-radius: 18px; }
#ios-gate h2 { margin: 10px 0 6px; font-size: 23px; font-weight: 400; color: #4a3826; }
#ios-gate .ig-sub { margin: 0 0 16px; font-size: 15px; line-height: 1.5; }
#ios-gate .ig-steps { margin: 0; padding: 0; list-style: none; counter-reset: ig; text-align: left; display: flex; flex-direction: column; gap: 10px; }
#ios-gate .ig-steps li { counter-increment: ig; display: grid; grid-template-columns: 32px 1fr; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: 0 2px 0 rgba(90, 70, 50, 0.1); }
#ios-gate .ig-steps li::before { content: counter(ig); grid-row: span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #0f7f76; color: #fff; font-size: 17px; }
#ios-gate .ig-steps b { font-weight: 400; font-size: 16px; color: #0f7f76; }
#ios-gate .ig-steps span { font-size: 13px; color: #7d6a52; }
#ios-gate .ig-skip { margin-top: 16px; min-height: 44px; padding: 8px 12px; border: 0; background: none; color: #8a7457; font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }

/* 검수 54: 망원경 보기. 게임 UI를 숨기고 돌아가기 버튼만 남긴다. */
body.scoping > :not(canvas):not(#scope-ui) { visibility: hidden !important; }
body.scoping #labels { display: none !important; }
#scope-ui { position: fixed; inset: 0; z-index: 90; visibility: visible; touch-action: none; background: radial-gradient(ellipse at 50% 46%, rgba(6, 9, 28, 0) 52%, rgba(6, 9, 28, 0.5) 100%); animation: scope-in 0.9s ease both; }
#scope-ui[hidden] { display: none; }
#scope-exit { position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); min-width: 132px; min-height: 48px; padding: 10px 22px; border: 0; border-radius: 999px; background: #fffbea; color: var(--ink, #3b2f2a); font: inherit; font-size: 17px; box-shadow: 0 3px 0 rgba(40, 30, 60, 0.35); cursor: pointer; }
#scope-exit:focus-visible { outline: 3px solid #ffd27a; outline-offset: 2px; }
@keyframes scope-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #scope-ui { animation: none; } }
#ios-gate .ig-skip { margin-top: 16px; min-height: 44px; padding: 8px 12px; border: 0; background: none; color: #8a7457; font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }

/* 검수 59 개성: 그림 칩 (눈·입·옷 무늬) */
.opt-row .chip.icon { padding: 3px 5px 1px; border: 2px solid var(--line); border-radius: 12px; background: #fff; line-height: 0; }
.opt-row .chip.icon canvas { display: block; border-radius: 6px; }
.opt-row .chip.icon[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }

/* 오늘의 주제 (검수 66, 오픈 묶음 B): 광장 안 고정 제목(고급 명조, 금빛) + 입장 직후 타이틀 연출 */
#topic-pill { top: calc(66px + env(safe-area-inset-top)); background: none; box-shadow: none; padding: 2px 10px; font-family: "Gowun Batang", "Nanum Myeongjo", "Batang", serif; font-weight: 700; font-size: 22px; letter-spacing: 0.02em; color: #f6d98a; text-shadow: 0 1px 0 #7a5418, 0 2px 8px rgba(30, 18, 0, 0.75), 0 0 18px rgba(255, 214, 120, 0.35); background-image: none; }
#topic-pill .tp-k { font-size: 0.55em; letter-spacing: 0.12em; color: #ffe9b3; margin-right: 0.7em; vertical-align: 0.18em; opacity: 0.9; }
@media (max-width: 720px) { #topic-pill { top: calc(104px + env(safe-area-inset-top)); left: 8px; right: 8px; transform: none; text-align: center; font-size: 17px; } }
#topic-intro { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(6, 5, 16, 0); cursor: pointer; touch-action: manipulation; overflow: hidden; }
#topic-intro .ti-box { position: relative; width: min(82vw, 760px); aspect-ratio: 1; max-height: 70vh; display: grid; place-items: center; }
#topic-intro .ti-img, #topic-intro .ti-sweep { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
#topic-intro .ti-sweep { -webkit-mask: var(--ti-mask) center / contain no-repeat; mask: var(--ti-mask) center / contain no-repeat; background: linear-gradient(100deg, transparent 38%, rgba(255, 255, 255, 0.95) 50%, transparent 62%) 0 0 / 300% 100% no-repeat; background-position: 100% 0; mix-blend-mode: screen; opacity: 0; }
#topic-intro .ti-star, #topic-intro .ti-dust { position: absolute; pointer-events: none; opacity: 0; }
#topic-intro .ti-star { width: 28px; height: 28px; background: #fff6d0; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); filter: drop-shadow(0 0 6px #ffe39a); }
#topic-intro .ti-dust { width: 5px; height: 5px; border-radius: 50%; background: #ffe9a8; box-shadow: 0 0 6px #ffd56b; }
#topic-intro .ti-text { font-family: "Gowun Batang", "Nanum Myeongjo", serif; font-weight: 700; color: #f6d98a; font-size: clamp(30px, 6vw, 64px); text-align: center; line-height: 1.3; padding: 0 6vw; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7), 0 0 24px rgba(255, 214, 120, 0.45); }
#topic-intro .ti-text small { display: block; font-size: 0.4em; letter-spacing: 0.2em; margin-bottom: 0.5em; color: #ffe9b3; }

.work-row { display: flex; gap: 6px; align-items: stretch; margin-bottom: 6px; }
.work-row input { flex: 1; min-width: 0; margin: 0; }
.work-clear { flex: none; min-width: 56px; min-height: 40px; border: 1px solid rgba(47,107,74,.35); background: #fff; color: #0f7f76; border-radius: 10px; font: inherit; font-size: 13px; cursor: pointer; }
.work-clear:disabled { opacity: .4; cursor: default; }

/* 채팅 크기: 크게 / 중간 / 접기 (오픈 묶음 B 항목 4) */
#chat-head { display: flex; align-self: stretch; border-bottom: 2px solid var(--line); background: rgba(255, 255, 255, 0.5); }
#chat-head #chat-fold { flex: 1; border-bottom: 0; background: none; }
#chat-head #chat-fold.has-new { background: #ffe9a8; }
#chat.folded #chat-head { border-bottom: 0; }
.chat-size { flex: none; min-width: 52px; min-height: 36px; padding: 4px 10px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.chat-size.on { font-weight: 700; color: var(--ink); box-shadow: inset 0 -3px 0 #0f7f76; }
.chat-size[hidden] { display: none; }
#chat.big { height: min(62vh, 560px); }
@media (max-width: 720px) {
  #chat.big { height: 52dvh; }
  .chat-size { min-height: 44px; min-width: 56px; }
}
@media (max-width: 720px) and (orientation: portrait) {
  body:has(#chat.big:not(.folded):not([hidden])) #near-act { bottom: calc(60dvh + env(safe-area-inset-bottom)); }
  body:has(#chat.big:not(.folded):not([hidden])) #near-act2 { bottom: calc(60dvh + 60px + env(safe-area-inset-bottom)); }
}
#chat-note { margin: 0; padding: 3px 12px; font-size: 11px; line-height: 1.3; color: var(--ink-soft); background: rgba(255, 249, 230, 0.7); }
#chat.folded #chat-note { display: none; }
.preset-slots { margin-bottom: 10px; }
.preset-row { flex-wrap: wrap; gap: 6px; }
.preset-row .chip.save { background: #e8f3ec; }
.preset-row .chip.empty { opacity: .55; }
.preset-row .chip:disabled { cursor: default; }

/* 게시물 크게 보기 (항목 7) */
.th-big-btn { display: inline-block; margin: 6px 6px 10px 0; padding: 6px 12px; min-height: 36px; border: 0; border-radius: 999px; background: #0f7f76; color: #fff; font: inherit; font-size: 14px; cursor: pointer; }
.blind-frame { position: relative; }
.blind-frame > .th-big-btn { display: block; margin: 8px 0 0 auto; }
#th-big { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(10, 8, 20, 0.72); }
.th-big-box { width: 90vw; height: 90vh; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #fff9e6; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.th-big-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 12px; background: #fff3c4; }
.th-big-open { color: var(--ink); font-size: 14px; }
.th-big-close { min-height: 44px; min-width: 76px; border: 0; border-radius: 999px; background: #0f7f76; color: #fff; font: inherit; font-size: 15px; cursor: pointer; }
.th-big-frame { width: 100%; height: 100%; border: 0; background: #fff; color-scheme: light; }
@media (max-width: 720px) { .th-big-box { width: 100vw; height: 100dvh; max-width: none; border-radius: 0; } }
.preset-list { display: grid; gap: 6px; }
.preset-item { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.preset-item b { min-width: 64px; font-size: 14px; }
.preset-btn { min-height: 40px; padding: 6px 12px; border: 1px solid rgba(47,107,74,.35); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.preset-btn.save { background: #e8f3ec; }
.preset-btn:disabled { opacity: .5; cursor: default; }

/* 검수 68 A: 오늘의 주제 제목을 상단 HUD 아래로 내리고 키우고 어두운 받침을 깐다 */
#topic-pill { top: calc(84px + env(safe-area-inset-top)); font-size: 28px; padding: 6px 22px 8px; border-radius: 999px; background: radial-gradient(ellipse at center, rgba(18, 12, 30, 0.58) 0%, rgba(18, 12, 30, 0.4) 62%, rgba(18, 12, 30, 0) 100%); text-shadow: 0 1px 0 #7a5418, 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 22px rgba(0, 0, 0, 0.7), 0 0 18px rgba(255, 214, 120, 0.3); max-width: min(620px, calc(100vw - 640px)); }
@media (max-width: 1100px) { #topic-pill { max-width: calc(100vw - 340px); font-size: 24px; } }
@media (max-width: 720px) { #topic-pill { top: calc(110px + env(safe-area-inset-top)); left: 8px; right: 8px; max-width: none; font-size: 18px; } }

#tp-menu .tp-item.tp-closed { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.6); }
#tp-menu .tp-item .tp-soon { font-style: normal; font-size: 11px; color: #8a5a2b; }


/* ===== UI-POLISH 70 (additive, remove this block to revert) ===== */
#tabs .tab, #tabs .tab button { transition: color .18s ease, border-color .18s ease, background-color .18s ease; }
.opt-row .chip { transition: color .15s ease, border-color .15s ease, transform .12s ease; }
.opt-row .chip[aria-checked="true"] { font-weight: 400; transform: translateY(-1px); }
.card-chips button { transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.ui-saved { position: relative; }
.ui-saved::after { content: "\2713"; margin-left: 6px; color: #0f7f76; font-weight: 700; animation: uiSavedPop 1.1s ease forwards; }
@keyframes uiSavedPop { 0% { opacity: 0; transform: scale(.4); } 20% { opacity: 1; transform: scale(1.25); } 40% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
.plaza-panel { transition: opacity .16s ease-in, translate .16s ease-in, display .16s allow-discrete; }
.plaza-panel[hidden] { opacity: 0; translate: 0 6px; pointer-events: none; }
.plaza-panel:not([hidden]) { transition-timing-function: ease-out; }
@starting-style { .plaza-panel:not([hidden]) { opacity: 0; translate: 0 6px; } }
/* Threads embed: never a black box */
iframe.th-embed { color-scheme: light; background: #f6f1e4 linear-gradient(#f6f1e4, #fffbea); min-height: 140px; }
.th-fallback { display: block; margin: 6px 0 0; padding: 6px 12px; border-radius: 999px; background: #fffbea; box-shadow: inset 0 0 0 2px #e6dcc8; color: var(--ink); font-size: 14px; text-align: center; text-decoration: none; }
.th-fallback:hover { background: #fff3c4; }
/* online list rows, name labels, stamps */
#online-list li { align-items: center; min-height: 32px; }
#online-list button { min-height: 28px; padding: 4px 0; }
.label .name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; font-size: 13px; text-shadow: 0 0 3px #3b2c1c, 0 0 3px #3b2c1c, 0 1px 2px #3b2c1c, 0 0 6px rgba(59,44,28,.6); }
.label .bubble { max-width: min(230px, 60vw); }
.stamp { min-width: 0; }
.stamp-name { overflow-wrap: anywhere; line-height: 1.2; }
.stamp-mark { flex: none; }
/* play emoji, booth fields */
#dock [data-dock="play"] .dk-ico, #emotes button { font-size: 20px; }
#booth input, #booth textarea, #booth select { font-size: 16px; font-family: inherit; }
#booth-intro, #booth-meta { font-size: 15px; }
/* tp discoverability */
#dock [data-dock="tp"] { position: relative; }
#dock.ui-tp-pulse [data-dock="tp"] { animation: uiTpPulse 1.6s ease-in-out infinite; }
@keyframes uiTpPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 190, 60, .0); } 50% { box-shadow: 0 0 0 6px rgba(255, 190, 60, .55), 0 0 14px 4px rgba(255, 210, 90, .6); } }
#ui-tp-tip { position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translateX(-50%); width: max-content; max-width: 200px; text-align: center; line-height: 1.3; padding: 7px 14px; border-radius: 12px; background: #3b2c1c; color: #fff; font-size: 14px; pointer-events: none; z-index: 6; }
#ui-tp-tip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: #3b2c1c; }
@media (prefers-reduced-motion: reduce) {
  #tabs .tab, #tabs .tab button, .opt-row .chip, .card-chips button { transition: none; }
  .plaza-panel, .plaza-panel:not([hidden]) { transition: none; }
  #dock.ui-tp-pulse [data-dock="tp"] { animation: none; box-shadow: 0 0 0 4px rgba(255, 190, 60, .6); }
  .ui-saved::after { animation: none; }
}
/* ===== /UI-POLISH 70 ===== */

/* ---- 글자 잘림 수정 (20261204) ---- */
.label .name { max-width: 220px; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; text-align: center; line-height: 1.2; }
.label .field { max-width: 220px; white-space: normal; text-align: center; line-height: 1.25; }
.label .bubble { overflow-wrap: anywhere; }
.cb-row .cb-intro { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.vc-id { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
#dm-toast span { display: block; overflow: visible; -webkit-line-clamp: unset; overflow-wrap: anywhere; }
#tp-menu .tp-item span { white-space: normal; overflow-wrap: anywhere; text-align: center; line-height: 1.2; }
#hot-bar { white-space: normal; max-width: min(560px, calc(100vw - 24px)); border-radius: 24px; }
#popup-bar { white-space: normal; max-width: min(760px, calc(100vw - 440px)); border-radius: 26px; line-height: 1.25; }
#topic-pill { white-space: normal; overflow: visible; text-overflow: clip; border-radius: 28px; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.mc-q small, .mc-count, .card-facts dt { white-space: normal; }
@media (max-width: 720px) { #popup-bar { max-width: calc(100vw - 16px); } }
/* 한글은 어절 단위로 줄바꿈 (20261204) */
body, body * { word-break: keep-all; overflow-wrap: anywhere; }
h1, h2, h3, .fc-text, .fc-cap-title, #topic-pill, #center-banner p, #dm-toast span, .mc-q span, #game h3, #game h4 { text-wrap: balance; }
p, .fc-note, .cb-intro, .post-text, .comment-text, .label .bubble { text-wrap: pretty; }
/* 블라인드: 두 가림막은 스크롤 창이 아니라 전체 임베드와 함께 움직인다. */
.blind-crop, .th-big-crop { overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; background: #fff; }
.blind-frame .blind-crop { max-height: min(460px, 43dvh); }
.th-big-crop { min-height: 0; }
.blind-embed-content { position: relative; width: min(100%, 550px); margin-inline: auto; height: var(--ih, 0px); overflow: hidden; visibility: hidden; }
.blind-embed-content.ready { visibility: visible; }
.blind-embed-content > iframe.th-embed, .blind-embed-content > .th-big-frame { display: block; width: 100%; height: 100%; min-height: 0; margin: 0; border-radius: 0; }
.blind-cover { position: absolute; inset-inline: 0; background: #fff; z-index: 2; }
.blind-cover.top { top: 0; height: 72px; }
.blind-cover.bot { bottom: 0; height: 56px; }
.blind-embed-wait { margin: 0; padding: 24px 16px; color: var(--ink-soft); text-align: center; }
.blind-embed-content.ready + .blind-embed-wait { display: none; }

.blind-mine .blind-cta { margin-left: 4px; padding: 6px 12px; min-height: 34px; border: 0; border-radius: 999px; background: #0f7f76; color: #fff; font: inherit; font-size: 13px; cursor: pointer; }
@keyframes blind-reveal-in { from { opacity: 0; transform: perspective(700px) rotateY(-70deg) scale(.92); } to { opacity: 1; transform: none; } }
#blind-body.blind-reveal-anim > .blind-label.reveal, #blind-body.blind-reveal-anim > .blind-head { animation: blind-reveal-in .5s ease-out both; }
@media (prefers-reduced-motion: reduce) { #blind-body.blind-reveal-anim > * { animation: none !important; } }


.editor-hint{margin:0;color:var(--ink-soft);font-size:14px}
#photo-share{cursor:pointer;font:inherit}

/* 광장 게시판 */
#board:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto minmax(0, 1fr); /* 2026-12-04 탭 줄 추가 */
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(1100px, 92vw);
  height: min(760px, 86vh, calc(100dvh - 144px));
  max-height: none;
  z-index: 12;
  border: clamp(8px, 1vw, 14px) solid #744421;
  border-radius: 16px;
  background: repeating-linear-gradient(2deg, #b77b49 0 4px, #b07848 5px 8px, #bc8554 9px 25px);
  box-shadow: 0 16px 44px #24120d73, inset 0 0 0 3px #deb481, inset 0 0 28px #48210b80;
  overflow: hidden;
}
#board > header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 4px 12px 4px 18px; color: #fff6df; background: #684022; }
#board h2 { font-weight: 700; }
#board-close { color: inherit; }
#board #compose { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; margin: 10px 12px 0; padding: 9px 12px; border: 0; border-radius: 9px; background: #fff1cb; }
#compose label { font-weight: 700; }
#board #post-text { height: 56px; min-width: 0; }
#board .compose-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; margin: 0; }
#board #posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); align-content: start; align-items: start; gap: 18px; padding: 18px 17px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
#board #posts .empty { grid-column: 1 / -1; padding: 24px 12px; color: #44301d; background: #fff1cb; border-radius: 9px; }
#board .post:not([hidden]) { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; border: 0; padding: 22px 12px 12px; background: #fff3ce; box-shadow: 1px 5px 10px #4c251957; rotate: -.55deg; }
#board .post:nth-child(3n+1) { rotate: .55deg; background: #fff8e5; }
#board .post:nth-child(3n+2) { rotate: 0deg; background: #fce7bd; }
#board .post::before { content: ''; position: absolute; top: 5px; left: calc(50% - 5px); width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #ffb097, #ab3630 52%, #75211d); box-shadow: 1px 2px 2px #64362970; }
#board :is(.post-head, .comment-head) { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
#board :is(.post-head, .comment-head) .time { grid-column: 1; grid-row: 2; }
#board :is(.post-head, .comment-head) .del { grid-column: 2; grid-row: 1; }
#board :is(.post-text, .comment-text, .post-head, .comment-head) { overflow-wrap: normal; overflow-x: auto; text-wrap: wrap; }
#board .post-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 66px), 1fr)); gap: 6px; }
#board .comment-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
#board .comment-form input { min-width: 0; }
body:has(#board:not([hidden])) :is(#chat, #online, #dock, #emotes, #react-btn) { visibility: hidden; }

/* 접속자 목록 아래에 고정하는 반응 단추 열 */
#emotes:not([hidden]):not(.folded) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-content: start stretch;
  gap: 3px;
  inset: auto 16px 70px auto;
  width: 144px;
  max-width: none;
  max-height: max(0px, calc(100dvh - var(--reaction-top, 126px) - 70px));
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
#emotes button { display: grid; grid-template-columns: 35px minmax(0, 1fr); align-items: center; gap: 4px; min-height: 30px; padding: 4px 7px; text-align: start; font-size: 13px; }
#emotes kbd { display: block; margin: 0; text-align: center; font-size: 11px; font-weight: 700; }
@media (max-width: 720px) {
  #emotes:not([hidden]):not(.folded) {
    inset: auto 8px calc(124px + env(safe-area-inset-bottom)) auto;
    max-height: max(0px, calc(100dvh - var(--reaction-top, 126px) - 124px - env(safe-area-inset-bottom)));
  }
  body:has(#emotes:not([hidden]):not(.folded)) #chat { width: calc(100vw - 168px); }
}

#bug-report { width: min(520px, 92vw); max-height: calc(100dvh - 144px); padding: 0; border: 0; border-radius: 20px; background: var(--cream); color: var(--ink); box-shadow: 0 14px 40px #24160c66; }
#bug-report::backdrop { background: #150f0c88; }
#bug-report-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 18px; }
#bug-report-form header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
#bug-report-form h2, #bug-report-form p { margin: 0; }
#bug-report-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: #fff; color: inherit; font: inherit; font-size: 25px; cursor: pointer; }
#bug-report-text { width: 100%; padding: 10px 12px; resize: vertical; border: 2px solid var(--line); border-radius: 12px; font: inherit; }
.bug-report-check { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; cursor: pointer; }
#bug-report-status:empty { display: none; }
#bug-report-status { color: #8b261e; }
#bug-report-send { justify-self: end; padding: 8px 16px; min-height: 44px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; cursor: pointer; }
#bug-report-send:disabled { opacity: .62; cursor: wait; }
.toast-report .toast-mark { background: #0f7f76; }

/* Creator directory and card motion */
.creator-filters { margin-bottom: 8px; }
.booth-find-card { display: flex; flex-direction: column; align-items: stretch; }
.creator-thumb { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; text-align: left; }
.booth-find-card button.creator-thumb { padding: 0; border: 0; background: none; color: inherit; align-self: stretch; cursor: pointer; }
.creator-heading { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.creator-heading .booth-find-name { max-width: 100%; }
.creator-owned-mark { padding: 1px 6px; border-radius: 999px; background: #e1f2e8; color: #1d5641; font-size: 12px; }
.creator-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 5px; }
.creator-actions button { flex: 1 1 112px; min-width: 0; }
.creator-rise { animation: creator-rise 210ms ease-out var(--rise-delay, 0ms) backwards; }
@keyframes creator-rise { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@media (hover: hover) and (pointer: fine) {
  .booth-find-card { transition: transform 140ms ease-out; }
  .booth-find-card:hover { transform: perspective(650px) translateY(-3px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); }
}
.booth-find-card:active { transform: scale(.98); }
.card-motion-stage { perspective: 1000px; aspect-ratio: 630 / 880; }
.card-motion-flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.4, 0, .2, 1); }
.card-motion-flip.is-back { transform: rotateY(180deg); }
.card-motion-side { display: block; position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 12px; backface-visibility: hidden; }
.card-motion-back { transform: rotateY(180deg); }
.creator-card-dialog, .creator-reveal { font: inherit; color: var(--ink); border: 0; }
.creator-card-dialog::backdrop { background: #1b14189c; }
.creator-reveal::backdrop { background: #2115169c; transition: opacity .36s ease; }
.creator-reveal.is-landing::backdrop { opacity: 0; }
.creator-card-dialog { width: min(360px, calc(100vw - 32px)); max-height: min(91dvh, 760px); box-sizing: border-box; border-radius: 18px; padding: 12px; background: var(--cream, #fff9e6); box-shadow: 0 12px 40px #21151064; }
.creator-card-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.creator-card-dialog-head strong { overflow-wrap: anywhere; }
.creator-card-dialog-close { flex: none; width: 44px; height: 44px; padding: 0; background: transparent; border: 0; font-size: 25px; cursor: pointer; }
.creator-card-flipper { display: block; margin: 4px auto; padding: 0; border: 0; background: none; width: min(100%, 300px, 46dvh); cursor: pointer; }
.creator-card-tip { margin: 8px 0; text-align: center; font-size: 14px; }
.creator-card-dialog .ccard-acts { justify-content: center; flex-wrap: wrap; }
.creator-card-dialog .ccard-acts > * { min-height: 38px; box-sizing: border-box; display: inline-grid; place-items: center; }
.creator-reveal { max-width: none; max-height: none; padding: 0; background: transparent; overflow: visible; }
.creator-reveal-button { display: grid; justify-items: center; gap: 10px; padding: 5px; border: 0; border-radius: 12px; background: transparent; color: #fff8de; font: inherit; cursor: pointer; }
.creator-reveal-button:focus-visible { outline: 2px solid #fff4cc; outline-offset: 4px; }
.creator-reveal-title, .creator-reveal-tip { text-shadow: 0 1px 6px #221609; transition: opacity .25s ease; }
.creator-reveal-title { font-size: clamp(16px, 3.5vw, 23px); }
.creator-reveal-tip { font-size: 13px; }
.creator-reveal.is-landing :is(.creator-reveal-title, .creator-reveal-tip) { opacity: 0; }
.creator-reveal.is-landing .creator-reveal-button { outline-color: transparent; }
.creator-reveal-stage { position: relative; width: min(290px, 60vw, 46dvh); }
.creator-reveal-shine { position: absolute; inset: 0; overflow: hidden; border-radius: 12px; pointer-events: none; }
.creator-reveal-shine::after { content: ''; display: block; width: 70%; height: 100%; background: linear-gradient(100deg, transparent 14%, #fff8e570 50%, transparent 85%); opacity: 0; }
.is-shining .creator-reveal-shine::after { animation: creator-shine 670ms .26s ease-out both; }
@keyframes creator-shine { 0% { transform: translateX(-100%); opacity: 0; } 28%, 70% { opacity: .76; } 100% { transform: translateX(145%); opacity: 0; } }
.creator-reveal-spark { position: absolute; width: 12px; height: 12px; background: #ffedb6; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; pointer-events: none; }
.is-shining .creator-reveal-spark { animation: creator-spark 640ms .24s ease-out both; }
.is-shining .creator-reveal-spark:nth-child(even) { animation-delay: .36s; }
@keyframes creator-spark { 0% { opacity: 0; transform: scale(.25) rotate(-18deg); } 32% { opacity: 1; transform: scale(1.25) rotate(20deg); } 100% { opacity: 0; transform: translateY(-15px) scale(.25) rotate(45deg); } }
#dock [data-dock="meet"] { position: relative; }
.creator-dock-badge { position: absolute; z-index: 1; top: -9px; right: -5px; min-width: 23px; padding: 2px 3px; border-radius: 999px; background: #962831; color: white; font: 700 12px/1.3 system-ui, sans-serif; text-align: center; pointer-events: none; animation: creator-badge 290ms ease-out; }
@keyframes creator-badge { 0% { transform: scale(.7); } 55% { transform: scale(1.25); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .creator-rise, .creator-dock-badge { animation: none; }
  .booth-find-card, .card-motion-flip { transition: none; }
  .booth-find-card:hover, .booth-find-card:active { transform: none; }
}

/* 2026-12-04: 크리에이터 찾기 = 주민카드 그대로 나열 */
.booth-find-grid:has(.creator-card-tile) { grid-template-columns: repeat(auto-fill, minmax(min(176px, 100%), 1fr)); gap: 14px; }
.booth-find-card.creator-card-tile { display: flex; flex-direction: column; gap: 8px; padding: 0; background: none; border: 0; box-shadow: none; }
.creator-thumb.creator-thumb-card { position: relative; display: block; padding: 0; border: 0; background: none; border-radius: 14px; cursor: default; }
button.creator-thumb.creator-thumb-card { cursor: pointer; }
.creator-card-face { display: block; width: 100%; height: auto; aspect-ratio: 630 / 880; border-radius: 14px; box-shadow: 0 6px 16px rgba(60, 40, 20, 0.18); }
.creator-thumb-card .creator-owned-mark { position: absolute; top: 8px; right: 8px; padding: 3px 9px; border-radius: 999px; background: #0f7f76; color: #fff; font-size: 12px; }
.creator-card-tile .creator-actions.ccard-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.creator-card-tile .creator-actions.ccard-acts button { flex: 1 1 auto; min-height: 36px; padding: 5px 12px; border: 2px solid var(--accent); border-radius: 999px; background: #fff; color: #0f7f76; font: inherit; font-size: 14px; cursor: pointer; transition: transform .12s, background .12s; }
.creator-card-tile .creator-actions.ccard-acts button.card-go { background: var(--accent); color: #fff; }
.creator-card-tile .creator-actions.ccard-acts button:hover { transform: translateY(-1px); }
.creator-card-tile .creator-actions.ccard-acts button:active { transform: scale(.97); }


/* 내 카드·부스 */
#cards.mine-panel { width: min(920px, calc(100vw - 38px)); box-sizing: border-box; }
.mine-summary, .mine-edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 12px; }
.mine-preview-panel, .mine-facts, .mine-section { min-width: 0; padding: 12px; border: 1px solid #e8dbc0; border-radius: 16px; background: #fffdf6; overflow-wrap: anywhere; }
.mine-handle { margin: 0; color: var(--ink); font-weight: 400; font-size: 21px; }
.mine-lead { margin: 2px 0 9px; color: var(--ink-soft); font-size: 13px; }
.mine-faces { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.mine-faces button { display: grid; justify-items: center; gap: 4px; min-width: 0; padding: 6px; border: 1px solid #e8dbc0; border-radius: 12px; background: #f7efdc; color: var(--ink); font: inherit; font-size: 13px; cursor: zoom-in; }
.mine-faces button:hover { border-color: var(--accent); background: #eaf4eb; }
.mine-faces canvas { display: block; width: 100%; height: auto; border-radius: 8px; }
.mine-actions { margin-top: 10px; }
.mine-actions button, .mine-savebar button { min-height: 33px; }
.ccard-acts button.mine-primary { background: #0f7f76; border-color: #0f7f76; color: #fff; }
.ccard-acts button.mine-primary:disabled { opacity: .55; }
.mine-actions button.share-open { margin: 0; }
.mine-status { margin: 6px 0 0; color: #0f7f76; font-size: 13px; }
.mine-status:empty { margin: 0; }
.mine-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; margin: 0; align-content: start; }
.mine-fact { padding: 5px 2px; border-bottom: 1px solid #eee4ce; min-width: 0; }
.mine-fact:last-child { grid-column: 1 / -1; border-bottom: 0; }
.mine-fact dt { color: #12665d; font-family: var(--title-font); font-size: 15px; line-height: 1.2; }
.mine-fact dd { margin: 3px 0 0; color: var(--ink); font-size: 13px; line-height: 1.32; }
.mine-empty { color: var(--ink-soft); }
.mine-inline { padding: 1px 7px; border: 1px solid #a4c6b7; border-radius: 999px; color: #0f7f76; background: #f5fbf5; font: inherit; font-size: 13px; cursor: pointer; }
.mine-inline:hover { background: #dceee1; }
.mine-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.mine-tags span { padding: 2px 5px; border-radius: 6px; color: #18574b; background: #e7f0df; font-size: 12px; }
.mine-work-links { display: flex; align-items: start; flex-wrap: wrap; gap: 3px 7px; }
.mine-work-links a, .mine-account a { color: #0f7f76; }
.mine-account a { margin-inline-start: 8px; }
.mine-color { display: inline-flex; align-items: center; gap: 6px; }
.mine-swatch { width: 18px; height: 13px; border-radius: 4px; border: 1px solid #4a3a2955; }
.mine-zoom { width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-sizing: border-box; border: 1px solid #e8dbc0; border-radius: 18px; background: #fff9e6; color: var(--ink); text-align: center; }
.mine-zoom::backdrop { background: #172a28b8; }
.mine-zoom h3 { margin: 0 0 6px; font-weight: 400; }
.mine-zoom canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 145px); margin: 0 auto; border-radius: 10px; }
.mine-zoom .ccard-acts { justify-content: center; margin-top: 8px; }
#cards .mine-editor { display: block; margin: 0; }
#mine-edit-title, .mine-section h3 { margin: 0 0 8px; font-weight: 400; }
#mine-edit-title { font-size: 20px; }
.mine-section h3 { color: #12665d; font-size: 18px; }
.mine-section :is(.muted, .card-howto, .mine-works-help) { margin-block: 5px; }
.mine-basic-layout { display: grid; grid-template-columns: minmax(85px, 118px) minmax(0, 1fr); align-items: start; gap: 9px; }
.mine-edit-preview .mc-preview { padding: 0; }
.mine-edit-preview canvas { width: 100%; height: auto; }
.mine-editor .mc-flip { margin: 4px 0 0; }
.mine-editor .mc-flip button { padding-inline: 5px; }
.mine-editor .mc-photo { padding: 8px; }
.mine-editor :is(.mc-photo-btns, .mc-pic) button { min-height: 30px; padding: 3px 8px; }
.mine-editor .mc-item { padding: 0; margin: 0 0 8px; }
.mine-editor .card-chips button { min-height: 30px; padding: 3px 7px; }
.mine-editor .mc-tools button[hidden] { display: none; }
.mine-editor .card-blind { display: flex; align-items: start; gap: 4px; }
.mine-savebar { position: sticky; z-index: 1; bottom: -1px; justify-content: flex-end; align-items: center; margin-top: 9px; padding: 8px; border: 1px solid #e8dbc0; border-radius: 12px; background: #fff9e6; box-shadow: 0 -2px 12px #5d432015; }
.mine-edit-status { flex: 1; margin: 0; color: #8c342c; font-size: 13px; }
.mine-panel :is(button, a, input, [tabindex]):focus-visible { outline: 2px solid #12665d; outline-offset: 2px; }
@media (max-width: 680px) {
  .mine-summary, .mine-edit-grid { grid-template-columns: minmax(0, 1fr); }
  .mine-faces canvas { max-height: 240px; object-fit: contain; }
}

/* 2026-12-04 Fable 디자인 검수 92 */
body:has(.creator-reveal-stage) #stamp-toast { display: none !important; }
body:has(:is(.plaza-panel, #cal-panel, #fortune, #tips, #cards, #blind, #board, #booth):not([hidden])) #topic-pill { opacity: 0; pointer-events: none; transition: opacity .15s; }
body:has(:is(#popup-card, #cal-panel):not([hidden])) #popup-bar { opacity: 0; pointer-events: none; }
body:has(:is(#cards, #tp-menu):not([hidden])) #chat { opacity: 0; pointer-events: none; }
#fortune { top: 16px; transform: translateX(-50%); max-height: calc(100dvh - 120px); }
#card-body h3:nth-of-type(3) { break-before: column; margin-top: 0; }
#meet-guide .mg-row { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 8px; }
#meet-guide .mg-row button { padding: 0 8px; white-space: nowrap; }
body:has(#meet-guide) #ui-tp-tip { display: none; }
#enter:disabled { background: #d9cdb8; color: #6b5a45; }

/* 2026-12-04 사용자: 내 카드·부스 수정 화면이 마진 없이 답답함 -> 여백 넉넉하게 */
#cards .mine-editor { padding: 4px 2px 0; }
.mine-summary, .mine-edit-grid { gap: 18px; }
.mine-preview-panel, .mine-facts, .mine-section { padding: 18px 20px; border-radius: 18px; }
.mine-section + .mine-section { margin-top: 18px; }
.mine-section h3 { margin: 0 0 14px; }
.mine-editor .mc-item { padding: 14px 16px; margin: 0 0 12px; border: 1px solid #eadfc8; border-radius: 14px; background: #fff; }
.mine-editor .mc-item:last-child { margin-bottom: 0; }
.mine-editor .mc-item > :first-child { margin-bottom: 10px; }
.mine-editor .mc-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.mine-editor .mc-line input, .mine-editor input[type="text"], .mine-editor input[type="url"] { min-height: 44px; padding: 10px 14px; }
.mine-editor .card-chips { gap: 8px; }
.mine-editor .card-chips button { min-height: 36px; padding: 6px 14px; }
.mine-editor :is(.mc-photo-btns, .mc-pic) button { min-height: 38px; padding: 6px 14px; }
.mine-editor .mc-photo { padding: 14px 16px; }
.mine-facts { row-gap: 14px; }

/* 2026-12-04 Fable 2차 검수 */
#profile { z-index: 25; }
body:has(:is(#profile, #fortune):not([hidden])) #popup-bar { opacity: 0; pointer-events: none; }
body:has(:is(.plaza-panel, #popup-card, #fortune, #profile, #cards, #blind, #board, #booth, #cal-panel, #tp-menu):not([hidden])) #meet-guide { opacity: 0; pointer-events: none; }
#meet-guide { bottom: 150px; }
#booth-edit-btn { min-height: 38px; padding: 6px 16px; border: 2px solid #0f7f76; border-radius: 999px; background: #fff; color: #0f7f76; font: inherit; font-size: 15px; cursor: pointer; }
#booth-edit-btn:hover { background: #eef8f6; }
.mine-savebar { bottom: -18px; }
.mine-editor input[type="checkbox"] { width: 20px; height: 20px; accent-color: #0f7f76; flex: none; }
.mine-editor .mc-item > :first-child { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mine-inline { min-height: 28px; padding: 2px 12px; margin-left: 6px; border: 1.5px solid #0f7f76; border-radius: 999px; background: #fff; color: #0f7f76; font: inherit; font-size: 13px; cursor: pointer; }
.mine-fact { padding: 8px 2px; }

/* 2026-12-04 사용자: 요약 칸 행이 비틀어짐 -> 모든 칸 같은 높이, 값 줄은 가운데 정렬 */
.mine-facts { grid-auto-rows: 1fr; row-gap: 0; column-gap: 24px; }
.mine-fact { display: grid; grid-template-rows: auto 1fr; align-content: start; gap: 6px; min-height: 68px; padding: 10px 2px; box-sizing: border-box; }
.mine-fact dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 30px; font-size: 14px; }
.mine-fact dd .mine-empty { display: inline-flex; align-items: center; gap: 6px; }
.mine-fact dd .mine-inline { margin-left: 0; }
.mine-fact:last-child { grid-column: 1 / -1; }

/* 2026-12-04 사용자: 대표작 재생목록 = 원본 영상 썸네일 */
.booth-stream-playlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; overflow: visible; padding: 4px 0 2px; }
.booth-stream-card { display: flex; flex-direction: column; align-items: stretch; gap: 6px; max-width: none; min-height: 0; padding: 6px; border-radius: 14px; background: #fff; transition: transform .15s, box-shadow .15s; }
.booth-stream-card:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(60,40,20,.15); }
.booth-stream-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #1d1a17; }
.booth-stream-thumb :is(video, img) { width: 100%; height: 100%; object-fit: cover; display: block; }
.booth-stream-thumb-empty { display: grid; place-items: center; width: 100%; height: 100%; color: #cdbfa8; font-size: 13px; }
.booth-stream-card .booth-stream-label { padding: 0 4px 2px; font-size: 14px; }
.booth-stream-card[aria-current='true'] { border-color: #0f7f76; box-shadow: 0 0 0 2px #0f7f76 inset; background: #eef8f6; }

/* 2026-12-04 블라인드 갤러리 원본 영상 */
.blind-media { position: relative; display: grid; place-items: center; width: 100%; min-height: 260px; max-height: min(62vh, 640px); overflow: hidden; border-radius: 6px; background: #14110e; }
.blind-media :is(video, img) { display: block; width: 100%; height: 100%; max-height: min(62vh, 640px); object-fit: contain; }

/* 2026-12-04 사용자: 작품 보기 영상이 너무 작다 -> 원본 영상이 걸리면 창을 넓히고 영상을 화면 높이에 맞춤 */
@media (min-width: 900px) {
  #blind:has(.blind-media) { width: min(720px, calc(100vw - 48px)); max-height: calc(100dvh - 110px); }
  #blind:has(.blind-media) .blind-wall { padding: 14px 10px 4px; }
  #blind:has(.blind-media) .blind-frame { padding: 8px; }
  #blind:has(.blind-media) .blind-mat { padding: 6px; }
  .blind-media { min-height: 0; height: min(46vh, 420px); max-height: none; }
  .blind-media :is(video, img) { max-height: none; height: 100%; }
}

/* 2026-12-04 작품 보기: 원본 비율 그대로(잘림·검은 띠 없음). 높이는 화면 46%(최대 420px) 안에서 */
.blind-media { --ar: 1.7778; --maxh: min(46vh, 420px); height: auto !important; min-height: 0 !important; max-height: none !important; aspect-ratio: var(--ar); width: min(100%, calc(var(--maxh) * var(--ar))); margin: 0 auto; background: transparent; }
.blind-media :is(video, img) { width: 100% !important; height: 100% !important; max-height: none !important; object-fit: contain; background: #14110e; }
@media (min-width: 900px) { .blind-media { height: auto !important; } }

/* 2026-12-04 블라인드 '내 작품' 통계 상자: 여백 넉넉하게, 나만 보여요 표시 */
.blind-mine { margin: 12px 0 0; padding: 14px 18px; border-radius: 16px; background: #fffdf6; border: 1px solid #eadfc8; font-size: 14px; line-height: 1.5; }
.blind-mine .bm-title { font-family: var(--title-font, Jua); font-weight: 400; font-size: 16px; color: #0f7f76; margin-right: 8px; }
.blind-mine .bm-only { display: inline-block; padding: 1px 10px; border-radius: 999px; background: #f3ead6; color: #7a6650; font-size: 12px; }
.blind-mine .bm-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.blind-mine .bm-stat { display: grid; gap: 2px; padding: 8px 10px; border-radius: 12px; background: #fff; border: 1px solid #f0e6d2; text-align: center; }
.blind-mine .bm-stat span { color: #7a6650; font-size: 12px; }
.blind-mine .bm-stat b { color: #4a3a2c; font-size: 16px; font-weight: 400; font-family: var(--title-font, Jua); }
@media (max-width: 700px) { .blind-mine .bm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* 2026-12-04 게시판 탭: 광장 게시판 / 버그·원하는 기능 */
#board-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 12px 12px; min-width: 0; }
#board-tabs button { min-height: 40px; border: 2px solid #0f7f76; border-radius: 999px; background: #fff; color: #0f7f76; font: inherit; font-size: 15px; cursor: pointer; }
#board-tabs button[aria-selected="true"] { background: #0f7f76; color: #fff; }
#board:not([data-cat="feedback"]) #posts .post[data-cat="feedback"] { display: none; }
#board[data-cat="feedback"] #posts .post:not([data-cat="feedback"]) { display: none; }

/* 2026-12-04 음량 조절 (배경음악·효과음 따로) */
.vol-box { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 249, 235, 0.92); color: #4a3a2c; font-size: 13px; }
.vol-row { display: grid; grid-template-columns: 56px 1fr 26px; align-items: center; gap: 8px; }
.vol-row input[type=range] { width: 100%; accent-color: #1f7a63; }
.vol-num { text-align: right; font-variant-numeric: tabular-nums; color: #6b5a48; }
#vol-float { position: fixed; left: 16px; bottom: 16px; z-index: 30; width: 220px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22); border-radius: 14px; }
#vol-float[hidden] { display: none; }
#menu-pop .vol-box { background: transparent; padding: 4px 2px; }
#board[data-cat="feedback"] #posts:not(:has(.post[data-cat="feedback"]))::before { content: '아직 글이 없어요. 불편한 점이나 있었으면 하는 기능을 남겨 주세요.'; display: block; padding: 24px 12px; text-align: center; color: #6b5a48; }

/* 2026-12-04 부스 응원하기 */
#booth-cheer { margin: 0 0 10px; min-height: 38px; padding: 0 18px; border: 2px solid #d9506a; border-radius: 999px; background: #fff; color: #d9506a; font: inherit; font-size: 15px; cursor: pointer; }
#booth-cheer.on { background: #d9506a; color: #fff; }
#booth-cheer:disabled { cursor: default; opacity: 0.85; }
/* 2026-12-04 채팅창이 작다는 의견(xbrush): 기본(중간)을 키움 */
@media (min-width: 701px) {
  #chat:not(.big):not(.folded) { height: min(400px, 48vh); }
}

/* 2026-12-04 크게 보기: 원본 영상·이미지 */
.th-big-mediabox { width: auto !important; height: auto !important; max-width: min(92vw, 1200px); }
.th-big-media { display: block; max-width: min(92vw, 1200px); max-height: 80vh; margin: 0 auto; background: #000; border-radius: 12px; }

/* 2026-12-04 내 카드 수정하기 버튼 (내 프로필·메뉴) */
#profile-edit { min-height: 46px; border: 0; border-radius: 999px; background: #e8a33d; color: #3b2508; font: inherit; font-size: 16px; cursor: pointer; }
#profile-edit[hidden] { display: none; }
#menu-mycard { background: #e8a33d !important; color: #3b2508 !important; }

/* 2026-12-04: 화면이 낮으면 프로필 창이 꽉 차면서 임베드 칸이 2px로 눌렸다. 줄어들지 않게 하고 창 안에서 스크롤 */
#profile > * { flex-shrink: 0; }


/* 2026-12-04 말풍선 영상 재생 */
.label .bubble.media { max-width: 252px; padding: 6px; pointer-events: auto; position: relative; }
.label .bubble.media .bubble-text { padding: 2px 6px 6px; font-size: 14px; }
.label .bubble .bubble-media { display: block; width: 240px; max-height: 300px; border: 0; border-radius: 12px; background: #000; object-fit: contain; }
.label .bubble iframe.bubble-media { height: 135px; }
.label .bubble iframe.bubble-embed { height: 300px; background: #fff; }
.label .bubble .bubble-x { position: absolute; top: -10px; right: -10px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: #4a3a2c; color: #fff; font-size: 16px; line-height: 26px; cursor: pointer; }

/* 2026-12-04 펀치 힘 게이지 */
#punch-gauge { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 40; width: min(520px, 86vw); padding: 14px 18px 12px; border-radius: 20px; background: rgba(40, 18, 24, 0.9); color: #fff7e0; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.35); cursor: pointer; user-select: none; }
#punch-gauge .pg-title { font-size: 18px; margin-bottom: 10px; }
#punch-gauge .pg-bar { position: relative; height: 26px; border-radius: 999px; background: linear-gradient(90deg, #4a5468, #c8283a 60%, #ffd23f); overflow: hidden; }
#punch-gauge .pg-sweet { position: absolute; top: 0; bottom: 0; left: 81%; width: 10%; background: #2fbf71; box-shadow: 0 0 12px #2fbf71; }
#punch-gauge .pg-needle { position: absolute; top: -4px; bottom: -4px; width: 6px; margin-left: -3px; border-radius: 3px; background: #fff; box-shadow: 0 0 8px #fff; }
#punch-gauge .pg-msg { margin-top: 8px; font-size: 14px; opacity: .9; }
#punch-gauge.done .pg-msg { font-size: 18px; color: #ffd23f; opacity: 1; }
#punch-gauge .pg-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; transition: width 60ms linear; }
#punch-gauge .pg-bar { background: #2a1a20 !important; box-shadow: inset 0 0 0 2px rgba(255,255,255,.15); }
#punch-gauge .pg-num { display: inline-block; min-width: 2.6em; color: #ffd23f; }

/* 2026-12-04 주 버튼: 내 카드 꾸미기 (눈에 띄게) */
#dock .dock-mycard { color: #b4631a; }
#dock .dock-mycard .dk-ico { background: #ffe7b8; border-radius: 10px; }

/* 2026-12-04 나가기 전 설문 */
#survey { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 45; width: min(560px, 92vw); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 22px 24px 18px; border-radius: 24px; background: #fffaf0; color: #4a3a2c; box-shadow: 0 16px 40px rgba(0,0,0,.3); }
#survey h2 { margin: 0 0 4px; font-size: 22px; }
#survey .sv-lead { margin: 0 0 12px; font-size: 14px; color: #7a6a58; }
#survey .sv-q { margin: 0 0 14px; }
#survey .sv-q h3 { margin: 0 0 8px; font-size: 15px; font-weight: 400; color: #0f7f76; }
#survey .sv-opts { display: flex; flex-wrap: wrap; gap: 6px; }
#survey .sv-opt { min-height: 36px; padding: 0 14px; border: 2px solid #d9cdb8; border-radius: 999px; background: #fff; color: #4a3a2c; font: inherit; font-size: 14px; cursor: pointer; }
#survey .sv-opt.on { border-color: #0f7f76; background: #0f7f76; color: #fff; }
#survey .sv-wish { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 2px solid #d9cdb8; border-radius: 14px; font: inherit; font-size: 14px; resize: vertical; }
#survey .sv-status { min-height: 1.2em; margin: 0 0 8px; color: #0f7f76; font-size: 14px; }
#survey .sv-acts { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
#survey .sv-acts button { min-height: 46px; border-radius: 999px; font: inherit; font-size: 16px; cursor: pointer; }
#survey .sv-later { border: 2px solid #0f7f76; background: #fff; color: #0f7f76; }
#survey .sv-send { border: 0; background: #0f7f76; color: #fff; }

/* 4인 펀치 대결 (2026-12-05) */
#punch-gauge.p4-count .p4-big { font-size: 64px; line-height: 1; text-align: center; color: #c8283a; }
#p4-result { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); z-index: 60; min-width: 300px; padding: 16px 22px; border-radius: 18px; background: #fffaf0; border: 3px solid #f2c230; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-family: Jua, sans-serif; animation: p4pop .35s ease-out; }
#p4-result .p4r-title { font-size: 22px; color: #c8283a; text-align: center; margin-bottom: 8px; }
#p4-result .p4r-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 8px; align-items: center; font-size: 18px; padding: 4px 6px; border-radius: 10px; }
#p4-result .p4r-row:first-of-type { background: #fff1b8; font-size: 21px; }
#p4-result .p4r-row.me { outline: 2px solid #1f8f84; }
#p4-result .p4r-row em { font-style: normal; color: #c8283a; }
@keyframes p4pop { from { transform: translateX(-50%) scale(.7); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }

/* 네컷 결과: 자동 업로드 아님 안내 (2026-12-05) */
#photo-note { margin: 6px 0 0; font-size: 12px; color: #7a6a58; text-align: center; }

#plaza-photo-gallery{position:fixed;inset:8% 12%;z-index:150;overflow:auto;background:#fff5df;color:#342324;padding:24px;border-radius:18px}#plaza-photo-gallery[hidden],#gallery-near[hidden]{display:none}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px}.gallery-grid img{width:100%;display:block}.gallery-large img{display:block;max-width:100%;max-height:65vh;margin:auto}.gallery-large{margin-top:20px}#plaza-photo-gallery button{margin:4px;padding:8px 12px}#gallery-near{position:fixed;bottom:22%;left:50%;transform:translateX(-50%);z-index:30;padding:12px;background:#fff0ce;color:#44262b;border:2px solid #ba914c;border-radius:12px}.post-pin-badge{color:#9a4826;font-weight:bold}[data-pin="true"]{border-left:3px solid #bf934b}@media(max-width:600px){#plaza-photo-gallery{inset:5% 3%;padding:14px}}

/* ---------- 2026-12-05 커피챗·사진관 (98 검수 반영) ---------- */
/* 글자 4단계: 22 / 17 / 15 / 13. 굵기는 전부 400 (Jua 는 굵기 하나) */

/* ===== 커피챗 ===== */
#coffee-panel { position: fixed; right: 206px; top: 84px; z-index: 6; width: min(340px, calc(100vw - 32px)); max-height: calc(100dvh - 188px); display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 24px; background: rgba(255, 249, 230, 0.98); color: var(--ink); box-shadow: 0 6px 0 rgba(90, 70, 50, 0.16); font-family: var(--body-font); font-size: 15px; font-weight: 400; }
#coffee-panel[hidden] { display: none; }
@media (max-width: 1100px) { #coffee-panel { right: 16px; top: 150px; max-height: calc(100dvh - 254px); } }
#coffee-panel > * { flex-shrink: 0; }
#coffee-panel :is(b, h2, button, small, p, span, a) { font-weight: 400; }
#coffee-panel button { margin: 0; font-family: var(--title-font); cursor: pointer; }

#coffee-panel .cf-head { display: flex; align-items: center; gap: 12px; }
#coffee-panel .cf-cup, #coffee-panel .cf-ava { display: none; }
#coffee-panel .cf-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#coffee-panel .cf-titles :is(b, h2) { margin: 0; font-family: var(--title-font); font-size: 22px; line-height: 1.2; color: var(--ink); }
#coffee-panel .cf-sub { color: var(--ink-soft); font-size: 13px; line-height: 1.3; }

/* 줄 안의 작은 알약: 보이는 높이 36px, 누르는 영역 44px */
#coffee-panel :is(.cf-leave, .cf-swap, .cf-link) { position: relative; flex: none; display: inline-flex; align-items: center; min-height: 36px; font-size: 13px; white-space: nowrap; }
#coffee-panel :is(.cf-leave, .cf-swap, .cf-link)::after { content: ''; position: absolute; inset: -4px 0; }
#coffee-panel .cf-leave { padding: 0 14px; border: 1.5px solid var(--field-line); border-radius: 999px; background: transparent; color: var(--ink); }
#coffee-panel .cf-leave:hover { background: rgba(90, 70, 50, 0.08); }
#coffee-panel .cf-swap { padding: 0 14px; border: 2px solid #0f7f76; border-radius: 999px; background: #fff; color: #0f7f76; }
#coffee-panel .cf-swap:hover, #coffee-panel .cf-qbtn:hover { background: #eef7f5; }
#coffee-panel .cf-link { padding: 0 4px; color: #0f7f76; font-family: var(--title-font); text-decoration: none; }
#coffee-panel .cf-link:hover { text-decoration: underline; text-underline-offset: 3px; }

#coffee-panel .cf-peers { display: flex; flex-direction: column; gap: 4px; padding-top: 0; border-top: 0; }
#coffee-panel .cf-label { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.4; }
#coffee-panel .cf-peer { display: flex; align-items: center; gap: 8px; min-height: 44px; }
#coffee-panel .cf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--title-font); font-size: 15px; }

#coffee-panel .cf-msgs { flex: 1 1 190px; min-height: 120px; height: auto; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(90, 70, 50, 0.3) transparent; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; background: #fffdf7; box-shadow: inset 0 0 0 1px var(--line); }
#coffee-panel .cf-empty { margin: auto; color: var(--ink-soft); font-size: 15px; line-height: 1.5; text-align: center; text-wrap: balance; }
#coffee-panel .cf-m { align-self: flex-start; max-width: 85%; display: flex; flex-direction: column; gap: 2px; }
#coffee-panel .cf-m small { padding-left: 4px; color: var(--ink-soft); font-size: 13px; }
#coffee-panel .cf-m span { padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: #fff; color: var(--field-ink); box-shadow: 0 1px 0 rgba(90, 70, 50, 0.14); font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
#coffee-panel .cf-m.me { align-self: flex-end; }
#coffee-panel .cf-m.me span { border-radius: 14px 14px 4px 14px; background: #d8ebe8; color: var(--field-ink); }

#coffee-panel .cf-card { align-self: stretch; width: auto; margin: 4px 0; padding: 12px 14px; border: 1.5px solid #e8c77a; border-radius: 12px; background: #fff4dc; box-shadow: none; text-align: center; }
#coffee-panel .cf-card small { display: block; color: #8a5a12; font-family: var(--title-font); font-size: 13px; letter-spacing: 0; }
#coffee-panel .cf-card p { margin: 4px 0 0; color: var(--ink); font-family: var(--title-font); font-size: 17px; line-height: 1.4; text-wrap: balance; }

#coffee-panel .cf-qbtn { min-height: 44px; padding: 0 16px; border: 2px solid #0f7f76; border-radius: 999px; background: #fff; color: #0f7f76; font-size: 15px; }
#coffee-panel .cf-form { display: flex; gap: 8px; }
#coffee-panel .cf-form input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border: 1.5px solid var(--field-line); border-radius: 999px; background: var(--field-bg); color: var(--field-ink); font-family: var(--body-font); font-size: 15px; outline: none; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
#coffee-panel .cf-form input::placeholder { color: #7d6a52; opacity: 1; }
#coffee-panel .cf-form input:focus { border-color: var(--field-focus); background: #fff; box-shadow: 0 0 0 3px rgba(15, 127, 118, 0.18); }
#coffee-panel .cf-send { flex: none; height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: #0f7f76; color: #fff; font-size: 15px; }
#coffee-panel .cf-send:hover { filter: brightness(1.06); }
#coffee-panel button:active { translate: 0 1px; }

/* ===== 광장 사진관 창 ===== */
#plaza-photo-gallery { position: fixed; inset: 16px 0 104px; left: 0; top: 16px; margin: auto; transform: none; z-index: 150; width: min(760px, calc(100vw - 32px)); height: fit-content; max-height: calc(100dvh - 120px); overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 24px; border-radius: 24px; background: rgba(255, 249, 230, 0.98); color: var(--ink); box-shadow: 0 6px 0 rgba(90, 70, 50, 0.16); font-family: var(--body-font); font-size: 15px; }
#plaza-photo-gallery[hidden] { display: none; }
#plaza-photo-gallery > * { flex-shrink: 0; }
#plaza-photo-gallery button { font-family: var(--title-font); font-weight: 400; cursor: pointer; }
#plaza-photo-gallery h2 { margin: 0; padding-right: 44px; align-self: stretch; font-family: var(--title-font); font-weight: 400; font-size: 22px; line-height: 24px; color: var(--ink); }
#plaza-photo-gallery > button:first-of-type { position: absolute; top: 12px; right: 10px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 0; }
#plaza-photo-gallery > button:first-of-type::after { content: '×'; font-size: 24px; line-height: 1; color: var(--ink); }
#plaza-photo-gallery > button.gallery-close { font-size: 24px; line-height: 1; }
#plaza-photo-gallery > button.gallery-close::after { content: none; }
#plaza-photo-gallery > button:first-of-type:hover { background: rgba(90, 70, 50, 0.08); }

#plaza-photo-gallery nav { display: flex; flex-wrap: wrap; gap: 8px; }
#plaza-photo-gallery nav:has(> button:only-child) { display: none; }
#plaza-photo-gallery nav button { min-height: 44px; padding: 0 18px; border: 2px solid #0f7f76; border-radius: 999px; background: #fff; color: #0f7f76; font-size: 15px; }
#plaza-photo-gallery nav button:hover { background: #eef7f5; }
#plaza-photo-gallery nav button[aria-pressed="true"] { background: #0f7f76; color: #fff; }

#plaza-photo-gallery .gallery-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(90, 70, 50, 0.3) transparent; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin: 0 -4px; padding: 4px 4px 8px; }
#plaza-photo-gallery .gallery-grid > button { display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 10px; border: 0; border-radius: 6px; background: #fff; box-shadow: 0 3px 0 rgba(90, 70, 50, 0.14); transform: rotate(-0.6deg); transition: transform 0.15s; }
#plaza-photo-gallery .gallery-grid > button:nth-child(even) { transform: rotate(0.6deg); }
#plaza-photo-gallery .gallery-grid > button:hover { transform: rotate(0deg) translateY(-3px); }
#plaza-photo-gallery .gallery-grid img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: rgba(90, 70, 50, 0.07); }
#plaza-photo-gallery .gallery-grid > button small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); font-family: var(--title-font); font-size: 13px; text-align: center; }
#plaza-photo-gallery .gallery-grid > p { grid-column: 1 / -1; margin: 0; padding: 32px 0; color: var(--ink-soft); font-size: 15px; line-height: 1.6; text-align: center; text-wrap: balance; }

/* ===== 크게 보기: 어두운 덮개 없이 창 안에서 2단 (왼쪽 사진, 오른쪽 이름과 버튼) ===== */
#plaza-photo-gallery:has(.gallery-large:not(:empty)) :is(nav, .gallery-grid) { display: none; }
#plaza-photo-gallery:has(.gallery-large:not(:empty)) { min-height: 0; }
#plaza-photo-gallery .gallery-large:empty { display: none; }
#plaza-photo-gallery .gallery-large:not(:empty) { position: static; inset: auto; z-index: auto; flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: auto minmax(200px, 1fr); grid-template-rows: 1fr auto; gap: 16px 24px; align-items: start; justify-content: stretch; padding: 0; border-radius: 0; background: none; }
#plaza-photo-gallery .gallery-large img { grid-column: 1; grid-row: 1 / 3; display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 226px); aspect-ratio: 4 / 5; object-fit: contain; border-radius: 6px; background: rgba(90, 70, 50, 0.07); box-shadow: 0 3px 0 rgba(90, 70, 50, 0.14); }
#plaza-photo-gallery .gallery-who { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; gap: 6px; min-width: 0; }
#plaza-photo-gallery .gallery-who span { padding: 0; border-radius: 0; background: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-family: var(--title-font); font-size: 17px; line-height: 1.4; }
#plaza-photo-gallery .gallery-acts { grid-column: 2; grid-row: 2; align-self: end; display: flex; flex-direction: column; gap: 8px; }
#plaza-photo-gallery .gallery-acts button { min-height: 46px; padding: 0 18px; border-radius: 999px; font-size: 15px; }
#plaza-photo-gallery .gallery-acts .gallery-save { border: 0; background: #0f7f76; color: #fff; }
#plaza-photo-gallery .gallery-acts .gallery-save:hover { filter: brightness(1.06); }
#plaza-photo-gallery .gallery-acts .gallery-back { border: 2px solid #0f7f76; background: #fff; color: #0f7f76; }
#plaza-photo-gallery .gallery-acts .gallery-back:hover { background: #eef7f5; }
#plaza-photo-gallery .gallery-acts .gallery-hide { min-height: 44px; border: 0; background: none; color: #a8232c; }
#plaza-photo-gallery .gallery-acts .gallery-hide:hover { background: rgba(168, 35, 44, 0.08); }
#plaza-photo-gallery button:active { translate: 0 1px; }
@media (max-width: 640px) {
  #plaza-photo-gallery { padding: 18px 16px 16px; }
  #plaza-photo-gallery .gallery-large:not(:empty) { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; justify-items: center; overflow-y: auto; }
  #plaza-photo-gallery .gallery-large img { grid-row: auto; max-height: 46dvh; }
  #plaza-photo-gallery .gallery-who, #plaza-photo-gallery .gallery-acts { grid-column: 1; grid-row: auto; justify-self: stretch; }
  #plaza-photo-gallery .gallery-who { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
}

/* ===== 벽 앞 버튼: #near-act 와 같은 모양 ===== */
#gallery-near { position: fixed; left: 50%; bottom: 84px; z-index: 6; transform: translateX(-50%); min-height: 48px; padding: 10px 24px; border: 0; border-radius: 999px; background: #0f7f76; color: #fff; font-family: var(--title-font); font-weight: 400; font-size: 17px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22); cursor: pointer; }
#gallery-near[hidden] { display: none; }
#gallery-near:hover { filter: brightness(1.06); }
@media (max-width: 720px) { #gallery-near { bottom: calc(130px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); } }

/* ===== 겹침 처리 (92 검수 5번과 같은 방식) ===== */
body:has(#plaza-photo-gallery:not([hidden])) #gallery-near { display: none; }
body:has(:is(.plaza-panel, #profile, #cards, #booth, #blind, #board, #cal-panel, #fortune):not([hidden])) #coffee-panel { opacity: 0; pointer-events: none; }
/* 아래 한 줄만 세 선택자 범위 밖(#chat, #popup-bar)을 건드린다. 사진관 창이 채팅과 상단 바를 반만 가리는 것을 막는다 */
body:has(#plaza-photo-gallery:not([hidden])) :is(#chat, #popup-bar) { opacity: 0; pointer-events: none; }

/* 2026-12-05 자유 카메라(운영자 녹화용): 화면 위 UI를 숨기고 이름표·말풍선만 남긴다 */
body.freecam :is(#meet-guide, #booth-guide, #dock, #chat, #online, #emotes, #popup-bar, #menu-btn, #menu-pop, #react-btn, #near-act, #near-act2, #gallery-near, #coffee-panel, #stamp-toast, #dm-toast, #topic-pill, #cardimg-chip) { display: none !important; }

/* ---------- 2026-12-05 오늘 변경분 (99 검수 반영) ---------- */

/* ===== 네컷 안내 (1, 15번) ===== */
#photo .photo-actions { flex-wrap: wrap; justify-content: center; align-items: center; }
#photo .photo-actions :is(a, button) { min-height: 44px; display: inline-flex; align-items: center; box-sizing: border-box; }
#photo #photo-note { order: -1; flex: 0 0 100%; margin: 0; color: #e9e6f5; font-size: 13px; line-height: 18px; text-align: center; }
#photo:not(.deco) #photo-note { display: none; }
@media (min-width: 721px) {
  #photo.deco { padding-bottom: 96px; }
  #photo.deco #photo-img { max-height: calc(100dvh - 128px); }
  #photo.deco .photo-actions { bottom: 10px; width: max-content; max-width: calc(100vw - 32px); }
}

/* ===== 힘 게이지·카운트다운 (5, 8, 14번) ===== */
#punch-gauge { padding: 16px 20px; border-radius: 24px; background: rgba(255, 249, 230, 0.98); color: var(--ink); box-shadow: 0 6px 0 rgba(90, 70, 50, 0.16); font-family: var(--title-font); font-weight: 400; }
#punch-gauge .pg-title { margin-bottom: 12px; font-size: 17px; }
#punch-gauge .pg-num { color: #c8283a; }
#punch-gauge .pg-bar { background: #eadfc8 !important; box-shadow: inset 0 0 0 1.5px rgba(90, 70, 50, 0.22); }
#punch-gauge .pg-msg { margin-top: 8px; color: var(--ink-soft); font-size: 15px; opacity: 1; }
#punch-gauge.done .pg-msg { color: #c8283a; font-size: 17px; }
#punch-gauge.p4-count .pg-title { margin-bottom: 4px; }
#punch-gauge.p4-count .p4-big { color: #c8283a; }

/* ===== 4인 펀치 결과 (6, 7, 14번) ===== */
#p4-result { top: 140px; min-width: 320px; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 20px; border: 0; border-radius: 24px; background: rgba(255, 249, 230, 0.98); color: var(--ink); box-shadow: 0 6px 0 rgba(90, 70, 50, 0.16); font-family: var(--title-font); font-weight: 400; }
#p4-result :is(b, em, span) { font-weight: 400; }
#p4-result .p4r-title { margin-bottom: 12px; color: var(--ink); font-size: 22px; line-height: 1.2; }
#p4-result .p4r-row { grid-template-columns: 44px 1fr auto; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; font-size: 17px; }
#p4-result .p4r-row:first-of-type { background: none; font-size: 17px; }
#p4-result .p4r-title + .p4r-row { background: #fff1b8; }
#p4-result .p4r-row.me { outline: 0; }
#p4-result .p4r-row.me span { color: #0f7f76; }
#p4-result .p4r-row em { color: #c8283a; }
/* 혼자 했을 때: 등수 칸과 강조를 뺀다 */
#p4-result .p4r-row:nth-child(2):last-child { grid-template-columns: 1fr auto; background: none; padding: 0 4px; }
#p4-result .p4r-row:nth-child(2):last-child b { display: none; }

/* ===== 응원 버튼 (11번) ===== */
#booth-cheer { min-width: 184px; min-height: 44px; border-color: #c62f37; color: #c62f37; }
#booth-cheer.on { background: #c62f37; color: #fff; }
#booth-cheer[data-armed] { background: #fff; color: #c62f37; }
#booth-cheer:not(:disabled):hover { filter: brightness(1.06); }

/* ===== 주제 인트로 (12번) ===== */
#topic-intro { background: rgba(6, 5, 16, 0.86); }

/* ===== 겹침 처리 (3, 5, 7번) ===== */
body:has(#punch-gauge) :is(#meet-guide, #booth-guide) { opacity: 0; pointer-events: none; }
body:has(#p4-result) .label.sign.plot-label,
body:has(#stamp-toast:not([hidden])) .label.sign.plot-label { visibility: hidden !important; }

/* 99 검수 16·21번 */
#profile-badge { font-size: 13px; }
body.freecam :is(#punch-gauge, #p4-result, #survey) { display: none !important; }
