/* 김가네 부자되기 — 휴대폰 화면
   PC 앱과 같은 색 토큰. 엄지로 누르기 쉽게: 누르는 곳은 44px 이상, 자주 쓰는 버튼은 화면 아래쪽. */

:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Pretendard', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;

  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef0f3;
  --press: rgba(17, 24, 39, 0.07);
  --border: #e7e9ee;
  --border-strong: #d5d9e0;
  --text: #111418;
  --text-2: #4a505b;
  --text-3: #7b818c;

  --accent: #2b6fdc;
  --accent-strong: #215fc4;
  --accent-soft: #e9f1fd;
  --accent-text: #1c5cab;
  --focus: rgba(43, 111, 220, 0.45);

  --income: #2a78d6;
  --income-text: #1c5cab;
  --expense: #eb6834;
  --track: #eceef2;

  --good: #0ca30c;
  --good-text: #00731b;
  --good-soft: #e7f6ea;
  --warning: #fab219;
  --warning-text: #8a5800;
  --warning-soft: #fff5de;
  --danger: #d03b3b;
  --danger-text: #b42727;
  --danger-soft: #fdeeee;

  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.05);
  --shadow-sheet: 0 -10px 40px rgba(16, 24, 40, 0.18);
  --scrim: rgba(10, 12, 16, 0.42);
  --radius: 18px;
  --radius-sm: 12px;

  --nav-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0e10;
    --surface: #18191c;
    --surface-2: #1d1e22;
    --surface-3: #25272c;
    --press: rgba(255, 255, 255, 0.08);
    --border: #26282d;
    --border-strong: #353840;
    --text: #eef0f3;
    --text-2: #b4b8c1;
    --text-3: #868b95;
    --accent: #3478e6;
    --accent-strong: #4a88ee;
    --accent-soft: rgba(57, 135, 229, 0.16);
    --accent-text: #7fb2f0;
    --focus: rgba(91, 152, 240, 0.55);
    --income: #3987e5;
    --income-text: #79aff0;
    --expense: #d95926;
    --track: #2a2c31;
    --good-text: #4cc265;
    --good-soft: rgba(12, 163, 12, 0.16);
    --warning-text: #f5c451;
    --warning-soft: rgba(250, 178, 25, 0.14);
    --danger: #e25c5c;
    --danger-text: #f08a8a;
    --danger-soft: rgba(226, 92, 92, 0.15);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sheet: 0 -10px 40px rgba(0, 0, 0, 0.5);
    --scrim: rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0e10;
  --surface: #18191c;
  --surface-2: #1d1e22;
  --surface-3: #25272c;
  --press: rgba(255, 255, 255, 0.08);
  --border: #26282d;
  --border-strong: #353840;
  --text: #eef0f3;
  --text-2: #b4b8c1;
  --text-3: #868b95;
  --accent: #3478e6;
  --accent-strong: #4a88ee;
  --accent-soft: rgba(57, 135, 229, 0.16);
  --accent-text: #7fb2f0;
  --focus: rgba(91, 152, 240, 0.55);
  --income: #3987e5;
  --income-text: #79aff0;
  --expense: #d95926;
  --track: #2a2c31;
  --good-text: #4cc265;
  --good-soft: rgba(12, 163, 12, 0.16);
  --warning-text: #f5c451;
  --warning-soft: rgba(250, 178, 25, 0.14);
  --danger: #e25c5c;
  --danger-text: #f08a8a;
  --danger-soft: rgba(226, 92, 92, 0.15);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sheet: 0 -10px 40px rgba(0, 0, 0, 0.5);
  --scrim: rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45; }
