@font-face {
  font-family: "Vow Cormorant";
  src: url("assets/cormorant-garamond-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Vow Cormorant";
  src: url("assets/cormorant-garamond-italic-300-700-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Vow DM Sans";
  src: url("assets/dm-sans-regular.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root, html[data-theme="olive"] {
  --paper:#f6f4ed; --surface:#fffdf7; --ink:#282e24; --muted:#626456;
  --rail:#283c30; --rail-text:#fff9e8; --rail-muted:#c8d0bb;
  --accent:#466245; --accent-ink:#fff; --soft:#e9eddf; --line:#d8d8c8;
  --ornament:#d8b880; --danger:#8d3535;
}
html[data-theme="rose"] {
  --paper:#faf2f1; --surface:#fffafb; --ink:#40282c; --muted:#715b62;
  --rail:#552d3b; --rail-text:#fff5f4; --rail-muted:#e6c4c9;
  --accent:#864556; --accent-ink:#fff; --soft:#f3e0e4; --line:#e8cfd3;
  --ornament:#deb4a0; --danger:#922e3b;
}
html[data-theme="terracotta"] {
  --paper:#f8f2e9; --surface:#fffcf5; --ink:#452d24; --muted:#735b4e;
  --rail:#5e352c; --rail-text:#fff3e1; --rail-muted:#e6c8ae;
  --accent:#924e33; --accent-ink:#fff; --soft:#f2e3d5; --line:#e0cdbc;
  --ornament:#e4bc86; --danger:#932c36;
}
html[data-theme="aegean"] {
  --paper:#edf4f4; --surface:#fafffd; --ink:#213d45; --muted:#526a70;
  --rail:#184554; --rail-text:#f2fcfa; --rail-muted:#bed7d7;
  --accent:#216576; --accent-ink:#fff; --soft:#daebeb; --line:#c3d6d7;
  --ornament:#d5c895; --danger:#993743;
}
html[data-theme="midnight"] {
  color-scheme:dark;
  --paper:#202731; --surface:#29333f; --ink:#f4f3ee; --muted:#c1c9ce;
  --rail:#141d27; --rail-text:#f6f0e1; --rail-muted:#c0cbd1;
  --accent:#b6cddb; --accent-ink:#15222b; --soft:#334451; --line:#465260;
  --ornament:#d2bc8b; --danger:#ffb7b9;
}
html[data-theme="orchid"] {
  --paper:#f4f0f7; --surface:#fdfaff; --ink:#382d42; --muted:#695e73;
  --rail:#473252; --rail-text:#fdf3ff; --rail-muted:#d6c6df;
  --accent:#755187; --accent-ink:#fff; --soft:#eadff0; --line:#dacde3;
  --ornament:#d6bc99; --danger:#903a52;
}
html[data-theme="slate"] {
  --paper:#f1f3f3; --surface:#fbfdfc; --ink:#263538; --muted:#56666a;
  --rail:#303f44; --rail-text:#f6faf6; --rail-muted:#c3d2cf;
  --accent:#475f65; --accent-ink:#fff; --soft:#dfe8e6; --line:#cdd7d5;
  --ornament:#ddc09a; --danger:#963847;
}
html[data-theme="honey"] {
  --paper:#f9f3e4; --surface:#fffdf6; --ink:#3d3220; --muted:#6e6149;
  --rail:#503e23; --rail-text:#fff4d4; --rail-muted:#e5d3ac;
  --accent:#79561c; --accent-ink:#fff; --soft:#f1e4bf; --line:#dcd0ad;
  --ornament:#efc77e; --danger:#943b35;
}
:root {
  --serif:"Vow Cormorant", "Baskerville", "Palatino Linotype", Georgia, serif;
  --sans:"Vow DM Sans", "Segoe UI", Arial, sans-serif;
  --radius:.65rem;
  --hero-paper:color-mix(in srgb,var(--soft) 48%,var(--surface));
  --rule:1px solid var(--line);
  --shadow:0 5px 19px -14px color-mix(in srgb,var(--ink) 45%,transparent);
}
* { box-sizing:border-box; }
html { font-size:16px; background:var(--paper); }
body { margin:0; min-height:100vh; color:var(--ink); background:var(--paper); font:400 1rem/1.52 var(--sans); -webkit-font-smoothing:antialiased; }
[hidden] { display:none !important; }
button, input, select, textarea { font:inherit; color:inherit; }
button, a { touch-action:manipulation; }
button { cursor:pointer; }
button:disabled, input:disabled, select:disabled { cursor:not-allowed; opacity:.55; }
a { color:var(--accent); }
img { max-width:100%; }
svg { flex-shrink:0; }
::selection { background:var(--soft); color:var(--ink); }
:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.sidebar :focus-visible, .mobile-nav :focus-visible { outline-color:var(--ornament); }
button, a, input, select, textarea { -webkit-tap-highlight-color:transparent; }
h1,h2,h3,h4,p,ul,ol,dl,figure { margin:0; }
h1,h2,h3 { text-wrap:balance; }
.skip-link { position:fixed; z-index:100; left:1rem; top:1rem; transform:translateY(-180%); background:var(--surface); padding:.6rem 1rem; }
.skip-link:focus { transform:none; }

.app-shell { display:grid; grid-template-columns:clamp(208px,17.4vw,267px) minmax(0,1fr); min-height:100vh; }
.sidebar {
  align-self:start; position:sticky; top:0; height:100vh; height:100dvh; overflow:auto;
  display:flex; flex-direction:column; padding:2.3rem 1rem 1.4rem;
  background:var(--rail); color:var(--rail-text); border-right:1px solid color-mix(in srgb,var(--rail) 90%,black);
}
.brand { display:flex; gap:.75rem; flex-direction:column; justify-content:center; align-items:flex-start; margin:0 .8rem 2.7rem; color:var(--rail-text); text-decoration:none; }
.brand-mark {
  position:relative; width:2.65rem; height:2.55rem; display:grid; place-items:center; border:1px solid color-mix(in srgb,var(--ornament) 83%,transparent);
  border-radius:55% 55% .2rem .2rem; color:var(--ornament); font:italic 500 2.05rem/.9 var(--serif);
}
.brand-mark::after { content:""; position:absolute; inset:.21rem; border:1px solid color-mix(in srgb,var(--ornament) 46%,transparent); border-radius:inherit; pointer-events:none; }
.brand-name { font:500 clamp(1.95rem,2.22vw,2.4rem)/1.04 var(--serif); letter-spacing:-.065rem; }
.nav-label { color:var(--rail-muted); padding:1rem .8rem .4rem; font-size:.71rem; letter-spacing:.14em; text-transform:uppercase; }
.nav-list { display:flex; flex-direction:column; gap:.22rem; }
.nav-link {
  border:1px solid transparent; background:transparent; color:var(--rail-muted); display:flex; align-items:center;
  gap:.76rem; min-height:45px; padding:.63rem .82rem; text-decoration:none; border-radius:.38rem; text-align:left;
  font:500 .94rem/1.25 var(--sans);
}
.nav-link svg { width:1.12rem; height:1.12rem; }
.nav-link:hover { background:color-mix(in srgb,var(--rail-text) 7%,transparent); color:var(--rail-text); }
.nav-link[aria-current="page"],.nav-link.active {
  color:var(--rail-text); background:color-mix(in srgb,var(--rail-text) 12%,var(--rail)); border-color:color-mix(in srgb,var(--rail-text) 18%,transparent);
}
.nav-link[aria-current="page"] svg,.nav-link.active svg { color:var(--ornament); }
.rail-footer { margin:auto .8rem 0; padding-top:1.15rem; display:grid; gap:.3rem; border-top:1px solid color-mix(in srgb,var(--rail-text) 22%,transparent); }
.nav-list + .rail-footer { margin-top:auto; }
.studio-signature { font:600 .85rem var(--sans); letter-spacing:.16em; color:var(--rail-text); }
.rail-footer small { color:var(--rail-muted); font-size:.76rem; }
.main { min-width:0; }
.topbar { height:66px; margin:0; padding:0 clamp(1.2rem,3.15vw,4.25rem); display:flex; justify-content:space-between; align-items:center; gap:1rem; border-bottom:var(--rule); background:color-mix(in srgb,var(--paper) 80%,var(--surface)); }
.breadcrumb,.topbar-actions { display:flex; align-items:center; gap:.75rem; }
.breadcrumb { font-size:.84rem; color:var(--muted); }
.breadcrumb strong { color:var(--ink); font-weight:600; }
.breadcrumb span[aria-hidden="true"] { color:var(--muted); opacity:.62; }
.topbar-actions { justify-content:flex-end; flex-wrap:wrap; gap:.45rem; }
.workspace { max-width:1536px; padding:clamp(1.3rem,2.7vw,3.1rem) clamp(1.2rem,3.15vw,4.25rem) 3.4rem; margin-inline:auto; }
.workspace:focus { outline:none; }
.mobile-nav { display:none; }

.dashboard-hero {
  position:relative; display:grid; grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr); min-height:clamp(230px,20vw,310px);
  overflow:hidden; background:var(--hero-paper); border:var(--rule); border-radius:.75rem;
}
.hero-copy { padding:clamp(1.5rem,3vw,3.5rem); display:flex; flex-direction:column; justify-content:center; align-items:flex-start; }
.eyebrow { margin:0 0 .7rem; font-size:.71rem; line-height:1.4; font-weight:700; letter-spacing:.16em; text-transform:uppercase; color:var(--accent); }
.hero-copy h1 { font:500 clamp(2.6rem,4.5vw,5rem)/.93 var(--serif); letter-spacing:-.042em; overflow-wrap:anywhere; }
.hero-copy h1 em, .page-head h1 em { font-weight:500; }
.hero-copy > p:not(.eyebrow) { color:var(--muted); margin:.9rem 0 0; max-width:43ch; }
.hero-meta { display:flex; align-items:center; flex-wrap:wrap; gap:.5rem .8rem; margin-top:1.1rem; padding-top:.8rem; border-top:1px solid color-mix(in srgb,var(--accent) 35%,var(--line)); font-size:.84rem; line-height:1.4; color:var(--muted); }
.hero-meta svg { width:1rem; height:1rem; }
.hero-media { position:relative; isolation:isolate; min-height:100%; overflow:hidden; background:var(--soft); }
.hero-media img { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:cover; object-position:49% 52%; }
.hero-media::after { content:""; position:absolute; inset:.62rem; border:1px solid #fffcde80; pointer-events:none; }
.stat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,176px),1fr)); gap:1rem; margin:1.15rem 0 1.5rem; }
.stat-card { position:relative; min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:.2rem; padding:1.05rem 1.2rem 1.1rem; background:var(--surface); border:var(--rule); border-radius:var(--radius); box-shadow:var(--shadow); overflow-wrap:anywhere; }
.stat-label { display:flex; align-items:center; gap:.45rem; color:var(--muted); font-size:.8rem; font-weight:600; line-height:1.35; }
.stat-label svg { color:var(--accent); height:1rem; width:1rem; }
.stat-value, .stat-card > strong { font:600 clamp(1.65rem,2.2vw,2.6rem)/1.15 var(--serif); letter-spacing:-.045em; color:var(--ink); }
.stat-detail,.stat-card small { font:400 .81rem/1.45 var(--sans); color:var(--muted); }
.dashboard-grid,.settings-grid { display:grid; align-items:start; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.15rem; }
.panel { min-width:0; padding:clamp(1rem,1.7vw,1.65rem); background:var(--surface); border:var(--rule); border-radius:var(--radius); box-shadow:var(--shadow); }
.workspace > .panel + .panel { margin-top:1.1rem; }
.panel-head,.page-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.panel-head { padding-bottom:.85rem; margin-bottom:.5rem; border-bottom:var(--rule); }
.panel-head h2,.panel h2 { font:600 clamp(1.45rem,2vw,2rem)/1.08 var(--serif); letter-spacing:-.035em; }
.panel-head h3,.panel h3 { font:600 1.35rem/1.15 var(--serif); letter-spacing:-.02em; }
.panel-head > div { min-width:0; }
.panel .eyebrow,.stat-card .eyebrow { margin-bottom:.32rem; }
.row-list { list-style:none; padding:0; margin:0; display:grid; }
.list-row { display:flex; align-items:center; justify-content:space-between; gap:.9rem; padding:.75rem 0; border-bottom:var(--rule); }
.list-row:last-child { border-bottom:0; }
.list-row > * { min-width:0; overflow-wrap:anywhere; }
.list-row strong,.list-row b { font-size:.95rem; font-weight:600; }
.list-row small { display:block; color:var(--muted); font-size:.83rem; }
.contribution { margin:.9rem 0; }
.contribution > div:first-child { display:flex; align-items:center; justify-content:space-between; gap:.6rem; }
.bar { position:relative; overflow:hidden; margin:.45rem 0 .2rem; background:var(--soft); height:.4rem; border-radius:2rem; }
.bar i { display:block; height:100%; border-radius:inherit; background:var(--accent); }
.page-head { margin:.22rem 0 1.35rem; align-items:flex-end; }
.page-head h1 { font:500 clamp(2.6rem,4.4vw,4.5rem)/1 var(--serif); letter-spacing:-.045em; }
.page-head p:not(.eyebrow) { color:var(--muted); margin-top:.4rem; max-width:70ch; }
.muted,small.muted { color:var(--muted); }
small.muted { display:block; line-height:1.35; }
.actions { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }

