:root {
  color-scheme: light;
  --navy-950: #031b35; --navy-900: #082e59; --navy-800: #0c4477;
  --blue: #0878c9; --cyan: #08bde0; --teal: #0e9f9a;
  --bg: #f2f6fa; --surface: #ffffff; --surface-2: #eaf2f8;
  --text: #102235; --muted: #607387; --line: #d9e3ec;
  --success: #07856f; --warning: #b56309; --danger: #c43846; --info: #1d63c6;
  --shadow: 0 12px 34px rgba(9, 45, 78, .10); --radius: 20px; --nav-h: 74px;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  font-synthesis: none;
}
[data-theme="dark"] {
  color-scheme: dark; --bg: #061728; --surface: #0c263e; --surface-2: #12334d;
  --text: #f2f8fc; --muted: #a6bacb; --line: #24455f; --shadow: 0 14px 38px rgba(0,0,0,.28);
}
* { box-sizing: border-box; }
html { height: 100%; background: var(--bg); -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body { margin: 0; min-height: 100%; min-height: 100dvh; background: var(--bg); color: var(--text); overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--cyan) 70%, white); outline-offset: 2px; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; z-index: 500; top: -80px; left: 12px; padding: 12px 16px; background: var(--navy-900); color: white; border-radius: 10px; }
.skip-link:focus { top: calc(8px + var(--safe-top)); }
.app-shell { min-height: 100vh; min-height: 100dvh; }
.topbar { position: sticky; z-index: 80; top: 0; height: calc(66px + var(--safe-top)); padding: calc(8px + var(--safe-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(18px); border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent); }
.brand { border: 0; background: transparent; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 2px; cursor: pointer; text-align: left; }
.brand img { border-radius: 12px; box-shadow: 0 4px 12px rgba(4,47,84,.2); }
.brand strong { display: block; letter-spacing: .03em; font-size: 17px; line-height: 1.15; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; letter-spacing: .18em; font-weight: 750; }
.top-actions { display: flex; gap: 5px; }
.icon-btn { display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: transparent; color: var(--navy-800); cursor: pointer; }
[data-theme="dark"] .icon-btn { color: var(--cyan); }
.icon-btn:active { background: var(--surface-2); transform: scale(.95); }
main { min-height: calc(100dvh - 66px - var(--nav-h)); }
.page { width: min(1120px, 100%); margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right)) calc(var(--nav-h) + 42px + var(--safe-bottom)) max(16px, env(safe-area-inset-left)); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 18px; }
.eyebrow { margin: 0 0 5px; color: var(--teal); font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: clamp(26px, 7vw, 40px); line-height: 1.15; letter-spacing: -.035em; }
h2 { margin-bottom: 12px; font-size: 20px; letter-spacing: -.02em; }
h3 { margin-bottom: 8px; font-size: 16px; }
.subtext, .muted { color: var(--muted); }
.subtext { margin: 0; font-size: 13px; }
.section { margin-top: 24px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 2px 9px rgba(4,39,72,.035); padding: 17px; }
.card.pressable { cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.card.pressable:active { transform: scale(.985); }
.hero { position: relative; overflow: hidden; color: white; background: linear-gradient(135deg, var(--navy-900), #075184 70%, #047e8c); border: 0; padding: 22px; box-shadow: 0 18px 38px rgba(5, 52, 90, .24); }
.hero::after { content: ''; position: absolute; width: 180px; height: 180px; right: -85px; top: -100px; border-radius: 50%; border: 35px solid rgba(255,255,255,.07); }
.hero .muted { color: rgba(255,255,255,.72); }
.hero-top { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.days { text-align: right; white-space: nowrap; }
.days strong { display: block; font-size: 32px; line-height: 1; }
.days span { font-size: 12px; opacity: .82; }
.hero-title { margin-bottom: 3px; font-size: 21px; }
.quota-row { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; margin-top: 24px; }
.quota-row strong { font-size: 30px; letter-spacing: -.04em; }
.quota-row span { font-size: 13px; color: rgba(255,255,255,.8); }
.progress { overflow: hidden; height: 12px; margin-top: 10px; border-radius: 999px; background: rgba(255,255,255,.18); }
.progress > i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), #5de4c5); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.encourage { margin: 11px 0 0; font-size: 13px; font-weight: 700; }
.metric { min-height: 106px; }
.metric .label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.metric .value { display: block; margin-top: 10px; font-size: clamp(23px, 6vw, 31px); line-height: 1; font-weight: 850; letter-spacing: -.04em; }
.metric .value small { font-size: 13px; letter-spacing: 0; color: var(--muted); }
.metric.teal { border-top: 4px solid var(--teal); }
.metric.blue { border-top: 4px solid var(--blue); }
.metric.amber { border-top: 4px solid #e79a26; }
.metric.red { border-top: 4px solid #dc6370; }
.task-list, .list { display: grid; gap: 9px; }
.task { display: flex; align-items: center; gap: 12px; min-height: 68px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 11px 12px; }
.task.overdue { border-left: 5px solid var(--danger); }
.task .avatar, .avatar { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: white; background: linear-gradient(145deg, var(--navy-800), var(--teal)); font-weight: 850; }
.task-main { min-width: 0; flex: 1; }
.task-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-main small { display: block; margin-top: 3px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-actions { display: flex; gap: 5px; }
.btn, .mini-btn { border: 0; border-radius: 13px; min-height: 44px; cursor: pointer; font-weight: 760; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; }
.btn.primary { color: white; background: var(--navy-900); }
.btn.teal { color: white; background: var(--teal); }
.btn.secondary { color: var(--text); background: var(--surface-2); border: 1px solid var(--line); }
.btn.danger { color: white; background: var(--danger); }
.btn.ghost { color: var(--navy-800); background: transparent; }
[data-theme="dark"] .btn.ghost { color: var(--cyan); }
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:active, .mini-btn:active { transform: scale(.97); }
.mini-btn { min-width: 44px; padding: 0 11px; background: var(--surface-2); color: var(--navy-800); font-size: 12px; }
[data-theme="dark"] .mini-btn { color: #c9f6ff; background: #17415f; border: 1px solid #285773; }
.link-btn { border: 0; padding: 8px 0; min-height: 44px; color: var(--blue); background: transparent; font-weight: 750; cursor: pointer; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 38px; border: 1px solid var(--line); border-radius: 999px; padding: 0 13px; background: var(--surface); font-size: 13px; font-weight: 700; cursor: pointer; }
.chip.active { color: white; background: var(--navy-900); border-color: var(--navy-900); }
.template-filters { margin-bottom: 10px; scroll-padding-inline: 8px; }
.filter-chip { min-height: 44px; padding-inline: 16px; background: var(--surface); color: var(--muted); }
.filter-chip.active { color: white; background: var(--navy-800); border-color: var(--navy-800); box-shadow: none; }
[data-theme="dark"] .filter-chip:not(.active) { background: #0d2b43; color: #b9ccda; border-color: #28506b; }
.status { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 800; background: var(--surface-2); color: var(--muted); }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status[data-status="予約済"], .status[data-status="入金済"], .status[data-status="来場済"] { color: var(--success); background: color-mix(in srgb, var(--success) 12%, var(--surface)); }
.status[data-status="返事待ち"], .status[data-status="検討中"], .status[data-status="入金待ち"] { color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, var(--surface)); }
.status[data-status="見送り"] { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.customer-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; }
.customer-row .meta { min-width: 0; }
.customer-row .meta strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.customer-row .meta small { display: block; margin-top: 4px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tag { display: inline-flex; padding: 3px 8px; border-radius: 999px; color: var(--tag-color, var(--teal)); background: color-mix(in srgb, var(--tag-color, var(--teal)) 13%, var(--surface)); font-size: 10px; font-weight: 800; }
.toolbar { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-bottom: 12px; }
.searchbox { position: relative; }
.searchbox svg { position: absolute; left: 13px; top: 50%; width: 20px; transform: translateY(-50%); color: var(--muted); }
.searchbox input { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); padding: 0 13px 0 42px; font-size: 16px; }
.select-compact { height: 48px; max-width: 130px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); padding: 0 11px; }
.empty { padding: 36px 20px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 24px; background: var(--surface-2); color: var(--teal); }
.empty-icon svg { width: 32px; height: 32px; }
.empty p { max-width: 420px; margin: 0 auto 18px; color: var(--muted); line-height: 1.7; }
.performance-card { overflow: hidden; padding: 0; }
.performance-cover { min-height: 116px; padding: 18px; color: white; background: linear-gradient(125deg, var(--navy-900), var(--navy-800), var(--teal)); background-size: cover; background-position: center; }
.performance-cover.has-image { min-height: 170px; display: flex; align-items: flex-end; position: relative; }
.performance-cover.has-image::before { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(1,16,31,.84), rgba(1,16,31,.05)); }
.performance-cover > * { position: relative; }
.performance-body { padding: 16px; }
.performance-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 10px 0; color: var(--muted); font-size: 12px; }
.progress.small { height: 8px; background: var(--surface-2); }
.progress.small > i { background: var(--teal); }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.kpi-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--line); }
.kpi-strip > div { padding: 14px 8px; background: var(--surface); text-align: center; }
.kpi-strip strong { display: block; font-size: 20px; }
.kpi-strip small { color: var(--muted); font-size: 10px; }
.show-row { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(80px,.7fr) minmax(70px,.7fr); gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.show-row:last-child { border: 0; }
.show-row .bar { height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.show-row .bar i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.modal-backdrop { position: fixed; z-index: 200; inset: 0; display: flex; align-items: flex-end; justify-content: center; background: rgba(1,14,28,.56); backdrop-filter: blur(3px); animation: fade .16s ease; }
.modal { width: min(680px,100%); max-height: min(92dvh, 920px); overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: 0 -20px 70px rgba(0,0,0,.28); animation: sheetUp .22s ease-out; }
.modal-head { flex: 0 0 auto; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; min-height: 64px; border-bottom: 1px solid var(--line); padding: 4px 8px; }
.modal-head h2 { margin: 0; text-align: center; font-size: 18px; }
.modal-close { width: 48px; height: 48px; border: 0; background: transparent; border-radius: 50%; cursor: pointer; }
.modal-body { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 18px max(17px, env(safe-area-inset-right)) calc(22px + var(--safe-bottom)) max(17px, env(safe-area-inset-left)); }
.modal-footer { flex: 0 0 auto; display: flex; gap: 9px; padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + var(--safe-bottom)) max(16px, env(safe-area-inset-left)); background: var(--surface); border-top: 1px solid var(--line); }
.modal-footer .btn { flex: 1; }
.form-grid { display: grid; gap: 15px; }
.form-grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.field { display: grid; gap: 7px; }
.field > span, .fieldset-title { font-size: 12px; font-weight: 800; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg); padding: 11px 12px; font-size: 16px; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.field input:invalid:not(:placeholder-shown) { border-color: var(--danger); }
.field .hint { font-size: 11px; font-weight: 500; color: var(--muted); }
.conditional-field[hidden] { display: none; }
.checkboxes { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip input { position: absolute; opacity: 0; }
.check-chip span { display: inline-flex; align-items: center; min-height: 40px; border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; background: var(--surface); font-size: 13px; font-weight: 700; }
.check-chip input:checked + span { color: white; background: var(--navy-900); border-color: var(--navy-900); }
.form-section { padding-top: 8px; border-top: 1px solid var(--line); }
.status-grid, .quick-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.status-choice, .quick-choice { min-height: 72px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: left; padding: 12px; cursor: pointer; }
.status-choice strong, .quick-choice strong { display: block; }
.status-choice small, .quick-choice small { display: block; margin-top: 4px; color: var(--muted); }
.quick-choice { min-height: 90px; }
.quick-choice svg { width: 27px; height: 27px; margin-bottom: 8px; color: var(--teal); }
.fab { position: fixed; z-index: 91; right: max(18px, env(safe-area-inset-right)); bottom: calc(var(--nav-h) + 17px + var(--safe-bottom)); display: grid; place-items: center; width: 58px; height: 58px; border: 0; border-radius: 19px; color: white; background: linear-gradient(145deg, var(--cyan), var(--teal)); box-shadow: 0 11px 28px rgba(5,134,146,.35); cursor: pointer; transition: transform .18s ease; }
.fab:active { transform: scale(.92) rotate(3deg); }
.fab svg { width: 28px; height: 28px; stroke-width: 2.5; }
.bottom-nav { position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--safe-bottom)); display: grid; grid-template-columns: repeat(5,1fr); padding: 6px max(4px, env(safe-area-inset-right)) var(--safe-bottom) max(4px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(20px); border-top: 1px solid var(--line); }
.bottom-nav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 54px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); cursor: pointer; }
.bottom-nav button.active { color: var(--navy-800); }
[data-theme="dark"] .bottom-nav button.active { color: var(--cyan); }
.bottom-nav button.active::before { content: ''; position: absolute; top: 1px; width: 27px; height: 3px; border-radius: 3px; background: var(--teal); }
.bottom-nav svg { width: 23px; height: 23px; }
.bottom-nav span { overflow: hidden; max-width: 100%; font-size: 10px; font-weight: 760; white-space: nowrap; }
.nav-badge { position: absolute; z-index: 2; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 4px; border-radius: 10px; color: white; background: var(--danger); font-size: 10px !important; line-height: 18px; }
.toast-root { position: fixed; z-index: 400; left: 50%; bottom: calc(var(--nav-h) + 27px + var(--safe-bottom)); width: min(calc(100% - 32px), 420px); transform: translateX(-50%); pointer-events: none; }
.toast { margin-top: 8px; padding: 13px 16px; border-radius: 14px; color: white; background: #092a46; box-shadow: var(--shadow); text-align: center; font-size: 13px; font-weight: 750; animation: toastIn .22s ease; }
.toast.success { background: #087566; }
.toast.error { background: #a92f3c; }
.timeline { position: relative; display: grid; gap: 15px; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline-item { position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -21px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--surface); }
.timeline-item small { color: var(--muted); }
.template-body { white-space: pre-wrap; line-height: 1.65; font-size: 14px; color: var(--muted); }
.chart-card { overflow: hidden; }
.chart-row { display: grid; grid-template-columns: 92px 1fr 46px; align-items: center; gap: 9px; margin-top: 11px; font-size: 12px; }
.chart-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-track { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.chart-track i { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: linear-gradient(90deg,var(--blue),var(--teal)); }
.donut { --p: 0%; width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; margin: 8px auto 18px; background: conic-gradient(var(--teal) var(--p), var(--surface-2) 0); }
.donut::after { content: attr(data-label); display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: var(--surface); font-size: 20px; font-weight: 850; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; }
.weekday { padding: 6px 0; color: var(--muted); font-size: 10px; font-weight: 750; text-align: center; }
.day { position: relative; min-height: 49px; border: 1px solid transparent; border-radius: 12px; background: transparent; cursor: pointer; }
.day.today { border-color: var(--teal); font-weight: 850; }
.day.selected { color: white; background: var(--navy-900); }
.day.other { opacity: .25; }
.day.has-events::after { content: ''; position: absolute; bottom: 6px; left: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--teal); transform: translateX(-50%); }
.day.selected::after { background: var(--cyan); }
.notice { display: flex; gap: 10px; padding: 13px; border-radius: 14px; background: color-mix(in srgb, var(--info) 8%, var(--surface)); color: var(--muted); font-size: 12px; line-height: 1.55; }
.notice svg { flex: 0 0 auto; width: 20px; color: var(--info); }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.onboarding { text-align: center; }
.onboarding-logo { width: 112px; height: 112px; border-radius: 28px; box-shadow: var(--shadow); }
.onboarding h1 { margin-top: 18px; }
.steps { display: grid; gap: 12px; margin: 24px 0; text-align: left; }
.step { display: flex; align-items: center; gap: 12px; }
.step b { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; color: white; background: var(--navy-900); }
.sale-success { text-align: center; padding: 18px 0; }
.success-check { display: grid; place-items: center; width: 78px; height: 78px; margin: 0 auto 17px; border-radius: 50%; color: white; background: var(--teal); animation: pop .4s cubic-bezier(.2,1.6,.4,1); }
.success-check svg { width: 42px; height: 42px; stroke-width: 3; }
.desktop-sidebar { display: none; }
@keyframes fade { from { opacity: 0 } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5 } }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0 } }
@keyframes pop { 0% { transform: scale(.5); opacity: 0 } 70% { transform: scale(1.08) } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (max-width: 390px) {
  .brand small { display: none; } .page { padding-left: 12px; padding-right: 12px; }
  .card { padding: 14px; } .hero { padding: 18px; } .task-actions .mini-btn:not(:last-child) { display: none; }
  .form-grid.two { grid-template-columns: 1fr; } .modal-body { padding-left: 14px; padding-right: 14px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  :root { --nav-h: 58px; }
  .topbar { position: relative; height: calc(56px + var(--safe-top)); padding-top: calc(4px + var(--safe-top)); padding-bottom: 4px; }
  .brand img { width: 38px; height: 38px; } .page { padding-top: 10px; }
  .bottom-nav { height: calc(58px + var(--safe-bottom)); } .bottom-nav button { min-height: 46px; }
  .bottom-nav svg { width: 20px; height: 20px; } .modal { max-height: 96dvh; }
  .hero { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .quota-row { margin-top: 0; }
}
@media (min-width: 760px) {
  .page { padding: 24px 26px 110px; }
  .grid.four { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal { border-radius: 26px; max-height: min(88dvh,900px); }
  .modal-footer { padding-bottom: 14px; }
}
@media (min-width: 1024px) {
  :root { --nav-h: 0px; }
  body { padding-left: 230px; }
  .topbar { left: 230px; }
  .bottom-nav { top: 0; right: auto; width: 230px; height: 100dvh; grid-template-columns: 1fr; grid-template-rows: repeat(5,58px); align-content: center; padding: 22px; border-top: 0; border-right: 1px solid var(--line); }
  .bottom-nav button { flex-direction: row; justify-content: flex-start; gap: 13px; padding: 0 16px; border-radius: 15px; }
  .bottom-nav button.active { background: var(--surface-2); }
  .bottom-nav button.active::before { left: -6px; top: 50%; width: 4px; height: 26px; transform: translateY(-50%); }
  .bottom-nav span { font-size: 13px; }
  .fab { right: 30px; bottom: 30px; }
  .toast-root { bottom: 30px; }
  .page { padding-bottom: 60px; }
}
