/* 숲속 쉼터 — AI 정원과 같은 색(크림·버건디·머스터드)과 둥근 카드, 밤에도 읽히는 반투명 판 */
:root {
  --bg: #F9F5EF;
  --ink: #3F393D;
  --ink2: #756D72;
  --burgundy: #8E4A60;
  --burgundy-d: #74394D;
  --mustard: #D7BC68;
  --glass: rgba(33, 29, 38, .58);
  --glass-line: rgba(255, 255, 255, .14);
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --hand: 'Gaegu', 'Pretendard Variable', 'Apple SD Gothic Neo', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #2b2733; color: #fff; font-family: var(--font); -webkit-font-smoothing: antialiased; word-break: keep-all; overscroll-behavior: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.stage { position: fixed; inset: 0; touch-action: none; }
.stage canvas { display: block; width: 100%; height: 100%; outline: none; }

/* 로딩 */
.loading { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, #4a3a3f 0%, #241f2b 70%); z-index: 50; transition: opacity .5s; }
.loading.done { opacity: 0; pointer-events: none; }
.loading-card { text-align: center; padding: 24px; }
.loading .brand { font-family: var(--hand); font-size: 44px; font-weight: 700; color: #ffe2ad; text-shadow: 0 0 24px rgba(255, 170, 80, .55); }
.loading .sub { margin-top: 6px; color: rgba(255, 255, 255, .78); }
.loading .bar { width: min(260px, 70vw); height: 6px; margin: 18px auto 0; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.loading .bar i { display: block; height: 100%; width: 4%; background: linear-gradient(90deg, #e9a25b, #ffd98a); border-radius: inherit; transition: width .3s; }
.loading .need { margin-top: 18px; display: grid; gap: 10px; justify-items: center; }
.loading .need a { display: inline-block; padding: 11px 18px; border-radius: 14px; background: var(--burgundy); color: #fff; text-decoration: none; font-weight: 700; }

/* 화면 위 판 */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.hud > * { pointer-events: auto; }
.top-left { position: absolute; left: max(14px, env(safe-area-inset-left)); top: max(12px, env(safe-area-inset-top)); display: grid; gap: 8px; justify-items: start; max-width: min(360px, calc(100vw - 150px)); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--glass); border: 1px solid var(--glass-line); color: #fff; font-size: 13px; text-decoration: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.chip:hover { background: rgba(33, 29, 38, .75); }
.chip[aria-pressed="true"] { background: rgba(142, 74, 96, .85); }
.place { padding: 8px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); line-height: 1.35; }
.place b { display: block; font-family: var(--hand); font-size: 22px; color: #ffe2ad; }
.place span { font-size: 12.5px; color: rgba(255, 255, 255, .8); }
.row { display: flex; flex-wrap: wrap; gap: 6px; }

.minimap { position: absolute; right: max(14px, env(safe-area-inset-right)); top: max(12px, env(safe-area-inset-top)); width: 140px; height: 140px; border-radius: 50%; border: 2px solid rgba(255, 226, 173, .55); box-shadow: 0 4px 18px rgba(0, 0, 0, .35); background: rgba(33, 29, 38, .5); }

.prompt { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); padding: 8px 14px; border-radius: 99px; background: rgba(33, 29, 38, .72); border: 1px solid var(--glass-line); font-size: 14.5px; white-space: nowrap; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.prompt kbd, .hotbar kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-right: 6px; padding: 0 5px; border-radius: 6px; background: #fff; color: var(--ink); font: 700 12px var(--font); }

.hotbar { position: absolute; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 5px; padding: 6px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hotbar button { display: inline-flex; align-items: center; gap: 4px; padding: 7px 10px; border: 1px solid transparent; border-radius: 11px; background: rgba(255, 255, 255, .08); font-size: 13px; white-space: nowrap; }
.hotbar button:hover { background: rgba(255, 255, 255, .18); }
.hotbar button[aria-pressed="true"] { background: rgba(255, 217, 138, .22); border-color: rgba(255, 217, 138, .85); }
.hotbar .ico { width: 20px; height: 20px; flex: none; }
.hotbar .sep { width: 1px; height: 24px; background: rgba(255, 255, 255, .18); margin: 0 2px; }
.prompt span { display: inline-flex; align-items: center; }
.prompt span + span { margin-left: 14px; }
.roast { position: absolute; left: 50%; bottom: 196px; transform: translateX(-50%); display: grid; justify-items: center; gap: 4px; padding: 8px 12px; border-radius: 14px; background: rgba(33, 29, 38, .7); border: 1px solid var(--glass-line); font-size: 13px; pointer-events: none; }
.roast-bar { position: relative; width: 190px; height: 8px; border-radius: 99px; background: linear-gradient(90deg, #fffaf2 0%, #f3d49a 34%, #e2a64e 52%, #d99a45 63%, #8a5a2b 78%, #2b2220 92%); }
.roast-bar i { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 1.5px #3F393D; }

.chat { position: absolute; left: max(14px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); width: min(360px, 32vw); display: grid; gap: 6px; }
.chat-log { display: grid; gap: 3px; max-height: 168px; overflow: hidden; align-content: end; font-size: 13.5px; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); pointer-events: none; }
.chat-log div { padding: 2px 8px; border-radius: 8px; background: rgba(20, 18, 24, .38); transition: opacity 1s; overflow-wrap: anywhere; }
.chat-log div.old { opacity: .35; }
.chat-log b { color: #ffd98a; margin-right: 6px; }
.chat-log .sys { color: rgba(255, 255, 255, .72); }
.chat-form input { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--glass-line); background: rgba(33, 29, 38, .62); color: #fff; outline: none; font-size: 14px; }
.chat-form input:focus { border-color: rgba(255, 217, 138, .7); background: rgba(33, 29, 38, .82); }
.chat-form input::placeholder { color: rgba(255, 255, 255, .5); }

/* 휴대폰 조작 */
.touch { display: none; }
.joy { position: absolute; left: max(22px, env(safe-area-inset-left)); bottom: max(26px, env(safe-area-inset-bottom)); width: 124px; height: 124px; border-radius: 50%; background: rgba(33, 29, 38, .4); border: 1px solid var(--glass-line); touch-action: none; }
.joy i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.touch-btns { position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: max(26px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(2, 64px); gap: 10px; }
.touch-btns button { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--glass-line); background: rgba(33, 29, 38, .55); font-weight: 700; font-size: 14px; touch-action: manipulation; }
.touch-btns .act, .touch-btns .use { grid-column: 1 / span 2; justify-self: end; width: auto; min-width: 64px; padding: 0 16px; border-radius: 32px; background: var(--burgundy); font-size: 14px; }
.touch-btns .use { background: #b9802f; }

body.is-touch .touch { display: block; }
body.is-touch .hotbar { bottom: auto; top: calc(max(12px, env(safe-area-inset-top)) + 150px); left: auto; right: max(14px, env(safe-area-inset-right)); transform: none; flex-direction: column; align-items: stretch; }
body.is-touch .hotbar kbd { display: none; }
body.is-touch .hotbar .sep { width: auto; height: 1px; margin: 2px 0; }
body.is-touch .hotbar button { padding: 6px 8px; font-size: 12px; }
body.is-touch .roast { bottom: 230px; }
body.is-touch .chat { bottom: 170px; width: min(300px, 62vw); }
body.is-touch .chat-form { display: none; }
body.is-touch .chat-form.open { display: block; }
body.is-touch .prompt { bottom: 178px; }
body.is-touch .minimap { width: 104px; height: 104px; }
body.is-touch .top-left { max-width: calc(100vw - 130px); }

/* 캐릭터 꾸미기 */
.pick { position: fixed; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); display: grid; justify-items: center; z-index: 20; padding: 0 12px; }
.pick-card { width: min(440px, 100%); max-height: min(56vh, 560px); overflow: auto; padding: 16px; border-radius: 22px; background: rgba(249, 245, 239, .97); color: var(--ink); text-align: center; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.pick-card h2 { margin: 0 0 8px; font-family: var(--hand); font-size: 26px; color: var(--burgundy); }
.pick-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 10px; }
.pick-row button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid #e6dccf; background: #fff; color: var(--ink); font-size: 15px; }
.pick-row span { min-width: 92px; font-weight: 700; }
.opts { display: grid; gap: 9px; margin-bottom: 12px; text-align: left; }
.opt { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 8px; }
.opt b { font-size: 13.5px; color: var(--ink2); }
.sw, .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sw button { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #e0d6c9; font-size: 10.5px; color: var(--ink2); }
.sw button.none { width: auto; min-width: 40px; padding: 0 8px; border-radius: 15px; background: repeating-linear-gradient(135deg, #fff 0 5px, #f1e8dc 5px 10px); }
.sw button[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--burgundy); }
.chips button { padding: 6px 11px; border-radius: 99px; border: 1px solid #e6dccf; background: #fff; font-size: 13px; color: var(--ink); }
.chips button[aria-pressed="true"] { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }
@media (min-width: 900px) {
  .pick { left: auto; right: 28px; top: 50%; bottom: auto; transform: translateY(-50%); padding: 0; }
  .pick-card { width: 400px; max-height: 82vh; }
}
.primary { width: 100%; padding: 12px; border: 0; border-radius: 14px; background: var(--burgundy); color: #fff; font-weight: 700; font-size: 15px; }
.primary:hover { background: var(--burgundy-d); }
.primary:disabled { opacity: .6; cursor: default; }

/* 판(사수·게시판·조작법) */
.panel { width: min(520px, calc(100vw - 24px)); max-height: min(78vh, 680px); padding: 0; border: 0; border-radius: 22px; background: var(--bg); color: var(--ink); box-shadow: 0 16px 50px rgba(0, 0, 0, .45); overflow: hidden; }
.panel::backdrop { background: rgba(20, 16, 24, .45); }
.panel .p-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 10px; }
.panel h3 { margin: 0; font-family: var(--hand); font-size: 26px; color: var(--burgundy); }
.panel .x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #e6dccf; background: #fff; font-size: 16px; }
.panel .p-body { padding: 0 18px 18px; overflow: auto; max-height: calc(min(78vh, 680px) - 66px); display: grid; gap: 12px; font-size: 14.5px; line-height: 1.6; }
.panel .muted { color: var(--ink2); font-size: 13.5px; }
.panel textarea { width: 100%; min-height: 84px; padding: 11px 12px; border-radius: 14px; border: 1px solid #e6dccf; background: #fff; color: var(--ink); resize: vertical; font: inherit; }
.panel .ans { padding: 14px; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(63, 57, 61, .05), 0 6px 22px rgba(63, 57, 61, .07); display: grid; gap: 8px; }
.panel .ans h4 { margin: 0; font-size: 16px; }
.panel .ans ol { margin: 0; padding-left: 20px; }
.panel .tip { padding: 10px 12px; border-radius: 12px; background: #F7EFD7; color: #6b5517; font-size: 13.5px; }
.panel .tag { display: inline-block; padding: 1px 8px; border-radius: 99px; background: #F5E7EC; color: var(--burgundy); font-size: 12px; font-weight: 700; margin-right: 6px; }
.panel .card { padding: 12px 14px; border-radius: 14px; background: #fff; display: grid; gap: 4px; }
.panel .keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; }
.panel .keys kbd { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #fff; border: 1px solid #e6dccf; font: 700 12.5px var(--font); }
.panel a.primary { display: block; text-align: center; text-decoration: none; }

.toasts { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; pointer-events: none; width: min(420px, calc(100vw - 24px)); }
.toasts div { padding: 10px 14px; border-radius: 14px; background: rgba(249, 245, 239, .96); color: var(--ink); font-size: 14px; box-shadow: 0 8px 26px rgba(0, 0, 0, .3); text-align: center; animation: tin .25s ease-out; }
@keyframes tin { from { opacity: 0; transform: translateY(-6px); } }

@media (max-width: 640px) {
  .place b { font-size: 19px; }
  .chip { padding: 5px 10px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .toasts div { animation: none; }
}
/* 꾸미기 창이 길어도 '들어가기' 버튼은 늘 보이게 */
.pick-card .primary { position: sticky; bottom: -16px; box-shadow: 0 -10px 16px rgba(249, 245, 239, .95); }

/* 화상 모임 */
.call-chip.live { background: rgba(142, 74, 96, .85); }
.call-chip.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #7ee08a; box-shadow: 0 0 6px #7ee08a; }
.call { position: absolute; right: max(14px, env(safe-area-inset-right)); top: calc(max(12px, env(safe-area-inset-top)) + 152px); width: 312px; padding: 10px; border-radius: 16px; background: rgba(28, 24, 32, .82); border: 1px solid var(--glass-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; gap: 8px; z-index: 12; }
.call header { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.call header b { font-size: 14px; color: #ffe2ad; }
.call header span { color: rgba(255, 255, 255, .7); flex: 1; }
.call .mini { padding: 4px 9px; border-radius: 99px; border: 1px solid var(--glass-line); background: rgba(255, 255, 255, .08); font-size: 12px; }
.call-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tile { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #3a3340; }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: #2a2530; }
.tile.self video { transform: scaleX(-1); }
.tile .nm { position: absolute; left: 6px; bottom: 5px; padding: 1px 7px; border-radius: 99px; background: rgba(0, 0, 0, .5); font-size: 11.5px; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .face { position: absolute; inset: 0; display: none; place-items: center; font-style: normal; font-family: var(--hand); font-size: 34px; color: #ffe2ad; background: radial-gradient(circle, #5a3a4a, #2a2530); }
.tile.novideo .face { display: grid; }
.tile em { position: absolute; left: 6px; right: 6px; top: 5px; font-style: normal; font-size: 11px; color: #ffd98a; text-shadow: 0 1px 2px #000; }
.call-btns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.call-btns button { padding: 8px; border-radius: 10px; border: 1px solid var(--glass-line); background: rgba(255, 255, 255, .08); font-size: 12.5px; }
.call-btns button[aria-pressed="true"] { background: rgba(255, 255, 255, .22); }
.call-btns .leave { background: #b4524a; border-color: #b4524a; }
.call-note { margin: 0; font-size: 11px; color: rgba(255, 255, 255, .55); line-height: 1.4; }
.call.big { left: 50%; top: 50%; right: auto; width: min(820px, calc(100vw - 32px)); transform: translate(-50%, -50%); z-index: 30; }
.call.big .call-grid { grid-template-columns: repeat(3, 1fr); }
.call.big .call-btns { grid-template-columns: repeat(4, 1fr); }
body.is-touch .call { left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); width: auto; top: calc(max(12px, env(safe-area-inset-top)) + 122px); }
body.is-touch .call .call-btns { grid-template-columns: repeat(4, 1fr); }
body.is-touch .call .call-btns button { font-size: 11.5px; padding: 7px 4px; }

/* 소리 조절 */
.chip.muted { opacity: .75; text-decoration: line-through; }
.sound-panel { position: absolute; left: max(14px, env(safe-area-inset-left)); top: calc(max(12px, env(safe-area-inset-top)) + 150px); width: 240px; padding: 12px; border-radius: 16px; background: rgba(28, 24, 32, .9); border: 1px solid var(--glass-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; gap: 8px; z-index: 15; font-size: 13px; }
.sp-head { display: flex; align-items: center; justify-content: space-between; }
.sp-head b { color: #ffe2ad; font-size: 14px; }
.sp-head button { padding: 5px 11px; border-radius: 99px; border: 1px solid var(--glass-line); background: rgba(255, 255, 255, .1); font-size: 12.5px; }
.sound-panel label { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; }
.sound-panel input[type=range] { width: 100%; accent-color: #d7bc68; }
.sound-panel p { margin: 0; font-size: 11.5px; color: rgba(255, 255, 255, .55); }
body.is-touch .sound-panel p { display: none; }
/* 좁은 PC 창: 채팅을 아이템 칸 위로 올려 겹치지 않게 */
@media (max-width: 1180px) {
  body:not(.is-touch) .chat { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 60px); }
}

.tile.self.screen video { transform: none; }
.call-guide { padding: 10px 12px; border-radius: 12px; background: #F9F5EF; color: #3F393D; font-size: 12.5px; line-height: 1.5; display: grid; gap: 4px; }
.call-guide b { color: #8E4A60; font-size: 13.5px; }
.call-guide p { margin: 0; }
.call-guide button { justify-self: end; margin-top: 2px; padding: 4px 12px; border-radius: 99px; border: 1px solid #e6dccf; background: #fff; color: #3F393D; font-size: 12px; }
.call-btns #call-share, .call-btns #call-blur { grid-column: auto; }

.pick-hint { margin: 0 0 10px; font-size: 12.5px; color: var(--ink2); text-align: center; }

/* 화상 모임 알림 창 */
.call-pop { position: fixed; left: 50%; top: max(70px, env(safe-area-inset-top)); transform: translateX(-50%); width: min(380px, calc(100vw - 24px)); padding: 16px; border-radius: 18px; background: rgba(249, 245, 239, .98); color: var(--ink); box-shadow: 0 14px 40px rgba(0, 0, 0, .4); z-index: 70; display: grid; gap: 6px; animation: popin .25s ease-out; }
.call-pop b { font-size: 16px; color: var(--burgundy); }
.call-pop p { margin: 0; font-size: 13.5px; color: var(--ink2); }
.pop-btns { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin-top: 6px; }
.pop-btns button { padding: 10px; border-radius: 12px; border: 1px solid #e6dccf; background: #fff; color: var(--ink); font-size: 14px; }
.pop-btns .primary { border: 0; background: var(--burgundy); color: #fff; font-weight: 700; }
@keyframes popin { from { opacity: 0; transform: translate(-50%, -8px); } }
@media (prefers-reduced-motion: reduce) { .call-pop { animation: none; } }
/* 초대 목록 */
.invite-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.invite-list p { margin: 0; font-size: 12px; color: rgba(255, 255, 255, .65); }
.invite-list button { padding: 6px 11px; border-radius: 99px; border: 1px solid var(--glass-line); background: rgba(255, 255, 255, .1); font-size: 12.5px; }
.invite-list button:disabled { opacity: .55; }
/* 전체 화면·공유 화면 크게 */
.tile .fs { position: absolute; right: 6px; bottom: 5px; width: 28px; height: 28px; border-radius: 8px; border: 0; background: rgba(0, 0, 0, .5); color: #fff; font-size: 15px; line-height: 1; opacity: .85; }
.tile .fs:hover { opacity: 1; background: rgba(0, 0, 0, .7); }
.tile:fullscreen, .tile:-webkit-full-screen { aspect-ratio: auto; width: 100vw; height: 100vh; border-radius: 0; background: #000; }
.tile:fullscreen video, .tile:-webkit-full-screen video { object-fit: contain; background: #000; }
.tile:fullscreen .nm { font-size: 15px; left: 16px; bottom: 14px; }
.tile:fullscreen .fs { right: 16px; bottom: 12px; width: 40px; height: 40px; font-size: 20px; }
.call.sharing .tile.spot { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.tile.spot video { object-fit: contain; background: #111; transform: none; }
.call.big.sharing { width: min(1100px, calc(100vw - 32px)); }
.call.big.sharing .call-grid { grid-template-columns: repeat(5, 1fr); }
.call.big { max-height: calc(100vh - 32px); overflow: auto; }
body.is-touch .call.sharing .call-grid { grid-template-columns: repeat(3, 1fr); }

/* 화상 모임 창 옮기기 */
.call header { cursor: move; touch-action: none; user-select: none; -webkit-user-select: none; }
.call header::before { content: '⠿'; color: rgba(255, 255, 255, .45); font-size: 13px; margin-right: -2px; }
/* 공유 화면이 커도 아래 버튼은 보이게 */
.call.big.sharing .tile.spot { justify-self: center; width: min(100%, calc(58vh * 16 / 9)); }

/* ───── 재영이 세상 ───── */
.join { margin-top: 16px; display: grid; gap: 12px; width: min(340px, 86vw); text-align: left; }
.join-form { display: grid; gap: 6px; }
.join-form label { font-size: 13px; color: rgba(255, 255, 255, .8); }
.join-form input { padding: 11px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .1); color: #fff; font-size: 15px; outline: none; }
.join-form input:focus { border-color: #ffd98a; }
.join-form button { padding: 11px; border: 0; border-radius: 12px; background: var(--burgundy); color: #fff; font-weight: 700; font-size: 15px; }
.join-form button.ghost { background: rgba(255, 255, 255, .14); }
.join details summary { cursor: pointer; font-size: 13px; color: rgba(255, 255, 255, .75); }
.join details[open] summary { margin-bottom: 8px; }
.join .err { margin: 0; min-height: 1em; color: #ffb4a8; font-size: 13px; }
.chip.live { background: rgba(142, 74, 96, .85); }
.focus-chip.live { background: rgba(215, 188, 104, .9); color: #2b2730; font-weight: 700; }
.call-menu { position: fixed; z-index: 40; display: grid; gap: 6px; min-width: 240px; padding: 10px; border-radius: 14px; background: rgba(28, 24, 32, .94); border: 1px solid var(--glass-line); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); font-size: 13px; }
.call-menu b { color: #ffe2ad; }
.call-menu button { text-align: left; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--glass-line); background: rgba(255, 255, 255, .08); color: #fff; }
.call-menu button:hover { background: rgba(255, 255, 255, .18); }
.panel .meet-list { display: grid; gap: 8px; }
.panel .card.meet .m-top { display: flex; gap: 6px; align-items: center; }
.panel .tag.live { background: var(--burgundy); color: #fff; }
.panel .m-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.panel .m-btns button, .panel .m-btns a.btn { padding: 7px 11px; border-radius: 10px; border: 1px solid #e6dccf; background: #fff; color: var(--ink); font-size: 13px; text-decoration: none; }
.panel .m-btns .pri { background: var(--burgundy); border-color: var(--burgundy); color: #fff; font-weight: 700; }
.panel .m-btns .del { color: #a14b42; }
.panel details.new-meet summary { cursor: pointer; font-weight: 700; color: var(--burgundy); padding: 6px 0; }
.panel .meet-form { display: grid; gap: 6px; margin-top: 6px; }
.panel .meet-form label { font-size: 13px; color: var(--ink2); }
.panel .meet-form input, .panel .meet-form select, .panel .meet-form textarea { width: 100%; padding: 9px 10px; border-radius: 10px; border: 1px solid #e6dccf; background: #fff; color: var(--ink); font: inherit; }
.panel .meet-form textarea { min-height: 64px; resize: vertical; }
.panel .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.panel .primary.alt { background: #b9802f; }
.panel .bar { height: 10px; border-radius: 99px; background: #efe6da; overflow: hidden; margin: 4px 0; }
.panel .bar i { display: block; height: 100%; background: linear-gradient(90deg, #d7bc68, #8e4a60); border-radius: inherit; }
.panel .rules { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 10px; font-size: 13.5px; margin-top: 4px; }
.panel .rules em { font-style: normal; color: #8E4A60; font-weight: 700; }
.panel .rules b { text-align: right; min-width: 28px; }
.panel .code { display: flex; align-items: center; gap: 8px; }
.panel .code code { font: 700 20px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 2px; padding: 6px 10px; border-radius: 10px; background: #F5E7EC; color: var(--burgundy); }
.panel .code button { padding: 7px 12px; border-radius: 10px; border: 1px solid #e6dccf; background: #fff; }
.panel .guide-btns { display: grid; gap: 8px; }
.panel .guide-btns button { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid #ece3d8; background: #fff; color: var(--ink); }
.panel .guide-btns button span { font-size: 12.5px; color: var(--ink2); }
.panel .guide-btns button:hover { border-color: var(--burgundy); }
@media (max-width: 640px) { .panel .row2 { grid-template-columns: 1fr; } }

/* 꾸미기 버튼 위치 알려 주기(걸어서 꾸미기가 닫혔을 때) */
.chip.nudge { animation: nudge 1s ease-in-out 5; box-shadow: 0 0 0 2px #ffd98a; }
@keyframes nudge { 50% { transform: scale(1.08); background: rgba(215, 188, 104, .9); color: #2b2730; } }
@media (prefers-reduced-motion: reduce) { .chip.nudge { animation: none; } }

/* 별명 바꾸기·운영자 */
.opt.nick .nick-row, .panel .nick-row { display: flex; gap: 6px; }
.nick-row input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid #e6dccf; background: #fff; color: var(--ink); font: inherit; }
.nick-row button { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--burgundy); background: var(--burgundy); color: #fff; font-weight: 700; }
.chips button:disabled { opacity: .45; cursor: not-allowed; }
.panel details.admin summary { cursor: pointer; font-weight: 700; color: var(--ink2); }

/* 소원 빌기 */
.wish-chip { background: linear-gradient(135deg, rgba(167, 150, 200, .85), rgba(142, 74, 96, .85)); }
.panel .sub { margin: 6px 0 0; font-size: 14px; color: var(--burgundy); }
.panel .wish-list { display: grid; gap: 6px; }
.panel .wish { display: grid; gap: 2px; padding: 9px 12px; border-radius: 12px; background: #fff; font-size: 13.5px; }
.panel .wish b { font-size: 12.5px; color: var(--burgundy); }
.panel .wish em { font-style: normal; font-size: 12.5px; color: var(--ink2); }
.panel .wish.req { grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; }
.panel .wish.req em, .panel .wish.req .adm { grid-column: 2; }
.panel .wish .adm { display: flex; gap: 4px; }
.panel .wish .adm button { padding: 3px 8px; border-radius: 99px; border: 1px solid #e6dccf; background: #fff; font-size: 12px; }
.panel p.small { font-size: 12.5px; margin: -2px 0 4px; }
.chips button.locked { opacity: .6; border-style: dashed; }
#pick-opts .card.admin { margin: 2px 0 4px; padding: 10px 12px; }

/* 모두의 나무 */
.panel .tree-list { display: grid; gap: 6px; margin-top: 6px; }
.panel .tree-row { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; font-size: 13.5px; }
.panel .tree-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel .tree-row button { padding: 6px 10px; border-radius: 99px; border: 1px solid #e6dccf; background: #fff; font-size: 12.5px; white-space: nowrap; }
.panel .tree-row button.pri { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }
.panel .tree-row button:disabled { opacity: .55; }

/* 집 출입 */
.panel .seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.panel .seg button { padding: 9px 6px; border-radius: 12px; border: 1px solid #e6dccf; background: #fff; color: #3f393d; font-size: 12.5px; line-height: 1.3; }
.panel .seg button[aria-pressed="true"] { background: var(--burgundy); border-color: var(--burgundy); color: #fff; font-weight: 700; }
.panel .g-list { display: grid; gap: 6px; }
.panel .g-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 12px; background: #fff; font-size: 13.5px; }
.panel .g-row button { padding: 5px 10px; border-radius: 99px; border: 1px solid #e6dccf; background: #fff; color: #3f393d; font-size: 12.5px; }
.knock-pop { position: fixed; z-index: 60; left: 50%; top: 84px; transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 18px; background: rgba(255, 250, 244, .97); box-shadow: 0 12px 34px rgba(60, 40, 30, .22); display: grid; gap: 10px; animation: knockIn .35s ease; }
@keyframes knockIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.knock-pop b { font-size: 14.5px; color: #3f393d; }
.knock-pop .k-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.knock-pop button { padding: 9px 6px; border-radius: 12px; border: 1px solid #e6dccf; background: #fff; color: #3f393d; font-size: 13px; cursor: pointer; }
.knock-pop button.pri { background: var(--burgundy); border-color: var(--burgundy); color: #fff; font-weight: 700; }

/* ───────── 귀여운 판(모임·소원·내 나무·집 설정 …) — 동화책 스티커 느낌 ───────── */
.panel { border-radius: 30px; background: #FFF9F0 radial-gradient(rgba(215, 188, 104, .16) 1.2px, transparent 1.6px) 0 0 / 18px 18px; box-shadow: 0 0 0 4px #fff, 0 0 0 7px #E9B7C4, 0 14px 0 2px rgba(142, 74, 96, .22), 0 24px 60px rgba(30, 20, 30, .45); }
.panel::backdrop { background: rgba(40, 24, 40, .38); backdrop-filter: blur(2px); }
.panel[open] { animation: panelPop .32s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes panelPop { from { transform: scale(.92) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.panel .p-head { position: relative; margin: 10px 10px 6px; padding: 12px 14px 12px 16px; border-radius: 22px; background: linear-gradient(135deg, #FFE7A8, #FFD3DC); box-shadow: inset 0 -3px 0 rgba(142, 74, 96, .12); }
.panel h3 { display: flex; align-items: center; gap: 8px; font-size: 30px; line-height: 1; color: #8E4A60; text-shadow: 0 2px 0 #fff; letter-spacing: 1px; }
.panel h3::before { content: '✨'; font-size: 22px; filter: drop-shadow(0 2px 0 rgba(255, 255, 255, .9)); }
.panel[data-kind="meetings"] h3::before { content: '📅'; }
.panel[data-kind="house"] h3::before { content: '🏡'; }
.panel .x { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #8E4A60; background: #fff; color: #8E4A60; font-weight: 800; box-shadow: 0 3px 0 #8E4A60; transition: transform .1s; }
.panel .x:hover { background: #FFE3EA; }
.panel .x:active { transform: translateY(2px); box-shadow: 0 1px 0 #8E4A60; }
.panel .p-body { padding: 4px 20px 22px; scrollbar-width: thin; scrollbar-color: #E9B7C4 transparent; }
.panel .muted { color: #8a7d84; }
/* 입력 칸: 동글동글 + 분홍 테두리 */
.panel input, .panel select, .panel textarea, .panel .meet-form input, .panel .meet-form select, .panel .meet-form textarea { border: 2px solid #F0E2D2; border-radius: 16px; background: #fff; padding: 10px 13px; transition: border-color .15s, box-shadow .15s; }
.panel input:focus, .panel select:focus, .panel textarea:focus { outline: none; border-color: #EBA2B6; box-shadow: 0 0 0 4px rgba(235, 162, 182, .25); }
.panel .meet-form label, .panel label { font-size: 13px; font-weight: 800; color: #8E4A60; margin-top: 4px; }
.panel .meet-form label::before { content: '•'; color: #EBA2B6; margin-right: 5px; }
/* 단추: 통통한 젤리 버튼(눌리면 쏙) */
.panel .primary, .panel button[type="submit"] { border-radius: 999px; padding: 13px; font-size: 15.5px; font-weight: 800; letter-spacing: .3px; background: linear-gradient(180deg, #A9587A, #8E4A60); box-shadow: 0 4px 0 #6A3348, 0 8px 16px rgba(142, 74, 96, .25); transition: transform .1s, box-shadow .1s; }
.panel .primary:active, .panel button[type="submit"]:active { transform: translateY(3px); box-shadow: 0 1px 0 #6A3348; }
.panel .m-btns button, .panel .m-btns a.btn, .panel .code button, .panel .g-row button, .panel .tree-row button, .panel .seg button { border: 2px solid #F0E2D2; border-radius: 999px; box-shadow: 0 2px 0 #F0E2D2; font-weight: 700; }
.panel .m-btns .pri, .panel .tree-row button.pri, .panel .seg button[aria-pressed="true"] { border-color: #8E4A60; box-shadow: 0 2px 0 #6A3348; }
/* 접는 칸 제목·카드 */
.panel details > summary { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 7px 14px; border-radius: 999px; background: #FFF0C7; color: #8E4A60; font-weight: 800; list-style: none; box-shadow: 0 2px 0 #F1D896; }
.panel details > summary::-webkit-details-marker { display: none; }
.panel details > summary::before { content: '🌱'; }
.panel details[open] > summary::before { content: '🌼'; }
.panel .card, .panel .wish, .panel .g-row { border-radius: 18px; border: 2px dashed #F1DCC0; background: #fff; }
.panel .card.meet { border-style: solid; border-color: #F6D3DD; }
.panel .sub { font-family: var(--hand); font-size: 20px; }
.panel .tag { border-radius: 999px; background: #FFE3EA; }
.panel .bar { height: 12px; background: #F6EBDD; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08); }
@media (max-width: 520px) { .panel h3 { font-size: 26px; } .panel .p-head { margin: 8px 8px 4px; } }

/* 큰 단추(모임 만들기·소원 빌기·운영자 인증 …): 말랑한 사탕 버튼 — 손글씨·반짝·살짝 통통 */
.panel .primary, .panel button[type="submit"] {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px 13px; border: 3px solid #fff; border-radius: 999px;
  background: linear-gradient(180deg, #FFB4C6 0%, #F27D9C 55%, #E2668A 100%);
  color: #fff; font-family: var(--hand); font-size: 24px; font-weight: 700; letter-spacing: 0; text-shadow: 0 2px 0 rgba(160, 50, 85, .45);
  box-shadow: 0 0 0 3px #E2668A, 0 6px 0 3px #B84E6E, 0 12px 20px rgba(226, 102, 138, .35);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.panel .primary::before, .panel button[type="submit"]::before { content: '✨'; font-size: 18px; text-shadow: none; }
.panel .primary::after, .panel button[type="submit"]::after { content: ''; position: absolute; left: 10%; right: 10%; top: 4px; height: 38%; border-radius: 999px; background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0)); pointer-events: none; }
.panel .meet-form button[type="submit"]::before { content: '📅'; }
.panel .primary:hover, .panel button[type="submit"]:hover { filter: brightness(1.05); transform: translateY(-1px) rotate(-.6deg); }
.panel .primary:active, .panel button[type="submit"]:active { transform: translateY(4px); box-shadow: 0 0 0 3px #E2668A, 0 2px 0 3px #B84E6E, 0 4px 8px rgba(226, 102, 138, .3); }
.panel .primary:disabled, .panel button[type="submit"]:disabled { filter: grayscale(.4); opacity: .75; transform: none; }
