/* 우리집 가계부 — 흰색·검정 미니멀 */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f5f3;
  --bg-softer: #faf9f7;
  --line: #ecebe8;
  --line-strong: #dcdad6;
  --text: #111111;
  --text-2: #57534e;
  --text-3: #8f8a84;
  --beige: #e6ddd2;
  --black: #111111;
  --danger: #d6342c;
  --radius: 18px;
  --radius-sm: 12px;
  --pad: clamp(14px, 4.5vw, 28px);
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --shadow: 0 10px 40px rgba(0, 0, 0, .10);
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body { font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; letter-spacing: -0.01em; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.boot-loading { min-height: 100dvh; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--black); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 레이아웃 ---------- */
.shell { min-height: 100dvh; display: flex; }
.side { display: none; }
.main { flex: 1; min-width: 0; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }
.page { width: 100%; max-width: 760px; margin: 0 auto; padding: calc(var(--safe-t) + 18px) var(--pad) 24px; }
.page.wide { max-width: 1180px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--text-3); font-size: 11px; font-weight: 600; }
.tabbar a svg.i { width: 23px; height: 23px; }
.tabbar a.on { color: var(--text); }

.fab {
  position: fixed; z-index: 41; right: max(var(--pad), calc((100vw - 760px) / 2 + var(--pad)));
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  width: 58px; height: 58px; border-radius: 50%; background: var(--black); color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  transition: transform .15s;
}
.fab:active { transform: scale(.94); }
.fab svg.i { width: 26px; height: 26px; stroke-width: 2.6; }

/* 태블릿·데스크톱·펼친 폴드: 왼쪽 메뉴 */
@media (min-width: 760px) {
  .tabbar { display: none; }
  .side {
    display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh;
    width: 228px; flex: none; padding: calc(var(--safe-t) + 26px) 14px 20px; border-right: 1px solid var(--line); background: var(--bg);
  }
  .side .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; font-weight: 800; font-size: 17px; }
  .side .brand .av { width: 36px; height: 36px; font-size: 18px; }
  .side a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; text-decoration: none; color: var(--text-2); font-weight: 600; font-size: 15px; }
  .side a:hover { background: var(--bg-soft); }
  .side a.on { background: var(--black); color: #fff; }
  .side .add { margin-top: 14px; justify-content: center; background: var(--bg-soft); color: var(--text); }
  .side .add:hover { background: var(--line); }
  .side .spacer { flex: 1; }
  .main { padding-bottom: 40px; }
  .fab { display: none; }
}
@media (min-width: 760px) and (max-width: 980px) {
  .side { width: 76px; padding-inline: 10px; align-items: center; }
  .side .brand span, .side a span { display: none; }
  .side .brand { padding: 0 0 22px; }
  .side a { justify-content: center; padding: 12px; }
}

