:root {
  --bg: #f6f4ef;
  --card: #fff;
  --ink: #1c1d22;
  --sub: #63646d;
  --faint: #9a9aa2;
  --line: #ebe8e1;
  --track: #eeebe4;
  --navy: #1f2d4d;
  --navy-soft: #e9edf5;
  --burgundy: #8a2f45;
  --gold: #b08a4a;
  --ok: #2f7d57;
  --ok-soft: #e4f2ea;
  --warn: #9a6200;
  --warn-soft: #fcf0d6;
  --bad: #b23a34;
  --bad-soft: #fbe8e6;
  --mute: #a8a8b0;
  --mute-soft: #f0efeb;
  --kakao: #fee500;
  --shadow: 0 1px 2px rgba(31, 33, 45, .04), 0 6px 18px -10px rgba(31, 33, 45, .12);
  --radius: 16px;
  --tabh: 58px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
body.locked { overflow: hidden; }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; touch-action: manipulation; text-align: inherit; }
button:disabled { opacity: .4; cursor: default; }
button, a { -webkit-user-select: none; user-select: none; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
em { font-style: normal; }
.ic { width: 20px; height: 20px; flex: none; }
.ic.faint { color: var(--faint); width: 18px; height: 18px; }

#view {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--safe-t) + 12px) calc(16px + env(safe-area-inset-right, 0px)) calc(var(--tabh) + var(--safe-b) + 28px) calc(16px + env(safe-area-inset-left, 0px));
}
#view.enter { animation: fade .22s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
/* iOS 상태 표시줄 뒤로 내용이 비치지 않게 */
body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: var(--safe-t); background: var(--bg); z-index: 15; }

/* 탭바 */
#tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 4px 8px var(--safe-b);
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line);
}
#tabbar .brand { display: none; }
#tabbar button { height: var(--tabh); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--faint); font-size: 11px; font-weight: 600; transition: color .18s; }
#tabbar button.on { color: var(--navy); }
.tab-ic { position: relative; display: grid; place-items: center; width: 52px; height: 28px; border-radius: 14px; transition: background .18s; }
#tabbar button.on .tab-ic { background: var(--navy-soft); }
.tab-ic .ic { width: 22px; height: 22px; }
sup { position: absolute; top: -3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--burgundy); color: #fff; font-size: 10px; line-height: 17px; text-align: center; font-weight: 700; }

