/* =====================================================================
   끼리톡 v1.3 — 클로드디자인 "끼리톡 UI 디자인 v1" 기준
   ===================================================================== */
@font-face { font-family: 'GmarketSans'; font-weight: 500; font-display: swap; src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff') format('woff'); }
@font-face { font-family: 'GmarketSans'; font-weight: 700; font-display: swap; src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansBold.woff') format('woff'); }

:root {
  /* 주요 색 */
  --mint: #4FD1AE;
  --mint-press: #2DB892;
  --mint-ink: #0C3B30;
  --mint-text: #0E6B53;
  --mint-50: #F1FBF7;
  --mint-100: #DDF7EE;
  --mint-bubble: #C8F1E2;
  --berry: #D6335F;
  --berry-50: #FFF5F7;
  --berry-100: #FFE3EA;
  --berry-line: #F5C6D3;
  /* 파스텔 */
  --peach: #FFD9CC;
  --lav: #E6DEFF;
  --lav-100: #EEE8FF;
  --sky: #D3ECFF;
  --sky-100: #E3F2FF;
  --lemon: #FFF0B8;
  --lemon-100: #FFF1C7;
  --pink: #FFD9E6;
  /* 글자·바탕 */
  --ink: #1E2633;
  --ink2: #4A5463;
  --ink3: #6B7482;
  --ink4: #A3ABB6;
  --field: #F3F5F8;
  --line: #EEF1F4;
  --line2: #F0F2F5;
  --ring: #DDE2E8;
  --gray-btn: #EEF1F4;
  --disabled: #E6EAEF;
  --room-bg: #EEF2FA;
  --soft-bg: #F6F8FA;
  --auth-bg: #F6FBF9;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --off-h: 0px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }   /* v1.20.1: 페이지 자체는 스크롤되지 않게 (화면 안쪽만 스크롤) */
body {
  font-family: 'GmarketSans', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-weight: 500;
  background: #E7ECF0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.2px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; text-align: inherit; letter-spacing: inherit; }
button:disabled { cursor: default; }
input, textarea { font: inherit; color: inherit; margin: 0; letter-spacing: inherit; }
input::placeholder, textarea::placeholder { color: #7A8391; }
a { color: var(--mint-text); }
img { display: block; }
[hidden] { display: none !important; }
b, strong, .b { font-weight: 700; }

@keyframes mtUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes mtFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mtDown { from { transform: translateY(-130%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mtSpin { to { transform: rotate(360deg); } }
@keyframes mtDot { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-8px); opacity: 1; } }

/* v1.20.1: 앱 화면을 '지금 보이는 화면'에 딱 맞춤 (휴대폰 브라우저의 주소창·아래 버튼 영역이 있어도
   아래 탭(친구·채팅·광고·더보기)이 스크롤 없이 바로 보이게. 100vh 는 주소창 높이만큼 화면보다 길어질 수 있음) */
#app {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; max-width: 480px; margin: 0 auto;
  background: #fff; overflow: hidden;
}
#app.offline { --off-h: 42px; }

/* ---------- 공통 ---------- */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; padding-top: calc(var(--safe-t) + var(--off-h)); }
.scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ibtn { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--ink); }
.ibtn:active { background: var(--gray-btn); }
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--mint); border-radius: 50%; animation: mtSpin .8s linear infinite; margin: 40px auto; }
.spin-sm { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(30,38,51,.15); border-top-color: var(--ink2); animation: mtSpin .8s linear infinite; flex: none; }

.btn {
  height: 54px; width: 100%; border-radius: 16px; background: var(--mint); color: var(--mint-ink);
  font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  transition: transform .1s, background .15s;
}
.btn:active { background: var(--mint-press); transform: scale(.98); }
.btn:disabled { background: var(--disabled); color: #8B94A1; transform: none; }
.btn.sm { height: 48px; width: auto; padding: 0 22px; font-size: 15px; }
.btn.md { height: 50px; border-radius: 14px; font-size: 15px; }
.btn.line { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ring); font-weight: 500; }
.btn.line:active { background: var(--field); }
.btn.danger-line { background: #fff; color: var(--berry); box-shadow: inset 0 0 0 1.5px var(--berry-line); font-weight: 500; }
.btn.danger-line:active { background: var(--berry-50); }
.btn.danger { background: var(--berry); color: #fff; }
.btn.danger:active { background: #BE2A52; }
.btn.gray { background: var(--gray-btn); color: var(--ink); font-weight: 500; }
.btn.gray:active { background: #E1E6EB; }
.btn.text { background: none; color: var(--ink2); font-weight: 500; height: 48px; }
.btn.text:active { background: var(--gray-btn); }
.btn.soft { background: var(--mint-100); color: var(--mint-text); }
.btn.soft:active { background: var(--mint-bubble); }
.btn.dark { background: var(--ink); color: #fff; }
.btn:disabled.line, .btn:disabled.danger-line { background: #F1F3F6; color: #8B94A1; box-shadow: inset 0 0 0 1.5px #F1F3F6; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .lbl { font-size: 13px; color: var(--ink2); }
.input {
  height: 52px; width: 100%; padding: 0 16px; border-radius: 14px; background: var(--field);
  border: 1.5px solid transparent; outline: none; font-size: 16px;
}
.input:focus { border-color: var(--mint); background: #fff; }
.input.err, .field.err .input { border-color: var(--berry); background: var(--berry-50); }
.field-err { display: flex; align-items: center; gap: 6px; color: var(--berry); font-size: 13px; }
.field-err:empty { display: none; }
.help { font-size: 12px; color: var(--ink3); }
.field.err .help { display: none; }
.counter { text-align: right; font-size: 12px; color: var(--ink3); }

/* 아바타 (사진이 없으면 이름 두 글자 + 파스텔 배경) */
.av { flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--ink); overflow: hidden; background: var(--line); letter-spacing: -0.3px; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.notice, .av.mint { background: var(--mint); color: var(--mint-ink); }
.av-group { position: relative; width: 52px; height: 52px; flex: none; display: block; }
.av-group .av-pos { position: absolute; display: block; }
.av-group .av { border: 2px solid #fff; }

.chip { font-size: 12px; padding: 5px 9px; border-radius: 10px; flex: none; white-space: nowrap; line-height: 1.2; }
.chip.active { background: var(--mint-100); color: var(--mint-text); }
.chip.pending { background: var(--lemon-100); color: #7A5300; }
.chip.suspended { background: var(--berry-100); color: #A3213F; }
.chip.admin { background: #EAE3FF; color: #5B3FC4; }
.chip.me { font-size: 11px; padding: 3px 7px; border-radius: 7px; background: var(--mint-100); color: var(--mint-text); }

.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--berry); color: #fff;
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}

.switch { width: 51px; height: 31px; border-radius: 16px; background: #D5DBE2; position: relative; flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.18); transition: left .2s; }
.switch.on { background: var(--mint); }
.switch.on::after { left: 22px; }
.switch:disabled { opacity: .5; }

/* ---------- 로딩·설치 안내 ---------- */
.splash { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--auth-bg); }
.splash-title { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.dots { display: flex; gap: 8px; height: 24px; align-items: center; }
.dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); animation: mtDot 1.1s ease-in-out infinite; }
.dots span:nth-child(2) { background: #FFB4A2; animation-delay: .15s; }
.dots span:nth-child(3) { background: #C9B8FF; animation-delay: .3s; }
.splash-sub { font-size: 13px; color: var(--ink3); }

/* ---------- 로그인·회원가입 ---------- */
.auth { background: var(--auth-bg); }
.auth .scroll { display: flex; flex-direction: column; }
.auth-top { padding: 32px 24px 26px; display: flex; flex-direction: column; align-items: center; gap: 8px; flex: none; text-align: center; }
.auth-top h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.6px; margin: 2px 0 0; }
.auth-top p { margin: 0; font-size: 14px; color: var(--ink2); }
.auth-card { flex: 1; background: #fff; border-radius: 28px 28px 0 0; padding: 22px 24px calc(28px + var(--safe-b)); display: flex; flex-direction: column; gap: 20px; }
.seg { display: flex; background: var(--gray-btn); border-radius: 16px; padding: 4px; gap: 4px; flex: none; }
.seg button { flex: 1; height: 44px; border-radius: 12px; font-size: 15px; font-weight: 700; color: var(--ink3); text-align: center; transition: all .2s; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(30,38,51,.12); }
.auth-fields { display: flex; flex-direction: column; gap: 14px; }
.note-mint { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; background: var(--mint-50); border-radius: 14px; font-size: 13px; line-height: 1.5; color: var(--mint-text); }
.note-mint svg { flex: none; margin-top: 1px; }
.foot-note { font-size: 12px; color: var(--ink3); text-align: center; line-height: 1.5; }
.setup-box { background: #fff; border-radius: 20px; padding: 18px; font-size: 14px; line-height: 1.6; color: var(--ink2); }
.setup-box b { color: var(--ink); }
.setup-box ol { padding-left: 20px; margin: 10px 0 0; }
.setup-box code { background: var(--field); padding: 1px 5px; border-radius: 4px; font-size: 13px; }

/* 승인 대기·정지 */
.blocked { background: var(--auth-bg); padding-left: 24px; padding-right: 24px; padding-bottom: calc(24px + var(--safe-b)); }
.blocked .center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.big-icon { width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.big-icon.lemon { background: var(--lemon-100); color: #8A5E00; }
.big-icon.pink { background: var(--berry-100); color: var(--berry); }
.blocked h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; margin: 0; }
.blocked p { font-size: 15px; line-height: 1.6; color: var(--ink2); max-width: 300px; margin: 0; }
.info-card { width: 100%; margin-top: 16px; background: #fff; border-radius: 20px; padding: 6px 18px; text-align: left; }
.info-card .kv { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; font-size: 14px; }
.info-card .kv + .kv { border-top: 1px solid var(--line); }
.info-card .kv span:first-child { color: var(--ink3); flex: none; }
.btn-col { display: flex; flex-direction: column; gap: 8px; }

/* ---------- 메인 탭 ---------- */
.main.gray { background: var(--soft-bg); }
.top { height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 20px; flex: none; }
.top h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; margin: 0; }
.bar { height: 56px; display: flex; align-items: center; gap: 2px; padding: 0 4px 0 8px; flex: none; }
.bar h1 { font-size: 18px; font-weight: 700; margin: 0; flex: 1; min-width: 0; }

.tabbar { height: calc(60px + var(--safe-b)); padding-bottom: var(--safe-b); flex: none; display: flex; background: #fff; border-top: 1px solid var(--line); }
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink3); }
.tabbar .pill { width: 56px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; position: relative; transition: background .2s; }
.tabbar .lbl { font-size: 11px; }
.tabbar button.on { color: var(--ink); }
.tabbar button.on .pill { background: var(--mint-100); }
.tabbar button.on .lbl { font-weight: 700; }
.tab-badge { position: absolute; top: -3px; right: 4px; }
.tab-badge .badge { min-width: 18px; height: 18px; padding: 0 5px; font-size: 10px; border: 2px solid #fff; border-radius: 9px; }

/* 친구 */
.me-card { display: flex; align-items: center; gap: 14px; margin: 4px 16px 12px; padding: 14px 16px; width: calc(100% - 32px); background: var(--mint-50); border-radius: 20px; }
.me-card:active { background: #E2F6EE; }
.me-card .chip-mine { font-size: 11px; padding: 4px 8px; border-radius: 8px; background: #fff; color: var(--mint-text); flex: none; }
.sec { padding: 8px 20px 6px; font-size: 13px; color: var(--ink3); }
.row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 9px 20px; min-height: 66px; text-align: left; }
.row:active { background: var(--soft-bg); }
.meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desc { font-size: 13px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card .name { font-size: 17px; }
.me-card .desc { color: var(--ink2); }

/* 채팅 목록 */
.row.chat { padding: 10px 20px; min-height: 74px; }
.row.chat .meta { gap: 6px; }
.title-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.title-line .cnt { font-size: 14px; color: var(--ink3); flex: none; }
.side { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex: none; align-self: flex-start; padding-top: 4px; }
.side .time { font-size: 11px; color: var(--ink3); }

/* 빈 화면 */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 64px 32px; gap: 10px; }
.empty-state .es-icon { width: 112px; height: 112px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.es-icon.lav { background: var(--lav-100); }
.es-icon.sky { background: var(--sky-100); color: #2C5A85; }
.empty-state b { font-size: 18px; }
.empty-state p { font-size: 14px; color: var(--ink3); line-height: 1.55; margin: 0; }
.empty-state .btn { margin-top: 14px; }
.empty-line { padding: 32px 16px; text-align: center; font-size: 14px; color: var(--ink3); }

/* 더보기 */
.more-body { padding: 4px 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.card { background: #fff; border-radius: 20px; overflow: hidden; }
.prof-card { display: flex; align-items: center; gap: 14px; padding: 18px; }
.prof-card .name { font-size: 18px; }
.prof-card .desc { color: var(--ink2); }
.edit-btn { height: 40px; padding: 0 14px; border-radius: 12px; background: var(--mint-50); color: var(--mint-text); font-size: 13px; display: flex; align-items: center; gap: 5px; flex: none; }
.edit-btn:active { background: var(--mint-100); }
.item { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 58px; width: 100%; text-align: left; }
.item + .item { border-top: 1px solid var(--line2); }
button.item:active { background: var(--soft-bg); }
.item .tile { width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex: none; }
.item .label { flex: 1; font-size: 15px; }
.item .val { font-size: 14px; color: var(--ink2); }
.item .chev { color: var(--ink4); flex: none; }
.item .sub { display: block; font-size: 12px; color: var(--ink3); line-height: 1.45; margin-top: 4px; }
.tile.sky { background: var(--sky-100); color: #2C5A85; }
.tile.lav { background: var(--lav-100); color: #5B3FC4; }
.tile.peach { background: #FFE6DE; color: #A2442C; }
.tile.mint { background: var(--mint-100); color: var(--mint-text); }
.tile.lemon { background: var(--lemon-100); color: #7A5300; }
.tile.pink { background: var(--berry-100); color: var(--berry); }
.item.danger { color: var(--berry); }
.item.danger:active { background: var(--berry-50); }
.chip-lemon { font-size: 12px; padding: 5px 9px; border-radius: 10px; background: var(--lemon-100); color: #7A5300; }
.version { text-align: center; font-size: 12px; color: var(--ink3); padding: 8px 0; }

/* ---------- 관리자 ---------- */
.admin { background: var(--soft-bg); z-index: 4; }
.admin-body { padding: 4px 16px 24px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; text-align: left; }
.stat:active { transform: scale(.98); }
.stat .k { font-size: 12px; }
.stat .n { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -0.5px; line-height: 1.1; }
.stat.all { background: var(--sky-100); } .stat.all .k { color: #2C5A85; }
.stat.pending { background: #FFF6D6; } .stat.pending .k { color: #7A5300; }
.stat.suspended { background: #FFE9EE; } .stat.suspended .k { color: #A3213F; }
.stat.on { box-shadow: inset 0 0 0 2px var(--ink); }
.search { margin-top: 16px; height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #fff; border-radius: 14px; border: 1.5px solid var(--disabled); color: var(--ink3); }
.search:focus-within { border-color: var(--mint); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; height: 100%; color: var(--ink); }
.filters { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; }
.filters button { height: 36px; padding: 0 14px; border-radius: 18px; font-size: 13px; white-space: nowrap; flex: none; background: #fff; color: var(--ink2); box-shadow: inset 0 0 0 1.5px #E1E6EB; text-align: center; }
.filters button.on { background: var(--ink); color: #fff; box-shadow: inset 0 0 0 1.5px var(--ink); }
.mrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; min-height: 64px; text-align: left; }
.mrow + .mrow { border-top: 1px solid var(--line2); }
.mrow:active { background: var(--soft-bg); }
.mrow .meta { gap: 4px; }
.mrow .desc { font-size: 12px; }
.m-head { display: flex; align-items: center; gap: 14px; }
.m-head .nm { display: flex; align-items: center; gap: 8px; }
.m-head .nm b { font-size: 19px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.cell { background: var(--soft-bg); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.cell span { font-size: 12px; color: var(--ink3); }
.cell b { font-size: 15px; }
.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

/* ---------- 채팅방 ---------- */
.room { background: var(--room-bg); z-index: 5; }
.room .bar { padding: 0 4px 0 8px; }
.room .bar .ttl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.room .bar .ttl .t { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room .bar .ttl .c { font-size: 15px; color: var(--ink3); flex: none; }
.room .bar .ibtn:active { background: rgba(30,38,51,.06); }
.mega-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--mint); color: var(--mint-ink); display: flex; align-items: center; justify-content: center; flex: none; }
.msgs-wrap { flex: 1; min-height: 0; position: relative; }
.msgs { position: absolute; inset: 0; overflow-y: auto; padding: 4px 0 16px; -webkit-overflow-scrolling: touch; }
.load-more { text-align: center; color: var(--ink3); font-size: 12px; padding: 10px; }
.date-sep { display: flex; justify-content: center; padding: 16px 0 6px; }
.date-sep span { font-size: 12px; color: var(--ink2); background: rgba(30,38,51,.07); padding: 6px 12px; border-radius: 12px; }
.sys { display: flex; justify-content: center; padding: 10px 24px 2px; }
.sys span { font-size: 12px; color: var(--ink2); text-align: center; line-height: 1.5; }

.msg { display: flex; gap: 8px; padding: 0 16px 0 12px; margin-top: 4px; }
.msg.first { margin-top: 12px; }
.msg .avs { width: 40px; flex: none; }
.msg .col { display: flex; flex-direction: column; gap: 5px; min-width: 0; max-width: 74%; }
.msg .sender { font-size: 12px; color: var(--ink2); padding-left: 2px; }
.msg .line { display: flex; align-items: flex-end; gap: 6px; }
.bubble { background: #fff; padding: 10px 13px; border-radius: 18px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.msg.first:not(.mine) .bubble { border-radius: 6px 18px 18px 18px; }
.bubble .ntitle { font-weight: 700; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.bubble a { color: var(--mint-text); word-break: break-all; }
.meta-col { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; flex: none; padding-bottom: 1px; }
.meta-col .unread { font-size: 11px; font-weight: 700; color: var(--berry); }
.meta-col .unread:empty { display: none; }
.meta-col .tm { font-size: 11px; color: var(--ink3); white-space: nowrap; }
.msg.mine { justify-content: flex-end; padding: 0 16px; }
.msg.mine .line { max-width: 80%; min-width: 0; }
.msg.mine .meta-col { align-items: flex-end; }
.msg.mine .bubble { background: var(--mint-bubble); }
.msg.mine.first .bubble { border-radius: 18px 6px 18px 18px; }
.msg.pending .bubble, .msg.failed .bubble { opacity: .6; }
.retry-btn { display: flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px 0 6px; border-radius: 14px; background: #fff; color: var(--berry); font-size: 11px; font-weight: 700; flex: none; box-shadow: inset 0 0 0 1.5px var(--berry-line); }
.retry-btn:active { background: var(--berry-100); }
.msg .spin-sm { margin-bottom: 4px; }
.bubble.photo { padding: 0; background: none !important; border-radius: 16px !important; overflow: hidden; display: block; flex: none; }
.bubble.photo img { width: 200px; max-height: 280px; min-height: 120px; object-fit: cover; background: var(--sky); border-radius: 16px; }
.mega-av { width: 40px; height: 40px; border-radius: 50%; background: var(--mint); color: var(--mint-ink); display: flex; align-items: center; justify-content: center; }

.new-pill { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); height: 40px; padding: 0 16px 0 14px; border-radius: 20px; background: var(--ink); color: #fff; font-size: 13px; display: flex; align-items: center; gap: 6px; box-shadow: 0 8px 20px rgba(30,38,51,.22); white-space: nowrap; animation: mtFade .2s; z-index: 2; }

.composer { display: flex; flex-direction: column; gap: 8px; padding: 8px 12px calc(8px + var(--safe-b)); background: #fff; flex: none; }
.composer .crow { display: flex; align-items: flex-end; gap: 8px; }
.composer .hint-line { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mint-text); padding: 2px 4px 0; }
.photo-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--field); color: var(--ink2); display: flex; align-items: center; justify-content: center; flex: none; }
.photo-btn:active { background: var(--disabled); }
.ta-wrap { flex: 1; min-width: 0; background: var(--field); border-radius: 22px; padding: 11px 16px; min-height: 44px; display: flex; }
.ta-wrap textarea { flex: 1; width: 100%; border: 0; background: transparent; resize: none; outline: none; font-size: 16px; line-height: 22px; max-height: 110px; padding: 0; display: block; height: 22px; }
.send-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--mint); color: var(--mint-ink); display: flex; align-items: center; justify-content: center; flex: none; transition: background .15s; }
.send-btn:active { transform: scale(.94); }
.send-btn:disabled { background: var(--disabled); color: #9AA2AD; transform: none; }
.notice-bar { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 16px calc(var(--safe-b)); background: #fff; color: var(--ink2); font-size: 14px; flex: none; }

/* ---------- 시트 ---------- */
.sheet-back { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-dim { position: absolute; inset: 0; background: rgba(20,28,40,.42); animation: mtFade .2s ease; }
.sheet {
  position: relative; background: #fff; border-radius: 26px 26px 0 0; padding: 8px 20px calc(20px + var(--safe-b));
  max-height: 90%; overflow-y: auto; animation: mtUp .32s cubic-bezier(.2,.8,.2,1); box-shadow: 0 -8px 30px rgba(20,28,40,.12);
}
.handle { width: 38px; height: 5px; border-radius: 3px; background: #D9DEE5; margin: 0 auto 6px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-bottom: 8px; }
.sheet-head h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.4px; margin: 0; }
.sheet-head .ibtn { margin-right: -10px; color: var(--ink2); }
.sheet .sub-text { font-size: 13px; color: var(--ink3); margin: -6px 0 12px; }
.bleed { margin: 0 -20px; }
.confirm { padding: 18px 4px 0; text-align: center; }
.confirm h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.4; margin: 0; }
.confirm p { font-size: 14px; color: var(--ink2); margin: 10px 0 0; line-height: 1.6; }
.notif-ask-ic { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 20px; background: #FFE6DE; color: #A2442C; margin-bottom: 12px; }
.notif-ask p { word-break: keep-all; }
.notif-ask p b { color: var(--ink); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; }

.profile-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 0 4px; }
.profile-card .pname { font-size: 23px; font-weight: 700; margin-top: 16px; letter-spacing: -0.5px; }
.profile-card .pid { font-size: 14px; color: var(--ink3); margin-top: 6px; }
.profile-card .pstatus { margin-top: 16px; background: var(--field); border-radius: 16px; padding: 11px 16px; font-size: 15px; color: var(--ink2); max-width: 100%; }
.sheet-close-only { display: flex; justify-content: flex-end; margin: -6px -10px 0; }
.sheet-close-only .ibtn { color: var(--ink2); }

.find-row { display: flex; gap: 8px; }
.find-input { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; height: 52px; padding: 0 14px; background: var(--field); border-radius: 14px; border: 1.5px solid transparent; }
.find-input.err { border-color: var(--berry); }
.find-input span { color: var(--ink3); font-size: 16px; }
.find-input input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; height: 100%; }
.find-btn { height: 52px; padding: 0 20px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 700; flex: none; }
.find-btn:active { background: #3A4352; }
.idle-text { padding: 28px 8px 16px; text-align: center; font-size: 14px; color: var(--ink3); line-height: 1.6; }
.found { margin-top: 16px; background: var(--soft-bg); border-radius: 22px; padding: 26px 20px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.found .fn { font-size: 18px; font-weight: 700; margin-top: 12px; }
.found .fid { font-size: 13px; color: var(--ink3); margin-top: 5px; }
.found .fst { font-size: 14px; color: var(--ink2); margin-top: 10px; }
.found .act { width: 100%; margin-top: 20px; }
.found .already { width: 100%; height: 52px; border-radius: 16px; background: #E9EDF1; color: var(--ink2); font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.found .itsme { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--disabled); font-size: 15px; color: var(--ink2); }

.sel-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; }
.sel-chip { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 8px 0 4px; border-radius: 20px; background: var(--mint-100); color: var(--mint-ink); font-size: 13px; flex: none; }
.sel-chip svg { color: var(--mint-text); }
.pick-list { max-height: 264px; overflow-y: auto; }
.pick { display: flex; align-items: center; gap: 14px; width: 100%; padding: 8px 20px; min-height: 60px; text-align: left; }
.pick:active { background: var(--soft-bg); }
.pick .nm { flex: 1; font-size: 15px; }
.ck { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; box-shadow: inset 0 0 0 2px #CBD2DA; color: var(--mint-ink); flex: none; transition: all .15s; }
.ck svg { display: none; }
.pick.on .ck { background: var(--mint); box-shadow: inset 0 0 0 2px var(--mint); }
.pick.on .ck svg { display: block; }

.menu-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 8px 20px; min-height: 58px; text-align: left; }
.menu-row:active { background: var(--soft-bg); }
.menu-row.invite span:last-child { font-size: 15px; font-weight: 700; color: var(--mint-text); }
.menu-row .circ { width: 44px; height: 44px; border-radius: 50%; background: var(--mint-100); color: var(--mint-text); display: flex; align-items: center; justify-content: center; flex: none; }
.menu-row.leave { color: var(--berry); gap: 10px; min-height: 56px; }
.menu-row.leave:active { background: var(--berry-50); }
.divider { height: 1px; background: var(--line); margin: 8px 0; }

.key-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--lav-100); color: #5B3FC4; display: flex; align-items: center; justify-content: center; }
.temp-pw { width: 100%; margin-top: 20px; padding: 24px 12px; border-radius: 20px; background: var(--soft-bg); border: 1.5px dashed #C9D0D8; font-size: 32px; font-weight: 700; letter-spacing: 4px; color: var(--ink); text-align: center; word-break: break-all; }
.compose-box { background: var(--field); border-radius: 16px; padding: 14px 16px 10px; }
.compose-box textarea { width: 100%; height: 150px; border: 0; background: transparent; resize: none; outline: none; font-size: 16px; line-height: 1.6; padding: 0; display: block; }
.edit-av { position: relative; }
.cam-btn { position: absolute; right: -6px; bottom: -6px; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; border: 3px solid #fff; }
.step { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--soft-bg); }
.step .num { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.step .tx { flex: 1; font-size: 15px; }

/* ---------- 토스트·배너·사진 보기 ---------- */
.toast { position: absolute; left: 12px; right: 12px; top: calc(var(--safe-t) + 8px); z-index: 70; animation: mtDown .35s cubic-bezier(.2,.8,.2,1); }
.toast > button, .toast > div { width: 100%; display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: rgba(255,255,255,.97); border-radius: 20px; box-shadow: 0 10px 30px rgba(30,38,51,.16), 0 0 0 1px rgba(30,38,51,.04); text-align: left; }
.toast .t-ico { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; background: var(--mint); color: var(--mint-ink); }
.toast .t-ico.err { background: var(--berry-100); color: var(--berry); }
.toast .t-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.toast .t-from { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink3); }
.toast .t-title { font-size: 14px; font-weight: 700; line-height: 1.4; }
.toast .t-text { font-size: 13px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast.info .t-title { white-space: normal; }

.offline-bar { position: absolute; left: 0; right: 0; top: var(--safe-t); height: 42px; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 0 16px; background: var(--lemon-100); color: #6B4A00; font-size: 13px; }
.offline-bar .spin-sm { border-color: rgba(107,74,0,.25); border-top-color: #6B4A00; }
#app.offline::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: var(--safe-t); background: var(--lemon-100); z-index: 30; }

.viewer { position: absolute; inset: 0; z-index: 60; background: #000; display: flex; flex-direction: column; color: #fff; animation: mtFade .2s; padding-top: var(--safe-t); padding-bottom: var(--safe-b); }
.viewer .vbar { height: 56px; display: flex; align-items: center; padding: 0 8px; flex: none; }
.viewer .vbar .ibtn { color: #fff; }
.viewer .vbar .ibtn:active { background: rgba(255,255,255,.12); }
.viewer .vt { flex: 1; text-align: center; display: flex; flex-direction: column; gap: 3px; }
.viewer .vt b { font-size: 15px; }
.viewer .vt span { font-size: 12px; color: #B8BEC7; }
.viewer .vimg { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.viewer .vimg img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer .vfoot { display: flex; justify-content: center; padding: 16px; flex: none; }
.viewer .save { height: 48px; padding: 0 22px; border-radius: 24px; background: rgba(255,255,255,.16); display: flex; align-items: center; gap: 8px; font-size: 15px; color: #fff; text-decoration: none; }
.viewer .save:active { background: rgba(255,255,255,.26); }

/* ---------- v1.5: 이모티콘 ---------- */
.ta-wrap { align-items: flex-end; padding-right: 8px; }
.emo-btn { width: 34px; height: 34px; margin: -6px 0 -6px 4px; border-radius: 50%; color: var(--ink3); display: flex; align-items: center; justify-content: center; flex: none; }
.emo-btn:active { background: var(--disabled); }
.emo-btn.on { color: var(--mint-text); background: var(--mint-100); }
.sticker-panel { margin: 0 -12px calc(-8px - var(--safe-b)); padding: 4px 12px calc(10px + var(--safe-b)); max-height: 264px; overflow-y: auto; border-top: 1px solid var(--line); background: #fff; -webkit-overflow-scrolling: touch; }
.stk-sec { font-size: 12px; color: var(--ink3); padding: 10px 4px 4px; }
.stk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.stk { aspect-ratio: 1; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.stk:active { background: var(--soft-bg); }
.stk.on { background: var(--mint-50); box-shadow: inset 0 0 0 2px var(--mint); }
.stk svg { width: 100%; height: auto; max-width: 84px; }
.stk-preview { position: absolute; left: 0; right: 0; bottom: 0; height: 132px; display: flex; align-items: center; justify-content: center; background: rgba(246, 251, 249, .9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 3; animation: mtFade .15s; }
.stk-big { border-radius: 18px; padding: 4px; }
.stk-big:active { transform: scale(.96); }
.stk-x { position: absolute; top: 6px; right: 8px; color: var(--ink2); }
.ibtn.sm { width: 36px; height: 36px; }
.bubble.sticker { padding: 0; background: none !important; border-radius: 0 !important; flex: none; line-height: 0; }
.bubble.sticker svg { display: block; }

/* ---------- v1.5: 연락처·추천 친구·휴대폰 번호 ---------- */
.find-card { display: flex; align-items: center; gap: 12px; margin: 0 16px 8px; padding: 12px 14px; width: calc(100% - 32px); border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); text-align: left; }
.find-card:active { background: var(--soft-bg); }
.find-card .tile { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.find-card .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.find-card .name { font-size: 15px; font-weight: 700; }
.find-card .desc { font-size: 12px; }
.row.sug { gap: 6px; padding-right: 12px; }
.row.sug:active { background: none; }
.sug-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; text-align: left; }
.sug-main .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sug-main .name { font-size: 16px; }
.row.sug .ibtn { color: var(--ink4); }
.mini-btn { height: 34px; padding: 0 14px; border-radius: 17px; background: var(--mint); color: var(--mint-ink); font-size: 13px; font-weight: 700; flex: none; }
.mini-btn:active { background: var(--mint-press); }
.mini-btn:disabled { background: var(--disabled); color: #9AA2AD; }
.kv-line { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--soft-bg); font-size: 13px; color: var(--ink2); line-height: 1.5; }
.kv-line span { flex: 1; min-width: 0; }
.kv-line b { color: var(--ink); }
.kv-line.warn { background: var(--lemon-100); color: #6B4A00; }
.link-btn { height: 32px; padding: 0 12px; border-radius: 10px; background: #fff; color: var(--mint-text); font-size: 13px; font-weight: 700; flex: none; box-shadow: inset 0 0 0 1.5px var(--line); }
.howto { margin-top: 12px; background: var(--soft-bg); border-radius: 14px; padding: 12px 14px; font-size: 13px; color: var(--ink2); line-height: 1.6; }
.howto summary { font-weight: 700; color: var(--ink); cursor: pointer; }
.howto ol { margin: 8px 0 0; padding-left: 20px; }
.howto p { margin: 8px 0 0; }
.card-line { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px; border-radius: 16px; background: var(--soft-bg); }
.card-line .label { flex: 1; font-size: 15px; }
.card-line .sub { display: block; font-size: 12px; color: var(--ink3); line-height: 1.45; margin-top: 4px; }
.cell.wide { grid-column: 1 / -1; }

/* ---------- v1.6: 성능 ---------- */
/* 메시지·채팅 목록 한 줄씩 레이아웃을 따로 계산 → 새 메시지가 와도 전체를 다시 계산하지 않음 */
.mw, .cw { contain: layout style; }

/* ---------- v1.6: 움직이는 이모티콘 ----------
   평소에는 멈춰 있고, .play(새로 온 이모티콘·누른 이모티콘)일 때 3번, 미리보기·고른 칸에서는 계속 움직임.
   CSS 변형(transform)·투명도만 써서 가볍게 움직임. */
.sticker-svg .ab, .sticker-svg .ax, .sticker-svg .ae { transform-box: fill-box; transform-origin: 50% 50%; }
.sticker-svg .ab { transform-origin: 50% 100%; }
:is(.play, .stk.on, .stk-big) .sticker-svg { --n: 3; }
:is(.stk.on, .stk-big) .sticker-svg { --n: infinite; }

:is(.play, .stk.on, .stk-big) .ae-blink { animation: stBlink 1.6s ease-in-out var(--n); }
@keyframes stBlink { 0%,40%,52%,100%{transform:scaleY(1)} 46%{transform:scaleY(.1)} }
:is(.play, .stk.on, .stk-big) .ab-bounce { animation: stB-bounce 1.1s ease-in-out var(--n); }
@keyframes stB-bounce { 0%,100%{transform:none}30%{transform:translateY(-5px)}55%{transform:scale(1.05,.95)}75%{transform:translateY(-1.5px)} }
:is(.play, .stk.on, .stk-big) .ab-jump { animation: stB-jump 1s ease-in-out var(--n); }
@keyframes stB-jump { 0%,100%{transform:none}18%{transform:scale(1.06,.9)}45%{transform:translateY(-9px) scale(.96,1.05)}70%{transform:scale(1.05,.95)}85%{transform:none} }
:is(.play, .stk.on, .stk-big) .ab-sway { animation: stB-sway 1.6s ease-in-out var(--n); }
@keyframes stB-sway { 0%,100%{transform:rotate(0)}25%{transform:rotate(-5deg)}75%{transform:rotate(5deg)} }
:is(.play, .stk.on, .stk-big) .ab-shake { animation: stB-shake .8s ease-in-out var(--n); }
@keyframes stB-shake { 0%,100%{transform:none}15%,45%,75%{transform:translateX(-2.6px)}30%,60%,90%{transform:translateX(2.6px)} }
:is(.play, .stk.on, .stk-big) .ab-giggle { animation: stB-giggle .9s ease-in-out var(--n); }
@keyframes stB-giggle { 0%,100%{transform:none}10%,30%,50%,70%{transform:translateY(-2px) rotate(-2.5deg)}20%,40%,60%,80%{transform:translateY(1px) rotate(2.5deg)} }
:is(.play, .stk.on, .stk-big) .ab-nod { animation: stB-nod 1s ease-in-out var(--n); }
@keyframes stB-nod { 0%,100%{transform:none}20%,60%{transform:translateY(3px) scale(1.02,.95)}40%,80%{transform:translateY(-1px)} }
:is(.play, .stk.on, .stk-big) .ab-bow { animation: stB-bow 1.4s ease-in-out var(--n); }
@keyframes stB-bow { 0%,100%{transform:none}35%,65%{transform:rotate(9deg) translateY(2px)} }
:is(.play, .stk.on, .stk-big) .ab-pulse { animation: stB-pulse 1.1s ease-in-out var(--n); }
@keyframes stB-pulse { 0%,100%{transform:scale(1)}15%{transform:scale(1.07)}30%{transform:scale(.98)}45%{transform:scale(1.05)}60%{transform:scale(1)} }
:is(.play, .stk.on, .stk-big) .ab-jolt { animation: stB-jolt 1s ease-out var(--n); }
@keyframes stB-jolt { 0%,100%{transform:none}10%{transform:translateY(-6px) scale(1.08)}25%{transform:scale(1.02)}35%{transform:translateX(-1.2px)}45%{transform:translateX(1.2px)}55%{transform:none} }
:is(.play, .stk.on, .stk-big) .ab-tilt { animation: stB-tilt 1.4s ease-in-out var(--n); }
@keyframes stB-tilt { 0%,100%{transform:none}30%,70%{transform:rotate(-11deg)} }
:is(.play, .stk.on, .stk-big) .ab-droop { animation: stB-droop 1.8s ease-in-out var(--n); }
@keyframes stB-droop { 0%,100%{transform:none}50%{transform:translateY(2.5px) scale(1.03,.94)} }
:is(.play, .stk.on, .stk-big) .ab-sob { animation: stB-sob .7s linear var(--n); }
@keyframes stB-sob { 0%,100%{transform:none}12%,37%,62%,87%{transform:translateY(-1.3px)}25%,50%,75%{transform:translateY(1.3px)} }
:is(.play, .stk.on, .stk-big) .ab-breathe { animation: stB-breathe 2.2s ease-in-out var(--n); }
@keyframes stB-breathe { 0%,100%{transform:scale(1)}50%{transform:scale(1.04,.97)} }
:is(.play, .stk.on, .stk-big) .ab-groove { animation: stB-groove 1.2s ease-in-out var(--n); }
@keyframes stB-groove { 0%,100%{transform:none}25%{transform:rotate(-6deg) translateY(-2px)}50%{transform:none}75%{transform:rotate(6deg) translateY(-2px)} }
:is(.play, .stk.on, .stk-big) .ab-shy { animation: stB-shy 1.6s ease-in-out var(--n); }
@keyframes stB-shy { 0%,100%{transform:none}30%,70%{transform:rotate(-7deg) scale(.97)}50%{transform:rotate(-4deg) scale(.97)} }
:is(.play, .stk.on, .stk-big) .ab-wiggle { animation: stB-wiggle 1s ease-in-out var(--n); }
@keyframes stB-wiggle { 0%,100%{transform:none}25%{transform:rotate(-4deg)}75%{transform:rotate(4deg)} }
:is(.play, .stk.on, .stk-big) .ax-wave { animation: stX-wave .9s ease-in-out var(--n); }
@keyframes stX-wave { 0%,100%{transform:rotate(0)}25%,75%{transform:rotate(-24deg)}50%{transform:rotate(14deg)} }
:is(.play, .stk.on, .stk-big) .ax-float { animation: stX-float 1.4s ease-in-out var(--n); }
@keyframes stX-float { 0%,100%{transform:none;opacity:1}50%{transform:translateY(-5px) scale(1.15);opacity:.8} }
:is(.play, .stk.on, .stk-big) .ax-pop { animation: stX-pop 1.2s ease-out var(--n); }
@keyframes stX-pop { 0%{transform:scale(.3);opacity:0}25%{transform:scale(1.25);opacity:1}40%{transform:scale(.92)}55%,100%{transform:scale(1)} }
:is(.play, .stk.on, .stk-big) .ax-twinkle { animation: stX-twinkle 1.1s ease-in-out var(--n); }
@keyframes stX-twinkle { 0%,100%{transform:none;opacity:1}50%{transform:scale(.35) rotate(45deg);opacity:.5} }
:is(.play, .stk.on, .stk-big) .ax-drip { animation: stX-drip 1.3s ease-in var(--n); }
@keyframes stX-drip { 0%,100%{transform:none;opacity:1}60%{transform:translateY(7px);opacity:0}61%{transform:translateY(-2px);opacity:0} }
:is(.play, .stk.on, .stk-big) .ax-bob { animation: stX-bob 1.2s ease-in-out var(--n); }
@keyframes stX-bob { 0%,100%{transform:none}50%{transform:translateY(-3px) rotate(8deg)} }
:is(.play, .stk.on, .stk-big) .ax-stream { animation: stX-stream .5s ease-in-out var(--n); }
@keyframes stX-stream { 0%,100%{transform:scaleY(1)}50%{transform:scaleY(.72)} }
:is(.play, .stk.on, .stk-big) .ax-throb { animation: stX-throb .8s ease-in-out var(--n); }
@keyframes stX-throb { 0%,100%{transform:scale(1)}40%{transform:scale(1.4)}60%{transform:scale(.9)} }
:is(.play, .stk.on, .stk-big) .ax-zz { animation: stX-zz 1.8s ease-out var(--n); }
@keyframes stX-zz { 0%,100%{transform:none;opacity:1}70%{transform:translate(4px,-6px) scale(1.25);opacity:0}71%{transform:translate(-2px,2px) scale(.6);opacity:0} }
:is(.play, .stk.on, .stk-big) .ax-fall { animation: stX-fall 1.4s ease-in var(--n); }
@keyframes stX-fall { 0%,100%{transform:none;opacity:1}70%{transform:translateY(10px) rotate(170deg);opacity:0}71%{transform:translateY(-4px);opacity:0} }
:is(.play, .stk.on, .stk-big) .ax-punch { animation: stX-punch .9s ease-in-out var(--n); }
@keyframes stX-punch { 0%,100%{transform:none}30%{transform:translateY(-7px) scale(1.12)}50%{transform:translateY(1px)} }
:is(.play, .stk.on, .stk-big) .ax-beat { animation: stX-beat 1s ease-in-out var(--n); }
@keyframes stX-beat { 0%,100%{transform:scale(1)}15%{transform:scale(1.18)}30%{transform:scale(.95)}45%{transform:scale(1.12)}60%{transform:scale(1)} }
:is(.play, .stk.on, .stk-big) .ax-hat { animation: stX-hat 1s ease-in-out var(--n); }
@keyframes stX-hat { 0%,100%{transform:rotate(0)}50%{transform:rotate(-14deg)} }
:is(.play, .stk.on, .stk-big) .ax-flutter { animation: stX-flutter .6s ease-in-out var(--n); }
@keyframes stX-flutter { 0%,100%{transform:rotate(0)}50%{transform:rotate(18deg)} }
:is(.play, .stk.on, .stk-big) .ax-stop { animation: stX-stop 1s ease-in-out var(--n); }
@keyframes stX-stop { 0%,100%{transform:none}35%,60%{transform:scale(1.22) translateX(1.5px)} }
:is(.play, .stk.on, .stk-big) .ax-wiggle { animation: stX-wiggle .9s ease-in-out var(--n); }
@keyframes stX-wiggle { 0%,100%{transform:rotate(0)}25%{transform:rotate(-14deg)}75%{transform:rotate(14deg)} }
@media (prefers-reduced-motion: reduce) {
  .sticker-svg .ab, .sticker-svg .ax, .sticker-svg .ae { animation: none !important; }
}
.sticker-svg { overflow: visible; }
.mw.nolast .meta-col .tm { display: none; }

/* ---------- v1.7: 1:1·단체 구분, 친구 요청, 내보내기 ---------- */
.chat-filter { display: flex; gap: 8px; padding: 2px 16px 10px; }
.chat-filter button { position: relative; height: 34px; padding: 0 14px; border-radius: 17px; font-size: 13px; background: #fff; color: var(--ink2); box-shadow: inset 0 0 0 1.5px #E1E6EB; display: flex; align-items: center; gap: 5px; }
.chat-filter button .n { font-size: 12px; color: var(--ink4); }
.chat-filter button.on { background: var(--ink); color: #fff; box-shadow: inset 0 0 0 1.5px var(--ink); }
.chat-filter button.on .n { color: rgba(255,255,255,.7); }
.chat-filter .dot { position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--berry); }
.tag-group { flex: none; font-size: 10.5px; font-weight: 700; line-height: 1; padding: 4px 6px; border-radius: 6px; background: var(--lav-100, #ECE6FF); color: #5B3FC4; }
.title-line { gap: 6px; }
.row.req .mini-btn { background: var(--ink); color: #fff; }
.menu-row .sub { display: block; font-size: 12px !important; font-weight: 500 !important; color: var(--ink3) !important; margin-top: 2px; }
.menu-row.mem { padding: 0 12px 0 0; gap: 8px; }
.menu-row.mem:active { background: none; }
.mem-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 8px 0 8px 20px; min-height: 58px; text-align: left; }
.mem-main:active { background: var(--soft-bg); }
.chip.owner { font-size: 11px; padding: 3px 7px; border-radius: 7px; background: var(--lemon-100); color: #7A5300; }
.kick-btn { flex: none; height: 32px; padding: 0 12px; border-radius: 10px; font-size: 12px; font-weight: 700; color: var(--berry); background: #fff; box-shadow: inset 0 0 0 1.5px var(--berry-line, #F5C2CF); }
.kick-btn:active { background: var(--berry-50, #FFF3F6); }

/* ---------- v1.8: 메시지 삭제 ---------- */
.bubble.deleted { display: flex; align-items: center; gap: 6px; color: var(--ink3) !important; background: #fff !important; box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14px; }
.msg.mine .bubble.deleted { background: var(--mint-50) !important; }
.msgs .bubble { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.msg-menu { display: flex; flex-direction: column; margin: 4px -20px 0; }
.msg-menu .menu-row { gap: 14px; font-size: 16px; min-height: 56px; }

/* v1.9: 연락처로 친구 찾기 — 고른 연락처마다 결과 */
.cres-sum { display: flex; align-items: center; gap: 10px; padding: 2px 2px 10px; font-size: 15px; line-height: 1.5; color: var(--ink); }
.cres-sum b { color: var(--mint-text); }
.cres-list { margin: 0 -20px; border-top: 1px solid var(--line); }
.row.cres { gap: 12px; padding: 8px 20px; min-height: 62px; border-bottom: 1px solid var(--line); }
.row.cres:active { background: none; }
.row.cres .meta { gap: 3px; }
.row.cres .desc.hit { color: var(--mint-text); font-weight: 600; }
.row.cres.dim .name { color: var(--ink2); font-weight: 600; }
.row.cres > .spin-sm { margin-right: 10px; }
.av.cav { background: var(--line); color: var(--ink3); }
.cres-tag { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 11px; border-radius: 15px; font-size: 12px; font-weight: 700; background: var(--soft-bg); color: var(--ink2); }
.cres-tag.ok { background: var(--mint-50); color: var(--mint-text); }
.cres-help { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--soft-bg); font-size: 13px; line-height: 1.6; color: var(--ink2); }
.cres-help-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cres-help-btns .link-btn { display: inline-flex; align-items: center; gap: 5px; }

/* v1.10: 보내기 메뉴 (앨범·카메라·파일·연락처) */
.attach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 14px 0 4px; }
.attach-grid button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0; border-radius: 16px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.attach-grid button:active { background: var(--soft-bg); }
.attach-grid .tile { width: 58px; height: 58px; border-radius: 20px; display: flex; align-items: center; justify-content: center; }
.attach-note { text-align: center; font-size: 12px; color: var(--ink3); padding-top: 6px; }

/* 파일 말풍선 */
.bubble.file { display: flex; align-items: center; gap: 11px; width: 248px; max-width: 100%; padding: 11px 12px; text-align: left; white-space: normal; flex: 0 1 auto; }
.f-ic { flex: none; width: 42px; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; letter-spacing: -0.2px; background: var(--soft-bg); color: var(--ink2); }
.f-ic.k-pdf { background: var(--berry-100); color: #A3213F; }
.f-ic.k-xls { background: var(--mint-100); color: var(--mint-text); }
.f-ic.k-doc { background: var(--sky-100); color: #2C5A85; }
.f-ic.k-ppt { background: #FFE6DE; color: #A2442C; }
.f-ic.k-zip { background: var(--lemon-100); color: #7A5300; }
.f-ic.k-img, .f-ic.k-vid, .f-ic.k-aud { background: var(--lav-100); color: #5B3FC4; }
.f-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.f-name { font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }
.f-sub { font-size: 12px; color: var(--ink3); }
.f-dl { flex: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(30,38,51,.06); color: var(--ink2); }
.msg.pending .f-dl, .msg.failed .f-dl { visibility: hidden; }

/* 연락처 말풍선 */
.bubble.contact { width: 236px; max-width: 100%; padding: 0; white-space: normal; overflow: hidden; flex: 0 1 auto; }
.ct-top { display: flex; align-items: center; gap: 11px; padding: 13px 14px 11px; }
.ct-av { flex: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--lemon-100); color: #7A5300; }
.ct-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ct-label { font-size: 11px; font-weight: 700; color: var(--ink3); }
.ct-name { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.ct-tel { font-size: 13px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.ct-acts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(30,38,51,.08); }
.ct-acts a, .ct-acts button { display: flex; align-items: center; justify-content: center; gap: 4px; height: 40px; font-size: 13px; font-weight: 600; color: var(--ink2); text-decoration: none; word-break: keep-all; }
.ct-acts > * + * { border-left: 1px solid rgba(30,38,51,.08); }
.ct-acts a:active, .ct-acts button:active { background: rgba(30,38,51,.05); }
.ct-more { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.ct-more:empty { display: none; }
.ct-more .lbl { font-size: 12px; color: var(--ink3); margin-right: 2px; }
.chip-tel { height: 32px; padding: 0 12px; border-radius: 16px; font-size: 13px; background: var(--soft-bg); color: var(--ink2); box-shadow: inset 0 0 0 1.5px var(--line); }
.chip-tel.on { background: var(--mint-100); color: var(--mint-text); box-shadow: none; font-weight: 700; }

/* v1.11: 옆으로 밀어서 답장 */
.msgs { touch-action: pan-y; }
.mw { position: relative; }
.mw > .msg { transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.mw > .msg.swiping { transition: none; }
.sw-ic { position: absolute; top: 50%; left: 14px; width: 32px; height: 32px; margin-top: -16px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--mint-100); color: var(--mint-text); opacity: var(--sw, 0); transform: scale(calc(.55 + .45 * var(--sw, 0))); pointer-events: none; }
.mw.sw-mine .sw-ic { left: auto; right: 14px; transform: scale(calc(.55 + .45 * var(--sw, 0))) scaleX(-1); }
.reply-bar { display: flex; align-items: center; gap: 10px; margin: -2px -4px 0; padding: 6px 2px 8px 6px; border-bottom: 1px solid var(--line); }
.rb-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--mint-100); color: var(--mint-text); }
.rb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rb-t b { font-size: 13px; color: var(--mint-text); }
.rb-t span { font-size: 13px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-bar .ibtn { color: var(--ink3); flex: none; }
/* 말풍선 안의 원본 인용 */
.bubble .quote { display: flex; flex-direction: column; gap: 1px; margin: -1px -2px 7px; padding: 6px 10px 6px 9px; border-left: 3px solid var(--mint); border-radius: 4px 10px 10px 4px;
  background: rgba(30,38,51,.05); font-size: 13px; line-height: 1.4; white-space: normal; cursor: pointer; max-width: 260px; }
.msg.mine .bubble .quote { background: rgba(255,255,255,.55); }
.bubble .quote b { font-size: 12px; color: var(--mint-text); }
.bubble .quote span { color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bubble .quote.gone span { color: var(--ink4); font-style: italic; }
.mw.flash .bubble { animation: mtFlash 1.5s ease; }
@keyframes mtFlash { 0%, 55% { box-shadow: 0 0 0 3px rgba(62,200,160,.6); } 100% { box-shadow: 0 0 0 3px rgba(62,200,160,0); } }

/* v1.11: 공감 */
.rx-row { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 16px 0 60px; }
.rx-row.mine { justify-content: flex-end; padding: 4px 16px 0; }
.rx { display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 9px 0 7px; border-radius: 13px; background: #fff; font-size: 12px; font-weight: 700; color: var(--ink2);
  box-shadow: 0 1px 3px rgba(20,28,40,.1); font-variant-numeric: tabular-nums; }
.rx .e { font-size: 14px; line-height: 1; }
.rx.on { background: var(--mint-100); color: var(--mint-text); box-shadow: inset 0 0 0 1.5px var(--mint); }
.rx:active { transform: scale(.94); }
.rx-bar { display: flex; justify-content: space-between; gap: 2px; padding: 12px 2px 12px; }
.rx-bar button { width: 50px; height: 50px; border-radius: 50%; font-size: 27px; line-height: 1; display: flex; align-items: center; justify-content: center; background: var(--soft-bg); transition: transform .12s ease; }
.rx-bar button:active { transform: scale(1.2); }
.rx-bar button.on { background: var(--mint-100); box-shadow: inset 0 0 0 2px var(--mint); }
.rx-who { display: flex; flex-direction: column; gap: 4px; padding: 0 4px 10px; font-size: 13px; color: var(--ink2); line-height: 1.5; }
.rx-who .w { display: flex; gap: 6px; align-items: baseline; }
.rx-who .e { font-size: 14px; flex: none; }
.rx-bar + .msg-menu, .rx-who + .msg-menu { border-top: 1px solid var(--line); }

/* v1.13: 관리자 친구 연결 */
.pick .nm { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick .cn-n { font-size: 15px; }
.pick .cn-d { font-size: 12px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick.done { opacity: .6; }
.btn.md.soft svg { margin-right: 4px; }

/* v1.14: 친구 초대 링크·QR */
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 6px auto 0; padding: 18px 18px 14px; width: fit-content; min-width: 244px; min-height: 120px;
  border-radius: 22px; background: #fff; box-shadow: 0 0 0 1.5px var(--line), 0 6px 18px rgba(20,28,40,.06); }
.qr-box svg { display: block; border-radius: 6px; }
.qr-cap { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.qr-cap span:not(.av) { color: var(--ink3); font-size: 13px; }
.qr-link { margin: 12px auto 0; max-width: 100%; font-size: 12px; color: var(--ink3); text-align: center; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.invite-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--ink3); flex-wrap: wrap; }
.invite-banner { display: flex; align-items: center; gap: 12px; margin: 0 20px 14px; padding: 14px 16px; border-radius: 18px; background: var(--mint-50); box-shadow: inset 0 0 0 1.5px var(--mint-100); }
.invite-banner div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.invite-banner b { font-size: 15px; color: var(--ink); }
.invite-banner span:not(.av):not(.tile) { font-size: 13px; color: var(--mint-text); }
.invite-banner .tile { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.invite-accept { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 8px 6px; text-align: center; }
.invite-accept .nm { font-size: 20px; margin-top: 10px; }
.invite-accept .id { font-size: 13px; color: var(--ink3); }
.invite-accept .st { font-size: 14px; color: var(--ink2); margin-top: 4px; }
.invite-accept p { font-size: 15px; line-height: 1.6; color: var(--ink2); margin: 14px 0 6px; }
.invite-accept p b { color: var(--mint-text); }
#invBtns { margin-top: 12px; }

/* v1.15: 채팅방 알림 끄기 */
.mute-ic { display: inline-flex; align-items: center; flex: none; color: var(--ink4); }
#roomTitle .mute-ic { margin-left: 4px; }
.badge.muted { background: #B6BEC8; }
.card-line.mute-line { margin: 4px 0 6px; }
#roomMuteBtn { color: var(--ink2); }
#roomMuteBtn.off { color: var(--ink4); }

/* v1.15.1: 더보기의 친구 추가 묶음 */
.card-head { padding: 14px 16px 2px; font-size: 13px; font-weight: 700; color: var(--ink3); }
.item:has(.sub) { padding-top: 10px; padding-bottom: 10px; }

/* v1.16: 광고 탭 */
.ads-body { padding: 4px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.ad-card { display: block; width: 100%; text-align: left; border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1.5px var(--line), 0 4px 14px rgba(20,28,40,.05); }
.ad-card:active { transform: scale(.99); }
.ad-img { position: relative; display: block; background: var(--soft-bg); }
.ad-img img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: cover; }
.ad-badge { position: absolute; top: 10px; left: 10px; padding: 2px 7px; border-radius: 6px; background: rgba(20,28,40,.55); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .5px; }
.ad-meta { display: flex; flex-direction: column; gap: 3px; padding: 12px 16px 14px; }
.ad-meta b { font-size: 15px; }
.ad-meta span { display: flex; align-items: center; gap: 2px; font-size: 12px; color: var(--ink3); }
/* 관리자: 광고 관리 */
.ad-list { margin: 0 -20px; border-top: 1px solid var(--line); }
.ad-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--line); }
.ad-row.off .ad-thumb img { opacity: .4; filter: grayscale(1); }
.ad-thumb { flex: none; width: 76px; height: 48px; border-radius: 10px; overflow: hidden; background: var(--soft-bg); }
.ad-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.ad-info b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-info span { font-size: 12px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-info .ad-stat { color: var(--mint-text); font-weight: 600; }
.ad-row.off .ad-info .ad-stat { color: var(--ink4); }
.ad-ord { display: flex; flex-direction: column; flex: none; }
.ad-ord .ibtn { color: var(--ink3); }
.ad-ord .ibtn:disabled { opacity: .3; }
.ad-pick { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 150px; border-radius: 18px; overflow: hidden; background: var(--soft-bg); box-shadow: inset 0 0 0 2px var(--line); }
.ad-pick img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.ad-pick-hint { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px; color: var(--ink2); text-align: center; }
.ad-pick-hint span { font-size: 12px; color: var(--ink3); }
.ad-pick.has .ad-pick-hint { position: absolute; left: 10px; bottom: 10px; flex-direction: row; gap: 6px; padding: 6px 12px; border-radius: 12px; background: rgba(255,255,255,.92); font-size: 13px; }
.ad-pick.has .ad-pick-hint span { display: none; }
.danger-text { color: var(--berry) !important; }
/* v1.16.1: 광고 클릭 수 */
.ad-info .ad-stat { display: flex; align-items: center; gap: 6px; }
.ad-clicks { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--mint-100); color: var(--mint-text); font-size: 12px; font-weight: 800; }
.ad-row.off .ad-clicks { background: var(--soft-bg); color: var(--ink3); }
.ad-total { padding: 10px 14px; border-radius: 14px; background: var(--soft-bg); font-size: 13px; color: var(--ink2); margin-bottom: 12px; }
.ad-total b { color: var(--mint-text); font-size: 15px; }

/* v1.17: 약관 동의 · 차단 · 신고 · 회원 탈퇴 */
a.item { color: inherit; text-decoration: none; }
.agree { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.5; color: var(--ink2); cursor: pointer; }
.agree input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--mint-press); }
.agree a { color: var(--mint-text); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.agree-field { gap: 6px; }
.legal-links { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; color: var(--ink3); }
.legal-links a { color: var(--ink3); text-decoration: none; }
.legal-links b { color: var(--ink2); }
.screen.blocked .legal-links { margin-top: 10px; }
.big-icon.mint { background: var(--mint-100); color: var(--mint-text); }
.terms-card { display: flex; flex-direction: column; gap: 4px; padding: 10px 18px 14px; }
.terms-card > a { padding: 10px 0; font-size: 15px; color: var(--mint-text); font-weight: 700; border-bottom: 1px solid var(--line); text-decoration: none; }
.terms-card .agree { margin-top: 10px; }
.sheet-desc { margin: 0 0 14px; font-size: 13.5px; line-height: 1.6; color: var(--ink2); }
.reason-list { display: flex; flex-direction: column; border-radius: 16px; background: var(--soft-bg); overflow: hidden; }
.reason { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 50px; font-size: 15px; cursor: pointer; }
.reason + .reason { border-top: 1px solid var(--line2); }
.reason input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--berry); }
#repDetail, #wordsBox { margin-top: 12px; height: auto; min-height: 80px; padding: 12px 14px; resize: vertical; line-height: 1.5; font-family: inherit; }
.prof-safety { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.prof-safety button { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 14px; border-radius: 18px; font-size: 13px; color: var(--ink3); }
.prof-safety button:active { background: var(--gray-btn); }
.bubble.deleted.blocked { color: var(--ink3); }
.withdraw-link { display: block; margin: 2px auto 0; padding: 10px 16px; font-size: 13px; color: var(--ink3); text-decoration: underline; text-underline-offset: 3px; }
.withdraw-info { padding: 14px 16px; border-radius: 16px; background: var(--soft-bg); font-size: 13.5px; line-height: 1.6; color: var(--ink2); margin-bottom: 14px; }
.withdraw-info p { margin: 0; }
.withdraw-info p + p, .withdraw-info ul + p { margin-top: 8px; }
.withdraw-info ul { margin: 6px 0 0; padding-left: 18px; }
.block-list { border-radius: 16px; background: #fff; }
.block-list .mrow { padding: 10px 4px; }
.block-list .btn.sm, .rep-actions .btn.sm { height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 12px; flex: none; }
.rep-list { display: flex; flex-direction: column; gap: 10px; }
.rep-card { padding: 14px; border-radius: 16px; background: var(--soft-bg); display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.rep-top { display: flex; align-items: center; gap: 8px; }
.rep-kind { font-size: 12px; color: var(--ink2); }
.rep-time { margin-left: auto; font-size: 12px; color: var(--ink3); }
.rep-who { color: var(--ink2); line-height: 1.5; }
.rep-who b { color: var(--ink); }
.rep-snap { padding: 10px 12px; border-radius: 12px; background: #fff; white-space: pre-wrap; word-break: break-all; line-height: 1.5; max-height: 160px; overflow: auto; }
.rep-snap img { display: block; max-width: 100%; max-height: 140px; border-radius: 8px; }
.rep-snap.gone { color: var(--ink3); }
.rep-gone { display: inline-block; margin-left: 6px; font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--berry-100); color: #A3213F; }
.rep-detail { font-size: 13px; color: var(--ink2); }
.rep-by { font-size: 12px; color: var(--ink3); }
.rep-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.rep-done { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--mint-text); font-weight: 700; }

/* v1.18: 관리자 화면 — 휴대폰은 위쪽 탭, PC(900px 이상)는 왼쪽 메뉴 */
.adm { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.adm-nav { flex: none; background: var(--soft-bg); }
.adm-top { display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 8px; }
.adm-top h1 { font-size: 20px; margin: 0; flex: 1; letter-spacing: -0.4px; }
.adm-refresh { color: var(--ink3); }
.adm-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tabs button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 20px; background: #fff; color: var(--ink2); font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 1.5px #E1E6EB; }
.adm-tabs button.on { background: var(--ink); color: #fff; box-shadow: none; }
.adm-badge { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--berry); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.adm-badge:empty { display: none; }
.adm-main { flex: 1; min-height: 0; overflow-y: auto; background: var(--soft-bg); }
.adm-sec { padding: 6px 16px 32px; display: flex; flex-direction: column; gap: 12px; }
.adm-sec > .search, .adm-sec .filters { margin-top: 0; }
.adm-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.adm-h h2 { font-size: 22px; margin: 4px 0 0; letter-spacing: -0.4px; }
.adm-date { font-size: 13px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kpi { background: #fff; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 4px; text-align: left; min-width: 0; }
button.kpi:active { transform: scale(.98); }
.kpi .k { font-size: 12.5px; color: var(--ink3); }
.kpi .n { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-n { min-width: 34px; height: 34px; padding: 0 6px; border-radius: 11px; background: var(--lemon-100); color: #7A5300; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; font-variant-numeric: tabular-nums; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 8px; }
.seg.mini { padding: 3px; border-radius: 12px; gap: 2px; }
.seg.mini button { height: 30px; font-size: 12.5px; padding: 0 10px; border-radius: 9px; }
.chart { width: 100%; height: auto; display: block; padding: 0 10px 6px; box-sizing: border-box; }
.chart .cg { stroke: var(--line2); stroke-width: 1; }
.chart .ct { fill: var(--ink3); font-size: 11px; }
.chart .cv { fill: var(--ink); font-size: 11px; font-weight: 700; }
.chart .cb { fill: var(--mint); }
.chart .cb.today { fill: var(--mint-press); }
.chart-note { margin: 0 16px 12px; font-size: 12px; color: var(--ink3); }
.mix { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 8px 12px 14px; }
.mix button { background: var(--soft-bg); border-radius: 14px; padding: 10px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.mix b { font-size: 18px; font-variant-numeric: tabular-nums; }
.mix span { font-size: 11px; color: var(--ink3); white-space: nowrap; }
.mem-tools { display: flex; gap: 8px; align-items: center; }
.mem-tools .search { flex: 1; margin: 0; min-width: 0; }
.adm-select { height: 48px; border-radius: 14px; border: 1.5px solid var(--disabled); background: #fff; padding: 0 8px; font: inherit; font-size: 14px; color: var(--ink); flex: none; max-width: 42%; }
.mem-head { display: none; }
.mem-row .c-st { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.mem-row .c-r { flex: none; min-width: 26px; text-align: right; }
.m-until { font-size: 11px; color: var(--berry); white-space: nowrap; }
.r-n { font-size: 13px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.pc-only { display: none; }
.more-btn { align-self: center; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.grid3 .cell b { font-size: 14px; word-break: keep-all; }
.adm-block { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.blk-h { font-size: 14px; font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.blk-h span { font-size: 12px; color: var(--ink3); font-weight: 500; }
.input.memo { height: auto; min-height: 76px; padding: 12px 14px; line-height: 1.5; resize: vertical; font-family: inherit; }
.hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hist li { background: var(--soft-bg); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; line-height: 1.5; word-break: break-all; }
.hist li span { display: block; font-size: 12px; color: var(--ink3); }
.empty-mini { font-size: 13px; color: var(--ink3); padding: 6px 2px; }
.note-berry { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--berry-50); color: #A3213F; font-size: 13.5px; font-weight: 600; }
.linkish { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; padding: 0; font: inherit; }
.inq-list { display: flex; flex-direction: column; }
.inq-row { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 16px; width: 100%; min-width: 0; }
.inq-row + .inq-row { border-top: 1px solid var(--line2); }
.inq-row:active { background: var(--soft-bg); }
.inq-l1 { display: flex; align-items: center; gap: 8px; }
.inq-cat { font-size: 12px; color: var(--ink2); }
.inq-time { margin-left: auto; font-size: 12px; color: var(--ink3); }
.inq-title { font-size: 15px; }
.inq-sub { font-size: 12.5px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inq-l1 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--berry); display: inline-block; }
.inq-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink3); margin-bottom: 12px; }
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; padding: 4px 0 12px; }
.tmsg { display: flex; flex-direction: column; gap: 3px; max-width: 88%; align-self: flex-start; }
.tmsg.adm { align-self: flex-end; align-items: flex-end; }
.tmsg .who { font-size: 12px; color: var(--ink3); }
.tmsg .tb { padding: 10px 14px; border-radius: 16px; background: var(--soft-bg); white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.55; }
.tmsg.adm .tb { background: var(--mint-100); }
.tmsg .tt { font-size: 11px; color: var(--ink3); }
.inq-cats { margin-top: 2px; flex-wrap: wrap; }
.todo-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.screen.blocked .until { margin: -2px 0 0; color: var(--berry); font-weight: 700; }

@media (min-width: 900px) {
  #app.adm-wide { max-width: 1240px; }
  #app.adm-wide .sheet-back { align-items: center; justify-content: center; }
  #app.adm-wide .sheet { width: min(620px, 92%); border-radius: 24px; max-height: 86%; }
  #app.adm-wide .sheet .handle { display: none; }
  .adm { flex-direction: row; }
  .adm-nav { width: 220px; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: #fff; }
  .adm-top { height: 64px; padding: 0 10px; }
  .adm-tabs { flex-direction: column; padding: 8px 12px; gap: 4px; overflow: visible; }
  .adm-tabs button { width: 100%; justify-content: flex-start; height: 44px; border-radius: 12px; background: transparent; box-shadow: none; font-size: 15px; }
  .adm-tabs button:hover { background: var(--soft-bg); }
  .adm-tabs button.on { background: var(--ink); color: #fff; }
  .adm-tabs .adm-badge { margin-left: auto; }
  .adm-sec { padding: 22px 32px 48px; max-width: 1000px; gap: 16px; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .pc-only { display: inline; }
  .m-only { display: none; }
  .mem-head, .mem-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 150px 110px 110px 64px; gap: 14px; align-items: center; }
  .mem-head { padding: 12px 16px 10px; font-size: 12px; font-weight: 700; color: var(--ink3); border-bottom: 1px solid var(--line2); }
  .mem-head span:first-child { grid-column: 1 / span 2; }
  .mem-head span:last-child, .mem-row .c-r { text-align: right; }
  .mem-row .c-st { align-items: flex-start; }
  .mem-row .c-d { font-size: 13px; color: var(--ink2); font-variant-numeric: tabular-nums; }
  .mem-row:hover, .inq-row:hover { background: var(--soft-bg); }
  .rep-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
.seg.mini button { white-space: nowrap; flex: none; }
.chart { max-width: 760px; margin: 0 auto; }
@media (max-width: 899px) {
  .adm-tabs button svg { display: none; }
  .adm-tabs button { padding: 0 13px; gap: 5px; }
}
@media (max-width: 899px) {
  .chart .ct, .chart .cv { font-size: 19px; }
}
/* v1.18.1: 키보드가 올라와 있을 때는 아래쪽 안전 여백(홈 표시줄 자리)을 빼서 입력창이 키보드에 바로 붙게 */
html.kb-open .composer { padding-bottom: 8px; }

/* v1.19: 보관 기간이 지난 사진·파일 */
.bubble.expired { display: flex; align-items: center; gap: 10px; width: 236px; max-width: 100%; padding: 11px 12px; color: var(--ink3) !important; background: #fff !important; box-shadow: inset 0 0 0 1.5px var(--line); text-align: left; white-space: normal; }
.bubble.expired .ex-meta { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.bubble.expired .ex-name { font-size: 14px; font-weight: 600; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble.expired .ex-sub { font-size: 12.5px; color: var(--ink3); }
.attach-note b { color: var(--ink2); }

/* v1.19: 관리자 현황판 — 사용량 */
.use-body { padding: 4px 16px 4px; }
.use-row { padding: 10px 0 12px; border-bottom: 1px solid var(--line2); }
.use-row:last-of-type { border-bottom: 0; }
.use-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.use-l { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.use-v { font-size: 13px; color: var(--ink2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.use-v small { font-size: 12px; color: var(--ink3); margin-left: 4px; }
.use-bar { height: 10px; border-radius: 6px; background: var(--field); margin-top: 8px; overflow: hidden; }
.use-bar i { display: block; height: 100%; min-width: 3px; border-radius: 6px; background: var(--mint); }
.use-row.warm .use-bar i { background: #F2B53B; }
.use-row.hot .use-bar i { background: var(--berry); }
.use-row.hot .use-v small { color: var(--berry); font-weight: 700; }
.use-sub { margin-top: 7px; font-size: 12.5px; color: var(--ink3); line-height: 1.6; word-break: keep-all; }
.use-sub b { color: var(--ink2); }
.use-sub .link-btn { height: 26px; padding: 0 9px; font-size: 12px; margin-left: 4px; vertical-align: 1px; }
.use-warn { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--berry-50); color: var(--berry); font-size: 13px; line-height: 1.5; word-break: keep-all; }
.use-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 6px; padding: 12px; border-radius: 12px; background: var(--field); color: var(--ink2); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.use-body .chart-note { margin: 4px 0 12px; }

/* v1.20.2: 데이터베이스 업데이트 안내 */
.db-warn { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 14px 16px; border-radius: 16px; background: var(--berry-50); color: var(--berry); box-shadow: inset 0 0 0 1.5px var(--berry-line); }
.db-warn b { color: var(--berry); font-size: 15px; }
.db-warn p { margin: 6px 0 8px; color: var(--ink2); font-size: 13.5px; line-height: 1.6; word-break: keep-all; }
.db-warn ol { margin: 0; padding-left: 18px; color: var(--ink2); font-size: 13.5px; line-height: 1.8; }
.db-warn ol b { color: var(--ink); font-size: 13.5px; }

/* v1.22: 대화방 메뉴(삼선) 안의 보관 기간 안내 */
.keep-info { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 6px; padding: 12px 14px; border-radius: 14px; background: var(--field); color: var(--ink3); font-size: 13px; line-height: 1.55; word-break: keep-all; }
.keep-info b { display: block; color: var(--ink2); font-size: 13.5px; margin-bottom: 2px; }

/* v1.22: 알림 소리 */
.snd-sec { font-size: 13px; font-weight: 700; color: var(--ink3); margin: 6px 0 6px; }
.snd-sec:not(:first-child) { margin-top: 20px; }
.snd-list { padding: 4px 0; margin-bottom: 4px; }
.snd-row { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 50px; padding: 0 16px; font-size: 15px; text-align: left; }
.snd-row + .snd-row { border-top: 1px solid var(--line2); }
.snd-row .ck { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: transparent; box-shadow: inset 0 0 0 1.5px var(--ring); }
.snd-row.on { font-weight: 700; }
.snd-row.on .ck { background: var(--mint); color: #fff; box-shadow: none; }
.snd-row.vib { padding-right: 8px; }
.snd-guide { padding: 12px 14px; border-radius: 14px; background: var(--field); font-size: 13.5px; line-height: 1.65; color: var(--ink2); word-break: keep-all; }
.snd-guide > b { display: block; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.snd-guide ol { margin: 0; padding-left: 18px; }
.snd-guide p { margin: 6px 0 0; }
.snd-other { margin-top: 10px; }
.snd-other summary { cursor: pointer; font-size: 13.5px; color: var(--mint-text); font-weight: 700; padding: 6px 0; }
.snd-other .snd-guide { margin-top: 8px; }
.snd-dl { display: flex; gap: 8px; flex-wrap: wrap; }
.snd-dl .btn { flex: 1; min-width: 140px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }

/* v1.25: 가입 화면 '권장' 표시 */
.rec-tag { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 7px; font-size: 11px; font-weight: 600; vertical-align: 1px; background: var(--mint-100); color: var(--mint-text); }

/* v1.26: 주소 이사 안내 화면 */
.move-card { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; font-size: 14px; line-height: 1.55; color: var(--ink2); }
.move-card > div { display: flex; gap: 10px; align-items: flex-start; }
.move-card svg { margin-top: 2px; }
a.btn { text-decoration: none; }