/* ---------- 헤더 (사진 스타일) ---------- */
.hh-head { display: flex; align-items: center; gap: 16px; padding: 14px 0 26px; }
.av { width: clamp(56px, 15vw, 76px); height: clamp(56px, 15vw, 76px); border-radius: 50%; background: var(--beige); display: grid; place-items: center; font-size: clamp(26px, 7vw, 36px); flex: none; }
.hh-head .t { flex: 1; min-width: 0; }
.hh-head .t b { display: block; font-size: clamp(19px, 5vw, 22px); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hh-head .t small { display: block; color: var(--text-2); font-size: clamp(14px, 4vw, 17px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--text); flex: none; }
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn svg.i { width: 25px; height: 25px; }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.sm svg.i { width: 20px; height: 20px; }

.month-row { display: flex; align-items: center; gap: 6px; }
.month-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; font-size: clamp(18px, 5.4vw, 27px); font-weight: 800; letter-spacing: -0.03em; }
.month-title button { display: inline-flex; align-items: center; }
.month-title button[hidden] { display: none; }
.month-title .icon-btn.sm { width: 30px; height: 30px; }
.month-title .val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; margin: 16px 0 4px; }
.sum-grid .r { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: clamp(13.5px, 3.8vw, 15.5px); min-width: 0; }
.sum-grid .r b { font-weight: 700; white-space: nowrap; }
.sum-grid .r span { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum-grid .r span.zero { color: var(--text-3); }

/* 좁은 화면(폴드 커버 등) */
@media (max-width: 360px) {
  :root { --pad: 12px; --nav-h: 58px; }
  .sum-grid { grid-template-columns: 1fr; gap: 4px; }
  .tabbar a span { display: none; }
  .hh-head { gap: 12px; }
  .icon-btn { width: 36px; height: 36px; }
}

/* ---------- 공통 컴포넌트 ---------- */
.section { margin-top: 26px; }
.section-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.section-h h2 { font-size: 17px; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.section-h .link { font-size: 14px; color: var(--text-2); font-weight: 600; padding: 6px 2px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.soft { background: var(--bg-soft); border-color: transparent; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 13px; border-radius: 999px; background: var(--bg-soft); color: var(--text-2); font-size: 14px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.chip.on { background: var(--black); color: #fff; }
.chip.outline { background: var(--bg); border-color: var(--line-strong); }
.badge { display: inline-block; padding: 2px 7px; border-radius: 6px; background: var(--bg-soft); color: var(--text-2); font-size: 11.5px; font-weight: 700; vertical-align: 1px; }
.badge.dark { background: var(--black); color: #fff; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg-soft); border-radius: 12px; padding: 4px; gap: 2px; }
.seg button { padding: 9px 6px; border-radius: 9px; font-weight: 700; font-size: 14.5px; color: var(--text-3); }
.seg button.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 13px 18px; border-radius: 14px; background: var(--black); color: #fff; font-weight: 700; font-size: 15.5px; }
.btn:disabled { opacity: .45; }
.btn.ghost { background: var(--bg-soft); color: var(--text); }
.btn.line { background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); }
.btn.danger { background: var(--bg); color: var(--danger); border: 1px solid var(--line); }
.btn.sm { padding: 8px 12px; font-size: 14px; border-radius: 11px; }
.btn.block { width: 100%; }
.empty { text-align: center; color: var(--text-3); padding: 38px 10px; font-size: 14.5px; }
.empty .em { font-size: 34px; display: block; margin-bottom: 8px; }

/* 진행 막대 */
.bar { height: 8px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--black); border-radius: 99px; }
.bar.over > i { background: var(--danger); }

/* ---------- 거래 목록 ---------- */
.tools { display: flex; align-items: center; gap: 8px; margin: 22px 0 6px; }
.tools .chips { flex: 1; min-width: 0; }
.day { margin-top: 18px; }
.day-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 2px 6px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--text-3); font-weight: 600; }
.day-h .d { color: var(--text); font-weight: 700; }
.tx { display: flex; align-items: center; gap: 12px; padding: 12px 2px; width: 100%; text-align: left; border-radius: 12px; }
.tx:hover { background: var(--bg-softer); }
.tx .ic { width: 42px; height: 42px; border-radius: 50%; background: var(--bg-soft); display: grid; place-items: center; font-size: 19px; flex: none; }
.tx .body { flex: 1; min-width: 0; }
.tx .body b { display: block; font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .body small { display: block; color: var(--text-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .amt { font-weight: 700; font-size: 15.5px; white-space: nowrap; text-align: right; }
.tx .amt.in { color: var(--text); }
.tx .amt.out { color: var(--text); }
.tx .amt.tr { color: var(--text-3); font-weight: 600; }
.tx .amt small { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-3); }

/* 달력 */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: 12px; }
.cal .wd { text-align: center; font-size: 12px; color: var(--text-3); font-weight: 700; padding: 6px 0; }
.cal .c { min-height: clamp(54px, 13vw, 84px); border-radius: 10px; padding: 5px 4px; text-align: left; display: flex; flex-direction: column; gap: 1px; overflow: hidden; }
.cal .c:hover { background: var(--bg-softer); }
.cal .c .n { font-size: 13px; font-weight: 700; }
.cal .c.today .n { background: var(--black); color: #fff; border-radius: 99px; width: 22px; height: 22px; display: grid; place-items: center; margin-left: -2px; }
.cal .c.sel { background: var(--bg-soft); }
.cal .c.other { opacity: .25; }
.cal .c .p, .cal .c .m { font-size: clamp(9px, 2.3vw, 11.5px); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .c .p { color: var(--text-2); }
.cal .c .m { color: var(--text); }
.cal .sun .n, .cal .wd.sun { color: var(--danger); }

/* 두 칸 레이아웃 (넓은 화면) */
.cols { display: grid; gap: 0 36px; grid-template-columns: minmax(0, 1fr); }
.cols > * { min-width: 0; }
@media (min-width: 1100px) {
  .cols { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .cols > .aside { position: sticky; top: 24px; }
}

/* ---------- 자산 ---------- */
.total-box { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.total-box .k { background: var(--bg-soft); border-radius: var(--radius); padding: 16px; min-width: 0; }
.total-box .k.dark { background: var(--black); color: #fff; }
.total-box .k small { display: block; font-size: 13px; font-weight: 600; opacity: .7; }
.total-box .k b { display: block; font-size: clamp(18px, 5vw, 24px); font-weight: 800; letter-spacing: -0.03em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 360px) { .total-box { grid-template-columns: 1fr; } }

.acc-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.acc { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.acc-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; text-align: left; width: 100%; }
.acc-top .nm { min-width: 0; }
.acc-top .nm b { font-size: 16px; font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-top .nm small { color: var(--text-3); font-size: 13px; }
.acc .bal { font-size: clamp(20px, 5.5vw, 24px); font-weight: 800; letter-spacing: -0.03em; }
.acc .rows { display: grid; gap: 4px; font-size: 13.5px; }
.acc .rows .r { display: flex; justify-content: space-between; gap: 10px; color: var(--text-2); }
.acc .rows .r b { color: var(--text); font-weight: 700; }
.acc .linked { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.acc .linked button { font-size: 12.5px; padding: 5px 10px; border-radius: 99px; background: var(--bg-soft); font-weight: 600; color: var(--text-2); }
.acc .linked button.add { background: none; border: 1px dashed var(--line-strong); color: var(--text-3); }

.cc { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.cc .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; width: 100%; }
.cc .head b { font-size: 16px; }
.cc .bills { margin-top: 10px; display: grid; gap: 6px; }
.cc .bill { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 10px 12px; background: var(--bg-soft); border-radius: 12px; font-size: 14px; }
.cc .bill.cur { background: var(--black); color: #fff; }
.cc .bill small { display: block; font-size: 12px; opacity: .65; }
.cc .bill b { font-size: 16px; white-space: nowrap; }

/* ---------- 배분 ---------- */
.alloc-acc { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.alloc-acc .h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; background: var(--bg-soft); }
.alloc-acc .h b { font-size: 15.5px; }
.alloc-acc .h .tot { font-weight: 800; font-size: 16px; white-space: nowrap; }
.alloc-item { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.alloc-item:first-of-type { border-top: 0; }
.alloc-item .nm { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alloc-item .v { font-weight: 600; white-space: nowrap; }
.alloc-add { width: 100%; padding: 11px 16px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 14px; font-weight: 600; text-align: left; }

/* ---------- 통계 ---------- */
.stat-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 4px 10px; align-items: center; padding: 9px 0; }
.stat-row .ic { width: 34px; height: 34px; border-radius: 50%; background: var(--bg-soft); display: grid; place-items: center; font-size: 16px; grid-row: span 2; }
.stat-row .nm { font-size: 14.5px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-row .v { font-weight: 700; font-size: 14.5px; text-align: right; white-space: nowrap; }
.stat-row .bar { grid-column: 2 / 4; height: 6px; }
.trend { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; align-items: end; height: 170px; padding-top: 10px; }
.trend .col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.trend .bars { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.trend .bars i { width: min(14px, 40%); border-radius: 5px 5px 2px 2px; background: var(--black); min-height: 2px; }
.trend .bars i.inc { background: var(--line-strong); }
.trend .lb { font-size: 12px; color: var(--text-3); font-weight: 600; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--black); margin-right: 5px; vertical-align: -1px; }
.legend i.inc { background: var(--line-strong); }
.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }

/* ---------- 설정 ---------- */
.list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list .it { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); width: 100%; text-align: left; font-size: 15px; min-height: 52px; }
.list .it:first-child { border-top: 0; }
.list .it:is(button, a):hover { background: var(--bg-softer); }
.list .it .l { flex: 1; min-width: 0; }
.list .it .l small { display: block; color: var(--text-3); font-size: 13px; }
.list .it .rv { color: var(--text-3); font-size: 14px; white-space: nowrap; }
.list .it.danger { color: var(--danger); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; font-weight: 700; letter-spacing: .12em; }

/* ---------- 폼 / 시트 ---------- */
.field { display: grid; gap: 6px; margin-top: 14px; }
.field > label, .field > .lb { font-size: 13px; font-weight: 700; color: var(--text-2); }
.input, select.input, textarea.input {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); font-size: 16px; outline: none; appearance: none; -webkit-appearance: none;
}
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23111' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.input:focus { border-color: var(--black); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
@media (max-width: 360px) { .row2, .row3 { grid-template-columns: 1fr; } }
.amount-input { display: flex; align-items: baseline; gap: 6px; border-bottom: 2px solid var(--black); padding: 6px 0; margin-top: 18px; }
.amount-input input { flex: 1; min-width: 0; border: 0; outline: none; font-size: clamp(28px, 8vw, 36px); font-weight: 800; letter-spacing: -0.03em; padding: 0; background: transparent; }
.amount-input span { font-size: 22px; font-weight: 700; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.cat-grid button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px; border-radius: 12px; font-size: 12.5px; font-weight: 600; color: var(--text-2); border: 1px solid transparent; min-width: 0; }
.cat-grid button span:first-child { font-size: 21px; }
.cat-grid button span:last-child { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-grid button.on { background: var(--black); color: #fff; }
.hint { font-size: 12.5px; color: var(--text-3); margin-top: 4px; line-height: 1.5; }
.err { color: var(--danger); font-size: 13.5px; margin-top: 10px; min-height: 1em; }

.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .35); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
.sheet {
  width: 100%; max-width: 560px; max-height: calc(100dvh - var(--safe-t) - 24px); background: var(--bg);
  border-radius: 24px 24px 0 0; display: flex; flex-direction: column; animation: up .24s cubic-bezier(.2, .9, .3, 1); overflow: hidden;
}
.sheet .sh { display: flex; align-items: center; gap: 8px; padding: 18px var(--pad) 6px; }
.sheet .sh h3 { flex: 1; margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.sheet .sb { padding: 4px var(--pad) 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet .sf { padding: 12px var(--pad) calc(14px + var(--safe-b)); display: flex; gap: 8px; border-top: 1px solid var(--line); background: var(--bg); }
.sheet .sf .btn { flex: 1; }
.sheet .sf .btn.danger, .sheet .sf .btn.ghost.narrow { flex: 0 0 auto; }
.grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line-strong); margin: 8px auto 0; }
@media (min-width: 760px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet { border-radius: 24px; box-shadow: var(--shadow); max-height: min(860px, calc(100dvh - 48px)); }
  .grab { display: none; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }

#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 90px); transform: translate(-50%, 20px); background: var(--black); color: #fff; padding: 11px 18px; border-radius: 99px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .22s; z-index: 80; max-width: calc(100vw - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 760px) { #toast { bottom: 32px; } }

/* ---------- 로그인 ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: calc(var(--safe-t) + 24px) var(--pad) calc(var(--safe-b) + 24px); }
.auth .box { width: 100%; max-width: 380px; }
.auth .logo { width: 72px; height: 72px; font-size: 34px; margin-bottom: 18px; }
.auth h1 { font-size: 26px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.03em; }
.auth p { margin: 0 0 18px; color: var(--text-2); }
.auth .switch { margin-top: 18px; text-align: center; font-size: 14px; color: var(--text-3); }
.auth .switch button { font-weight: 700; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.search-bar { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 14px; padding: 0 12px; }
.search-bar input { flex: 1; min-width: 0; border: 0; outline: none; padding: 12px 0; font-size: 16px; }