body { min-height: 100dvh; overscroll-behavior-y: contain; word-break: keep-all; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; border: 0; background: none; padding: 0; }
input, textarea { font-size: 16px; } /* 아이폰이 확대하지 않도록 16px 이상 */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.emoji { font-family: var(--emoji); }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------------------ 시작 화면들 */
.splash, .center-screen {
  min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: calc(32px + var(--safe-t)) 24px calc(32px + var(--safe-b)); text-align: center;
}
.splash b { font-size: 20px; }
.center-screen h1 { font-size: 24px; margin: 6px 0 0; letter-spacing: -0.02em; }
.center-screen p { margin: 0; color: var(--text-2); max-width: 340px; }
.center-screen .piggy { width: 112px; height: 112px; }
.center-screen .stack { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 340px; margin-top: 12px; }
.note-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; text-align: left; font-size: 14px; color: var(--text-2); width: 100%; max-width: 340px; }
.note-box.warn { background: var(--warning-soft); border-color: transparent; color: var(--warning-text); }
.note-box ol { margin: 6px 0 0; padding-left: 20px; }
.note-box li + li { margin-top: 4px; }
.who-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 340px; margin-top: 8px; }
.who-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 10px; border-radius: var(--radius);
  background: var(--surface); border: 1.5px solid var(--border); font-weight: 700; font-size: 18px; box-shadow: var(--shadow-1);
}
.who-btn .emoji { font-size: 40px; line-height: 1; }
.who-btn:active { transform: scale(0.97); background: var(--surface-2); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--track); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border-radius: 14px; font-weight: 650; font-size: 16px; background: var(--surface-3); color: var(--text);
  transition: transform 0.08s ease, background 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active { background: var(--accent-strong); }
.btn-primary:disabled { opacity: 0.45; }
.btn-ghost { background: transparent; color: var(--accent-text); }
.btn-danger { background: var(--danger-soft); color: var(--danger-text); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; color: var(--text-2); }
.icon-btn:active { background: var(--press); }

/* ------------------------------------------------------------ 앱 뼈대 */
.app { min-height: 100dvh; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 12px); }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 4px;
  padding: calc(6px + var(--safe-t)) 8px 6px 12px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
}
.topbar .title { font-size: 20px; font-weight: 750; letter-spacing: -0.02em; padding-left: 4px; }
.month-switch { display: flex; align-items: center; }
.month-switch .label { font-size: 20px; font-weight: 750; letter-spacing: -0.02em; min-width: 64px; text-align: center; }
.month-switch .icon-btn { width: 40px; color: var(--text-3); }
.month-switch .icon-btn:disabled { opacity: 0.25; }
.spacer { flex: 1; }
.sync-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--surface);
  border: 1px solid var(--border);
}
.sync-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.sync-pill.warn { color: var(--warning-text); background: var(--warning-soft); border-color: transparent; }
.sync-pill.busy svg { animation: spin 1s linear infinite; }
.content { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 14px; }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 92%, transparent); border-top: 1px solid var(--border);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
}
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--text-3); }
.nav-item.active { color: var(--text); }
.nav-item svg.i { width: 24px; height: 24px; }
.nav-add { display: grid; place-items: center; }
.nav-add span {
  width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: var(--accent); color: #fff;
  box-shadow: 0 6px 16px rgba(43, 111, 220, 0.35); transform: translateY(-6px); transition: transform 0.1s;
}
.nav-add:active span { transform: translateY(-6px) scale(0.94); }
.nav-add svg.i { width: 28px; height: 28px; stroke-width: 2.4; }

/* ------------------------------------------------------------ 카드 · 목록 */
.card { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-1); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card-title { font-size: 17px; font-weight: 750; margin: 0; letter-spacing: -0.01em; }
.link-btn { font-size: 14px; color: var(--text-3); display: inline-flex; align-items: center; gap: 2px; min-height: 36px; }

.hero .label { font-size: 14px; color: var(--text-2); font-weight: 600; }
.hero .big { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; margin: 2px 0 12px; line-height: 1.15; }
.hero .big small { font-size: 22px; font-weight: 700; margin-left: 2px; }
/* 예산 막대: 한 계열(지출) + 회색 바탕. 넘치면 상태색 + 아이콘 + 글자 */
.meter { height: 10px; border-radius: 999px; background: var(--track); overflow: hidden; position: relative; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--expense); }
.meter.over > i { background: var(--danger); }
.meter .pace { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text-3); border-radius: 1px; opacity: 0.7; }
.meter-text { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--text-2); }
.status { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; }
.status svg.i { width: 15px; height: 15px; }
.status.bad { color: var(--danger-text); }
.status.good { color: var(--good-text); }
.status.warn { color: var(--warning-text); }
.hero-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.mini { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }
.mini .k { font-size: 13px; color: var(--text-3); font-weight: 600; }
.mini .v { font-size: 18px; font-weight: 750; margin-top: 2px; letter-spacing: -0.02em; }
.mini .v.income { color: var(--income-text); }
.mini .v small { font-size: 13px; font-weight: 650; margin-left: 3px; }
.tip { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-soft); color: var(--accent-text); border-radius: 14px; padding: 12px 14px; font-size: 14px; font-weight: 550; }
.tip.warn { background: var(--warning-soft); color: var(--warning-text); }
.tip svg.i { width: 18px; height: 18px; margin-top: 1px; }