/* 머리글 */
.page-head { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.page-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.icon-btn { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); color: var(--navy); }
.icon-btn.on { background: var(--navy); color: #fff; }
.text-btn, .link { color: var(--navy); font-weight: 600; min-height: 44px; padding: 0 6px; }
h2 { font-size: 17px; font-weight: 700; margin: 24px 2px 10px; }

.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.eyebrow { font-size: 12px; color: var(--gold); font-weight: 700; letter-spacing: .04em; }
.home-head h1 { font: 600 24px/1.2 "Cormorant Garamond", "Times New Roman", Georgia, serif; letter-spacing: .05em; color: var(--navy); }

.hero { display: flex; align-items: center; justify-content: space-between; background: var(--navy); color: #fff; border-radius: 20px; padding: 18px 20px; }
.hero div { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.hero .ic { color: #e6c9a0; }
.hero span { font-size: 18px; font-weight: 700; letter-spacing: .02em; }
.hero small { color: rgba(255, 255, 255, .68); }
.hero strong { font-size: 32px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

.card { display: block; width: 100%; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); text-align: left; }
.pad { padding: 18px 16px; }
.label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--sub); font-weight: 600; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; }
.groom { background: var(--navy); }
.bride { background: var(--burgundy); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.total { margin-top: 12px; padding: 18px; }
.huge, .big { display: block; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.huge { font-size: 46px; line-height: 1.15; color: var(--navy); }
.big { font-size: 30px; line-height: 1.25; margin-top: 4px; }
.huge em, .big em, .unknown em, .mini em, .prog em, .kakao-top em { font-size: .5em; font-weight: 600; color: var(--sub); margin-left: 2px; letter-spacing: 0; }
.card small, .mini small { display: block; font-size: 12px; color: var(--sub); }
.total + .two { margin-top: 10px; }
.stat { padding: 14px; }
.unknown { display: flex; align-items: center; gap: 10px; padding: 14px 16px; margin-top: 10px; min-height: 56px; }
.unknown > span { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.unknown b { font-size: 22px; font-variant-numeric: tabular-nums; }

.progs { padding: 4px 16px 16px; }
.prog { display: block; width: 100%; padding: 13px 0; border-bottom: 1px solid var(--line); text-align: left; }
.prog.static:last-child { border-bottom: 0; padding-bottom: 0; }
.prog-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.prog-top > span { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.prog-top .ic { color: var(--navy); width: 18px; height: 18px; }
.prog-top b { font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prog small { margin-top: 5px; }
.bar { height: 7px; border-radius: 4px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--navy); border-radius: 4px; transition: width .3s; }
.minis { margin-top: 12px; }
.mini { background: var(--bg); border-radius: 12px; padding: 12px; min-height: 76px; }
.mini b { display: block; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }

.todos { overflow: hidden; }
.todo-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; min-height: 66px; text-align: left; border-bottom: 1px solid var(--line); }
.todo-row:last-child { border-bottom: 0; }
.todo-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--navy-soft); color: var(--navy); flex: none; }
.todo-row.strong { background: #fffbe0; }
.todo-row.strong .todo-ic { background: var(--kakao); color: #2b2100; }
.todo-text { flex: 1; min-width: 0; }
.todo-text b { display: block; font-size: 15px; }
.todo-n { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.notice { display: flex; gap: 12px; align-items: center; width: 100%; margin-top: 14px; padding: 14px; border-radius: var(--radius); background: var(--warn-soft); color: var(--warn); text-align: left; }
.notice small { display: block; font-size: 12px; }
.foot { font-size: 12px; color: var(--faint); text-align: center; margin: 16px 8px 0; }

/* 하객 */
.sticky { position: sticky; top: var(--safe-t); z-index: 10; background: var(--bg); margin: 0 -16px; padding: 0 16px 8px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 12px; background: #e9e6de; margin: 8px 0; }
.seg button { min-height: 40px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--sub); text-align: center; padding: 4px 6px; transition: background .15s; }
.seg button.on { background: var(--card); color: var(--navy); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg.wrap { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); margin: 0; }
.search-row { display: flex; gap: 8px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); color: var(--faint); min-width: 0; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); -webkit-appearance: none; appearance: none; }
.search:focus-within { box-shadow: 0 0 0 2px var(--navy); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--sub); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip.small { padding: 0 10px; font-size: 12px; }
.chip .ic { width: 14px; height: 14px; }
.result-head { display: flex; justify-content: space-between; align-items: center; min-height: 36px; padding: 0 2px; font-size: 13px; color: var(--sub); }
.result-head b { color: var(--ink); }
.cards { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.guest { content-visibility: auto; contain-intrinsic-size: auto 130px; overflow: hidden; }
.guest-main { display: block; width: 100%; text-align: left; padding: 14px; }
.guest-top { display: flex; align-items: center; gap: 11px; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 19px; color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.guest-id { flex: 1; min-width: 0; }
.guest-id strong { display: block; font-size: 16px; }
.guest-id strong.noname { color: var(--faint); font-weight: 600; }
.guest-count { white-space: nowrap; color: var(--sub); font-size: 13px; }
.guest-count b { font-size: 22px; color: var(--ink); margin-right: 1px; font-variant-numeric: tabular-nums; }
.memo { margin-top: 8px; font-size: 13px; color: var(--sub); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 7px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.badge .ic { width: 12px; height: 12px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.mute { background: var(--mute-soft); color: var(--sub); }
.badge.na { background: transparent; border: 1px dashed var(--mute); color: var(--faint); }
.actions { display: flex; gap: 6px; padding: 0 14px 14px; }
.actions .btn { flex: 1; min-width: 0; font-size: 13px; padding: 0 6px; }
.actions .btn.primary { flex: 1.5; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--mute-soft); font-weight: 700; font-size: 14px; text-align: center; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger-text { color: var(--bad); }
.btn.kakao { background: var(--kakao); color: #2b2100; }
.btn.block { width: 100%; }
.btn.small { min-height: 40px; font-size: 13px; }
.btn .ic { width: 17px; height: 17px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tools { margin-top: 8px; }

/* 할 일 */
.kakao-hero { display: block; width: 100%; text-align: left; margin-top: 6px; padding: 16px 18px; border-radius: 20px; background: var(--kakao); color: #2b2100; border: 2px solid transparent; }
.kakao-hero.on { border-color: #2b2100; }
.kakao-top { display: flex; justify-content: space-between; align-items: center; }
.kakao-top > span { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.kakao-top b { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kakao-top em { color: #5c4a00; }
.kakao-hero .bar { background: rgba(43, 33, 0, .14); margin: 6px 0; }
.kakao-hero .bar i { background: #2b2100; }
.kakao-hero small { font-size: 12px; color: #5c4a00; }
.task-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.task-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); border: 2px solid transparent; text-align: center; font-size: 12px; font-weight: 600; color: var(--sub); }
.task-tile b { font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; }
.task-tile.on { border-color: var(--navy); color: var(--navy); }
.method-link { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin-top: 8px; padding: 0 14px; border-radius: 12px; border: 1px dashed var(--mute); color: var(--sub); font-size: 13px; font-weight: 600; }
.method-link span { flex: 1; }
.method-link.on { border: 2px solid var(--navy); color: var(--navy); }
.task-title { margin-bottom: 0; }
.seg.slim button { min-height: 36px; font-size: 13px; }
#task-results .cards, #guest-results .cards { margin-top: 2px; }
.pickable.picked { box-shadow: 0 0 0 2px var(--navy); }
.check { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 13px; border: 2px solid var(--mute); flex: none; }
.picked .check { background: var(--navy); border-color: var(--navy); color: #fff; }
.check .ic { width: 15px; height: 15px; }
.bulkbar { position: sticky; bottom: calc(var(--tabh) + var(--safe-b) + 12px); z-index: 12; margin-top: 12px; padding: 8px 10px 10px; border-radius: var(--radius); background: var(--card); box-shadow: 0 8px 30px rgba(20, 22, 35, .22); }
.bulk-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; }
.bulk-btns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.bulk-btns .btn { padding: 0 4px; }

/* 통계 */
.grid-stats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 8px; }
.card h3 { font-size: 15px; margin-bottom: 14px; }
.card h3 small { display: inline; font-weight: 500; margin-left: 4px; }
.hbar { display: grid; grid-template-columns: 78px 1fr 50px; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; }
.track { display: flex; height: 12px; border-radius: 6px; background: var(--track); overflow: hidden; }
.track i { display: block; height: 100%; }
.track i + i { border-left: 1px solid #fff; }
.side-legend { display: flex; gap: 14px; font-size: 12px; color: var(--sub); }
.side-legend span { display: flex; align-items: center; gap: 5px; }
.donut-wrap { display: flex; align-items: center; gap: 16px; }
.donut { width: 124px; height: 124px; flex: none; }
.donut text { text-anchor: middle; fill: var(--ink); }
.d-top { font-size: 20px; font-weight: 800; }
.donut .d-sub { font-size: 9px; fill: var(--sub); }
.legend { flex: 1; list-style: none; font-size: 13px; min-width: 0; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto 38px; align-items: center; gap: 7px; padding: 5px 0; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend em { text-align: right; color: var(--sub); font-size: 12px; }
.guar-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; padding: 9px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.guar-row > :not(:first-child) { text-align: right; }
.guar-row.head { color: var(--faint); font-size: 12px; padding-top: 0; }
.guar-row.sum { border-bottom: 0; font-weight: 800; color: var(--navy); padding-bottom: 0; }
.meal { margin-top: 12px; padding: 14px; border-radius: 12px; background: var(--navy-soft); }
.meal.actual { background: var(--bg); }
.meal .big { font-size: 28px; margin-bottom: 2px; }
.meal-side { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; }
.hint { font-size: 12px; color: var(--faint); margin: 8px 2px 0; }

/* 입력 */
.field { display: block; min-width: 0; }
.field > span { display: block; font-size: 12px; font-weight: 700; color: var(--sub); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); font-size: 16px; outline: 0; }
.field textarea { resize: vertical; line-height: 1.4; }
.field input:focus, .field textarea:focus { border-color: var(--navy); background: #fff; }
.field input.invalid { border-color: var(--bad); background: var(--bad-soft); }

/* 시트 */
.scrim { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; background: rgba(18, 20, 30, .42); }
.scrim.enter { animation: dim .2s; }
.scrim.enter .sheet { animation: up .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes dim { from { background: transparent; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.sheet { display: flex; flex-direction: column; width: 100%; max-width: 560px; max-height: calc(100% - var(--safe-t) - 10px); border-radius: 22px 22px 0 0; background: var(--bg); overflow: hidden; }
.grab { width: 36px; height: 5px; border-radius: 3px; background: #d3d0c8; margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 16px 8px; }
.sheet-head h2 { margin: 0; font-size: 20px; min-width: 0; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 16px 20px; }
.sheet-foot { padding: 10px 16px calc(var(--safe-b) + 10px); border-top: 1px solid var(--line); background: var(--card); }
.sheet-body:last-child { padding-bottom: calc(var(--safe-b) + 20px); }
.group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px; margin-bottom: 10px; border-radius: var(--radius); background: var(--card); }
.group:empty { display: none; }
.sheet-body > .field { margin-bottom: 16px; }
.saved-hint { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ok); margin: 0 2px 8px; }
.saved-hint .ic { width: 14px; height: 14px; }
.stepper { display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
.stepper > div { display: flex; align-items: center; gap: 4px; }
.stepper button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--mute-soft); }
.stepper input { width: 52px; height: 44px; border: 0; background: transparent; text-align: center; font-size: 20px; font-weight: 800; }
.sum-line { text-align: right; font-size: 13px; color: var(--sub); border-top: 1px solid var(--line); padding-top: 10px; }
.sum-line b { font-size: 18px; color: var(--ink); }
.group.list { gap: 0; padding: 0 14px; }
.set-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; text-align: left; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row span { flex: 1; min-width: 0; }
.set-row small { display: block; font-size: 12px; color: var(--sub); }
.set-row.danger-text { color: var(--bad); }
.info { font-size: 12.5px; color: var(--sub); padding: 4px 4px 0; }
.info p { margin-top: 6px; }

.scrim.center { z-index: 40; align-items: center; padding: 24px; }
.dialog { width: 100%; max-width: 320px; background: var(--card); border-radius: 20px; padding: 20px 16px 14px; text-align: center; }
.dialog h3 { font-size: 17px; margin-bottom: 8px; }
.dialog p { font-size: 13.5px; color: var(--sub); margin-bottom: 16px; }

#toast { position: fixed; z-index: 50; left: 16px; right: 16px; bottom: calc(var(--tabh) + var(--safe-b) + 12px); max-width: 528px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 8px 16px; border-radius: 14px; background: #23242b; color: #fff; font-size: 14px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s; }
#toast.show { opacity: 1; visibility: visible; transform: none; }
#toast button { color: #ffd98a; font-weight: 700; min-height: 40px; white-space: nowrap; }

.loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 40vh; color: var(--sub); }
.spinner { width: 26px; height: 26px; border-radius: 13px; border: 3px solid var(--track); border-top-color: var(--navy); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 20px; text-align: center; color: var(--sub); }
.empty > .ic { width: 36px; height: 36px; color: var(--faint); }
.empty b { color: var(--ink); }
.empty p { font-size: 13px; }
.empty.full { padding-top: 22vh; }
.empty.full .btn { width: 100%; max-width: 280px; }

/* PC · 태블릿 */
@media (min-width: 900px) {
  #tabbar { top: 0; right: auto; width: 220px; display: flex; flex-direction: column; gap: 4px; padding: 20px 12px; border-top: 0; border-right: 1px solid var(--line); }
  #tabbar .brand { display: flex; align-items: center; gap: 8px; padding: 0 10px 18px; color: var(--navy); font-weight: 800; font-size: 13px; }
  #tabbar button { flex-direction: row; justify-content: flex-start; gap: 6px; height: 48px; padding: 0 8px; font-size: 14px; border-radius: 12px; }
  #tabbar button.on { background: var(--navy-soft); }
  #app { padding-left: 220px; }
  #tabbar[hidden] ~ #view { margin-left: -220px; }
  #view { max-width: 1080px; padding: 24px 32px 48px; }
  .grid-home { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .grid-home h2:first-child { margin-top: 12px; }
  .sticky { margin: 0; padding: 0 0 8px; top: 0; }
  .sticky .seg { max-width: 420px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
  .grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .bulkbar, .actions { max-width: 560px; }
  .bulkbar { bottom: 16px; margin-left: auto; margin-right: auto; }
  #toast { bottom: 20px; }
  .scrim { align-items: center; padding: 24px; }
  .sheet { border-radius: 22px; max-height: 90vh; }
  .grab { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
