/* Porch — 도어 그린 + 현관 불빛 */
:root {
  --accent: #1F5C4A;
  --accent-press: #174637;
  --accent-soft: #E8F0EC;
  --lamp: #F2B544;
  --lamp-ink: #3D2B00;
  --lamp-text: #B07A12;
  --bg: #FFFFFF;
  --bg-2: #F4F5F3;
  --chat-bg: #F1F2EF;
  --line: #E5E7E3;
  --text: #1A1D1B;
  --text-2: #6E736F;
  --text-3: #9A9F9B;
  --bubble: #FFFFFF;
  --mine: #1F5C4A;
  --mine-text: #FFFFFF;
  --danger: #D2463B;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #5FAE90;
    --accent-press: #4E977B;
    --accent-soft: #1C2B25;
    --lamp-text: #E3A93A;
    --bg: #141715;
    --bg-2: #1C201D;
    --chat-bg: #0F1211;
    --line: #262B28;
    --text: #E6E9E6;
    --text-2: #9AA19C;
    --text-3: #6E756F;
    --bubble: #1E2320;
    --mine: #2A6B56;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 15px; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; letter-spacing: inherit; }
input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.screen { height: 100dvh; }

/* ── 버튼·입력 ── */
.btn { border: 1px solid var(--line); background: var(--bg); padding: 12px 16px; border-radius: 10px; font-weight: 600; font-size: 15px; transition: background .12s; }
.btn:active { background: var(--bg-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:active { background: var(--accent-press); }
.btn.ghost { border-color: transparent; color: var(--accent); background: none; }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; height: 52px; margin-top: 12px; font-size: 16px; }
.btn:disabled { opacity: .45; cursor: default; }
.icon-btn { border: 0; background: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--text); }
.icon-btn:hover { background: var(--bg-2); }

label { display: block; font-size: 13px; color: var(--text-2); font-weight: 500; }
label input, .field {
  display: block; width: 100%; margin-top: 6px; padding: 14px;
  border: 1px solid transparent; border-radius: 10px; background: var(--bg-2);
  font-size: 16px; font-weight: 400; outline: none; transition: border-color .12s, background .12s;
}
label input:focus, .field:focus { border-color: var(--accent); background: var(--bg); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
label + label { margin-top: 14px; }

/* ── 로그인 ── */
#login { display: flex; justify-content: center; overflow-y: auto; padding: calc(40px + var(--safe-t)) 24px 32px; }
.login-box { width: 100%; max-width: 380px; }
@media (min-height: 760px) { #login { padding-top: 12vh; } }
.wordmark { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; letter-spacing: -0.04em; color: var(--accent); margin: 0; }
.wordmark img { width: 28px; height: 28px; border-radius: 8px; }
.wordmark.sm { font-size: 22px; flex: 1; }
.headline { font-size: 27px; line-height: 1.35; font-weight: 700; letter-spacing: -0.03em; margin: 28px 0 8px; }
.tagline { color: var(--text-2); margin: 0 0 28px; font-size: 15px; line-height: 1.5; }
.hint { font-size: 13px; min-height: 18px; margin: 6px 2px 10px; color: var(--text-2); }
.hint.ok { color: var(--accent); } .hint.new { color: var(--accent); } .hint.bad { color: var(--danger); }
.error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 10px 0 0; }
.fine { font-size: 12px; color: var(--text-3); margin: 20px 0 0; line-height: 1.6; }
.invite-banner { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 22px; font-size: 15px; }
.invite-banner b { font-weight: 700; }
.invite-banner .note { display: block; margin-top: 3px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.or { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; margin: 26px 0 16px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ── 레이아웃 ── */
#main { display: flex; }
#sidebar { width: 100%; display: flex; flex-direction: column; background: var(--bg); min-width: 0; }
#chat { flex: 1; display: none; flex-direction: column; background: var(--chat-bg); min-width: 0; }
body.in-chat #sidebar { display: none; }
body.in-chat #chat { display: flex; }
@media (min-width: 768px) {
  #sidebar { width: 360px; flex: none; border-right: 1px solid var(--line); display: flex !important; }
  #chat { display: flex; }
  .back { display: none !important; }
}
.bar { display: flex; align-items: center; gap: 4px; padding: calc(8px + var(--safe-t)) 10px 8px 18px; background: var(--bg); min-height: 58px; }
#chat .bar { border-bottom: 1px solid var(--line); padding-left: 8px; }
.bar-actions { display: flex; gap: 2px; align-items: center; }
.avatar-btn { border: 0; padding: 0; background: none; margin-left: 6px; }
.conn { font-size: 12px; text-align: center; padding: 5px; background: var(--bg-2); color: var(--text-2); }

.avatar { width: 46px; height: 46px; border-radius: 38%; display: grid; place-items: center; color: #fff; font-weight: 600; flex: none; font-size: 17px; }
.avatar.sm { width: 34px; height: 34px; font-size: 14px; }
.avatar.group, .avatar.porch { background: var(--accent-soft) !important; color: var(--accent); }
.avatar.porch svg, .avatar.group svg { width: 24px; height: 24px; }
.avatar.sm svg { width: 19px; height: 19px; }
.avatar > svg { width: 26px; height: 26px; }
.avatar.sm > svg { width: 19px; height: 19px; }

.room-list { list-style: none; margin: 0; padding: 2px 0 12px; overflow-y: auto; flex: 1; }
.room { display: flex; gap: 12px; align-items: center; padding: 10px 18px; cursor: pointer; }
.room:hover { background: var(--bg-2); }
.room.active { background: var(--accent-soft); }
.room .meta { flex: 1; min-width: 0; }
.room .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.room .name { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room .count { color: var(--text-3); font-weight: 500; font-size: 14px; margin-left: 5px; }
.room .time { font-size: 12px; color: var(--text-3); flex: none; }
.room .bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 3px; }
.room .preview { color: var(--text-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { background: var(--lamp); color: var(--lamp-ink); font-size: 12px; font-weight: 700; border-radius: 10px; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; flex: none; }
.tag { display: inline-block; font-size: 12px; font-weight: 500; color: var(--accent); margin-left: 6px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: -1px; }
.tag::before { content: '·'; margin-right: 5px; color: var(--text-3); }
.tag.off { color: var(--text-3); }

.empty { flex: 1; justify-content: center; padding: 40px 28px 80px; text-align: center; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.empty p { margin: 0 0 6px; line-height: 1.6; }
.empty .empty-t { color: var(--text); font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.empty .btn { width: 240px; margin-top: 4px; }
.chat-empty { margin: auto; }

.push-banner { display: flex; align-items: center; gap: 10px; margin: 4px 14px 6px; padding: 10px 6px 10px 14px; background: var(--bg-2); border-radius: 12px; font-size: 13px; color: var(--text-2); }
.push-banner span { flex: 1; }
.push-banner .btn { padding: 7px 12px; font-size: 13px; }
.push-banner .icon-btn { width: 30px; height: 30px; color: var(--text-3); }
.push-banner .icon-btn svg { width: 18px; height: 18px; }

/* ── 채팅 ── */
#chat-view { display: flex; flex-direction: column; height: 100%; }
.chat-title { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-left: 4px; }
.chat-title b { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title small { color: var(--text-2); font-size: 12px; margin-top: 1px; }
.messages { flex: 1; overflow-y: auto; padding: 8px 14px 10px; display: flex; flex-direction: column; }
.day { align-self: center; font-size: 12px; color: var(--text-2); margin: 18px 0 8px; }
.sys { align-self: center; font-size: 12px; color: var(--text-2); background: rgba(0,0,0,.04); border-radius: 20px; padding: 5px 12px; margin: 8px 0; text-align: center; }
@media (prefers-color-scheme: dark) { .sys { background: rgba(255,255,255,.05); } }
.msg { display: flex; gap: 8px; margin-top: 3px; max-width: 100%; }
.msg.first { margin-top: 12px; }
.msg .av-slot { width: 34px; flex: none; }
.msg .body { display: flex; flex-direction: column; min-width: 0; max-width: calc(100% - 64px); }
.msg .who { font-size: 13px; color: var(--text-2); margin: 0 0 5px 2px; }
.msg .row { display: flex; align-items: flex-end; gap: 5px; }
.bubble { background: var(--bubble); padding: 9px 13px; border-radius: 18px; white-space: pre-wrap; word-break: break-word; line-height: 1.5; max-width: min(460px, 100%); font-size: 15px; }
.msg.first:not(.mine) .bubble { border-top-left-radius: 5px; }
.msg.first.mine .bubble { border-top-right-radius: 5px; }
.bubble a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.msg .side { display: flex; flex-direction: column; font-size: 11px; color: var(--text-3); flex: none; line-height: 1.35; }
.msg .side .rc { color: var(--lamp-text); font-weight: 700; }
.msg.mine { justify-content: flex-end; }
.msg.mine .body { align-items: flex-end; max-width: 78%; }
.msg.mine .row { flex-direction: row-reverse; }
.msg.mine .side { align-items: flex-end; }
.msg.mine .bubble { background: var(--mine); color: var(--mine-text); }
.msg.pending .bubble { opacity: .6; }
.msg.failed .bubble { box-shadow: 0 0 0 1.5px var(--danger); }
.more { align-self: center; margin: 6px 0 10px; font-size: 13px; padding: 8px 14px; }

.composer { display: flex; gap: 8px; align-items: flex-end; padding: 8px 10px calc(8px + var(--safe-b)); background: var(--bg); border-top: 1px solid var(--line); }
.composer textarea { flex: 1; resize: none; border: 0; border-radius: 20px; padding: 10px 16px; background: var(--bg-2); max-height: 140px; outline: none; font-size: 16px; line-height: 1.4; }
.send { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; transition: opacity .12s; }
.send:disabled { opacity: .25; }
.send svg { width: 19px; height: 19px; margin-left: -2px; }
.quick { display: flex; gap: 6px; padding: 10px 10px 2px; overflow-x: auto; background: var(--bg); border-top: 1px solid var(--line); scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick button { flex: none; border: 1px solid var(--line); color: var(--text); background: var(--bg); border-radius: 18px; padding: 7px 13px; font-size: 14px; }
.quick button:active { background: var(--accent-soft); border-color: var(--accent); }
.quick + .composer { border-top: 0; }
.closed-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px calc(10px + var(--safe-b)) 18px; background: var(--bg); border-top: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
.closed-bar .btn { padding: 8px 12px; font-size: 13px; }

/* ── 모달 (모바일은 바텀시트) ── */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(420px, calc(100vw - 32px)); background: var(--bg); color: var(--text); max-height: 86dvh; }
dialog::backdrop { background: rgba(10, 14, 12, .45); }
@media (max-width: 767px) {
  dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 18px 18px 0 0; max-height: 90dvh; }
  dialog[open] { animation: sheet .2s ease-out; }
  #modal-body { padding-bottom: calc(20px + var(--safe-b)) !important; }
  #modal-body::before { content: ''; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: -10px auto 14px; }
}
@keyframes sheet { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
#modal-body { padding: 22px 20px 20px; }
.m-title { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.m-title .icon-btn { margin-right: -8px; color: var(--text-2); }
.m-sec { margin-top: 22px; }
.m-sec h3 { font-size: 13px; color: var(--text-2); margin: 0 0 8px; font-weight: 600; }
.m-row { display: flex; gap: 8px; }
.m-row .field { margin-top: 0; }
.m-row .btn { flex: none; white-space: nowrap; }
.m-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.m-actions .btn { flex: 1; }
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { border: 0; background: none; padding: 8px 0 10px; font-weight: 600; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--text); border-bottom-color: var(--text); }
.linkbox { font-size: 13px; background: var(--bg-2); border-radius: 10px; padding: 11px 12px; word-break: break-all; color: var(--text-2); }
.members { list-style: none; padding: 0; margin: 0; max-height: 240px; overflow-y: auto; }
.members li { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.members small { color: var(--text-2); }
.me-head { display: flex; gap: 14px; align-items: center; }
.me-head .avatar { width: 56px; height: 56px; font-size: 22px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.av-edit { position: relative; cursor: pointer; flex: none; }
.av-cam { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; }
.av-cam svg { width: 14px; height: 14px; fill: none; stroke: var(--text-2); stroke-width: 1.8; stroke-linejoin: round; }
.linkbtn { border: 0; background: none; padding: 0; margin-top: 4px; font: inherit; font-size: 13px; color: var(--text-2); text-decoration: underline; cursor: pointer; }
.muted { color: var(--text-2); font-size: 13px; line-height: 1.55; }
.guide { padding-left: 20px; line-height: 1.9; }
.center { text-align: center; }

.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); background: #1A1D1B; color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 14px; z-index: 100; max-width: calc(100vw - 32px); }

/* ── 포치 관리 ── */
.porch-list { list-style: none; margin: 0; padding: 0; }
.porch-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.porch-item:last-child { border-bottom: 0; }
.porch-item.off .ph { opacity: .5; }
.porch-item .ph { display: flex; gap: 12px; align-items: center; }
.porch-item .pt { flex: 1; min-width: 0; }
.porch-item .pt b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.porch-item .pa { display: flex; gap: 6px; margin-top: 10px; padding-left: 58px; flex-wrap: wrap; }
.porch-item .pa .btn { padding: 7px 11px; font-size: 13px; }
.type-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 16px; }
.type-pick button { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 12px 4px 10px; font-size: 13px; font-weight: 500; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-2); }
.type-pick button svg { width: 24px; height: 24px; }
.type-pick button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.qr-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; place-items: center; margin: 2px auto 14px; width: 232px; }
.qr-box svg { width: 202px; height: 202px; }

/* ── 하단 탭 ── */
#sidebar { position: relative; }
.tab-page { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tab-page .room-list, .porch-list { flex: 1; overflow-y: auto; }
.tabbar { display: flex; align-items: flex-start; justify-content: space-around; height: calc(66px + var(--safe-b)); padding: 8px 28px var(--safe-b); border-top: 1px solid var(--line); background: var(--bg); flex: none; }
.tabbar .tab { position: relative; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 72px; color: var(--text-3); font-size: 11px; font-weight: 500; padding: 2px 0; }
.tabbar .tab.on { color: var(--accent); font-weight: 600; }
.tabbar .tab svg { width: 24px; height: 24px; }
.tab-badge { position: absolute; top: 0; right: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--lamp); }
.tab-qr { width: 58px; height: 58px; margin-top: -24px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(31,92,74,.28); flex: none; }
.tab-qr:active { background: var(--accent-press); }
.tab-qr svg { width: 26px; height: 26px; }
.wordmark.sm img { width: 26px; height: 26px; border-radius: 7px; }
.page-title { margin: 0; flex: 1; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.page-desc { margin: 0 18px 6px; font-size: 13px; color: var(--text-2); line-height: 1.55; }
.sm-btn { display: flex; align-items: center; gap: 4px; padding: 8px 6px; font-size: 14px; }
.sm-btn svg { width: 18px; height: 18px; }

/* 노크함 필터 */
.filters { display: flex; gap: 6px; padding: 2px 18px 10px; overflow-x: auto; scrollbar-width: none; flex: none; }
.filters::-webkit-scrollbar { display: none; }
.fchip { flex: none; border: 1px solid var(--line); background: var(--bg); border-radius: 18px; padding: 7px 13px; font-size: 14px; display: flex; gap: 5px; align-items: center; }
.fchip span { color: var(--lamp-text); font-weight: 700; }
.fchip.on { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }
.room .left { display: inline-block; font-size: 11px; font-weight: 600; color: #8A5A00; background: #FBEFD3; border-radius: 5px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px; }

/* 포치 아바타 */
.avatar.porch.pt-temp { background: #FBEFD3 !important; color: #8A5A00; }
.avatar.lg { width: 60px; height: 60px; }
.avatar.lg svg { width: 30px; height: 30px; }

/* 내 포치 목록 */
.porch-list { list-style: none; margin: 0; padding: 0 18px 12px; }
.porch-item .pt-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.porch-item .pt-top b { flex: 0 1 auto; }
.st { flex: none; font-size: 12px; font-weight: 600; border-radius: 5px; padding: 2px 6px; }
.st.on { color: var(--accent); background: var(--accent-soft); }
.st.lamp { color: #8A5A00; background: #FBEFD3; }
.st.off { color: var(--text-2); background: var(--bg-2); }

/* 새 포치: 용도 */
.purpose { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.purpose-btn { display: flex; gap: 14px; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: var(--bg); border-radius: 14px; padding: 16px; }
.purpose-btn:active { border-color: var(--accent); background: var(--accent-soft); }
.purpose-btn .pp { display: flex; flex-direction: column; gap: 4px; }
.purpose-btn b { font-size: 16px; }
.purpose-btn .pp > span { font-size: 14px; color: var(--text-2); line-height: 1.5; }
.purpose-btn em { font-style: normal; font-size: 12px; color: var(--accent); margin-top: 2px; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.seg2 button, .dur button { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 11px 0; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--text-2); }
.seg2 button svg { width: 20px; height: 20px; }
.seg2 button.on, .dur button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.dur { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
#pf-date { margin-top: 8px; }
.time-row { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; }
.time-row .field { margin-top: 0; }
.switch-row { display: flex; align-items: center; justify-content: space-between; font-size: 15px; color: var(--text); padding: 6px 0; }
.switch-row input { width: 20px; height: 20px; accent-color: var(--accent); }
.muted-in { color: var(--text-3); font-weight: 400; }
.chips-edit { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 18px; padding: 6px 6px 6px 12px; font-size: 14px; max-width: 100%; }
.chip button { border: 0; background: none; padding: 2px; color: var(--text-3); display: grid; }
.chip button svg { width: 15px; height: 15px; }
.chip-add { border: 1px dashed #B9BEB9; border-radius: 18px; padding: 7px 12px; font-size: 14px; background: none; outline: none; width: 120px; }
.chip-add:focus { border-style: solid; border-color: var(--accent); width: 100%; }
textarea.field { resize: vertical; line-height: 1.5; }

/* 대화: 안내 줄, 자동응답, 자주 쓰는 답 */
.chat-note { display: flex; align-items: center; gap: 8px; padding: 9px 16px; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot.on { background: #2E8B6A; } .dot.lamp { background: var(--lamp); }
.auto-tag { font-size: 11px; color: var(--text-3); margin: 0 0 3px 2px; }
.bubble.auto { background: transparent; border: 1px dashed var(--line); color: var(--text-2); }
.q-label { flex: none; align-self: center; font-size: 12px; color: var(--text-3); padding-right: 2px; }

/* QR 바로 보여주기 */
.qr-show { position: fixed; inset: 0; z-index: 90; background: #1F5C4A; color: #fff; display: flex; flex-direction: column; padding: calc(10px + var(--safe-t)) 0 calc(20px + var(--safe-b)); }
.qs-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px 0 16px; }
.qs-top .icon-btn { color: #fff; }
.qs-top .icon-btn:hover { background: rgba(255,255,255,.1); }
.qs-pick select { appearance: none; -webkit-appearance: none; border: 0; background: rgba(255,255,255,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; color: #fff; border-radius: 20px; padding: 9px 36px 9px 14px; font: inherit; font-size: 14px; font-weight: 600; max-width: 260px; }
.qs-pick option { color: #1A1D1B; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.qs-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 0 28px; }
.qs-card { width: min(300px, 100%); box-sizing: border-box; background: #fff; color: #1A1D1B; border-radius: 22px; padding: 26px 26px 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.qs-qr svg { width: 232px; height: 232px; max-width: 100%; display: block; }
.qs-card b { font-size: 18px; margin-top: 6px; text-align: center; }
.qs-badge { font-size: 13px; font-weight: 600; color: #8A5A00; background: #FBEFD3; border-radius: 6px; padding: 3px 8px; }
.qs-help { margin: 0; text-align: center; font-size: 15px; line-height: 1.6; color: #E4EEE9; }
.qs-actions { display: flex; gap: 8px; padding: 0 20px; }
.qs-actions .btn { flex: 1; height: 50px; font-size: 15px; }
.qs-ghost { background: transparent !important; border-color: rgba(255,255,255,.35) !important; color: #fff !important; }
.qs-solid { background: #fff !important; border-color: #fff !important; color: #1F5C4A !important; font-weight: 700; }
.qs-order { display: block; margin: 14px auto 0; border: 0; background: none; color: #E4EEE9; font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 10px; }
.order-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg-2); border-radius: 12px; padding: 12px 14px; margin: 4px 0 12px; }
.order-code b { font-size: 20px; letter-spacing: .06em; font-family: ui-monospace, Menlo, Consolas, monospace; }
.order-promo { background: #FBEFD3; color: #8A5A00; border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.5; margin: 0 0 12px; }
@media (min-width: 768px) { .qr-show { left: 50%; transform: translateX(-50%); width: 420px; border-radius: 0; box-shadow: 0 0 0 100vmax rgba(10,14,12,.5); } }

/* 방문자 첫 화면 */
#landing { display: flex; flex-direction: column; }
#landing-head { display: flex; flex-direction: column; align-items: flex-start; }
.ld-name { margin: 16px 0 8px; font-size: 27px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.3; }
.ld-status { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.ld-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.ld-status.on { color: var(--accent); } .ld-status.on i { background: #2E8B6A; }
.ld-until { font-size: 13px; font-weight: 700; color: #8A5A00; background: #FBEFD3; border-radius: 7px; padding: 5px 10px; }
.ld-note { margin: 12px 0 0; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.landing-q { margin-top: 26px; }
.landing-q h3 { margin: 0 0 8px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.q-list { display: flex; flex-direction: column; gap: 8px; }
.q-btn { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 14px 12px 14px 16px; font-size: 15px; }
.q-btn:active { border-color: var(--accent); background: var(--accent-soft); }
.q-btn svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
#guest-form { margin-top: 24px; }
.landing-closed { margin: 24px 0 0; padding: 14px; border-radius: 12px; background: var(--bg-2); color: var(--text-2); font-size: 14px; }
.linkish { align-self: center; margin-top: 14px; border: 0; background: none; color: var(--text-2); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; padding: 8px; }
#login-area:not([hidden]) + * { margin-top: 0; }
#landing:not([hidden]) ~ #login-area { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }

/* 알림 안내창 */
.push-sheet { text-align: center; padding: 6px 4px 0; }
.push-sheet .ps-icon { width: 56px; height: 56px; margin: 4px auto 14px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.push-sheet .ps-icon svg { width: 28px; height: 28px; }
.push-sheet h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; letter-spacing: -0.03em; }
.push-sheet p { margin: 0 0 18px; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.push-sheet .btn.block { margin-top: 8px; }
.inapp-bar { display: flex; align-items: center; gap: 10px; margin: -8px 0 24px; padding: 12px 12px 12px 14px; background: #FBEFD3; color: #5A3B00; border-radius: 12px; font-size: 13px; font-weight: 600; line-height: 1.4; }
.inapp-bar span { flex: 1; }
.inapp-bar .btn { flex: none; padding: 8px 12px; font-size: 13px; }