/* 가로 막대 목록 (카테고리·사용자별): 막대 옆에 이름·금액을 항상 글자로 같이 쓴다 */
.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; width: 100%; text-align: left; }
.bar-row .ico { width: 34px; height: 34px; border-radius: 11px; background: var(--surface-3); display: grid; place-items: center; font-size: 18px; }
.bar-row .top { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }
.bar-row .name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .amt { font-weight: 700; white-space: nowrap; }
.bar-row .track { height: 6px; border-radius: 999px; background: var(--track); margin-top: 6px; position: relative; overflow: hidden; }
.bar-row .track > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--expense); min-width: 4px; }
.bar-row .track.over > i { background: var(--danger); }
.bar-row .sub { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.delta-up { color: var(--danger-text); font-weight: 650; }
.delta-down { color: var(--good-text); font-weight: 650; }

.tx-list { display: flex; flex-direction: column; }
.tx-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; width: 100%; text-align: left; border-radius: 12px; min-height: 60px; }
.tx-row:active { background: var(--press); }
.tx-ico { width: 42px; height: 42px; border-radius: 14px; background: var(--surface-3); display: grid; place-items: center; font-size: 21px; flex: none; }
.tx-main { flex: 1; min-width: 0; }
.tx-title { font-weight: 650; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-sub { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.tx-amt { font-weight: 700; font-size: 15.5px; white-space: nowrap; }
.tx-amt.income { color: var(--income-text); }
.tx-amt.transfer { color: var(--text-3); }
.day-head {
  position: sticky; top: calc(56px + var(--safe-t)); z-index: 5; display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 4px 6px; font-size: 13.5px; font-weight: 700; color: var(--text-2); background: var(--bg);
}
.day-head .num { font-weight: 600; color: var(--text-3); font-size: 13px; }
.day-group { background: var(--surface); border-radius: var(--radius); padding: 4px 12px; box-shadow: var(--shadow-1); }
.empty { text-align: center; padding: 36px 16px; color: var(--text-3); }
.empty img { width: 84px; height: 84px; opacity: 0.9; }
.empty p { margin: 8px 0 0; }

.search-box { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 14px; padding: 0 12px; height: 46px; border: 1px solid var(--border); }
.search-box input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; height: 100%; }
.search-box svg.i { color: var(--text-3); width: 19px; height: 19px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-size: 14.5px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .emoji { font-size: 16px; }
.sum-line { display: flex; gap: 14px; font-size: 14px; color: var(--text-2); padding: 0 4px; flex-wrap: wrap; }
.sum-line b { color: var(--text); }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-3); border-radius: 13px; padding: 3px; gap: 3px; }
.segmented button { height: 38px; border-radius: 10px; font-weight: 650; font-size: 15px; color: var(--text-2); }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.segmented.type button.active.expense { color: var(--expense); }
.segmented.type button.active.income { color: var(--income-text); }

