/*!
 * 우리끼리 (Woorikkiri) - 스타일시트
 * 작성자·저작권자: 김도권 (金道卷)  |  © 2026 김도권. All rights reserved.
 */
:root {
  --bg: #ffffff; --bg2: #fafafa; --text: #111111; --text2: #737373; --line: #dbdbdb; --line2: #efefef;
  --input: #efefef; --sheet: #ffffff; --bubble: #efefef; --hover: rgba(0,0,0,.04);
  --brand: #EF5B4C; --brand-d: #DB4A3C; --brand-soft: #FFF1EE; --like: #F2385A;
  --ring: linear-gradient(45deg, #FFB547 0%, #FF7A45 35%, #EF5B4C 62%, #D6457A 100%);
  --overlay: rgba(0,0,0,.55); --navh: 52px; --toph: 52px; --maxw: 480px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg2: #0c0c0c; --text: #f5f5f5; --text2: #a8a8a8; --line: #363636; --line2: #262626;
    --input: #262626; --sheet: #262626; --bubble: #262626; --hover: rgba(255,255,255,.06); --brand-soft: #3a1d19;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg2: #0c0c0c; --text: #f5f5f5; --text2: #a8a8a8; --line: #363636; --line2: #262626;
  --input: #262626; --sheet: #262626; --bubble: #262626; --hover: rgba(255,255,255,.06); --brand-soft: #3a1d19;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  overscroll-behavior-y: none;
}
body.dark-page { background: #000; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
a { color: inherit; text-decoration: none; }
input, textarea { font: inherit; color: var(--text); }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--text2) !important; }
.center { text-align: center; }
.small { font-size: 12px; }
.pad { padding: 16px; }
.pad-x { padding: 0 16px; }
.ic { flex: none; display: block; }

/* ───── 레이아웃 ───── */
#root { min-height: 100dvh; }
.app { max-width: var(--maxw); margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; }
.app.has-nav { padding-bottom: calc(var(--navh) + var(--safe-b)); }
@media (min-width: 560px) {
  body { background: var(--bg2); }
  .app { border-left: 1px solid var(--line2); border-right: 1px solid var(--line2); }
}
.splash { height: 100dvh; display: grid; place-items: center; animation: fade .4s; }

