@font-face {font-family:"DM Sans";font-style:normal;font-weight:100 1000;font-display:swap;src:url("dm-sans.ttf") format("truetype")}
@font-face {font-family:"Pixelify Sans";font-style:normal;font-weight:400 700;font-display:swap;src:url("pixelify-sans.ttf") format("truetype")}
:root {
  color-scheme: light;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  color: #182c29;
  background: #f6f8f8;
  font-synthesis: none;
  --ink: #182c29;
  --muted: #586b66;
  --green: #126550;
  --line: #dee6e3;
  --page: #f6f8f8;
  --sidebar: 216px;
}
*, *::before, *::after { box-sizing: border-box }
body { margin: 0; min-width: 300px; font-size: 1rem; -webkit-font-smoothing: antialiased }
button, input, select { font: inherit }
button, a { -webkit-tap-highlight-color: transparent }
button { cursor: pointer; color: inherit }
button, input, select { touch-action: manipulation }
button:disabled { cursor: default; opacity: .5 }
button { border: 0; background: transparent }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid #318e75; outline-offset: 3px }
button:hover:not(:disabled) { filter: brightness(.978) }
a { color: inherit }
[hidden] { display: none !important }
svg { display: block; flex-shrink: 0 }
i[data-icon] { display: inline-flex; font-style: normal }
::selection { background: #caeada; color: #123d30 }
.skip { position: fixed; left: 8px; top: 8px; z-index: 20; padding: 9px 16px; background: white; transform: translateY(-170%) }
.skip:focus { transform: none }
.layout { min-height: 100vh }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 5 }
.brand { display: inline-flex; width: fit-content; margin: 30px 0 0 27px; align-items: center; gap: 10px; font-size: 2.3rem; font-weight: 750; letter-spacing: -.09em; line-height: 1; text-decoration: none }
.brand-icon { width: 40px; height: 40px }
.brand-dot { color: #479c72; margin-left: 1px }
.side-body { padding: 52px 15px 15px }
.nav-label { font-size: .69rem; letter-spacing: .12em; font-weight: 750; text-transform: uppercase; color: #697c74; padding: 0 14px 13px }
#nav-main { display: grid; gap: 5px }
.nav-btn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; text-decoration: none; padding: 12px 15px; min-height: 44px; border-radius: 9px; font-size: .94rem; font-weight: 550; color: #4c605b; letter-spacing: -.012em }
.nav-btn svg { color: #6e8079; width: 19px }
.nav-btn:hover { background: #f4f7f5 }
.nav-btn.active { background: #e5f2e9; color: #125a42; font-weight: 700 }
.nav-btn.active svg { color: #20714e }
.side-tools { margin-top: 36px }
.side-tools .nav-btn { font-size: .88rem; gap: 10px; white-space: nowrap }
.mini-brand, .mobile-data, .narrow-month { display: none }
.side-footer { display: flex; align-items: center; gap: 11px; border-top: 1px solid var(--line); margin: auto 17px 0; padding: 21px 4px }
.device-icon { width: 37px; height: 37px; border-radius: 11px; display: grid; place-items: center; color: #487061; background: #edf4ee }
.device-icon svg { width: 18px }
.side-footer strong, .side-footer small { display: block; line-height: 1.45 }
.side-footer strong { font-size: .88rem; font-weight: 650 }
.side-footer small { font-size: .78rem; color: var(--muted) }
.content { margin-left: var(--sidebar) }
.topbar { height: 65px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 2.6vw, 44px); gap: 15px; background: #fff; border-bottom: 1px solid var(--line) }
.trail, .wallet-switch { display: inline-flex; align-items: center }
.trail { gap: 11px; font-size: .85rem; color: #40564b; font-weight: 600 }
.trail-icon, .trail-parent, .slash { color: #718078; font-weight: 450 }
.trail-icon svg { width: 17px; height: 17px }
.slash { color: #aab5ae }
.wallet-switch { font-size: .8rem; font-weight: 600; gap: 8px; padding: 7px 10px; border: 1px solid #d3e5d8; background: #f0f7f1; border-radius: 7px; color: #386344; white-space: nowrap }
.wallet-switch svg:last-child { color: #74937c }
main { padding: 31px clamp(22px, 2.6vw, 44px) 42px; max-width: 1760px; margin: 0 auto }
main:focus:not(:focus-visible) { outline: none }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 24px }
h1, h2, h3, p { margin: 0 }
.page-head h1 { font-size: clamp(1.85rem, 2.15vw, 2.5rem); line-height: 1.17; font-weight: 700; letter-spacing: -.052em }
.page-head p { margin-top: 6px; color: var(--muted); font-size: .94rem; line-height: 1.42 }
.river-scene, .couple-signature { display: none }
.page-head.overview-head { display: block; position: relative }
.overview-head .page-intro {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 17px;
  min-height: clamp(166px, 13.7vw, 196px); padding: 18px clamp(20px, 2.4vw, 34px) 71px;
  background: linear-gradient(105deg, #fff4da 0%, #f3ecd3 46%, #d5ddc8 82%);
  border: 1px solid #dbdec8;
}
.overview-head .river-scene {
  display: block; position: absolute; z-index: -1; inset: 0 0 0 auto;
  width: auto; max-width: 66%; height: 100%; object-fit: cover; object-position: 59% center;
  mask-image: linear-gradient(to right, transparent 0%, #000 27%);
}
.overview-head .page-copy { max-width: 52%; position: relative }
.overview-head h1 { color: #485c45; font-size: .94rem; font-weight: 650; letter-spacing: .005em; line-height: 1.35 }
.overview-head .couple-signature {
  display: block; font-size: clamp(2.05rem, 3.1vw, 3.18rem); line-height: 1.04;
  margin: 4px 0 0; font-family: 'Pixelify Sans', monospace; font-weight: 500; letter-spacing: -.035em; color: #203f33;
}
.couple-signature span { white-space: nowrap }
.couple-signature i { color: #925b40; font-style: normal }
.overview-head #page-desc { display: none }
.overview-head .head-actions { position: absolute; bottom: 18px; left: calc(clamp(20px, 2.4vw, 34px) + 1px) }
.head-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0 }
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 8px; min-height: 41px; padding: 9px 14px; border-radius: 8px; white-space: nowrap; font-size: .88rem; font-weight: 650; letter-spacing: -.01em }
.btn-light { border: 1px solid #d6e0db; background: #fff; color: #31483c; box-shadow: 0 1px 2px #17392305 }
.btn-primary { color: #fff; background: #145e4b; border: 1px solid #145e4b; box-shadow: 0 2px 3px #174d3416 }
.btn-primary:hover { background: #0d5140 }
.btn svg { width: 17px; height: 17px }
#period-button > svg:last-child { width: 13px; margin-left: 2px; color: #65786a }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 7px; color: var(--muted) }
.icon-btn:hover { background: #eef4f0 }
.menu-toggle { display: none }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 2px 4px #193c2603; min-width: 0 }
.recent { margin-top: 20px }
.flow-month-detail { grid-column: 1 / -1; min-width: 0; }
.flow-month-detail .panel-head { align-items: center; padding-bottom: 12px; }
.flow-month-detail .panel-head p { margin-top: 3px; font-size: .875rem; color: var(--muted); }
.flow-detail-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0 23px 20px; border: 1px solid var(--line); border-radius: 10px; background: #f6f9f7; }
.flow-detail-summary div { min-width: 0; padding: 10px 15px; }
.flow-detail-summary div + div { border-left: 1px solid var(--line); }
.flow-detail-summary dt { font-size: .85rem; color: var(--muted); }
.flow-detail-summary dd { margin: 3px 0 0; font-size: 1.05rem; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.flow-detail-summary .income { color: #197659; }
.flow-detail-summary .expense { color: #a14a39; }
.flow-detail-empty { margin: 0; padding: 0 23px 20px; color: var(--muted); }
@media (min-width: 841px) {
  .fc-analysis > .fc-expenses { grid-column: 2; grid-row: 1; }
}
@media (max-width: 540px) {
  .flow-detail-summary { grid-template-columns: 1fr; margin: 0 15px 15px; }
  .flow-detail-summary div { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 7px 11px; }
  .flow-detail-summary div + div { border-left: 0; border-top: 1px solid var(--line); }
  .flow-detail-summary dd { margin: 0; text-align: right; }
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 23px 17px }
.panel-head h2 { font-size: 1.11rem; line-height: 1.3; letter-spacing: -.035em; font-weight: 700 }
.text-btn { font-size: .87rem; font-weight: 650; color: var(--green); border-radius: 5px; padding: 4px 0; white-space: nowrap }
.text-btn:hover { text-decoration: underline }
.table-wrap { overflow-x: auto }
.records { border-collapse: collapse; width: 100%; text-align: left; font-size: .89rem; font-variant-numeric: tabular-nums }
.records th { background: #f7f9f8; border-top: 1px solid #e7ede9; border-bottom: 1px solid #e7ede9; font-size: .76rem; color: #65766b; font-weight: 600; padding: 9px 12px }
.records td { padding: 11px 12px; border-bottom: 1px solid #edf1ee }
.records tr:last-child td { border-bottom: 0 }
.records th:first-child, .records td:first-child { padding-left: 23px }
.records th:last-child, .records td:last-child { padding-right: 23px }
.records tbody tr:hover { background: #f9fbf9 }
.item-edit { display: inline-flex; align-items: center; gap: 12px; text-align: left; padding: 0; font-weight: 600; letter-spacing: -.015em; min-width: 0; max-width: 100%; line-height: 1.34; word-break: break-word }
.item-edit:hover > span:last-child { text-decoration: underline; text-underline-offset: 3px }
.cat-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--tint); color: var(--tone); flex: 0 0 auto }
.category-tag { color: var(--tone); display: inline-flex; align-items: center; gap: 6px; background: var(--tint); padding: 4px 9px; border-radius: 6px; font-size: .76rem; font-weight: 650; white-space: nowrap }
.category-tag::before { content: ''; width: 6px; height: 6px; background: var(--dot); border-radius: 50% }
.date-cell { color: var(--muted); white-space: nowrap }
.records .amount { text-align: right; font-weight: 650; white-space: nowrap }
.amount.income { color: #197659 }
.amount.expense { color: #a14a39 }
.records .edit-cell { text-align: right; width: 46px; padding-left: 3px }
.edit-cell button { display: inline-grid; place-items: center; width: 29px; height: 29px; border-radius: 6px; color: #687b70 }
.edit-cell button:hover { background: #eaf1ed }
.empty { display: grid; justify-items: center; gap: 9px; text-align: center; padding: 36px 20px }
.empty .empty-icon { display: grid; place-items: center; width: 44px; height: 44px; background: #edf4ee; color: var(--green); border-radius: 14px; margin-bottom: 2px }
.empty strong { font-size: 1.02rem; font-weight: 650 }
.empty p { color: var(--muted); font-size: .9rem }
.filter-bar { display: flex; gap: 11px; align-items: center; flex-wrap: wrap; padding: 18px 22px; border-bottom: 1px solid var(--line) }
.search-field, .select-field { display: inline-flex; align-items: center; position: relative }
.search-field { flex: 1 1 230px; gap: 9px; padding: 0 11px; background: #f8faf8; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); min-height: 40px }
.search-field input { border: 0; outline: 0; width: 100%; min-width: 0; background: transparent; color: var(--ink); font-size: .89rem }
.search-field:focus-within { outline: 2px solid #4f9b7d }
.select-field select { appearance: none; padding: 9px 30px 9px 11px; border-radius: 8px; border: 1px solid #d6e1da; background: #fff; color: #3f5649; font-size: .86rem; min-height: 40px; cursor: pointer; max-width: 100% }
.select-field svg { position: absolute; pointer-events: none; right: 10px; color: #758479 }
.ledger-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); padding: 13px 22px; font-size: .85rem; color: var(--muted) }
.ledger-foot strong { color: var(--ink) }
.type-tabs { display: inline-flex; background: #e8eeea; padding: 3px; border-radius: 9px; gap: 2px; margin-bottom: 18px }
.type-tabs button { font-weight: 600; font-size: .9rem; padding: 8px 18px; color: #586c60; border-radius: 7px }
.type-tabs .chosen { background: #fff; box-shadow: 0 1px 4px #284c321a; color: var(--green) }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,246px),1fr)); gap: 15px }
.category-card { text-align: left; padding: 20px; display: grid; gap: 16px; min-width: 0; transition: border-color .15s }
.category-card:hover { border-color: #91bda5 }
.category-card > div { display: flex; align-items: center; justify-content: space-between; gap: 10px }
.category-card h2 { font-size: 1.03rem; margin-right: auto; font-weight: 650; letter-spacing: -.025em }
.category-card p { color: var(--muted); font-size: .83rem }
.category-card strong { font-variant-numeric: tabular-nums; font-size: 1.37rem; letter-spacing: -.04em; font-weight: 650 }
.cat-track { display: block; border-radius: 4px; height: 5px; background: #eef2ef; overflow: hidden }
.cat-track span { background: var(--dot); display: block; height: 100%; width: var(--pct) }
.category-card small { color: var(--muted); font-size: .8rem; margin-top: -7px }
.month-dialog { width: 305px; border: 1px solid var(--line); border-radius: 17px; padding: 17px; box-shadow: 0 16px 55px #17352620; color: var(--ink); background: #fff }
.month-dialog::backdrop { background: #132f2540 }
.month-title,.month-year { display: flex; align-items: center; justify-content: space-between; gap: 10px }
.month-title h2 { font-size: 1.13rem; letter-spacing: -.04em }
.month-year { margin: 12px 0 6px }
.month-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px }
.month-grid button { border-radius: 7px; padding: 9px; font-size: .91rem }
.month-grid button:hover { background: #eff4f0 }
.month-grid .selected { background: #dcefe1; color: #185b40; font-weight: 700 }
.month-now { border-top: 1px solid var(--line); width: 100%; padding-top: 13px; margin-top: 10px }
#toast { position: fixed; z-index: 11; bottom: 20px; left: 50%; transform: translate(-50%,0); max-width: calc(100vw - 24px); color: white; border-radius: 10px; background: #193e31; box-shadow: 0 5px 25px #1b392b22; font-size: .92rem }
#toast:not(:empty) { padding: 12px 19px }
@media(min-width:1500px) { :root { --sidebar: 235px } main { padding-top: 38px } .side-body { padding-inline: 19px } }
@media(max-width:1190px) and (min-width:881px) { :root { --sidebar: 188px } .side-body { padding-inline: 10px } main, .topbar { padding-inline: 23px } .btn { padding-inline: 11px } .head-actions { gap: 7px } }
@media(max-width:880px) {
  .sidebar { transform: translateX(-102%); transition: transform .2s; width: 225px; z-index: 8 }
  .menu-open .sidebar { transform: none }
  .mobile-shade { position: fixed; z-index: 7; inset: 0; background: #142e2445 }
  .content { margin-left: 0 }
  .menu-toggle { display: inline-grid; margin-left: -8px }
  .trail { gap: 8px }
  .trail-icon { display: none !important }
  .topbar { height: 57px }
}
@media(max-width:650px) {
  main { padding: 22px 15px 30px }
  .topbar { padding: 0 16px }
  .page-head { align-items: flex-start; flex-direction: column; gap: 17px; margin-bottom: 18px }
  .page-head h1 { font-size: 1.88rem }
  .overview-head .page-intro { padding: 16px; display: flex; align-items: center; min-height: clamp(134px, 38vw, 166px) }
  .overview-head .river-scene { max-width: 62%; mask-image: linear-gradient(to right, transparent 0%, #000 24%) }
  .overview-head h1 { font-size: .84rem }
  .overview-head .couple-signature { font-size: clamp(1.8rem, 6.5vw, 2.24rem); line-height: 1.04; margin-top: 5px }
  .overview-head .head-actions { position: static; margin-top: 12px }
  .head-actions { width: 100%; justify-content: space-between; gap: 6px }
  .head-actions .btn { font-size: .835rem; min-height: 40px; gap: 5px; padding-inline: 10px }
  .trail-parent,.slash { display: none }
  .wallet-switch { font-size: .755rem; gap: 6px }
  .panel-head { padding: 17px 15px 15px }
  .records .category-col,.records .date-col,.records .edit-col { display: none }
  .records th:first-child,.records td:first-child { padding-left: 15px }
  .records td.amount,.records th.amount { padding-right: 15px }
  .item-edit { gap: 8px; font-size: .82rem }
  .records td { padding: 10px 6px }
  .cat-icon { width: 32px; height: 32px }
  .records .amount { font-size: .81rem }
  .filter-bar { padding: 15px; gap: 8px }
  .filter-bar .select-field { flex: 1 }
  .select-field select { width: 100% }
  .ledger-foot { padding: 14px 15px }
  .recent { margin-top: 15px }
}
@media(max-height:530px) { .sidebar { overflow-y: auto } .side-body { padding-top: 25px } .side-footer { margin-top: 10px } }
@media(max-width:650px) {
  .trail #crumb { display: none }
  .mini-brand { display: inline; font-size: 1.48rem; letter-spacing: -.08em; font-weight: 750; color: #203a2e }
  .mini-brand span { color: #479c72 }
  .mobile-data { display: block; font-size: .72rem; font-weight: 450; letter-spacing: 0; color: var(--muted); margin-top: 2px }
}
@media(max-width:375px) {
  .full-month { display:none }
  .narrow-month { display:inline }
  .head-actions { flex-wrap:wrap }
  .head-actions .btn { padding-inline:8px }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition-duration: .001ms !important; animation-duration: .001ms !important } }
@media print { .sidebar,.topbar,.head-actions,.filter-bar,.edit-col,#toast { display:none } .content { margin:0 } main { padding:0 } .panel { break-inside:avoid } }

.fc-summary,
.fc-analysis {
  --fc-ink: #182e2b;
  --fc-secondary: #60716d;
  --fc-earn: #168775;
  --fc-spend: #eaa187;
  display: grid;
  gap: 18px;
  color: var(--fc-ink);
  min-width: 0;
}

.fc-summary { grid-template-columns: 1.18fr repeat(3, minmax(0,1fr)); }
.fc-analysis { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); margin-top: 20px; }
.fc-card { min-width: 0; border: 1px solid #dce4e2; border-radius: 17px; background: #fff; }
.fc-card h2, .fc-card p { margin: 0; }
.fc-metric {
  position: relative;
  container-type: inline-size;
  isolation: isolate;
  overflow: hidden;
  padding: 19px 22px 17px;
}
.fc-metric-heading { display: flex; align-items: center; gap: 10px; }
.fc-metric-heading h2 { color: #4f615c; font: inherit; font-size: .9rem; font-weight: 600; }
.fc-icon { display: inline-grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; flex: none; }
.fc-metric-income .fc-icon { color: #137966; background: #def2e9; }
.fc-metric-expense .fc-icon { color: #b85f42; background: #fcece5; }
.fc-metric-surplus .fc-icon { color: #725893; background: #eee8f5; }
.fc-metric-value { position: relative; display: block; margin: 13px 0 5px; letter-spacing: -.052em; font: inherit; font-size: clamp(1.45rem, 11cqi, 2.25rem); font-weight: 650; line-height: 1.16; overflow-wrap: anywhere; }
.fc-metric-note { color: var(--fc-secondary); font-size: .8rem; line-height: 1.45; }
.fc-metric-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 20px; }
.fc-balance {
  border-color: #134e43;
  background: linear-gradient(112deg,#103d36 2%,#135344 100%);
  color: #fff;
}
.fc-balance .fc-icon { color: #d3f1e5; background: #ffffff18; }
.fc-balance .fc-metric-heading h2 { color: #ebf6f1; }
.fc-balance-details { display: grid; gap: 2px; margin: 7px 0 0; color: #cee6dc; font-size: .8rem; line-height: 1.45; }
.fc-balance-details > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 .75rem; }
.fc-balance-details dd { margin: 0; color: #f1faf6; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fc-balance-details small { font-size: inherit; }
.fc-contours {
  position: absolute;
  right: -2px; bottom: -1px;
  width: 64%; height: 100%;
  z-index: -1;
  color: #8addb3;
  opacity: .37;
  mask-image: linear-gradient(90deg,transparent,#000 32%);
  pointer-events: none;
}
.fc-spark { width: clamp(43px,24cqi,80px); height: 31px; flex: none; margin: -9px 0 -3px; }
.fc-spark.fc-income { color: #55a990; }
.fc-spark.fc-expense { color: #dc967f; }
.fc-spark.fc-surplus { color: #78639d; }
.fc-panel {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  padding: 22px 23px 20px;
}
.fc-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.fc-panel-heading h2 { color: var(--fc-ink); font: inherit; font-size: clamp(1.05rem, 4.8cqi, 1.22rem); font-weight: 650; letter-spacing: -.035em; line-height: 1.3; }
.fc-panel-heading p { font-size: .83rem; color: var(--fc-secondary); line-height: 1.5; margin-top: 3px; }
.fc-range { position: relative; flex-shrink: 0; }
.fc-range select {
  appearance: none;
  background: #fff;
  color: #40554e;
  border: 1px solid #dbe4df;
  border-radius: 8px;
  padding: 6px 27px 6px 10px;
  min-height: 32px;
  font: inherit;
  font-size: .81rem;
  line-height: 1.3;
  cursor: pointer;
}
.fc-range svg { position: absolute; top: 50%; right: 9px; transform: translateY(-50%); color: #5d6e68; pointer-events: none; }
.fc-range select:hover { border-color: #a4b7af; }
.fc-panel :focus-visible { outline: 2px solid #198775; outline-offset: 2px; }
.fc-chart { --fc-plot-height: 132px; display: grid; margin: 20px 1px 0 0; padding-left: 48px; }
.fc-plot, .fc-bars { grid-area: 1/1; }
.fc-plot { position: relative; height: var(--fc-plot-height); pointer-events: none; }
.fc-grid-line { height: 0; position: absolute; left: 0; right: 0; border-top: 1px dashed #dfe7e3; }
.fc-grid-line.fc-axis-zero { border-top: 1px solid #8a9e96; }
.fc-grid-line span { position: absolute; right: calc(100% + 9px); top: 0; transform: translateY(-50%); font-size: .75rem; color: #657871; white-space: nowrap; }
.fc-bars { display: grid; position: relative; grid-template-columns: repeat(var(--fc-columns), minmax(0,1fr)); }
.fc-group { display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; font: inherit; }
.fc-month-columns { height: var(--fc-plot-height); display: flex; align-items: flex-start; justify-content: center; gap: clamp(2px,.65cqi,4px); }
.fc-group:focus-visible { z-index: 2; }
.fc-bars button.fc-group:hover:not(:disabled) { filter: none; }
.fc-month-name { align-self: center; padding: 3px 5px; margin: 5px 0 0; border-radius: 5px; color: #526c61; font-size: .8rem; line-height: 1.4; text-align: center; }
.fc-group[aria-expanded="true"] { background: #16877510; }
.fc-group[aria-expanded="true"] .fc-month-name { background: #17664f; color: white; font-weight: 650; }
.fc-chart-empty { margin-top: 0; padding-left: 0; }
.fc-chart-empty .fc-group { min-height: 38px; justify-content: center; }
.fc-chart-empty .fc-month-name { margin: 0; }
.fc-bar { position: relative; flex: 0 1 20%; max-width: 15px; border-radius: 3.5px 3.5px 0 0; }
.fc-bar.fc-negative { border-radius: 0 0 3.5px 3.5px; }
.fc-marker { display: inline-block; width: 9px; height: 9px; border-radius: 3px; flex: none; }
.fc-series-income { background: var(--fc-earn); }
.fc-series-expense { background: var(--fc-spend); }
.fc-series-balance { background: var(--fc-surplus,#78639d); }
.fc-chart-key { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding-top: 16px; font-size: .78rem; color: #53675f; margin-top: auto; }
.fc-chart-key > span { display: inline-flex; align-items: center; gap: 6px; }
.fc-tooltip {
  position: absolute;
  --fc-tip-width: min(100%, 14rem);
  width: var(--fc-tip-width); box-sizing: border-box;
  bottom: 34%;
  left: clamp(0%, calc(var(--fc-group-center) - var(--fc-tip-width) / 2), calc(100% - var(--fc-tip-width)));
  z-index: 3;
  pointer-events: none;
  color: #243832;
  border-radius: 10px;
  border: 1px solid #cfded7;
  background: #fff;
  box-shadow: 0 6px 18px #123e3520;
  padding: 10px 12px;
  font-size: .78rem;
  text-align: left;
  visibility: hidden;
}
.fc-group:focus-visible .fc-tooltip { visibility: visible; }
@media (hover: hover) {
  .fc-group:hover { z-index: 2; }
  .fc-group:hover .fc-tooltip { visibility: visible; }
  button.fc-group[aria-expanded="false"]:hover .fc-month-name { color: #155940; background: #e6f3ec; }
}
.fc-tooltip > b { display: block; margin-bottom: 5px; }
.fc-tooltip > span { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 5px; padding: 2px 0; }
.fc-tooltip strong { margin-left: auto; max-width: 100%; overflow-wrap: anywhere; font-weight: 600; }
.fc-breakdown { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 5cqi, 22px); flex: 1; padding: 19px 0 9px; }
.fc-donut { width: clamp(106px, 46cqi, 166px); flex: 0 1 auto; position: relative; aspect-ratio: 1; }
.fc-donut svg { width: 100%; height: auto; display: block; }
.fc-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.4; }
.fc-donut-center span { color: var(--fc-secondary); font-size: .75rem; }
.fc-donut-center strong { letter-spacing: -.045em; font-size: clamp(.61rem, calc((130cqi / var(--fc-amount-length)) * .42), 1.08rem); font-weight: 650; }
.fc-legend { flex: 1 1 0; min-width: 0; }
.fc-legend-row {
  min-height: 33px;
  padding: 4px 0;
  gap: 7px;
  display: flex;
  align-items: center;
  width: 100%;
  color: #394e47;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-size: .81rem;
  line-height: 1.35;
  text-align: left;
}
.fc-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; }
.fc-legend-row > span { overflow-wrap: anywhere; }
.fc-legend-row > b { font-size: .8rem; font-weight: 600; margin-left: auto; color: #50645c; }
button.fc-legend-row, .fc-others summary { cursor: pointer; }
button.fc-legend-row:hover, .fc-others summary:hover { background: #f4f8f6; }
.fc-others { position: relative; }
.fc-others summary { list-style: none; }
.fc-others summary::-webkit-details-marker { display: none; }
.fc-others-list { position: absolute; bottom: 100%; right: 0; z-index: 3; min-width: max-content; max-width: 90vw; border: 1px solid #dae4de; border-radius: 9px; background: white; box-shadow: 0 6px 18px #123e351a; padding: 5px; }
.fc-others-list > * { display: flex; justify-content: space-between; gap: 15px; width: 100%; border: 0; border-radius: 5px; background: transparent; padding: 6px; font: inherit; font-size: .8rem; color: #2b4339; }
.fc-others-list > button { cursor: pointer; }
.fc-others-list > button:hover { background: #f4f8f6; }
.fc-flow-empty { min-height: 178px; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--fc-secondary); text-align: center; }
.fc-flow-empty strong { color: #3b554a; font-size: .92rem; }
.fc-flow-empty > span, .fc-empty-label { color: var(--fc-secondary); font-size: .84rem; }
.fc-empty-symbol { width: 38px; height: 38px; display: grid; place-items: center; background: #e9f3ed; border-radius: 50%; color: #467c65; margin-bottom: 5px; }
@container (max-width: 282px) {
  .fc-breakdown { gap: 9px; }
  .fc-legend-row { gap: 5px; }
  .fc-legend-row, .fc-legend-row > b { font-size: .78rem; }
  .fc-donut { width: 41cqi; }
}
@container (max-width: 215px) {
  .fc-spark { display: none; }
}
@media (max-width: 1150px) {
  .fc-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fc-summary, .fc-analysis { gap: 14px; }
  .fc-analysis { grid-template-columns: minmax(0,1.22fr) minmax(0,1fr); margin-top: 16px; }
  .fc-panel { padding: 19px 17px 16px; }
  .fc-metric { padding: 17px 17px 15px; }
}
@media (max-width: 840px) {
  .fc-analysis { grid-template-columns: minmax(0,1fr); }
  .fc-breakdown { justify-content: flex-start; gap: 28px; }
  .fc-donut { width: clamp(115px,35cqi,151px); }
  .fc-legend { max-width: 300px; }
  .fc-panel { padding: 19px 20px; }
}
@media (max-width: 650px) {
  .fc-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .fc-balance, .fc-metric-surplus { grid-column: 1 / -1; }
  .fc-balance .fc-metric-value { font-size: 2rem; }
  .fc-metric { padding: 15px; }
  .fc-metric-heading { gap: 7px; }
  .fc-metric-heading h2 { font-size: .86rem; }
  .fc-icon { width: 27px; height: 27px; border-radius: 8px; }
  .fc-icon svg { width: 15px; height: 15px; }
  .fc-metric-value { margin-top: 10px; font-size: clamp(1.15rem,13cqi,1.85rem); }
  .fc-metric-note { font-size: .77rem; }
  .fc-chart { --fc-plot-height: 133px; }
  .fc-chart:not(.fc-chart-empty) { padding-left: 40px; }
}
@media (prefers-reduced-motion: no-preference) {
  .fc-range select, .fc-legend-row { transition: background-color .15s, border-color .15s; }
}

.fx-dialog,
.fx-dialog * {
  box-sizing: border-box;
}

.fx-dialog {
  position: fixed;
  inset: 0;
  width: min(29.75rem, calc(100vw - 2rem));
  max-width: 100%;
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  margin: auto;
  padding: 1.65rem;
  border: 1px solid #dce5e2;
  border-radius: 1.2rem;
  background: #fff;
  color: #20342f;
  box-shadow: 0 24px 86px #132c2d33;
  font-family: inherit;
  overscroll-behavior: contain;
}

.fx-dialog[open] { display: block; }
.fx-dialog::backdrop { background: rgb(13 35 31 / 40%); backdrop-filter: blur(3px); }
.fx-dialog [hidden] { display: none !important; }
.fx-dialog :is(input, select, button) { font: inherit; }
.fx-dialog button { cursor: pointer; }
.fx-dialog svg { flex: none; }
.fx-dialog .fx-dialog-header { display: flex; justify-content: space-between; align-items: center; }
.fx-dialog .fx-dialog-symbol,
.fx-dialog .fx-option-icon {
  display: inline-flex;
  flex: none;
  justify-content: center;
  align-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .8rem;
  color: #096959;
  background: #e9f5f0;
}

.fx-dialog .fx-close,
.fx-dialog .fx-delete {
  display: inline-grid;
  place-items: center;
  min-width: 2.5rem;
  height: 2.5rem;
  color: #5a6b65;
  background: #fff;
  border: 1px solid #dce4e1;
  border-radius: .7rem;
}
.fx-dialog .fx-close:hover { color: #193d33; background: #f3f7f5; }
.fx-dialog .fx-dialog-title {
  color: #172e26;
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: -.045em;
  font-weight: 700;
  margin: 1rem 0 1.15rem;
}

.fx-dialog .fx-note {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  border-radius: .65rem;
  padding: .75rem;
  margin: 0 0 1.15rem;
  background: #edf5f2;
  color: #326456;
  font-size: .875rem;
  line-height: 1.45;
}
.fx-dialog .fx-note svg { margin-top: .1rem; }
.fx-dialog .fx-form { display: grid; gap: 1rem; margin: 0; }
.fx-dialog .fx-field,
.fx-dialog .fx-type-group legend {
  font-size: .875rem;
  font-weight: 600;
  color: #374541;
  letter-spacing: -.01em;
}
.fx-dialog .fx-field { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.fx-dialog .fx-type-group { padding: 0; border: 0; margin: 0; }
.fx-dialog .fx-type-group legend { margin: 0 0 .45rem; padding: 0; }
.fx-dialog .fx-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .25rem;
  padding: .25rem;
  background: #f1f4f2;
  border: 1px solid #e5ebe7;
  border-radius: .75rem;
}
.fx-dialog .fx-type { position: relative; min-width: 0; cursor: pointer; }
.fx-dialog .fx-type input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.fx-dialog .fx-type > span {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  width: 100%;
  min-height: 2.35rem;
  border: 1px solid transparent;
  border-radius: .5rem;
  font-size: .9rem;
  font-weight: 600;
  color: #62716a;
}
.fx-dialog .fx-type input:checked + span {
  background: #fff;
  box-shadow: 0 1px 4px #263a2f0e;
  border-color: #e0e6df;
}
.fx-dialog .fx-expense input:checked + span { color: #984b3c; }
.fx-dialog .fx-income input:checked + span { color: #076754; }
.fx-dialog .fx-field-row { display: grid; gap: .75rem; grid-template-columns: 1fr 1fr; }
.fx-dialog .fx-field :is(input, select) {
  width: 100%;
  min-width: 0;
  height: 2.8rem;
  padding: 0 .8rem;
  color: #213d33;
  background: #fff;
  border: 1px solid #cbd7d1;
  border-radius: .65rem;
  font-size: 1rem;
  font-weight: 400;
}
.fx-dialog .fx-field input::placeholder { color: #7a8681; }
.fx-dialog .fx-money,
.fx-dialog .fx-select { position: relative; display: block; }
.fx-dialog .fx-money > span,
.fx-dialog .fx-select > svg { position: absolute; top: 50%; transform: translateY(-50%); pointer-events: none; }
.fx-dialog .fx-money > span { left: .75rem; color: #566960; font-weight: 500; }
.fx-dialog .fx-money input { padding-left: 2.5rem; font-variant-numeric: tabular-nums; }
.fx-dialog .fx-select select { appearance: none; padding-right: 2.5rem; cursor: pointer; }
.fx-dialog .fx-select > svg { right: .8rem; color: #64776b; }
.fx-dialog :is(button, input, select):focus-visible,
.fx-dialog .fx-type input:focus-visible + span {
  outline: 3px solid #91c8b6;
  outline-offset: 2px;
}
.fx-dialog .fx-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: .3rem;
  padding-top: 1rem;
  border-top: 1px solid #e6ece8;
}
.fx-dialog .fx-button {
  min-height: 2.7rem;
  padding: .55rem .95rem;
  border: 1px solid transparent;
  border-radius: .65rem;
  font-size: .9rem;
  line-height: 1.2;
  font-weight: 600;
}
.fx-dialog .fx-secondary { background: #fff; border-color: #ced8d3; color: #344c40; }
.fx-dialog .fx-secondary:hover { background: #f5f8f6; }
.fx-dialog .fx-primary { background: #08695c; color: #fff; }
.fx-dialog .fx-primary:hover { background: #05554a; }
.fx-dialog .fx-danger { background: #aa4638; color: white; }
.fx-dialog .fx-danger:hover { background: #933a2d; }
.fx-dialog .fx-delete { margin-right: auto; color: #a6443a; }
.fx-dialog .fx-delete:hover { border-color: #deb9b1; background: #fff4f0; }
.fx-dialog .fx-copy { font-size: 1rem; color: #52645a; line-height: 1.5; margin: -.25rem 0 1.2rem; overflow-wrap: anywhere; }
.fx-dialog .fx-error {
  margin: .8rem 0 0;
  color: #9a3629;
  background: #fff0eb;
  padding: .7rem .85rem;
  font-size: .9rem;
  border-radius: .7rem;
}
.fx-dialog :is(.fx-backup-options,.fx-wallet-options) { display: grid; gap: .6rem; }
.fx-dialog .fx-option {
  display: flex;
  align-items: center;
  gap: .8rem;
  background: #fff;
  border: 1px solid #d8e1da;
  border-radius: .85rem;
  padding: .85rem;
  color: #2c4237;
  text-align: left;
}
.fx-dialog .fx-option:hover { border-color: #8eb8a6; background: #f8fbf9; }
.fx-dialog .fx-option.is-active { border-color: #67a58c; background: #f1f8f4; }
.fx-dialog .fx-option-icon { width: 2.45rem; height: 2.45rem; border-radius: .7rem; }
.fx-dialog .fx-option :is(strong,small) { display: block; }
.fx-dialog .fx-option strong { font-size: .96rem; font-weight: 600; }
.fx-dialog .fx-option small { margin-top: .2rem; font-size: .84rem; line-height: 1.4; color: #617269; }
.fx-dialog .fx-check { display: inline-flex; margin-left: auto; color: #087052; }

@media (max-width: 30rem) {
  .fx-dialog { padding: 1.2rem; }
  .fx-dialog .fx-actions { flex-wrap: wrap; }
}
@media (max-width: 21rem) {
  .fx-dialog .fx-field-row { grid-template-columns: 1fr; }
}

.fb-page {
  color: #20372f;
  display: grid;
  gap: 1.35rem;
}
.fb-summary,
.fb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.fb-summary-card,
.fb-limits {
  background: #fff;
  border: 1px solid #dfe6e2;
  border-radius: 1.1rem;
}
.fb-summary-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.25rem;
}
.fb-card-label,
.fb-limit-header { display: flex; align-items: center; gap: .65rem; }
.fb-card-label { font-size: .9rem; font-weight: 550; color: #42564c; }
.fb-symbol,
.fb-cat-icon,
.fb-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 2.25rem;
  width: 2.25rem;
  border-radius: .7rem;
  color: #106a58;
  background: #e5f1e9;
}
.fb-out .fb-symbol, .fb-exceeded .fb-symbol { color: #a65340; background: #fbece4; }
.fb-summary-card .fb-amount {
  margin: .7rem 0 .3rem;
  color: #19332a;
  font-size: clamp(1.3rem, 2.55vw, 2rem);
  font-weight: 650;
  letter-spacing: -.05em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.fb-summary-card .fb-caption { color: #687870; font-size: .84rem; line-height: 1.4; }
.fb-exceeded .fb-amount { color: #a14534; }
.fb-limits { padding: 1.35rem; }
.fb-limits > h2 { margin: 0 0 1rem; font-size: 1.15rem; line-height: 1.35; letter-spacing: -.035em; }
.fb-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .8rem; }
.fb-limit-card {
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid #dce6df;
  border-radius: .9rem;
}
.fb-cat-icon { color: #306d58; background: #edf3ef; }
@supports (color: color-mix(in srgb, green 20%, white)) {
  .fb-cat-icon { color: color-mix(in srgb, var(--fb-color) 70%, #162a22); background: color-mix(in srgb, var(--fb-color) 15%, #fff); }
}
.fb-limit-header h3 { margin: 0; font-size: 1rem; font-weight: 650; letter-spacing: -.025em; }
.fb-edit {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-left: auto;
  padding: 0;
  border-radius: .55rem;
  border: 0;
  color: #63766b;
  background: transparent;
  cursor: pointer;
}
.fb-edit:hover { background: #f0f5f1; color: #165c47; }
.fb-limit-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem; margin: 1.2rem 0 .7rem; }
.fb-limit-value strong { font-size: 1.25rem; letter-spacing: -.045em; color: #21382f; }
.fb-limit-value > span { font-size: .875rem; color: #65766c; }
.fb-meter { overflow: hidden; height: .45rem; border-radius: 8px; background: #eaf0ec; }
.fb-meter > span { display: block; height: 100%; background: var(--fb-color, #3a8e70); border-radius: inherit; }
.fb-limit-status { display: flex; justify-content: space-between; gap: .45rem; margin-top: .7rem; font-size: .8rem; color: #52665a; font-variant-numeric: tabular-nums; }
.fb-limit-status > span:last-child { font-weight: 600; }
.fb-over .fb-limit-status { color: #a34334; }
.fb-over .fb-meter > span { background: #c96855; }
.fb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.3rem 1rem;
  border: 1px dashed #cddbd2;
  border-radius: .9rem;
  text-align: center;
  background: #fafcfb;
}
.fb-empty-icon { width: 3rem; height: 3rem; border-radius: 1rem; }
.fb-empty h3 { font-size: 1.1rem; letter-spacing: -.03em; margin: .85rem 0 .3rem; }
.fb-empty p { color: #627269; margin: 0; font-size: .9rem; }
.fb-empty button {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #fff;
  background: #08695c;
  border: 0;
  border-radius: .65rem;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  padding: .7rem .95rem;
  margin-top: 1.1rem;
  cursor: pointer;
}
.fb-empty button:hover { background: #075648; }
.fb-page button:focus-visible { outline: 3px solid #91c8b6; outline-offset: 2px; }
@media (max-width: 47rem) {
  .fb-summary { grid-template-columns: 1fr; gap: .65rem; }
  .fb-summary-card { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .65rem; padding: .85rem 1rem; }
  .fb-summary-card .fb-amount { margin: 0; }
  .fb-summary-card .fb-caption { grid-column: 1 / -1; }
  .fb-limits { padding: 1rem; }
}

body:not(.auth-verified) > :is(.layout, .skip, #toast) { display:none !important }
.auth-gate {
  min-height:100vh; min-height:100dvh; display:grid; place-items:center;
  padding:clamp(20px,5vw,72px); color:#173e38;
  background:radial-gradient(ellipse at 8% 90%,#d5e7da 0,transparent 52%),
    radial-gradient(ellipse at 95% 3%,#f5ddce 0,transparent 53%),#f7f1e8;
}
.auth-card, .auth-account {
  background:#fffcf7; border:1px solid #d9d9c9; border-radius:20px;
  box-shadow:0 20px 56px -28px #27493648; color:#193e37; text-align:left;
}
.auth-card {
  width:min(100%,1060px); min-width:0; display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);
  padding:8px; border-radius:24px;
}
.auth-portrait {
  min-width:0; min-height:clamp(460px,39vw,555px); position:relative; isolation:isolate;
  display:flex; flex-direction:column; overflow:hidden; margin:0; border-radius:17px;
  background:#193f38;
}
.auth-scene { position:relative; flex:1; }
.auth-scene img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:59% 50%; }
.auth-portrait figcaption {
  padding:clamp(13px,1.6vw,22px) 12px; text-align:center; color:#fff5d9;
  border-top:3px solid #b8d090; font:500 clamp(1.9rem,3.4vw,3rem)/1.05 "Pixelify Sans",monospace;
}
.auth-portrait em { color:#ffb0ae; font-style:normal; }
.auth-panel {
  min-width:0; width:100%; align-self:center; padding:clamp(32px,4.25vw,62px);
}
.auth-brand {
  display:inline-flex; align-items:center; gap:8px; width:fit-content; margin-bottom:clamp(32px,3.4vw,46px);
  font-size:1.65rem; line-height:1; font-weight:750; letter-spacing:-.08em;
}
.auth-brand-dot { color:#44996f }
.auth-logo { display:grid; place-items:center }
.auth-logo svg { width:29px; height:29px }
.auth-card h1 { font-size:clamp(1.7rem,4vw,2.1rem); line-height:1.12; font-weight:690; letter-spacing:-.055em; margin:0 }
.auth-card h1:focus { outline:0 }
.auth-description, .auth-account-email { color:#566b5c; line-height:1.5; overflow-wrap:anywhere }
.auth-description { margin:9px 0 0; font-size:.95rem }
.auth-fields { display:grid; gap:8px; margin-top:26px }
.auth-fields label { font-size:.9rem; font-weight:650 }
.auth-fields input {
  display:block; width:100%; padding:12px 13px; min-height:47px; color:#173527; background:#fffefb;
  border:1px solid #c5cfc5; border-radius:9px; font-size:1rem;
}
.auth-fields input::placeholder { color:#758779 }
.auth-fields > label:not(:first-child) { margin-top:8px }
.auth-fields input:focus-visible { border-color:#2f7358; outline:2px solid #9fcdb2; outline-offset:1px }
.auth-password { position:relative }
.auth-password input { padding-right:74px }
.auth-reveal { position:absolute; right:6px; top:50%; transform:translateY(-50%); padding:5px 6px; font-size:.78rem; font-weight:650; color:#28654b; border-radius:6px }
.auth-primary, .auth-update, .auth-exit, .auth-switch {
  min-height:43px; padding:9px 15px; border-radius:8px; font-weight:650; font-size:.91rem;
}
.auth-primary { margin-top:14px; min-height:47px; border-radius:10px }
.auth-primary, .auth-update { background:#145e4b; color:white }
.auth-switch, .auth-exit { color:#234a35; background:#eff5f0; border:1px solid #d4e2d8 }
.auth-switch { margin-top:15px }
.auth-message, .auth-setup { padding:12px 14px; border-radius:9px; font-size:.88rem; line-height:1.5; overflow-wrap:anywhere; margin:15px 0 0; color:#32563e; background:#edf4ee }
.auth-error { background:#fbefea; color:#893f29 }
.auth-setup { margin-top:20px; border:1px solid #d7e5da }
.auth-setup code { color:#224d36; font-size:.88rem; font-weight:600 }
.auth-account { width:min(390px, calc(100% - 28px)); padding:24px; max-height:calc(100dvh - 28px); overflow:auto }
.auth-account::backdrop { background:#142c2255 }
.auth-account-head { display:flex; justify-content:space-between; align-items:center; gap:12px }
.auth-account-head h2 { font-size:1.3rem; letter-spacing:-.045em }
.auth-close { display:grid; place-items:center; width:32px; height:32px; border-radius:7px; background:#f1f5f2; font-size:1.35rem; line-height:1; color:#486451 }
.auth-account-email { margin:8px 0 0; font-size:.93rem }
.auth-account-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:22px }
.auth-account-actions button { flex:1; white-space:nowrap }
@media(max-width:740px) {
  .auth-gate { padding:20px 16px; }
  .auth-card { max-width:480px; grid-template-columns:minmax(0,1fr); padding:6px; border-radius:19px; }
  .auth-portrait { min-height:0; border-radius:13px; }
  .auth-scene { flex:none; aspect-ratio:2 / 1; }
  .auth-portrait figcaption { padding:8px; font-size:clamp(1.45rem,5.8vw,1.9rem); }
  .auth-panel { padding:22px clamp(15px,5.2vw,28px) 24px; }
  .auth-brand { font-size:1.35rem; margin-bottom:20px; gap:6px; }
  .auth-logo svg { width:23px; height:23px; }
  .auth-fields { margin-top:20px; }
}
@media(max-width:360px) {
  .auth-gate { padding:12px; }
  .auth-account-actions { flex-direction:column; }
}