.list-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 54px; width: 100%; text-align: left; }
.list-item + .list-item { border-top: 1px solid var(--border); }
.list-item:active { background: var(--press); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .t { font-weight: 650; }
.list-item .s { font-size: 13px; color: var(--text-3); margin-top: 1px; word-break: break-all; }
.list-item.danger { color: var(--danger-text); }
.section-label { font-size: 13px; font-weight: 700; color: var(--text-3); padding: 6px 4px 0; }
.device { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.device .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.device .dot.me { background: var(--accent); }

/* ------------------------------------------------------------ 입력 시트 */
.scrim { position: fixed; inset: 0; z-index: 50; background: var(--scrim); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: calc(100dvh - 24px - var(--safe-t));
  display: flex; flex-direction: column; background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-sheet);
  padding-bottom: var(--safe-b);
}
.sheet-enter-active, .sheet-leave-active { transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sheet-enter-from, .sheet-leave-to { transform: translateY(100%); }
.fade-enter-active, .fade-leave-active { transition: opacity 0.2s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .sheet-enter-active, .sheet-leave-active, .fade-enter-active, .fade-leave-active { transition: none; }
}
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--border-strong); margin: 8px auto 2px; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 4px; padding: 0 8px 6px; flex: none; }
.sheet-head h2 { flex: 1; text-align: center; font-size: 17px; margin: 0; }
.sheet-body { overflow-y: auto; padding: 4px 18px 14px; display: flex; flex-direction: column; gap: 16px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet-foot { padding: 10px 18px 12px; flex: none; border-top: 1px solid var(--border); display: flex; gap: 10px; }

.amount-display { width: 100%; text-align: left; padding: 6px 2px; border-radius: 12px; }
.amount-display .v { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.amount-display .v.placeholder { color: var(--text-3); font-weight: 700; }
.amount-display .v small { font-size: 26px; font-weight: 700; margin-left: 2px; }
.amount-display .k { font-size: 14px; color: var(--text-3); min-height: 20px; }
.amount-display.compact .v { font-size: 30px; }
.amount-display.compact::after { content: '고치려면 누르세요'; font-size: 12px; color: var(--text-3); }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick button { height: 40px; border-radius: 12px; background: var(--surface-3); font-weight: 650; font-size: 14.5px; color: var(--text-2); }
.quick button:active { background: var(--press); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.keypad button { height: 58px; border-radius: 14px; font-size: 26px; font-weight: 600; display: grid; place-items: center; }
.keypad button:active { background: var(--press); }
.keypad button svg.i { width: 28px; height: 28px; }

.field-label { font-size: 13.5px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.badge { font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
.text-input {
  width: 100%; height: 50px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface-2);
  padding: 0 14px; outline: none;
}
.text-input:focus { border-color: var(--accent); background: var(--surface); }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.suggest button { height: 34px; padding: 0 12px; border-radius: 999px; background: var(--surface-3); font-size: 14px; font-weight: 600; color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cat-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px 8px; border-radius: 14px;
  background: var(--surface-2); border: 1.5px solid transparent; font-size: 12.5px; font-weight: 600; color: var(--text-2); min-height: 70px;
}
.cat-tile .emoji { font-size: 24px; line-height: 1.1; }
.cat-tile span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.cat-tile.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.cat-tile:active { transform: scale(0.96); }
.date-input { position: relative; }
.date-input input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }
.transfer-arrow { display: grid; place-items: center; color: var(--text-3); margin: -6px 0; }
.error-text { color: var(--danger-text); font-size: 14px; font-weight: 600; }

/* ------------------------------------------------------------ 알림 · 잠금 */
.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); z-index: 60;
  display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 16px; border-radius: 14px;
  background: #23262c; color: #fff; font-size: 15px; font-weight: 600; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}
.toast .grow { flex: 1; }
.toast button { color: #8ab8ff; font-weight: 700; min-height: 36px; padding: 0 6px; }
.toast.error { background: #7d1f1f; }
.lock { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: calc(24px + var(--safe-t)) 24px calc(24px + var(--safe-b)); gap: 18px; }
.lock .dots { display: flex; gap: 14px; margin: 6px 0 4px; }
.lock .dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); }
.lock .dots i.on { background: var(--text); border-color: var(--text); }
.lock .keypad { width: 100%; max-width: 320px; }
.lock .head { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.lock .head img { width: 84px; height: 84px; }
.banner { display: flex; align-items: center; gap: 10px; background: var(--warning-soft); color: var(--warning-text); border-radius: 14px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.banner .grow { flex: 1; }

@media (min-width: 640px) {
  .content, .topbar-inner { max-width: 560px; margin: 0 auto; width: 100%; }
  .sheet { max-width: 560px; margin: 0 auto; }
}