button:not([class]),.btn,.button,.btn-primary,.btn-secondary,.text-button,.icon-button {
  border-radius:.39rem; font:600 .89rem/1.35 var(--sans); display:inline-flex; align-items:center; justify-content:center;
  gap:.45rem; min-height:39px; padding:.5rem .86rem; text-decoration:none; border:1px solid var(--line); background:var(--surface); color:var(--ink);
}
.btn svg,.button svg,.text-button svg,.icon-button svg { width:1rem; height:1rem; }
.btn.primary,.btn-primary,.button.primary { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
.btn.secondary,.btn-secondary,.button.secondary { background:var(--surface); color:var(--ink); border-color:var(--line); }
.btn.danger,.button.danger { color:var(--danger); border-color:color-mix(in srgb,var(--danger) 40%,var(--line)); background:var(--surface); }
button:not([class]):hover:not(:disabled),.btn.secondary:hover:not(:disabled),.btn-secondary:hover:not(:disabled),.button:hover:not(:disabled) { background:var(--soft); }
.btn.primary:hover:not(:disabled),.btn-primary:hover:not(:disabled) { filter:brightness(.91); }
.text-button { background:transparent; border-color:transparent; color:var(--accent); padding:.32rem .2rem; }
.text-button:hover { text-decoration:underline; text-underline-offset:.2em; }
.icon-button { width:2.4rem; height:2.4rem; padding:0; font-size:1.35rem; }
.badge,.pill,.chip { display:inline-flex; align-items:center; gap:.3rem; font-size:.77rem; font-weight:600; color:var(--accent); background:var(--soft); border:1px solid var(--line); padding:.21rem .62rem; border-radius:2rem; }

.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.9rem 1rem; align-items:start; }
.field { min-width:0; display:flex; flex-direction:column; gap:.35rem; margin:0; color:var(--ink); font-size:.88rem; font-weight:550; }
.field > span:first-child,.field > label { color:var(--ink); font-weight:600; }
.field small,.hint,.help-text { color:var(--muted); font-size:.8rem; font-weight:400; }
.field.full,.field.wide,.form-grid .span-2 { grid-column:1/-1; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select,textarea {
  background-color:var(--surface); color:var(--ink); min-width:0; width:100%; min-height:42px; padding:.58rem .72rem;
  border:1px solid color-mix(in srgb,var(--muted) 43%,var(--line)); border-radius:.33rem; font:400 .97rem/1.35 var(--sans);
}
input::placeholder,textarea::placeholder { color:color-mix(in srgb,var(--muted) 87%,var(--surface)); opacity:1; }
input[type=checkbox],input[type=radio],input[type=range],progress { accent-color:var(--accent); }
input[type=checkbox],input[type=radio] { width:1.05rem; height:1.05rem; }
input[type=range] { width:100%; min-height:26px; }
textarea { resize:vertical; min-height:5rem; }
fieldset { min-width:0; margin:0; padding:.85rem 1rem; border:var(--rule); border-radius:.4rem; }
legend { padding:0 .3rem; font-weight:650; font-size:.85rem; }
.table-wrap { max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
table { width:100%; border-collapse:collapse; text-align:left; font-size:.91rem; }
th,td { padding:.68rem .55rem; vertical-align:middle; border-bottom:var(--rule); }
th { color:var(--muted); font-size:.77rem; font-weight:650; }
th:first-child,td:first-child { padding-left:0; }
th:last-child,td:last-child { padding-right:0; }
tbody tr:last-child td { border-bottom:0; }
td strong { font-weight:650; }
td .actions { align-items:flex-start; gap:.3rem; flex-wrap:nowrap; }
td .actions .btn { min-height:31px; padding:.3rem .48rem; font-size:.77rem; }
.empty-state { border:1px dashed var(--line); border-radius:.45rem; padding:1.2rem; color:var(--muted); background:color-mix(in srgb,var(--soft) 32%,var(--surface)); }
.empty-state h3 { color:var(--ink); }
.theme-picker { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:.45rem; margin:.8rem 0; }
.theme-option {
  display:flex; align-items:center; justify-content:flex-start; gap:.55rem; padding:.56rem .65rem; min-height:40px;
  background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:.37rem; text-align:left;
}
.theme-option[aria-pressed="true"],.theme-option[aria-checked="true"],.theme-option.active { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.theme-option strong { font-size:.86rem; font-weight:550; }
.swatch { width:1.15rem; height:1.15rem; flex:none; border-radius:100%; border:1px solid #0002; background:var(--swatch,var(--accent)); }
.dialog { color:var(--ink); background:var(--surface); border:var(--rule); border-radius:.72rem; padding:0; width:min(570px,calc(100% - 2rem)); max-width:100%; max-height:88vh; max-height:88dvh; box-shadow:0 1.2rem 7rem #101b2855; overflow-y:auto; }
.dialog::backdrop { background:#12201994; }
.dialog-head,.dialog-footer { display:flex; align-items:center; gap:1rem; padding:1.05rem 1.4rem; }
.dialog-head { justify-content:space-between; border-bottom:var(--rule); }
.dialog-head h2 { font:600 1.85rem/1.1 var(--serif); letter-spacing:-.03em; }
.dialog-body { padding:1.35rem 1.4rem; }
.dialog-body > * + * { margin-top:.82rem; }
.dialog-footer { justify-content:flex-end; flex-wrap:wrap; border-top:var(--rule); }
.form-error { color:var(--danger); padding:0 1.4rem .8rem; font-size:.88rem; }
.toast { position:fixed; bottom:1.2rem; right:1.2rem; z-index:12; background:var(--rail); color:var(--rail-text); border:1px solid var(--rail-muted); padding:.7rem 1.15rem; box-shadow:var(--shadow); border-radius:.5rem; max-width:calc(100% - 2.4rem); font-size:.9rem; }
.mode-label { display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:2rem; padding:.24rem .65rem; font:550 .77rem/1.4 var(--sans); color:var(--accent); background:var(--soft); white-space:nowrap; }
.hero-copy .hero-meta { color:var(--accent); margin-top:.72rem; }
.hero-copy h1 em { color:var(--accent); }
.dashboard-hero + .stat-grid .stat-card:first-child { background:var(--rail); border-color:var(--rail); color:var(--rail-text); }
.dashboard-hero + .stat-grid .stat-card:first-child .stat-value { color:var(--rail-text); }
.dashboard-hero + .stat-grid .stat-card:first-child .stat-detail,.dashboard-hero + .stat-grid .stat-card:first-child .stat-label { color:var(--rail-muted); }
.next-payment { display:flex; gap:.85rem; align-items:center; flex-wrap:wrap; margin:.95rem 0 1rem; }
.payment-date { order:0; min-width:3.15rem; min-height:3.6rem; display:flex; flex-direction:column; align-items:center; justify-content:center; border:1px solid var(--line); border-radius:.3rem; background:var(--soft); color:var(--accent); }
.payment-date strong { font:600 1.85rem/.95 var(--serif); }
.payment-date span { text-transform:uppercase; font-size:.65rem; font-weight:700; line-height:1.4; letter-spacing:.09em; }
.payment-info { display:grid; gap:.15rem; flex:1 1 7.5rem; min-width:0; overflow-wrap:anywhere; }
.payment-info > strong { font-weight:650; }
.payment-info small { color:var(--muted); font-size:.81rem; }
.next-payment .amount { font:650 1.4rem/1 var(--serif); }
.family-panel > p,.day-panel > p,.settings-grid .muted,.panel > p.muted { font-size:.9rem; }
.panel > p.muted + .actions,.panel > p.muted + .btn,.panel > p.muted + .form-grid,.settings-grid .panel .actions,#wedding-settings > p,#wedding-settings > button { margin-top:.86rem; }
.contribution > div:first-child { font-size:.88rem; }
.contribution strong { font-weight:650; }
.contribution small { font-size:.78rem; font-weight:400; color:var(--muted); }
.contribution:nth-of-type(2) .bar i { background:color-mix(in srgb,var(--accent) 55%,var(--ornament)); }
.contribution:nth-of-type(3) .bar i { background:color-mix(in srgb,var(--ornament) 75%,var(--ink)); }
.dialog-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.35rem; }
.dialog-nav .nav-link { color:var(--ink); background:var(--soft); }
.dialog-nav .nav-link svg { color:var(--accent); }
.dialog-nav .nav-link:hover { border-color:var(--accent); }
.field [data-fin-projection],.field [data-fin-variance] { min-height:42px; display:flex; align-items:center; color:var(--accent); font:600 1.48rem/1.13 var(--serif); }

@media (min-width:1550px) {
  .workspace { padding-top:2.6rem; }
}
@media (max-width:1100px) {
  .app-shell { grid-template-columns:202px minmax(0,1fr); }
  .sidebar { padding:1.75rem .65rem 1.2rem; }
  .stat-grid { gap:.65rem; grid-template-columns:repeat(auto-fit,minmax(min(100%,148px),1fr)); }
  .stat-card { padding:.9rem; }
  .dashboard-grid,.settings-grid { gap:.75rem; }
}
@media (max-width:820px) {
  .app-shell { display:block; }
  .sidebar { display:none; }
  .mobile-nav { display:flex; justify-content:space-around; background:var(--rail); color:var(--rail-text); position:fixed; z-index:9; bottom:0; left:0; width:100%;
    padding:.28rem max(.3rem,env(safe-area-inset-right)) max(.28rem,env(safe-area-inset-bottom)) max(.3rem,env(safe-area-inset-left));
    border-top:1px solid var(--rail-muted); box-shadow:0 -3px 20px #131e1f18; }
  .mobile-nav .nav-link { justify-content:center; align-items:center; flex:1 1 0; min-width:0; gap:.23rem; flex-direction:column; padding:.4rem .13rem; border-radius:.33rem; font-size:.72rem; line-height:1.15; white-space:normal; text-align:center; }
  .mobile-nav .nav-link svg { width:1.05rem; height:1.05rem; }
  .topbar { height:auto; min-height:56px; }
  .workspace { padding-bottom:calc(5.8rem + env(safe-area-inset-bottom)); }
  .toast { bottom:calc(4.1rem + env(safe-area-inset-bottom)); }
}
@media (max-width:600px) {
  .topbar { padding:.6rem 1rem; gap:.45rem; }
  .breadcrumb,.topbar-actions { gap:.42rem; }
  .breadcrumb { font-size:.77rem; }
  .topbar .btn,.topbar .button,.topbar button { min-height:34px; font-size:.77rem; padding:.32rem .55rem; }
  .workspace { padding:1rem .9rem calc(5.8rem + env(safe-area-inset-bottom)); }
  .dashboard-hero { min-height:190px; grid-template-columns:minmax(0,1.22fr) minmax(0,.78fr); border-radius:.5rem; }
  .hero-copy { padding:1rem .85rem; }
  .hero-copy h1 { font-size:clamp(2.05rem,9.5vw,3.35rem); }
  .hero-copy > p:not(.eyebrow) { font-size:.83rem; margin-top:.42rem; }
  .hero-copy .eyebrow { font-size:.62rem; margin-bottom:.45rem; letter-spacing:.12em; }
  .hero-meta { font-size:.74rem; margin-top:.7rem; padding-top:.5rem; gap:.22rem .4rem; }
  .hero-media img { object-position:50% 48%; }
  .hero-media::after { inset:.35rem; }
  .stat-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.52rem; margin:.7rem 0 .95rem; }
  .stat-card { padding:.75rem; }
  .stat-value,.stat-card > strong { font-size:1.75rem; }
  .stat-label { font-size:.75rem; }
  .stat-detail,.stat-card small { font-size:.75rem; }
  .dashboard-grid,.settings-grid { grid-template-columns:minmax(0,1fr); }
  .panel { padding:1rem .9rem; }
  .page-head { gap:.6rem; align-items:flex-start; flex-wrap:wrap; }
  .page-head h1 { font-size:2.8rem; }
  .panel-head { gap:.55rem; }
  .form-grid { gap:.7rem; }
  .dialog { max-height:92dvh; }
  .dialog-head,.dialog-footer { padding:.8rem 1rem; }
  .dialog-body { padding:1.05rem 1rem; }
  .dialog .form-grid { grid-template-columns:minmax(0,1fr); }
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea { font-size:1rem; }
}
@media (max-width:370px) {
  .breadcrumb span:first-child,.breadcrumb span[aria-hidden] { display:none; }
  .form-grid { grid-template-columns:minmax(0,1fr); }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; animation-duration:0s !important; transition-duration:0s !important; }
}