/* ───── 상단바 ───── */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: calc(var(--toph) + var(--safe-t)); padding: var(--safe-t) 12px 0; background: var(--bg);
  border-bottom: 1px solid transparent;
}
.tb-left, .tb-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tb-right { gap: 14px; flex: none; }
.tb-title { font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar.center .tb-title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 16px; max-width: 55%; text-align: center; }
.user-title { display: flex; align-items: center; gap: 4px; font-size: 20px; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 4px; border-radius: 50%; }
.icon-btn:active { opacity: .5; }
.tb-text-btn { color: var(--brand); font-weight: 700; font-size: 15px; padding: 6px 4px; }
.dot { position: absolute; top: 3px; right: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--like); border: 1.5px solid var(--bg); }
.badge {
  position: absolute; top: -3px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--like); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; border: 2px solid var(--bg);
}
.user-row .badge { position: static; border: 0; }
.space-btn { display: flex; align-items: center; gap: 6px; min-width: 0; }
.space-name { font-size: 13px; color: var(--text2); font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo { display: inline-flex; align-items: center; gap: .3em; font-weight: 800; letter-spacing: -.04em; }
.logo svg { flex: none; }
.logo b { font-weight: 800; background: linear-gradient(90deg, #F2794A, #EF5B4C 50%, #D6457A); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ───── 하단 탭바 ───── */
.bottomnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--maxw); z-index: 30;
  height: calc(var(--navh) + var(--safe-b)); padding-bottom: var(--safe-b); display: flex; justify-content: space-around; align-items: center;
  background: var(--bg); border-top: 1px solid var(--line2);
}
.bottomnav a { flex: 1; display: flex; justify-content: center; align-items: center; height: 100%; }
.bottomnav a:active { opacity: .5; }
.bottomnav.dark { background: #000; color: #fff; border-top-color: #262626; }
.av-active .av-img { outline: 2px solid var(--text); outline-offset: 1px; }
.bottomnav.dark .av-active .av-img { outline-color: #fff; }

/* ───── 아바타 ───── */
.av { display: inline-flex; flex: none; border-radius: 50%; cursor: pointer; }
.av-img { border-radius: 50%; object-fit: cover; display: block; background: var(--line2); }
.av-ph { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.av-ring { background: var(--ring); }
.av-ring.seen { background: var(--line); }
.av-gap { display: block; padding: 2px; border-radius: 50%; background: var(--bg); }
.reels-page .av-gap, .story-viewer .av-gap { background: #000; }

/* ───── 공용 요소 ───── */
.spin-wrap { display: flex; justify-content: center; padding: 28px 0; }
.spinner { border: 2.5px solid var(--line); border-top-color: var(--text2); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes pop { 0% { transform: translate(-50%,-50%) scale(0); opacity: 0; } 15% { transform: translate(-50%,-50%) scale(1.2); opacity: .95; } 30% { transform: translate(-50%,-50%) scale(.95); } 45%,80% { transform: translate(-50%,-50%) scale(1); opacity: .95; } 100% { transform: translate(-50%,-60%) scale(.9); opacity: 0; } }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 32px; gap: 10px; }
.empty-ic { width: 80px; height: 80px; border: 2px solid var(--text); border-radius: 50%; display: grid; place-items: center; margin-bottom: 4px; }
.empty h3 { font-size: 20px; font-weight: 800; }
.empty p { color: var(--text2); max-width: 300px; }
.feed-end { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 36px 16px 28px; color: var(--text2); }
.feed-end .ic { border: 2px solid var(--brand); color: var(--brand); border-radius: 50%; padding: 6px; width: 48px; height: 48px; margin-bottom: 6px; }
.feed-end b { color: var(--text); font-size: 15px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 9px;
  background: var(--input); font-weight: 700; font-size: 14px; white-space: nowrap; transition: filter .15s;
}
.btn:active:not(:disabled) { filter: brightness(.92); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.link { background: none; height: auto; padding: 6px 4px; color: var(--brand); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 46px; font-size: 15px; border-radius: 11px; }
.btn.block { display: flex; width: 100%; }

.form { display: flex; flex-direction: column; gap: 10px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text2); }
.form input, .form textarea, .sheet input, .sheet textarea {
  width: 100%; border: 1px solid var(--line); background: var(--bg2); border-radius: 10px; padding: 11px 12px; font-size: 15px; outline: none; resize: vertical;
}
.form input:focus, .form textarea:focus { border-color: var(--text2); }
.form input:disabled { opacity: .6; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 16px; background: var(--input); font-size: 13px; font-weight: 600; }
.chip.on { background: var(--brand); color: #fff; }
.err { color: var(--like); font-size: 13px; text-align: center; }
.rel { display: inline-block; margin-left: 5px; padding: 0 6px; border-radius: 5px; background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 700; line-height: 18px; vertical-align: 1px; }
.rel.owner { background: var(--input); color: var(--text2); }
.rel.reel-tag { background: var(--input); color: var(--text); }
.rel.light { background: rgba(255,255,255,.2); color: #fff; }

/* ───── 시트 / 모달 ───── */
.sheet-back, .modal-back { position: fixed; inset: 0; z-index: 100; background: var(--overlay); animation: fade .2s; }
.sheet {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: var(--maxw); max-height: 75dvh;
  background: var(--sheet); border-radius: 16px 16px 0 0; display: flex; flex-direction: column; animation: up .28s cubic-bezier(.2,.8,.2,1);
  padding-bottom: var(--safe-b); transition: transform .2s;
}
@keyframes upx { from { transform: translate(-50%, 100%); } }
.sheet { animation-name: upx; }
.sheet.full { height: 88dvh; max-height: 88dvh; }
.sheet-handle { padding: 8px 0 4px; flex: none; touch-action: none; }
.sheet-handle > span { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 6px; }
.sheet-title { text-align: center; font-weight: 700; font-size: 15px; padding: 4px 0 10px; border-bottom: 1px solid var(--line2); }
.sheet-body { overflow-y: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.modal-back { display: flex; align-items: center; justify-content: center; padding: 24px; }
.action-sheet { width: 100%; max-width: 360px; background: var(--sheet); border-radius: 14px; overflow: hidden; animation: fade .15s; }
.action-sheet button { display: block; width: 100%; padding: 14px; font-size: 14px; border-top: 1px solid var(--line2); }
.action-sheet button:first-child { border-top: 0; }
.action-sheet button.danger { color: #ED4956; font-weight: 700; }
.action-sheet button.bold { font-weight: 700; }
.confirm-text { padding: 26px 22px 18px; text-align: center; }
.confirm-text h3 { font-size: 17px; margin-bottom: 6px; }
.confirm-text p { color: var(--text2); }
.confirm .confirm-text + button { border-top: 1px solid var(--line2); }

/* ───── 목록 ───── */
.list { display: flex; flex-direction: column; }
.list-head { padding: 12px 16px 6px; font-weight: 700; font-size: 15px; }
.list-head.big { font-size: 16px; }
.list-item, .user-row { display: flex; align-items: center; gap: 12px; padding: 8px 16px; width: 100%; text-align: left; cursor: pointer; }
.list-item:active, .user-row:active { background: var(--hover); }
.li-text, .ur-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.li-text small, .ur-text span { color: var(--text2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ur-text span.unread { color: var(--text); font-weight: 700; }
.sp-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--input); display: grid; place-items: center; font-size: 22px; flex: none; }
.sp-ic.add { font-size: 22px; color: var(--text2); }
.sp-ic.xl { width: 76px; height: 76px; border-radius: 22px; font-size: 40px; }
.check-on { color: var(--brand); }
.group-av { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; font-size: 22px; flex: none; }
.thread .group-av { width: 54px; height: 54px; font-size: 26px; }
.group-av.sm { width: 30px; height: 30px; font-size: 15px; }
.group-av.lg { width: 88px; height: 88px; font-size: 42px; }

/* ───── 홈: D-day / 초대 / 스토리 ───── */
.dday { display: flex; align-items: center; gap: 10px; margin: 4px 12px 2px; padding: 10px 14px; border-radius: 14px; background: var(--brand-soft); }
.dday-ic { font-size: 26px; }
.dday div { display: flex; flex-direction: column; }
.dday b { font-size: 14px; }
.dday em { font-style: normal; color: var(--brand); font-size: 16px; }
.dday span { font-size: 12px; color: var(--text2); }

.stories { display: flex; gap: 14px; overflow-x: auto; padding: 10px 12px 12px; border-bottom: 1px solid var(--line2); scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story-item { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 74px; flex: none; cursor: pointer; }
.story-item.dim { opacity: .55; }
.story-av-wrap { position: relative; }
.story-add {
  position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 700; border: 2.5px solid var(--bg); line-height: 1;
}
.story-add.big { width: 28px; height: 28px; font-size: 19px; right: 2px; bottom: 2px; }
.story-name { font-size: 12px; max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-name.seen { color: var(--text2); }
.sk-circle { width: 70px; height: 70px; border-radius: 50%; background: var(--line2); }

.invite-card { margin: 16px; padding: 22px 18px; border-radius: 18px; border: 1px solid var(--line); text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.invite-card.first { margin-top: 28px; }
.ic-hero { font-size: 54px; line-height: 1; }
.invite-card h3 { font-size: 18px; font-weight: 800; }
.invite-card p { color: var(--text2); font-size: 13px; }
.code-box { background: var(--bg2); border: 1px dashed var(--brand); border-radius: 12px; padding: 8px 22px; display: flex; flex-direction: column; }
.code-box small { color: var(--text2); font-size: 11px; }
.code-box b { font-size: 24px; letter-spacing: .18em; font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--brand); }
.btn-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ───── 게시물 ───── */
.post { border-bottom: 1px solid var(--line2); padding-bottom: 6px; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 12px; }
.ph-text { flex: 1; min-width: 0; display: flex; flex-direction: column; cursor: pointer; line-height: 1.3; }
.ph-text b { font-size: 14px; }
.loc { font-size: 12px; color: var(--text2); }
.carousel { position: relative; width: 100%; background: #000; overflow: hidden; user-select: none; -webkit-user-select: none; }
.track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.slide img, .slide video { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.counter { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 12px; }
.nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.85); color: #222; display: none; place-items: center; }
.nav-arrow.l { left: 8px; } .nav-arrow.r { right: 8px; }
@media (hover: hover) { .carousel:hover .nav-arrow { display: grid; } }
.mute-btn { position: absolute; right: 12px; bottom: 12px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.heart-burst { position: absolute; left: 50%; top: 50%; color: #fff; pointer-events: none; animation: pop 1s ease forwards; filter: drop-shadow(0 4px 14px rgba(0,0,0,.25)); }
.post-actions { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 2px; position: relative; }
.pa-left { display: flex; gap: 8px; }
.post-actions .icon-btn { padding: 6px; }
.icon-btn.liked { color: var(--like); animation: like .35s; }
.icon-btn.saved { color: var(--text); }
@keyframes like { 50% { transform: scale(1.25); } }
.dots { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background .2s; }
.dots i.on { background: var(--brand); }
.post-body { padding: 0 14px 8px; display: flex; flex-direction: column; gap: 4px; }
.likes { font-size: 14px; cursor: pointer; }
.caption { white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.caption.open { display: block; }
.caption b { cursor: pointer; }
.more-btn, .muted-btn { color: var(--text2); text-align: left; font-size: 14px; }
.cmt-preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.post-body time { font-size: 11px; color: var(--text2); margin-top: 2px; letter-spacing: .02em; }

/* ───── 댓글 ───── */
.comments { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.comments.inline { border-top: 1px solid var(--line2); }
.cmt-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.comments.inline .cmt-list { overflow: visible; }
.cmt { display: flex; gap: 12px; padding: 8px 14px; align-items: flex-start; }
.caption-cmt { border-bottom: 1px solid var(--line2); padding-bottom: 14px; margin-bottom: 4px; }
.cmt-main { flex: 1; min-width: 0; word-break: break-word; white-space: pre-wrap; }
.cmt-main b { cursor: pointer; }
.cmt-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text2); margin-top: 3px; white-space: normal; }
.cmt-meta button { color: var(--text2); font-weight: 600; font-size: 12px; }
.cmt-like { padding: 8px 2px; color: var(--text2); }
.cmt-like.liked { color: var(--like); }
.cmt-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 40px 0; color: var(--text2); }
.cmt-empty b { color: var(--text); font-size: 18px; }
.cmt-input-wrap { border-top: 1px solid var(--line2); background: var(--sheet); flex: none; }
.comments.inline .cmt-input-wrap { position: sticky; bottom: calc(var(--navh) + var(--safe-b)); background: var(--bg); }
.quick { display: flex; justify-content: space-around; padding: 8px 8px 2px; }
.quick button { font-size: 24px; padding: 2px 4px; transition: transform .1s; }
.quick button:active { transform: scale(1.3); }
.cmt-input { display: flex; align-items: center; gap: 10px; padding: 8px 14px 10px; }
.cmt-input input { flex: 1; border: 1px solid var(--line); border-radius: 22px; padding: 10px 14px; background: transparent; outline: none; font-size: 14px; min-width: 0; }
.post-btn { color: var(--brand); font-weight: 700; }

/* ───── 스토리 뷰어 ───── */
.story-viewer { position: fixed; inset: 0; z-index: 90; background: #000; color: #fff; display: flex; flex-direction: column; max-width: var(--maxw); margin: 0 auto; transition: opacity .2s; touch-action: none; }
.sv-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; user-select: none; -webkit-user-select: none; }
.sv-stage img, .sv-stage video { width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-touch-callout: none; }
.sv-stage .cover { object-fit: cover; }
.sv-top { position: relative; z-index: 2; padding: calc(var(--safe-t) + 8px) 8px 24px; background: linear-gradient(rgba(0,0,0,.45), transparent); }
.sv-bars { display: flex; gap: 3px; }
.sv-bars span { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.sv-bars i { display: block; height: 100%; background: #fff; }
.sv-head { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 0 4px; }
.sv-head b { font-size: 14px; cursor: pointer; }
.sv-head span { color: rgba(255,255,255,.7); font-size: 13px; }
.sv-actions { margin-left: auto; display: flex; gap: 4px; }
.sv-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 14px 12px calc(var(--safe-b) + 14px); background: linear-gradient(transparent, rgba(0,0,0,.4)); }
.sv-reply { display: flex; gap: 10px; align-items: center; }
.sv-reply input { flex: 1; background: transparent; border: 1px solid rgba(255,255,255,.6); color: #fff; border-radius: 24px; padding: 11px 16px; outline: none; font-size: 14px; min-width: 0; }
.sv-reply input::placeholder { color: rgba(255,255,255,.8); }
.sv-send { font-weight: 700; padding: 0 6px; }
.sv-views { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; padding: 6px; }

/* ───── 릴스 ───── */
.reels-page { position: fixed; inset: 0; bottom: calc(var(--navh) + var(--safe-b)); max-width: var(--maxw); margin: 0 auto; background: #000; color: #fff; z-index: 5; }
.reels-top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: calc(var(--safe-t) + 10px) 14px 10px; pointer-events: none; }
.reels-top h1 { font-size: 22px; font-weight: 800; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.reels-top button { pointer-events: auto; }
.reels-center { height: 100%; display: grid; place-items: center; }
.reels-center .empty-ic { border-color: #fff; }
.reels-center .empty p { color: #aaa; }
.reels { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.reels::-webkit-scrollbar { display: none; }
.reel { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; }
.reel-stage { position: absolute; inset: 0; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.reel-stage video, .reel-stage img { width: 100%; height: 100%; object-fit: cover; }
.reel-stage .contain { object-fit: contain; }
.reel-paused, .reel-flash { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: rgba(255,255,255,.9); pointer-events: none; }
.reel-flash { background: rgba(0,0,0,.55); border-radius: 50%; padding: 18px; animation: flash .8s forwards; }
@keyframes flash { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.6); } 20% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; } }
.reel-side { position: absolute; right: 8px; bottom: 26px; z-index: 2; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.reel-side button { display: flex; flex-direction: column; align-items: center; gap: 3px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.reel-side button span { font-size: 12px; font-weight: 600; }
.reel-side button.liked { color: var(--like); }
.reel-side button.liked span { color: #fff; }
.reel-info { position: absolute; left: 0; right: 64px; bottom: 0; z-index: 2; padding: 40px 14px 22px; background: linear-gradient(transparent, rgba(0,0,0,.55)); display: flex; flex-direction: column; gap: 8px; }
.ri-user { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.ri-user b { font-size: 14px; }
.ri-caption { font-size: 14px; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.ri-caption.open { display: block; max-height: 40dvh; overflow-y: auto; }
.ri-loc { display: flex; align-items: center; gap: 4px; font-size: 12px; opacity: .9; }
.reel-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.25); z-index: 3; }
.reel-progress i { display: block; height: 100%; background: #fff; }

/* ───── 만들기 ───── */
.create { min-height: 100dvh; display: flex; flex-direction: column; }
.pick-area { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; cursor: pointer; }
.pick-ic { color: var(--text); margin-bottom: 4px; }
.pick-area h2 { font-size: 20px; font-weight: 700; }
.pick-area p { color: var(--text2); }
.type-tabs { display: flex; justify-content: center; gap: 4px; padding: 10px 0 calc(var(--safe-b) + 16px); }
.type-tabs button { padding: 8px 18px; border-radius: 20px; font-weight: 700; color: var(--text2); font-size: 15px; }
.type-tabs button.on { background: var(--text); color: var(--bg); }
.preview { width: 100%; background: #000; overflow: hidden; }
.preview.tall { aspect-ratio: 9/16; max-height: 62dvh; }
.preview img, .preview video { width: 100%; height: 100%; object-fit: cover; }
.preview.tall img, .preview.tall video { object-fit: contain; }
.sel-strip { display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; }
.sel { position: relative; width: 62px; height: 62px; border-radius: 8px; overflow: hidden; flex: none; cursor: pointer; opacity: .7; border: 2px solid transparent; }
.sel.on { opacity: 1; border-color: var(--brand); }
.sel img, .sel video { width: 100%; height: 100%; object-fit: cover; }
.sel-n { position: absolute; left: 4px; top: 3px; color: #fff; font-size: 11px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.sel-x { position: absolute; right: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; line-height: 18px; }
.filters { display: flex; gap: 12px; overflow-x: auto; padding: 14px 12px 20px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; font-size: 12px; font-weight: 600; color: var(--text2); }
.filter.on { color: var(--text); }
.fthumb { width: 76px; height: 76px; object-fit: cover; border-radius: 4px; border: 2px solid transparent; }
.filter.on .fthumb { border-color: var(--brand); }
.fthumb.vid { display: grid; place-items: center; background: linear-gradient(135deg, #F7B267, #EF5B4C, #8E6FD8); color: #fff; }
.story-share-bar { padding: 16px; }
.details { display: flex; flex-direction: column; }
.details-top { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line2); }
.details-thumb { position: relative; width: 76px; height: 76px; flex: none; border-radius: 6px; overflow: hidden; background: #000; }
.details-thumb img, .details-thumb video { width: 100%; height: 100%; object-fit: cover; }
.details-top textarea { flex: 1; border: 0; outline: none; background: transparent; resize: none; font-size: 15px; }
.details-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line2); }
.details-row input { flex: 1; border: 0; outline: none; background: transparent; font-size: 15px; }
.details-row.note { color: var(--text2); font-size: 13px; }
.details-row.note b { color: var(--text); }
.details .btn { margin: 20px 16px; width: auto; }
.uploading { position: fixed; inset: 0; z-index: 120; background: var(--overlay); display: grid; place-items: center; animation: fade .2s; }
.up-card { background: var(--sheet); border-radius: 18px; padding: 26px 34px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 240px; }
.up-card small { color: var(--text2); font-size: 12px; }
.up-card span { color: var(--text2); }
.up-ring { --p: 0; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--line2) 0); position: relative; }
.up-ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--sheet); }
.up-ring span { position: relative; font-weight: 800; color: var(--text) !important; }

/* ───── 탐색 / 그리드 ───── */
.search-bar { gap: 6px; }
.search-input { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--input); border-radius: 10px; padding: 0 12px; height: 38px; color: var(--text2); }
.search-input input { flex: 1; border: 0; outline: none; background: transparent; font-size: 15px; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.grid-item { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--line2); }
.reel-grid .grid-item { aspect-ratio: 9/16; }
.thumb { width: 100%; height: 100%; object-fit: cover; background: var(--line2); }
.gi-badge { position: absolute; top: 6px; right: 6px; color: #fff; filter: drop-shadow(0 0 2px rgba(0,0,0,.5)); }
.gi-stat { position: absolute; left: 6px; bottom: 6px; color: #fff; font-size: 12px; font-weight: 700; display: flex; gap: 3px; align-items: center; filter: drop-shadow(0 0 2px rgba(0,0,0,.6)); }
.memories { padding: 12px 0 14px; border-bottom: 1px solid var(--line2); margin-bottom: 2px; }
.memories h3 { font-size: 15px; padding: 0 14px 10px; }
.mem-strip { display: flex; gap: 8px; overflow-x: auto; padding: 0 14px; }
.mem { position: relative; width: 112px; height: 150px; border-radius: 12px; overflow: hidden; flex: none; }
.mem span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 8px; color: #fff; font-size: 12px; font-weight: 700; background: linear-gradient(transparent, rgba(0,0,0,.6)); }

/* ───── 프로필 ───── */
.prof-head { display: flex; align-items: center; gap: 20px; padding: 10px 16px 8px; }
.prof-av { position: relative; cursor: pointer; }
.prof-stats { flex: 1; display: flex; justify-content: space-around; text-align: center; }
.prof-stats div { display: flex; flex-direction: column; }
.prof-stats b { font-size: 17px; font-weight: 700; }
.prof-stats span { font-size: 13px; }
.prof-bio { padding: 4px 16px 10px; }
.prof-bio b { font-size: 14px; }
.prof-bio p { white-space: pre-wrap; margin-top: 2px; }
.prof-btns { display: flex; gap: 6px; padding: 0 16px 14px; }
.prof-btns .btn { flex: 1; height: 34px; }
.tabs { display: flex; border-top: 1px solid var(--line2); }
.tabs button { flex: 1; display: flex; justify-content: center; padding: 11px 0; color: var(--text2); border-bottom: 1.5px solid transparent; }
.tabs button.on { color: var(--text); border-bottom-color: var(--text); }
.edit-av { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 0 6px; }

/* ───── 알림 ───── */
.noti-group { border-bottom: 1px solid var(--line2); padding: 8px 0; }
.noti-group h3 { font-size: 16px; padding: 6px 16px; }
.noti { display: flex; align-items: center; gap: 12px; padding: 8px 16px; cursor: pointer; }
.noti.unread { background: var(--brand-soft); }
.noti p { flex: 1; min-width: 0; word-break: break-word; }
.noti time { color: var(--text2); font-size: 13px; }
.noti-thumb { width: 44px; height: 44px; border-radius: 4px; flex: none; }

/* ───── 메시지 ───── */
.chat { height: 100dvh; display: flex; flex-direction: column; }
.chat .topbar { border-bottom-color: var(--line2); flex: none; }
.chat-title { display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; }
.chat-title div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.chat-title b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title small { color: var(--text2); font-size: 12px; }
.msgs { flex: 1; overflow-y: auto; padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.chat-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text2); text-align: center; }
.chat-empty b { color: var(--text); font-size: 18px; margin-top: 6px; }
.day-sep { text-align: center; font-size: 12px; color: var(--text2); margin: 14px 0 8px; }
.msg { display: flex; align-items: flex-end; gap: 6px; margin-top: 8px; max-width: 100%; }
.msg.grouped { margin-top: 2px; }
.msg.mine { flex-direction: row-reverse; }
.msg-av { width: 28px; flex: none; }
.msg-col { display: flex; flex-direction: column; max-width: 72%; min-width: 0; gap: 4px; }
.msg.mine .msg-col { align-items: flex-end; }
.msg-name { font-size: 12px; color: var(--text2); padding-left: 4px; }
.bubble { background: var(--bubble); padding: 9px 13px; border-radius: 20px; white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.msg.mine .bubble { background: linear-gradient(135deg, #F2794A, #EF5B4C 60%, #E14F6B); color: #fff; }
.msg time { font-size: 10px; color: var(--text2); flex: none; margin-bottom: 2px; }
.msg-post { width: 220px; border-radius: 16px; overflow: hidden; background: var(--bubble); cursor: pointer; }
.mp-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; font-size: 13px; }
.msg-post img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.msg-post p { padding: 8px 10px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-input { flex: none; display: flex; align-items: center; gap: 8px; margin: 8px 12px calc(var(--safe-b) + 10px); padding: 4px 6px 4px 16px; border: 1px solid var(--line); border-radius: 26px; }
.chat-input input { flex: 1; border: 0; outline: none; background: transparent; padding: 9px 0; font-size: 15px; min-width: 0; }
.send-btn { color: var(--brand); font-weight: 700; padding: 0 10px; }

/* ───── 설정 ───── */
.set-group { border-bottom: 6px solid var(--bg2); padding: 6px 0; }
.set-group h3 { font-size: 13px; color: var(--text2); font-weight: 600; padding: 10px 16px 4px; }
.set-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px; text-align: left; }
.set-row:not(.static):active { background: var(--hover); }
.set-row.danger { color: #ED4956; }
.sr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sr-text b { font-weight: 500; font-size: 15px; }
.sr-text small { color: var(--text2); font-size: 12px; }
.seg { display: inline-flex; background: var(--input); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text2); }
.seg button.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; padding: 9px 0; font-size: 14px; }
.copyright { text-align: center; color: var(--text2); font-size: 12px; padding: 22px 16px 30px; }
.space-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 16px 4px; }
.space-hero b { font-size: 19px; }
.space-hero small { color: var(--text2); }
.space-form { display: flex; flex-direction: column; gap: 12px; }
.type-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px; border-radius: 14px; border: 1.5px solid var(--line); }
.type-card span { font-size: 34px; }
.type-card b { font-size: 16px; color: var(--text); }
.type-card small { color: var(--text2); font-size: 12px; }
.type-card.on { border-color: var(--brand); background: var(--brand-soft); }
.code-input { text-transform: uppercase; letter-spacing: .3em; font-size: 20px !important; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; }
.invite-preview { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--brand-soft); }
.invite-preview > span { font-size: 30px; }
.invite-preview div { display: flex; flex-direction: column; }
.invite-preview b { color: var(--text); font-size: 15px; }
.invite-preview small { color: var(--text2); }
.invite-preview.full { background: var(--input); }
.onboard-msg { padding: 28px 16px 4px; text-align: center; }
.onboard-msg h2 { font-size: 20px; margin-bottom: 6px; }
.onboard-msg p { color: var(--text2); }
.trash-list { display: flex; flex-direction: column; }
.trash-item { display: flex; align-items: center; gap: 12px; padding: 8px 16px; }
.trash-item .thumb { width: 56px; height: 56px; border-radius: 6px; flex: none; }
.trash-item div { flex: 1; display: flex; flex-direction: column; }
.trash-item small { color: var(--text2); font-size: 12px; }
.install { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.install-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 16px 0 6px; color: var(--text2); }
.install-done { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.guide { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.guide.hl { border-color: var(--brand); background: var(--brand-soft); }
.guide h3 { font-size: 15px; margin-bottom: 6px; }
.guide ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.guide p { margin-top: 6px; font-size: 12px; }
.about { display: flex; flex-direction: column; align-items: center; padding: 30px 20px; gap: 10px; text-align: center; }
.about-tag { color: var(--text2); }
.about dl { width: 100%; text-align: left; margin: 14px 0 0; border-top: 1px solid var(--line2); }
.about dt { font-size: 12px; color: var(--text2); margin-top: 14px; }
.about dd { margin: 2px 0 0; font-size: 14px; }

/* ───── 로그인 / 가입 ───── */
.auth { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 10px; max-width: 400px; margin: 0 auto; }
.auth-card { width: 100%; padding: 26px 28px 22px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 450px) { .auth-card { border: 0; padding: 12px 8px; } .auth-card.switch { border-top: 1px solid var(--line2); padding-top: 18px; } }
.auth-logo { display: flex; justify-content: center; padding: 6px 0 2px; }
.auth-tag { text-align: center; color: var(--text2); font-size: 14px; }
.auth-tag b { color: var(--text); }
.auth-card.switch { text-align: center; padding: 18px; }
.auth-foot { color: var(--text2); font-size: 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; line-height: 1.6; }
.auth-foot .ic { display: inline; vertical-align: -2px; }
.auth .form input { background: var(--bg2); border-radius: 6px; padding: 10px; font-size: 14px; }
.form-h { font-size: 16px; text-align: center; }
.steps { display: flex; gap: 6px; justify-content: center; }
.steps i { width: 26px; height: 4px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--brand); }

/* ───── 푸시 알림 ───── */
.push-prompt { display: flex; align-items: center; gap: 10px; margin: 6px 12px 2px; padding: 10px 8px 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); }
.pp-ic { font-size: 24px; }
.pp-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.pp-text b { font-size: 14px; }
.pp-text span { font-size: 12px; color: var(--text2); }
.pp-x { color: var(--text2); }
.push-card { margin: 12px 16px 6px; padding: 22px 18px; border-radius: 18px; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.push-card b { font-size: 17px; }
.push-card p { color: var(--text2); font-size: 13px; max-width: 340px; }
.push-card .btn { margin-top: 6px; }
.push-ic { font-size: 40px; line-height: 1; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--input); }
.push-ic.on { background: var(--brand-soft); }
.toggle { position: relative; width: 50px; height: 30px; border-radius: 15px; background: var(--line); flex: none; transition: background .2s; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.toggle.on { background: var(--brand); }
.toggle.on i { transform: translateX(20px); }
.quiet-row { display: flex; align-items: center; gap: 8px; padding: 4px 16px 14px; flex-wrap: wrap; }
.quiet-row select { padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; font-size: 15px; }
.quiet-row span { color: var(--text2); }

/* ───── 하이라이트 · 스토리 보관함 ───── */
.hl-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 16px 14px; scrollbar-width: none; }
.hl-row::-webkit-scrollbar { display: none; }
.hl-item { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 68px; flex: none; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.hl-circle { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line); padding: 3px; display: grid; place-items: center; background: var(--bg); overflow: hidden; flex: none; }
.hl-circle img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.hl-circle.add { color: var(--text); }
.hl-circle.sm { width: 44px; height: 44px; padding: 2px; }
.hl-title { font-size: 12px; max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-new { display: flex; gap: 8px; padding: 8px 16px 12px; }
.hl-new input { flex: 1; min-width: 0; }
.archive-info { display: flex; gap: 10px; align-items: flex-start; margin: 12px 16px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); font-size: 13px; color: var(--text); }
.archive-info .ic { color: var(--brand); margin-top: 1px; }
.archive .story-grid { margin-top: 12px; }
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.sg-item { position: relative; aspect-ratio: 9/16; overflow: hidden; background: var(--line2); }
.sg-item img, .sg-item video { width: 100%; height: 100%; object-fit: cover; }
.sg-date { position: absolute; left: 6px; top: 6px; background: rgba(255,255,255,.92); color: #111; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.sg-live { position: absolute; left: 6px; bottom: 6px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.sg-check { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.sg-item.on .sg-check { background: var(--brand); }
.sg-item.on img, .sg-item.on video { opacity: .75; }
.hl-editor { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow-y: auto; }
.hl-editor-top { display: flex; gap: 8px; padding: 8px 12px 12px; position: sticky; top: 0; background: var(--sheet); z-index: 1; }
.hl-editor-top input { flex: 1; min-width: 0; }

/* ───── 구글 드라이브 백업 ───── */
.backup-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 18px 20px 6px; }
.backup-hero b { font-size: 17px; }
.backup-hero p { color: var(--text2); font-size: 13px; }
.backup-hero p b { color: var(--text); font-size: 13px; }
.backup-hero .push-ic { background: var(--brand-soft); color: var(--brand); }
.backup-card { margin: 12px 16px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.bk-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-head b { font-size: 16px; }
.bk-head .muted { font-size: 13px; }
.bk-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.bk-dot.on { background: #2DBE6C; box-shadow: 0 0 0 4px rgba(45,190,108,.18); }
.bar { height: 8px; border-radius: 4px; background: var(--input); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; transition: width .3s; }
.bk-quota small, .bk-run small { color: var(--text2); font-size: 12px; }
.bk-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.bk-kv dt { color: var(--text2); }
.bk-kv dd { margin: 0; }
.bk-title { font-size: 15px; }
.bk-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.bk-steps a { color: var(--brand); font-weight: 700; }
.bk-steps small { color: var(--text2); }
.code-copy { display: flex; gap: 6px; align-items: center; margin: 6px 0 2px; }
.code-copy code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: 12px; }
.bk-tree { list-style: none; margin: 0; padding: 6px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.bk-tree .i1 { padding-left: 18px; }
.bk-tree small { color: var(--text2); }

/* ───── 로그인된 기기 ───── */
.dev-info { display: flex; gap: 10px; align-items: flex-start; margin: 12px 16px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); font-size: 13px; }
.dev-info .ic { color: var(--brand); margin-top: 1px; flex: none; }
.dev-list { display: flex; flex-direction: column; gap: 8px; padding: 4px 16px; }
.dev { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.dev.current { border-color: var(--brand); }
.dev-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--input); display: grid; place-items: center; flex: none; }
.dev.current .dev-ic { background: var(--brand-soft); color: var(--brand); }
.dev-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dev-text b { font-size: 14px; }
.dev-text small { color: var(--text2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-actions { display: flex; flex-direction: column; gap: 4px; flex: none; }
.btn.danger-btn { color: #ED4956; }

/* ───── 토스트 ───── */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--navh) + var(--safe-b) + 18px); transform: translate(-50%, 20px); z-index: 200;
  background: rgba(38,38,38,.95); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 14px; max-width: calc(100vw - 32px);
  opacity: 0; pointer-events: none; transition: all .25s; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
