:root {
      --bg: #06101c;
      --fg: #eef5ff;
      --surface: #0e1c32;
      --sunken: #17304c;
      --muted: #8eabc8;
      --border: #2a4a70;
      --owed: #ff7a88;
      --ok: #3ee0b8;
      --accent: #4ea2ff;
      --on-accent: #021018;
      --on-ok: #002018;
      --credit: #8ec4ff;
      --day-on: #1a3a64;
      --day-off: #6a7e94;
      --card-rad: 24px;
    }
    * {
      box-sizing: border-box;
      -webkit-tap-highlight-color: transparent;
      -webkit-touch-callout: none;
      -webkit-user-select: none;
      user-select: none;
    }
    input, textarea, [contenteditable="true"], label {
      -webkit-user-select: text;
      user-select: text;
      -webkit-touch-callout: default;
      font-size: 16px; /* iOS: smaller than 16px can crash/zoom the keyboard */
      touch-action: manipulation;
    }
    input, textarea { pointer-events: auto; }
    html, body, #root, #ledger-root {
      margin: 0;
      background: var(--bg) !important;
      background-color: var(--bg) !important;
      color: var(--fg);
      font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
      height: auto;
      overscroll-behavior-x: none;
      touch-action: pan-y;
      -ms-touch-action: pan-y;
    }
    html {
      min-height: 100%;
      min-height: 100dvh;
      overflow-x: hidden;
      overflow-y: auto;
      overscroll-behavior-y: auto;
      -webkit-overflow-scrolling: touch;
    }
    body {
      min-height: 100dvh;
      height: auto;
      overflow: visible;
      overscroll-behavior-y: auto;
      background: var(--bg) !important;
      background-color: var(--bg) !important;
    }
    #root, #ledger-root {
      min-height: 0;
      height: auto;
      overflow: visible;
    }
    body.reduce-motion .board-track,
    body.reduce-motion .board-track.dragging,
    body.reduce-motion .board-track.is-settling,
    body.reduce-motion .board-track.jump {
      transition: none !important;
      animation: none !important;
    }
    body.theme-ios header, body.theme-ios-dark header {
      background: color-mix(in srgb, var(--bg) 86%, transparent);
      backdrop-filter: saturate(180%) blur(18px);
      -webkit-backdrop-filter: saturate(180%) blur(18px);
      border-bottom: 0.5px solid var(--border);
    }
    body.theme-ios .card, body.theme-ios-dark .card {
      border-radius: 16px;
      box-shadow: none;
      border: 0;
    }
    body.theme-ios .btn, body.theme-ios-dark .btn { border-radius: 12px; }
    body.theme-ios .kpi, body.theme-ios-dark .kpi { border-radius: 14px; box-shadow: none; }
    body.compact-cards main {
      padding-left: 0 !important;
      padding-right: 0 !important;
    }
    body.compact-cards .board-page { padding-left: 0 !important; padding-right: 0 !important; }
    body.compact-cards header { padding-left: 10px; padding-right: 10px; }
    body.compact-cards .card {
      padding: 10px 10px 12px;
      margin-left: 0 !important;
      margin-right: 0 !important;
      border-radius: 18px;
    }
    body.compact-cards .set-grid { border-radius: 18px; }
    body.compact-cards .pay { padding: 6px 0; }
    body.compact-cards .home-tile { min-height: 110px; }
    body.compact-cards .sheet-wrap { border-radius: 14px; }
    body.compact-cards .kpis { padding-left: 8px; padding-right: 8px; }
    button, input { font: inherit; }
    button { cursor: pointer; }
    header {
      position: sticky; top: 0; z-index: 20;
      background: color-mix(in srgb, var(--bg) 88%, transparent);
      backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--border);
      padding: 10px 12px;
      padding-top: max(10px, env(safe-area-inset-top));
      display: flex; align-items: center; justify-content: space-between; gap: 6px;
      transition: transform .28s ease, opacity .28s ease;
      will-change: transform;
    }
    header.header-hide {
      transform: translateY(-110%);
      opacity: 0;
      pointer-events: none;
    }
    #settingsHit {
      position: fixed;
      top: 0;
      left: 0;
      z-index: 55;
      width: 88px;
      height: calc(58px + env(safe-area-inset-top, 0px));
      padding: 0;
      margin: 0;
      border: 0;
      background: transparent;
      pointer-events: auto !important;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }
    .header-center {
      flex: 1; min-width: 0;
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      text-align: center; gap: 2px;
    }
    #pageTitle {
      font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
      line-height: 1.2; max-width: 100%;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    #menuBtn {
      position: fixed;
      right: 14px;
      bottom: max(16px, env(safe-area-inset-bottom));
      z-index: 49;
      width: 52px; height: 52px;
      border-radius: 16px;
      font-size: 22px; line-height: 1; letter-spacing: 1px;
      background: color-mix(in srgb, var(--surface) 78%, transparent);
      border: 1px solid var(--border);
      color: var(--fg);
      box-shadow: 0 8px 24px rgba(0,0,0,.18);
    }
    body.blur-mode #menuBtn {
      background: color-mix(in srgb, var(--surface) 55%, transparent);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
    }
    body.overlay-blur #menuBtn,
    body.blur-mode.modal-lock #menuBtn {
      background: color-mix(in srgb, var(--surface) 45%, transparent);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
    }
    .page-drawer-bg {
      position: fixed; inset: 0; z-index: 47;
      background: rgba(0,0,0,.32);
      opacity: 0; visibility: hidden; pointer-events: none;
      transition: opacity .16s ease, visibility 0s linear .16s;
    }
    .page-drawer-bg.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .16s ease, visibility 0s; }
    .page-drawer-bg[hidden] { display: none !important; }
    .page-drawer {
      position: fixed; z-index: 48;
      left: auto;
      right: 14px;
      bottom: calc(52px + 12px + max(16px, env(safe-area-inset-bottom)));
      top: auto;
      width: min(280px, calc(100vw - 28px));
      max-height: min(70vh, 480px);
      background: var(--surface); color: var(--fg);
      border: 1px solid var(--border);
      border-radius: 18px;
      box-shadow: 0 16px 40px rgba(0,0,0,.38);
      padding: 8px 8px 10px;
      transform: translateY(8px) scale(.96);
      transform-origin: bottom right;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: transform .16s cubic-bezier(.22,.9,.28,1), opacity .16s ease, visibility 0s linear .16s;
      display: flex;
      flex-direction: column; gap: 4px;
    }
    .page-drawer[hidden] { display: none !important; pointer-events: none; }
    .page-drawer.on {
      display: flex !important;
      transform: translateY(0) scale(1);
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transition: transform .16s cubic-bezier(.22,.9,.28,1), opacity .16s ease, visibility 0s;
    }
    .page-drawer-head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 6px 8px 8px;
    }
    .page-drawer-head b { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
    .page-drawer-list { overflow: auto; flex: 1; -webkit-overflow-scrolling: touch; padding: 2px 2px 6px; }
    .page-drawer-item {
      width: 100%; display: flex; align-items: center; gap: 12px;
      min-height: 48px; padding: 8px 10px; margin: 3px 0;
      border: 0; border-radius: 14px;
      background: transparent; color: var(--fg); font-weight: 650; text-align: left;
      pointer-events: auto; touch-action: manipulation; position: relative; z-index: 1;
    }
    .page-drawer-item .nav-ico {
      width: 34px; height: 34px; border-radius: 11px; flex: 0 0 34px;
      display: inline-flex; align-items: center; justify-content: center;
      background: var(--sunken); font-size: 16px;
    }
    .page-drawer-item .nav-name { flex: 1; min-width: 0; }
    .page-drawer-item.on {
      background: color-mix(in srgb, var(--accent) 16%, var(--sunken));
    }
    .page-drawer-item.on .nav-ico { background: var(--accent); color: var(--on-accent); }
    .page-drawer-item .check {
      width: 36px; height: 36px; min-width: 36px; min-height: 36px;
      border-radius: 10px; border: 2px solid var(--border);
      background: var(--sunken); color: var(--fg); font-weight: 800;
      display: inline-flex; align-items: center; justify-content: center;
      padding: 0; flex: 0;
    }
    .check.on { background: var(--ok); color: #fff; border-color: var(--ok); }
    .task-name { cursor: pointer; }
    .task-name.done { text-decoration: line-through; opacity: .55; }
    .page-drawer-item.nav-set { margin-bottom: 6px; }
    .page-drawer-sep { height: 1px; background: var(--border); margin: 4px 8px 8px; }
    body.immersive main {
      padding-top: 8px;
      padding-left: 10px;
      padding-right: 10px;
      padding-bottom: 0;
    }
    body.immersive .board-nav { margin-bottom: 6px; }
    body.fs-immersive header { display: none !important; }
    body.fs-immersive main {
      padding-top: max(6px, env(safe-area-inset-top));
      padding-left: 8px;
      padding-right: 8px;
      padding-bottom: 0;
    }
    body.fs-immersive .board-nav { display: none !important; }
    #immersiveNav {
      display: none;
      position: sticky; top: 0; z-index: 25;
      padding: max(4px, env(safe-area-inset-top)) 6px 4px;
      justify-content: space-between; align-items: center; gap: 6px;
      pointer-events: none;
    }
    body.fs-immersive #immersiveNav { display: none !important; }
    #immersiveNav button {
      pointer-events: auto;
      min-width: 40px; min-height: 40px; border: 0; border-radius: 12px;
      background: color-mix(in srgb, var(--surface) 82%, transparent);
      color: var(--fg); font-weight: 700; font-size: 18px;
    }
    @media (orientation: landscape) {
      header {
        padding: 6px 12px;
        padding-top: max(6px, env(safe-area-inset-top));
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
      }
      .day { min-height: 42px; padding: 4px 2px; }
      .card { padding: 14px 12px 12px; margin: 8px 0; }
      body.fs-immersive main {
        padding-top: max(4px, env(safe-area-inset-top));
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
        padding-bottom: 0;
      }
      body.fs-immersive #immersiveNav {
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
      }
    }
    #brand {
      min-height: 44px; border: 0; background: transparent; color: var(--fg);
      font: inherit; font-size: 13px; font-weight: 800; letter-spacing: -0.03em;
      line-height: 1.15; padding: 0 6px 0 0; text-align: left;
      max-width: min(52vw, 188px); white-space: nowrap;
      display: flex; align-items: center; gap: 8px;
      overflow: visible;
    }
    #brand .brand-mark {
      width: 42px; height: 50px;
      border-radius: 0 !important;
      object-fit: contain; flex: 0 0 auto;
      background: transparent !important;
      box-shadow: none !important;
      border: 0 !important;
      overflow: visible;
      padding: 0;
    }
    #brandName { overflow: hidden; text-overflow: ellipsis; }
    .screen { display: none; background: var(--bg); }
    .screen.on { display: block; background: var(--bg); }
    .menu-row {
      width: 100%; display: flex; align-items: center; justify-content: space-between;
      min-height: 52px; border: 0; border-bottom: 1px solid var(--border);
      background: transparent; color: var(--fg); text-align: left; padding: 12px 14px 12px 18px;
    }
    .swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
    .theme-group-label {
      width: 100%; margin: 10px 0 4px; font-size: 12px; font-weight: 700;
      color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
    }
    .swatch { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--border); padding: 0; }
    .swatch.on { outline: 2px solid var(--fg); outline-offset: 2px; }
    .month { display: flex; align-items: center; gap: 4px; }
    .hdr-mini {
      min-height: 28px; padding: 4px 8px; font-size: 11px; font-weight: 700;
      border-radius: 999px; border: 1px solid var(--border);
      background: var(--sunken); color: var(--fg); line-height: 1;
    }
    .hdr-mini.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
    .hdr-mini[hidden] { display: none !important; }
    .sheet-tools { display: none !important; }
    .month[hidden], #backBtn[hidden] { display: none !important; }
    .statbar { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
    .statbar > b { display: block; margin-bottom: 8px; }
    .dot {
      display: inline-block; width: 10px; height: 10px; border-radius: 50%;
      margin-right: 8px; vertical-align: middle;
    }
    .dot.green { background: var(--ok); }
    .dot.red { background: var(--owed); }
    .icon {
      width: 44px; height: 44px; border: 0; border-radius: 10px;
      background: transparent; color: var(--fg);
    }
    .icon:active { background: var(--sunken); }
    main {
      max-width: 980px; margin: 0 auto;
      padding: 10px 8px 0;
      overflow: visible;
      background: var(--bg);
    }
    
    .sheet-wrap {
      margin: 8px 0 0;
      width: 100%;
      max-width: 100%;
      overflow-x: auto;
      overflow-y: hidden;
      -webkit-overflow-scrolling: touch;
      max-height: none;
      border-radius: 12px;
      touch-action: pan-x pan-y;
      overscroll-behavior-x: contain;
      overscroll-behavior-y: auto;
    }
    .sheet-banner,
    .sheet-head,
    .dash-kpis,
    .sheet-tools,
    .sheet-capture > .row,
    .sheet-capture > p,
    .sheet-capture > h2,
    .sheet-capture > h3 {
      touch-action: pan-y;
    }
    .sheet-tools {
      display: flex; gap: 8px; margin: 0 0 10px; flex-wrap: wrap;
    }
    .sheet-tools .btn { flex: 1; min-width: 0; font-size: 13px; }
    .sheet-capture {
      transform-origin: top center;
      transition: transform .2s ease;
    }
    .sheet-capture.fitted {
      overflow: visible;
    }
    .sheet-fit-host {
      overflow: visible;
      border-radius: var(--card-rad);
    }
    .sheet-fit-host.fit-on {
      max-height: calc(100dvh - 56px);
      overflow: hidden;
      display: flex;
      justify-content: center;
      align-items: flex-start;
    }
    body.capturing-sheet header,
    body.capturing-sheet .board-nav,
    body.capturing-sheet .sheet-tools { visibility: hidden !important; }
    body.capturing-sheet,
    body.capturing-sheet .board-page,
    body.capturing-sheet .sheet-fit-host,
    body.capturing-sheet .sheet-wrap {
      overflow: visible !important;
      max-width: none !important;
      width: max-content !important;
    }
    body.capturing-sheet .board-page.is-capturing,
    body.capturing-sheet .sheet-fit-host,
    body.capturing-sheet .sheet-capture {
      overflow: visible !important;
      max-height: none !important;
      max-width: none !important;
      transform: none !important;
    }
    #viewOnlyTag {
      display: none;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: .04em;
      text-transform: uppercase;
      color: var(--on-accent);
      background: var(--accent);
      border-radius: 999px;
      padding: 3px 8px;
      margin-left: 4px;
    }
    body.view-only #viewOnlyTag { display: inline-flex; align-items: center; flex-shrink: 0; white-space: nowrap; }
    body.view-only #brand { max-width: min(42vw, 148px); }
    body:not(.view-only):not(.has-view-stores) #viewStoresTile,
    body:not(.view-only) #viewLogoutBtn { display: none !important; }
    body.view-only #viewStoresTile,
    body.has-view-stores #viewStoresTile { display: flex !important; }
    body.view-only #viewLogoutBtn { display: block !important; }
    #viewStoreBar {
      padding: 8px 12px 4px;
      background: var(--bg);
    }
    #viewStoreBar .tools-tabs { margin: 0; }
    .view-page-picks {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .view-page-picks .chip { font-size: 12px; }
    .viewer-row {
      padding: 12px 0;
      border-top: 1px solid var(--border);
    }
    .viewer-row .row { gap: 6px; flex-wrap: wrap; }
    body.capturing-sheet .tool-panel,
    body.capturing-sheet #toolsStage,
    body.capturing-sheet #trackerMonthBox,
    body.capturing-sheet .sheet-wrap,
    body.capturing-sheet table.sheet {
      overflow: visible !important;
      max-width: none !important;
      max-height: none !important;
      transform: none !important;
    }
    body.capturing-sheet #trackerMonthBox { display: block !important; }
    body.capturing-sheet #addPayout,
    body.capturing-sheet #addMoneyDrop,
    body.capturing-sheet .sheet-tools,
    body.capturing-sheet #calExpand { display: none !important; }
    .auth-tabs button { font-size: 13px; padding: 0 4px; }
    body.view-only #addPayout,
    body.view-only #addMoneyDrop,
    body.view-only #openEmployeeModal,
    body.view-only #openBudgetModal,
    body.view-only #openContactModal,
    body.view-only #openProjectModal,
    body.view-only [data-open-note],
    body.view-only [data-pay-emp],
    body.view-only [data-del-pay],
    body.view-only [data-del-note],
    body.view-only [data-del-imp],
    body.view-only [data-del-proj],
    body.view-only [data-del-budget],
    body.view-only [data-edit-payout],
    body.view-only [data-edit-note],
    body.view-only .swipe-del,
    body.view-only .mini-tools,
    body.view-only #addBillBtn,
    body.view-only #billPanel,
    body.view-only #toolMoneyDrop,
    body.view-only #toolMoneyToHand,
    body.view-only #clearAllData,
    body.view-only #importBackupBtn,
    body.view-only #exportBackup,
    body.view-only #shareAppBtn,
    body.view-only [data-go="share-report"],
    body.view-only [data-go="pages"],
    body.view-only [data-go="sales-types"],
    body.view-only [data-go="easy"],
    body.view-only [data-go="hist-payees"],
    body.view-only [data-go="financers"],
    body.view-only [data-go="cats"],
    body.view-only [data-go="access"],
    body.view-only [data-go="more"],
    body.view-only [data-go="appearance"],
    body.view-only [data-go="mail"],
    body.view-only #openStatsPage,
    body.view-only #androidInstallGrid,
    body.view-only #androidInstallSec,
    body.view-only #ownerPermsCard,
    body.view-only #viewerAccessCard,
    body.view-only #daySaveRow,
    body.view-only #dayEditPanel,
    body.view-only #dayAllActions,
    body.view-only [data-day-kind],
    body.view-only [data-rename-sheet],
    body.view-only #setSearch,
    body.view-only #lookSec,
    body.view-only #lookGrid,
    body.view-only #setupSec,
    body.view-only #dataCard,
    body.view-only #shareCard,
    body.view-only #screen-settings [data-go="share-report"],
    body.view-only #screen-settings [data-go="pages"],
    body.view-only #screen-settings [data-go="sales-types"],
    body.view-only #screen-settings [data-go="easy"],
    body.view-only #screen-settings [data-go="hist-payees"],
    body.view-only #screen-settings [data-go="financers"],
    body.view-only #screen-settings [data-go="cats"],
    body.view-only #screen-settings [data-go="access"],
    body.view-only #screen-settings [data-go="more"],
    body.view-only #screen-settings [data-go="appearance"],
    body.view-only #screen-settings #openStatsPage,
    body.view-only #screen-settings #exportBackup,
    body.view-only #screen-settings #importBackupBtn,
    body.view-only #screen-settings #clearAllData,
    body.view-only #screen-settings #shareAppBtn {
      display: none !important;
    }
    body.view-only table.sheet td,
    body.view-only table.sheet th,
    body.view-only [data-sheet-kind],
    body.view-only [data-sheet-field] { pointer-events: none; }
    body.view-only #dayEditPanel input,
    body.view-only #dayEditPanel textarea,
    body.view-only #dayEditPanel select,
    body.view-only #dayPayStack input,
    body.view-only .pay-edit-row,
    body.view-only [contenteditable] {
      pointer-events: none !important;
      caret-color: transparent;
    }
    body.view-only .auth-tabs button { font-size: 12px; padding: 0 6px; }
    body.capturing-sheet .card,
    body.capturing-sheet .sheet-capture {
      background: var(--surface) !important;
      color: var(--fg) !important;
      box-shadow: none !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
    }
    body.capturing-sheet .kpi {
      background: var(--sunken) !important;
      color: var(--fg) !important;
      box-shadow: none !important;
    }
    body.capturing-sheet .muted,
    body.capturing-sheet .muted-cell { color: var(--muted) !important; visibility: visible !important; }
    body.capturing-sheet table.sheet th,
    body.capturing-sheet table.sheet td {
      border-bottom: 1px solid var(--border) !important;
      box-shadow: none !important;
    }
    body.capturing-sheet table.sheet thead th,
    body.capturing-sheet table.sheet th.col-date,
    body.capturing-sheet table.sheet td.col-date,
    body.capturing-sheet table.sheet th.col-day,
    body.capturing-sheet table.sheet td.col-day {
      background: var(--sunken) !important;
      color: var(--fg) !important;
    }
    body.capturing-sheet table.sheet tbody td {
      background: var(--surface) !important;
      color: var(--fg) !important;
    }
    body.capturing-sheet table.sheet tbody tr:nth-child(even) td {
      background: var(--sunken) !important;
    }
    body.capturing-sheet .board-page.page-tinted .card,
    body.capturing-sheet .board-page.page-tinted table.sheet th,
    body.capturing-sheet .board-page.page-tinted table.sheet td {
      background: var(--surface) !important;
    }
    .board-page .card { margin-bottom: 10px; }
    .board-page.is-active > :last-child,
    .board-page.is-active .card:last-child,
    .board-page.is-active .sheet-fit-host > :last-child,
    .board-page.is-active .tool-panel.on > :last-child,
    main.screen.on > :last-child,
    main.screen.on > .card:last-child {
      margin-bottom: 0 !important;
    }
    .kpis {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
      gap: 6px;
      overflow: visible;
      padding-bottom: 0;
    }
    .kpi {
      min-width: 0; flex: none; background: var(--sunken);
      border: 0; border-radius: 12px; padding: 8px 10px;
      text-align: left; color: inherit; box-shadow: none;
    }
    .kpi b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
    .kpi span { color: var(--muted); font-size: 10px; font-weight: 600; }
    .kpi.saved b { color: var(--ok); }
    .note { color: var(--muted); font-size: 13px; margin: 8px 0; }
    .note:last-child { margin-bottom: 0; }
    .grid7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
    .dow { text-align: center; font-size: 11px; color: var(--muted); padding: 2px 0 8px; font-weight: 700; letter-spacing: .04em; }
    .day {
      min-height: 68px; border: 0; border-radius: 16px;
      background: color-mix(in srgb, var(--sunken) 88%, var(--surface));
      text-align: left; padding: 7px 5px 6px; color: var(--fg);
      box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 55%, transparent);
    }
    .day.off { color: var(--day-off); background: transparent; box-shadow: none; }
    .day.on { outline: 2px solid var(--accent); background: var(--day-on); box-shadow: none; }
    .day.today .num {
      width: 22px; height: 22px; border-radius: 50%;
      display: inline-flex; align-items: center; justify-content: center;
      background: var(--accent); color: var(--on-accent);
    }
    .day .num { display: block; font-size: 13px; font-weight: 700; }
    .day .cash, .day .credit {
      display: block; font-size: 10px; font-variant-numeric: tabular-nums; line-height: 1.25;
    }
    .day .cash { color: var(--ok); font-weight: 700; }
    .day .credit { color: var(--credit); }
    .day-dots {
      display: flex; justify-content: center; align-items: center; gap: 3px; margin-top: 4px; min-height: 8px;
    }
    .day-dots i {
      width: 6px; height: 6px; border-radius: 50%; display: inline-block;
    }
    .day-dots i.past { background: #ef4444; }
    .day-dots i.up { background: #eab308; }
    .day-dots i.paid { background: #22c55e; }
    .day-dots i.bell {
      width: auto; height: auto; background: none; font-style: normal;
      font-size: 10px; line-height: 1;
    }
    .card {
      background: var(--surface); border: 0; border-radius: var(--card-rad);
      padding: 18px 20px 16px;
      margin: 10px 0;
      box-shadow: 0 2px 10px rgba(0,0,0,.10);
      overflow: visible;
    }
    .card .sheet-wrap,
    .card .sheet-fit-host,
    .card table.sheet {
      max-width: none;
    }
    .tile {
      background: var(--sunken);
      border-radius: 16px;
      padding: 14px 14px 12px;
      margin: 10px 0 0;
      overflow: visible;
    }
    .day-all-row {
      display: flex; align-items: center; gap: 10px;
      padding: 8px 0;
      border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    }
    .day-all-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-top: 8px;
    }
    .day-all-grid .day-all-row {
      flex-direction: column; align-items: stretch; gap: 4px;
      border: 0; padding: 8px; margin: 0;
      background: var(--sunken); border-radius: 12px;
    }
    .day-all-grid .day-all-row label { font-size: 11px; font-weight: 700; color: var(--muted); }
    .day-all-grid .day-all-row input {
      width: 100%; text-align: left; min-height: 40px; padding: 8px 10px;
      background: var(--surface);
    }
    .day-all-row label { flex: 1; margin: 0; font-weight: 650; }
    .day-all-row input,
    .day-all-row .day-all-box {
      width: 42%; margin: 0; text-align: right;
      min-height: 46px; border: 0; border-radius: 14px;
      padding: 10px 14px; background: var(--sunken); color: var(--muted);
      font: inherit; font-variant-numeric: tabular-nums;
    }
    .day-all-row input:not(:placeholder-shown),
    .day-all-row .day-all-box.has-amt { color: var(--fg); }
    .check {
      flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
      border: 2px solid var(--border); background: transparent; color: var(--fg);
      padding: 0; font-size: 14px; line-height: 1; font-weight: 700;
    }
    .check.on { background: var(--ok); border-color: var(--ok); color: var(--on-ok); }
    .task-name.done { text-decoration: line-through; opacity: .55; }
    .mini-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
    .mini-tools .btn { flex: 1; min-width: 0; min-height: 34px; padding: 6px 8px; font-size: 12px; }
    h2 { margin: 0 0 6px; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
    .row { display: flex; gap: 10px; margin: 12px 0; }
    .board-nav[hidden],
    #kpis[hidden],
    #insight[hidden] { display: none !important; }
    .btn {
      flex: 1; min-height: 46px; border: 0; border-radius: 14px;
      background: var(--sunken); color: var(--fg); padding: 10px 14px; font-weight: 600;
    }
    .btn.primary { background: var(--accent); color: var(--on-accent); }
    .btn.danger { color: var(--owed); }
    .btn.paid { background: var(--ok); color: var(--on-ok); pointer-events: none; }
    .btn:active { opacity: .88; transform: scale(.98); }
    label { display: block; font-size: 12px; margin: 10px 0 6px; color: var(--muted); font-weight: 600; }
    label[hidden], [hidden] { display: none !important; }
    input {
      width: 100%; min-height: 46px; border: 0;
      border-radius: 14px; padding: 10px 14px; background: var(--sunken); color: var(--fg);
    }
    .kpi-amt {
      width: 100%; min-height: 28px; border: 0; border-radius: 0; padding: 0;
      background: transparent; color: inherit; font-size: 20px; font-weight: 700;
      font-variant-numeric: tabular-nums;
    }
    .list { list-style: none; margin: 0; padding: 0; }
    .list li { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--border); }
    .muted { color: var(--muted); font-size: 13px; }
    .owed { color: var(--owed); font-weight: 600; }
    .panel { display: none; margin-top: 10px; }
    .panel.open { display: block; }
    .kind-row { display: flex; align-items: center; gap: 8px; }
    .kind-row .menu-row { flex: 1; margin: 0; }
    .kind-plus {
      flex: 0 0 44px; width: 44px; height: 44px; padding: 0;
      font-size: 22px; line-height: 1; border-radius: 14px;
    }
    #payoutPanel.open,
    #payoutPanel.open input,
    #payoutPanel.open button,
    #payoutPanel.open label {
      pointer-events: auto !important;
      touch-action: manipulation !important;
    }
    .pay {
      padding: 8px 0 10px;
      margin: 0;
    }
    .pay .prog {
      margin: 8px 0 0; height: 8px; border-radius: 999px;
      background: color-mix(in srgb, var(--sunken) 80%, var(--surface));
      border: 0;
    }
    .pay .prog.full { background: color-mix(in srgb, var(--sunken) 80%, var(--surface)); }
    .pay .prog.full i { background: var(--ok); }
    .pay .prog.open i { background: var(--owed); }
    .pay .amt-total { font-weight: 700; }
    .pay .amt-paid.full { color: var(--ok); font-weight: 700; }
    .pay .amt-paid.open { font-weight: 700; }
    .pay .amt-owed { color: var(--owed); font-weight: 700; text-align: center; }
    .pay .pay-date { color: var(--muted); font-size: 12px; font-weight: 600; }
    .pay .meta { display: none; }
    .pay .btn[data-pay], .pay .btn.paid { display: none; }
    body.show-pay-btns .pay .btn[data-pay], body.show-pay-btns .pay .btn.paid {
      display: inline-flex; min-height: 32px; padding: 4px 10px; font-size: 12px; margin-top: 6px;
    }
    .swipe { margin-top: 0; }
    .swipe-main { padding-top: 0; }
    .prog { height: 8px; background: color-mix(in srgb, var(--sunken) 80%, var(--surface)); border-radius: 99px; overflow: hidden; margin: 8px 0 0; border: 0; }
    .prog > i { display: block; height: 100%; background: var(--ok); border-radius: 99px; opacity: .95; }
    .prog.owed > i { background: var(--owed); }
    .swipe { position: relative; overflow: clip; border-bottom: 0; margin-top: 0; }
    .swipe-main { position: relative; background: var(--surface); z-index: 1; padding-top: 0; }
    .swipe-del {
      position: absolute; right: 0; top: 0; bottom: 0; width: 88px;
      border: 0; border-radius: 0; background: var(--owed); color: var(--on-accent);
      transform: translateX(100%); transition: transform .18s ease;
    }
    .swipe.show-del .swipe-del { transform: none; }
    .swipe.show-del .swipe-main { transform: translateX(-88px); transition: transform .18s ease; }
    .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
    .chip {
      min-height: 36px; border: 1px solid var(--border); border-radius: 999px;
      background: var(--sunken); padding: 6px 12px; font-size: 13px; color: var(--fg);
    }
    .cat-ic { margin-right: 6px; }
    .pop {
      position: fixed; z-index: 60; min-width: 180px; background: var(--surface);
      color: var(--fg); border: 1px solid var(--border); border-radius: 14px;
      box-shadow: 0 16px 40px rgba(0,0,0,.35); padding: 6px;
      display: block; opacity: 0; visibility: hidden; pointer-events: none;
      transition: opacity .14s ease, visibility 0s linear .14s;
    }
    .pop.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .14s ease, visibility 0s; }
    .pop[hidden] { display: none !important; }
    .pop-scrim {
      position: fixed; inset: 0; z-index: 59;
      background: rgba(0,0,0,.28);
      display: block; opacity: 0; visibility: hidden; pointer-events: none;
      transition: opacity .14s ease, visibility 0s linear .14s;
    }
    .pop-scrim.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .14s ease, visibility 0s; }
    .pop-scrim[hidden] { display: none !important; }
    body.blur-mode .pop-scrim:not([hidden]) {
      background: rgba(0,0,0,.22);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
    .pop button {
      width: 100%; border: 0; background: transparent; color: var(--fg);
      text-align: left; padding: 12px 14px; border-radius: 10px; font-weight: 600;
    }
    .pop button:active { background: var(--sunken); }
    .pop button.danger { color: var(--owed); }
    .chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
    html.modal-lock,
    body.modal-lock {
      overflow: hidden !important;
      overscroll-behavior: none;
      touch-action: none;
    }
    body.modal-lock main,
    body.modal-lock .board-swipe,
    body.modal-lock header,
    body.modal-lock #androidBanner,
    body.modal-lock #menuBtn,
    body.modal-lock #immDrop,
    body.modal-lock #hubBar,
    body.modal-lock #hubHome,
    body.modal-lock .android-banner {
      pointer-events: none;
      touch-action: none;
    }
    body.modal-lock .modal-bg.on,
    body.modal-lock .page-drawer,
    body.modal-lock .page-drawer-bg,
    body.modal-lock .pop-scrim.on,
    body.modal-lock .pop,
    body.modal-lock .modal,
    body.modal-lock .modal input,
    body.modal-lock .modal button,
    body.modal-lock .modal textarea {
      pointer-events: auto;
      touch-action: auto;
    }
    body.modal-lock #settingsHit,
    body.modal-lock #brand,
    body.modal-lock #easySettings,
    body.modal-lock .page-drawer-item {
      pointer-events: auto !important;
      touch-action: manipulation !important;
    }
    .modal-bg {
      position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55);
      display: flex; align-items: flex-end; justify-content: center; padding: 16px;
      overscroll-behavior: none; touch-action: none;
      opacity: 0; visibility: hidden; pointer-events: none;
      transition: opacity .18s ease, visibility 0s linear .18s;
    }
    .modal-bg:not([hidden]) { pointer-events: auto; }
    body.blur-mode .modal-bg:not([hidden]),
    body.blur-mode .page-drawer-bg:not([hidden]) {
      background: rgba(0,0,0,.38);
      backdrop-filter: blur(14px) saturate(140%);
      -webkit-backdrop-filter: blur(14px) saturate(140%);
    }
    .modal-bg.on {
      display: flex !important;
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transition: opacity .18s ease, visibility 0s;
    }
    .modal {
      width: 100%; max-width: 420px; max-height: 85vh; overflow: auto;
      background: var(--surface); color: var(--fg); border-radius: 22px 22px 16px 16px;
      padding: 18px; box-shadow: 0 20px 50px rgba(0,0,0,.4);
      overscroll-behavior: contain; touch-action: auto; -webkit-overflow-scrolling: touch;
      transform: translateY(28px); opacity: .96;
      transition: transform .34s cubic-bezier(.22,.9,.28,1), opacity .28s ease;
    }
    .modal-bg.on .modal {
      transform: translateY(0); opacity: 1;
    }
    .modal h3 { margin: 0 0 8px; font-size: 18px; }
    .modal .meta-line { font-size: 13px; color: var(--muted); margin: 2px 0; }
    .legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--muted); margin-top: 8px; }
    .legend i { font-style: normal; font-weight: 600; }
    .legend .c { color: var(--ok); }
    .chart {
      display: flex; align-items: flex-end; gap: 6px; height: 180px;
      padding: 8px 0 0; border-top: 1px solid var(--border); margin-top: 8px;
    }
    .col {
      flex: 1; min-width: 0; height: 100%;
      display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    }
    .col .bar {
      width: 100%; max-width: 36px; border-radius: 6px 6px 2px 2px; min-height: 4px;
      display: flex; flex-direction: column-reverse; overflow: hidden;
    }
    .col .bar > i { display: block; width: 100%; min-height: 0; }
    .col .amt { font-size: 10px; font-variant-numeric: tabular-nums; margin-top: 4px; }
    .col .lab { font-size: 10px; color: var(--muted); }
    .chart-legend {
      display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 10px;
      font-size: 11px; color: var(--muted);
    }
    .chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
    .chart-legend i {
      width: 10px; height: 10px; border-radius: 3px; display: inline-block;
    }
    .sale-wrap {
      overflow: visible; margin: 4px 0 8px;
    }
    .sale-track {
      display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px; width: 100%;
      padding: 2px 0 4px;
    }
    .sale-track .kpi, .sale-track .sale-tab {
      flex: none; min-width: 0; width: auto;
    }
    button.sale-tab {
      display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
      text-align: left; border: 0; cursor: pointer;
      padding: 8px 8px; border-radius: 12px;
      background: var(--sunken); color: var(--fg);
    }
    button.sale-tab span { font-size: 11px; color: var(--muted); }
    button.sale-tab b { font-size: 14px; font-weight: 700; }
    #extraSaleRow { display: contents; }
    .board-swipe {
      overflow-x: hidden;
      overflow-y: hidden;
      width: 100%;
      position: relative;
      overscroll-behavior-x: none;
      overscroll-behavior-y: auto;
      overflow-anchor: none;
      touch-action: pan-y;
      height: auto !important;
      max-height: none !important;
      background: var(--bg);
    }
    #boardSwipe.board-swipe {
      overflow-x: hidden !important;
      overflow-y: hidden !important;
      touch-action: pan-y !important;
      overscroll-behavior-x: none !important;
      overscroll-behavior-y: auto !important;
    }
    .board-swipe.swiping-x {
      touch-action: none !important;
    }
    .board-track {
      display: flex;
      flex-direction: row;
      align-items: flex-start;
      width: 100%;
      height: auto;
      transition: transform .62s cubic-bezier(.22,.82,.2,1);
      will-change: transform;
      transform: translate3d(0,0,0);
      backface-visibility: hidden;
      background: var(--bg);
    }
    .board-track.dragging,
    .board-track.jump { transition: none !important; }
    .board-page {
      box-sizing: border-box;
      padding: 0 4px 0;
      flex: 0 0 100%;
      width: 100%;
      max-width: 100%;
      min-width: 100%;
      height: auto;
      align-self: flex-start;
      min-height: 0;
      pointer-events: none;
      background: var(--bg);
    }
    .board-page.is-active {
      pointer-events: auto;
      height: auto !important;
      max-height: none !important;
      overflow: visible;
      visibility: visible;
      padding-bottom: 0;
    }
    .board-page:not(.is-active) {
      visibility: visible;
      pointer-events: none;
      height: 0 !important;
      min-height: 0 !important;
      max-height: 0 !important;
      overflow: hidden !important;
      padding-top: 0 !important;
      padding-bottom: 0 !important;
      margin: 0 !important;
    }
    .board-swipe.swiping-x .board-page.is-near,
    .board-swipe.is-peeking .board-page.is-near,
    .board-track.dragging .board-page.is-near,
    .board-track.is-settling .board-page.is-near,
    .board-page.is-capturing {
      visibility: visible !important;
      pointer-events: none;
      height: auto !important;
      min-height: 0 !important;
      max-height: none !important;
      overflow: visible !important;
      padding-top: 0 !important;
      padding-bottom: 0 !important;
      margin: 0 !important;
    }
    .board-swipe.swiping-x .board-page.is-active,
    .board-swipe.is-peeking .board-page.is-active,
    .board-track.dragging .board-page.is-active,
    .board-track.is-settling .board-page.is-active,
    .board-page.is-capturing.is-active {
      pointer-events: auto;
    }
    .board-page.page-tinted .card {
      background: color-mix(in srgb, var(--page-tint) 72%, var(--surface));
      border: 1px solid color-mix(in srgb, var(--page-accent) 28%, var(--border));
    }
    .board-page.page-tinted table.sheet th,
    .board-page.page-tinted table.sheet td {
      background: color-mix(in srgb, var(--page-tint) 55%, var(--surface)) !important;
    }
    .board-page[hidden] { display: none !important; }
    .bill-card {
      padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    }
    .bill-card:last-child { border-bottom: 0; }
    .bill-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 6px; font-size: 13px; color: var(--muted); }
    .bill-stack-list {
      margin-top: 10px; padding-left: 8px; border-left: 3px solid var(--border);
    }
    .bill-stack-row {
      display: flex; justify-content: space-between; gap: 10px; align-items: flex-start;
      padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 13px;
    }
    .bill-stack-row:last-child { border-bottom: 0; }
    .due-right {
      flex: 0 0 auto;
      font-weight: 700;
      font-size: 13px;
      color: var(--fg);
      white-space: nowrap;
      text-align: right;
    }
    .detail-sheet { max-height: 82vh; }
    .detail-body { margin-top: 10px; }
    .confirm-sheet {
      max-width: 360px;
      margin-bottom: 20vh;
      border-radius: 20px;
      text-align: center;
    }
    .confirm-sheet h3 { text-align: center; }
    .confirm-sheet .row { justify-content: stretch; }
    .detail-row {
      display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
      padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px;
    }
    .detail-row:last-child { border-bottom: 0; }
    .detail-row span { color: var(--muted); }
    .detail-row b { text-align: right; font-weight: 600; }
    .payee-name, [data-open-payout], [data-open-bill-name] { cursor: pointer; }
    .payee-name:active, [data-open-payout]:active, [data-open-bill-name]:active { opacity: .75; }
    .tag {
      display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600;
      background: var(--sunken); color: var(--fg);
    }
    .tag.recurring { background: rgba(79,140,255,.18); color: var(--accent); }
    .dash-kpis {
      display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0;
    }
    .dash-kpis .kpi { min-width: 0; }
    .dash-kpis .kpi.wide { grid-column: 1 / -1; }
    table.sheet .c-amt,
    table.sheet .c-prev,
    table.sheet .c-paid,
    table.sheet .c-unpaid,
    table.sheet .c-clr { background: transparent; }
    table.sheet input[type="checkbox"] { width: 18px; height: 18px; }
    .ov-tabs {
      display: flex; gap: 8px; margin: 8px 0 10px;
    }
    .ov-tabs button {
      flex: 1; min-height: 44px; border: 0; border-radius: 14px;
      background: var(--sunken); color: var(--fg); font-weight: 700;
    }
    .ov-tabs button.on {
      background: var(--fg);
      color: var(--bg);
    }
    .ov-grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px;
    }
    .ov-grid .kpi {
      min-width: 0; margin: 0;
    }
    .ov-grid .kpi.wide { grid-column: 1 / -1; }
    .ov-debt { padding: 0; border: 0; display: block; }
    .set-sec { margin: 10px 8px 6px; font-size: 13px; font-weight: 650; letter-spacing: 0; text-transform: none; color: var(--muted); }
    .set-search {
      width: 100%; border: 0; border-radius: 16px; background: var(--sunken);
      color: var(--fg); padding: 12px 16px; font-size: 16px; margin: 0 0 10px;
      appearance: none; -webkit-appearance: none;
    }
    .notes-search {
      font-size: 16px !important;
      -webkit-user-select: text;
      user-select: text;
    }
    .set-search::-webkit-search-decoration,
    .set-search::-webkit-search-cancel-button,
    .set-search::-webkit-search-results-button { display: none; }
    body.settings-view {
      overflow: visible;
      height: auto;
      min-height: 0;
      overscroll-behavior-x: none;
      overscroll-behavior-y: auto;
      background: var(--bg);
    }
    body.settings-view header {
      transform: none !important;
      opacity: 1 !important;
      pointer-events: auto !important;
    }
    body.settings-view .screen.on {
      height: auto;
      min-height: 0;
      overflow: visible;
      padding-bottom: 0;
      background: var(--bg);
    }
    #screen-settings.screen.on {
      display: block !important;
    }
    #screen-settings .card,
    [id^="screen-"] .card {
      border-radius: 20px;
      box-shadow: none;
      padding: 10px 10px 12px;
      margin: 10px 0;
    }
    #screen-settings .set-grid {
      padding: 0;
      margin: 0 0 14px;
    }
    #screen-settings .card > h2,
    [id^="screen-"] .card > h2 {
      font-size: 13px; font-weight: 650; color: var(--muted);
      padding: 8px 18px 4px; margin: 0;
    }
    .set-grid { display: flex; flex-direction: column; gap: 0; background: var(--surface); border-radius: 20px; overflow: clip; }
    .set-tile {
      display: flex; flex-direction: row; align-items: center; gap: 14px;
      min-height: 56px; padding: 10px 16px 10px 16px; border-radius: 0; text-align: left;
      background: transparent; color: var(--fg); border: 0;
      border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
      font-weight: 650; font-size: 16px;
    }
    .set-tile:last-child { border-bottom: 0; }
    .set-tile span { font-size: 13px; font-weight: 500; color: var(--muted); display: block; }
    .set-tile .set-copy { flex: 1; min-width: 0; color: var(--fg); font-size: 16px; font-weight: 650; }
    .set-tile .set-copy span { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }
    .set-tile .chev { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 18px; opacity: .7; }
    .set-ico {
      width: 22px; height: 22px; flex: 0 0 22px; margin: 0;
      display: inline-flex; align-items: center; justify-content: center;
      text-align: center; font-size: 17px; line-height: 1;
      background: transparent !important;
      box-shadow: none !important;
      border: 0 !important;
      border-radius: 0 !important;
    }
    .menu-row { gap: 14px; }
    .menu-row .set-ico,
    .set-tile .set-ico { flex: 0 0 24px !important; width: 24px; height: 24px; max-width: 24px; font-size: 18px; margin: 0; background: none; border-radius: 0; }
    .menu-row > span:not(.set-ico):not(.switch):not(.chev) { flex: 1; min-width: 0; text-align: left; font-weight: 600; }
    .seg {
      display: flex; gap: 4px; padding: 4px; margin: 8px 0 4px;
      background: var(--sunken); border-radius: 14px;
    }
    .seg button {
      flex: 1; min-height: 36px; border: 0; border-radius: 11px;
      background: transparent; color: var(--fg); font-weight: 700;
    }
    .seg button.on { background: var(--accent); color: var(--on-accent); }
    .settings-top { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
    .settings-top h2 { margin: 0; flex: 1; }
    #settingsPageRight { display: none !important; }
    .board-page[data-page-id="tracker"] {
      padding-bottom: 0;
    }
    .board-page[data-page-id="budget"] .card,
    .board-page[data-page-id="todos"] .card {
      margin-bottom: 20px;
      overflow: visible;
    }
    body.large-text { font-size: 20px; }
    body.large-text #pageTitle { font-size: 19px; }
    body.large-text #brand { font-size: 17px; }
    body.large-text #menuBtn { font-size: 26px; width: 58px; height: 58px; }
    body.large-text h2 { font-size: 23px; }
    body.large-text #screen-settings .card > h2,
    body.large-text [id^="screen-"] .card > h2 { font-size: 18px; }
    body.large-text .btn { font-size: 19px; min-height: 52px; }
    body.large-text label { font-size: 16px; }
    body.large-text input,
    body.large-text textarea,
    body.large-text select { font-size: 20px !important; min-height: 52px; }
    body.large-text .muted,
    body.large-text .hint-line,
    body.large-text .set-sub,
    body.large-text .set-copy span { font-size: 16px; }
    body.large-text .kpi b { font-size: 20px; }
    body.large-text .kpi span { font-size: 13px; }
    body.large-text .kpi-amt { font-size: 26px; }
    body.large-text .day .num { font-size: 17px; }
    body.large-text .day .amt,
    body.large-text .day .bell { font-size: 13px; }
    body.large-text .dow { font-size: 14px; }
    body.large-text table.sheet { font-size: 16px; }
    body.large-text table.sheet th,
    body.large-text table.sheet td { padding: 11px 12px; }
    body.large-text .menu-row,
    body.large-text .set-tile { font-size: 19px; min-height: 58px; }
    body.large-text .set-tile span { font-size: 15px; }
    body.large-text .set-tile .set-copy { font-size: 19px; }
    body.large-text .hub-tile .ht-name { font-size: 16px; }
    body.large-text .hub-tile .ht-amt { font-size: 22px; }
    body.large-text .hub-bar button { font-size: 14px; }
    body.large-text .hub-bar button span.ico { font-size: 24px; }
    body.large-text .modal h3 { font-size: 23px; }
    body.large-text .modal p,
    body.large-text #confirmMsg { font-size: 18px !important; }
    body.large-text .auth-tabs button { font-size: 16px; }
    body.large-text .chip,
    body.large-text .sale-tab span,
    body.large-text .view-page-picks .chip { font-size: 14px; }
    body.large-text button.sale-tab b { font-size: 18px; }
    body.large-text .pay .pay-date { font-size: 15px; }
    body.large-text .list li { font-size: 18px; }
    body.large-text .sheet-tools .btn,
    body.large-text .mini-tools .btn { font-size: 15px; min-height: 42px; }
    body.large-text .page-drawer-item,
    body.large-text .page-drawer-head b { font-size: 18px; }
    body.large-text .pin-pad button { font-size: 26px; }
    body.large-text .pin-pad button.ghost { font-size: 17px; }
    body.large-text .col .amt,
    body.large-text .col .lab { font-size: 13px; }
    body.large-text .name-combo-input { font-size: 20px; }
    body.large-text .pick-option,
    body.large-text .pick-btn { font-size: 19px; }
    body.large-text .seg button { font-size: 16px; min-height: 42px; }
    body.large-text .tool-tab,
    body.large-text [data-tool-tab] { font-size: 16px; }
    body.large-text .bill-meta,
    body.large-text .legend,
    body.large-text .meta-line { font-size: 16px; }
    body.large-text .sheet-banner h2 { font-size: 19px; }
    body.large-text .sheet-banner .muted { font-size: 15px; }
    body.large-text .card,
    body.large-text .board-page,
    body.large-text .screen,
    body.large-text .modal,
    body.large-text .page-drawer { font-size: 18px; }
    body.large-text .month strong,
    body.large-text #monthLabel { font-size: 16px; }
    body.large-text .set-search { font-size: 18px; }
    body.quiet-hints .hint-line,
    body.quiet-hints .set-sub,
    body.quiet-hints .set-copy > span:not(.set-ico) { display: none !important; }
    body.quiet-hints .card > p.muted { display: none !important; }
    body.quiet-hints .screen .muted.hint-line { display: none !important; }
    input[type="file"].hidden-file { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
    .pick-btn {
      text-align: left; background: var(--sunken); border: 1px solid var(--border);
      min-height: 46px; padding: 10px 14px; border-radius: 14px;
    }
    .name-combo {
      display: flex; align-items: stretch; margin: 6px 0 10px;
      border-radius: 16px; background: var(--sunken); border: 1px solid var(--border);
      overflow: clip;
    }
    .name-combo-input {
      flex: 1; min-width: 0; border: 0 !important; background: transparent !important;
      color: var(--fg); padding: 12px 14px; border-radius: 0 !important;
      font-size: 16px;
    }
    .name-combo-input::placeholder { color: var(--muted); opacity: 1; }
    .name-combo-arrow {
      flex: 0 0 48px; width: 48px; border: 0; background: transparent;
      color: var(--muted); display: flex; flex-direction: column;
      align-items: center; justify-content: center; gap: 3px;
    }
    .name-combo-arrow i {
      display: block; width: 14px; height: 2px; border-radius: 2px;
      background: var(--muted);
    }
    .name-combo-input:focus,
    .name-combo-input:focus-visible {
      outline: none !important;
      box-shadow: none !important;
      background: transparent !important;
    }
    .name-combo:focus-within {
      border-color: var(--border);
      box-shadow: none;
    }
    #pickModal { z-index: 80; }
    .pick-sheet { max-height: 78vh; }
    .pick-list {
      display: flex; flex-direction: column; gap: 8px; margin-top: 10px;
      max-height: 46vh; overflow: auto; -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain; padding-bottom: 4px;
    }
    .pick-option {
      display: flex; align-items: center; justify-content: space-between;
      width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 16px;
      border: 1px solid var(--border); background: var(--sunken); color: var(--fg);
      font-weight: 600; font-size: 15px; text-align: left;
      transition: background .16s ease, border-color .16s ease, transform .12s ease;
    }
    .pick-option:active { transform: scale(.98); }
    .pick-option.on {
      border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--sunken));
      box-shadow: inset 0 0 0 1px var(--accent);
    }
    .pick-option .tick { color: var(--accent); font-size: 18px; }
    .drag-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
    .drag-item {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 12px; border-radius: 14px; background: var(--sunken);
      border: 1px solid var(--border); touch-action: pan-y; user-select: none;
    }
    .drag-item.dragging { opacity: .55; }
    .drag-item.drag-over { outline: 2px solid var(--accent); }
    .drag-handle {
      width: 28px; text-align: center; color: var(--muted); font-size: 18px;
      cursor: grab; flex: 0 0 auto;
    }
    .drag-item input {
      flex: 1; min-height: 40px; border: 0; border-radius: 12px;
      padding: 8px 12px; background: var(--surface); color: var(--fg);
    }
    /* sheet-wrap defined above for immersive layout */
    .sheet-wrap {
      border-radius: 16px;
      border: 1px solid var(--border);
      background: var(--surface);
      box-shadow: 0 8px 24px color-mix(in srgb, var(--fg) 6%, transparent);
    }
    .sheet-head { cursor: pointer; }
    .sheet-head::after { content: " ✎"; font-size: 12px; color: var(--muted); font-weight: 500; }
    .set-sub { display:block; font-size:11px; font-weight:500; color:var(--muted); margin-top:2px; }
    table.sheet th.col-date, table.sheet td.col-date,
    table.sheet th.col-day, table.sheet td.col-day {
      background: var(--sunken) !important;
      color: var(--fg);
      font-weight: 700;
      text-align: left;
    }
    table.sheet td.col-date { position: sticky; left: 0; z-index: 3; }
    table.sheet {
      width: max-content; min-width: 100%;
      border-collapse: separate; border-spacing: 0;
      font-size: 12.5px; font-variant-numeric: tabular-nums;
      letter-spacing: .01em;
    }
    table.sheet th, table.sheet td {
      border: 0;
      border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
      padding: 9px 10px; text-align: right;
      white-space: nowrap;
    }
    table.sheet th:first-child, table.sheet td:first-child,
    table.sheet th:nth-child(2), table.sheet td:nth-child(2) { text-align: left; }
    table.sheet th:first-child, table.sheet td:first-child {
      position: sticky; left: 0; z-index: 3;
      padding-left: 12px;
      box-shadow: 6px 0 10px -8px rgba(0,0,0,.35);
    }
    table.sheet tbody td:first-child { background: var(--surface); font-weight: 700; }
    table.sheet thead th:first-child { background: var(--sunken); z-index: 4; }
    table.sheet th:last-child, table.sheet td:last-child { padding-right: 12px; }
    table.sheet thead th {
      font-weight: 700; background: var(--sunken);
      position: sticky; top: 0; z-index: 2;
      font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
      color: var(--muted);
    }
    table.sheet tbody td { background: var(--surface); font-weight: 650; }
    table.sheet tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--sunken) 35%, var(--surface)); }
    table.sheet tbody tr.wkend td { opacity: 1; }
    body.weekend-mark table.sheet tbody tr.wkend td { background: var(--surface); }
    #appLock { z-index: 80; }
    #appLock .modal { pointer-events: auto; }
    #wipeOk:disabled { opacity: .45; }
    table.sheet tbody tr:active td { background: var(--surface); }
    table.sheet td.muted-cell { color: var(--muted); opacity: .55; }
    table.sheet td.vendor-cell, table.sheet th.vendor-cell {
      font-weight: 800;
      background: inherit;
    }
    table.sheet .grp-store,
    table.sheet .grp-fuel,
    table.sheet .grp-lotto,
    table.sheet .grp-vendor {
      background: var(--sunken); color: var(--fg);
    }
    table.sheet [class^="c-"],
    table.sheet [class*=" c-"],
    table.sheet [class^="grp-"],
    table.sheet [class*=" grp-"] {
      background: transparent !important;
      color: inherit;
    }
    table.sheet thead th,
    table.sheet thead [class^="grp-"],
    table.sheet thead [class*=" grp-"] {
      background: var(--sunken) !important;
      color: var(--muted);
    }
    table.sheet tbody td,
    table.sheet td.vendor-cell,
    table.sheet th.vendor-cell {
      color: var(--fg);
    }
    table.sheet tfoot td {
      background: var(--sunken) !important;
      color: var(--fg);
      border-top: 2px solid var(--border);
    }
    table.sheet .var-pos { color: var(--ok); font-weight: 700; }
    table.sheet .var-neg { color: var(--owed); font-weight: 700; }
    .kpi b.var-pos { color: var(--credit); }
    .kpi b.var-neg { color: var(--owed); }
    table.sheet tfoot td { font-weight: 700; background: var(--surface); }
    table.sheet tfoot td:first-child { background: var(--surface); }
    table.sheet th { white-space: nowrap; font-size: 11px; }
    #lottoSheet, #gasSheet {
      width: max-content; min-width: 100%;
    }
    .sheet-banner {
      background: var(--sunken); color: var(--fg); padding: 10px 12px; border-radius: 14px;
      margin: 0 0 10px; border-bottom: 0;
    }
    .sheet-banner h2 { color: var(--fg) !important; font-size: 15px; letter-spacing: .02em; }
    .sheet-banner .muted { color: var(--muted) !important; font-size: 12px; margin: 4px 0 0; }
    .sheet-banner .icon { background: var(--surface); color: var(--fg); }
    table.sheet thead .sheet-group th {
      font-size: 10px; font-weight: 600; text-transform: none; color: var(--muted);
      background: var(--surface);
      text-align: center;
    }
    #lottoSheet th, #gasSheet th, #lottoSheet td, #gasSheet td { background: var(--surface) !important; }
    table.sheet td.sheet-cell {
      cursor: pointer;
      -webkit-user-select: none;
      user-select: none;
    }
    table.sheet td.sheet-cell.lotto-edit {
      box-shadow: none;
    }
    table.sheet td.sheet-cell {
      cursor: pointer; min-width: 52px; user-select: none;
    }
    table.sheet td.sheet-cell:active { filter: brightness(1.15); outline: 2px solid var(--accent); }
    .switch {
      position: relative; width: 48px; height: 28px; border-radius: 999px;
      background: var(--border); border: 0; padding: 0; flex: 0 0 auto;
      display: inline-block;
    }
    .switch i {
      position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
      border-radius: 50%; background: #fff; transition: transform .18s ease;
      box-shadow: 0 1px 3px rgba(0,0,0,.25);
    }
    .switch.on { background: var(--ok); }
    .switch.on i { transform: translateX(20px); }
    #hubHome {
      display: none;
      padding: 8px 14px 96px;
      position: relative;
      z-index: 5;
    }
    body.layout-switch:not(.page-lift) #hubHome { display: block; }
    body.layout-switch:not(.page-lift) .board-swipe { display: none; }
    body.layout-switch.page-lift #hubHome { display: block; filter: none; }
    body.layout-switch.page-lift.blur-mode #hubHome { filter: blur(14px); pointer-events: none; }
    body.layout-switch.page-lift .board-swipe {
      background: color-mix(in srgb, var(--bg) 88%, transparent);
    }
    body.layout-switch.page-lift.blur-mode .board-swipe {
      background: color-mix(in srgb, var(--bg) 55%, transparent);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
    }
    body.layout-swipe #hubHome { display: none !important; }
    body.page-lift .board-swipe {
      display: block;
      position: fixed;
      left: 0; right: 0; top: 0; bottom: 0;
      z-index: 26;
      background: var(--bg);
      transform: translateY(0);
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      padding-top: 8px;
      animation: liftIn .28s cubic-bezier(.2,.8,.2,1);
    }
    body.page-lift .board-track {
      transform: none !important;
      width: 100%;
    }
    body.page-lift .board-page { display: none !important; pointer-events: none; }
    body.page-lift .board-page.is-active {
      display: block !important;
      pointer-events: auto;
      flex: 0 0 100%;
      width: 100%;
    }
    @keyframes liftIn {
      from { transform: translateY(100%); }
      to { transform: translateY(0); }
    }
    body.page-lift.lift-out .board-swipe {
      animation: liftOut .26s cubic-bezier(.4,0,.2,1) forwards;
    }
    @keyframes liftOut {
      from { transform: translateY(0); }
      to { transform: translateY(110%); }
    }
    .lift-handle {
      display: none;
      width: 44px; height: 5px; border-radius: 99px;
      background: var(--muted); opacity: .45;
      margin: 6px auto 10px;
    }
    body.page-lift .lift-handle { display: block; }
    .hub-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
    }
    .hub-tile {
      border: 0; border-radius: 26px; min-height: 128px;
      padding: 16px 10px 14px;
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
      color: #1f2430; text-align: center;
    }
    .hub-tile .ht-name { font-size: 13px; font-weight: 750; line-height: 1.2; }
    .hub-tile .ht-ico {
      width: auto; height: auto; border-radius: 0;
      background: transparent !important;
      box-shadow: none;
      font-size: 34px;
      line-height: 1;
      color: inherit;
    }
    .hub-tile .ht-amt { font-size: 17px; font-weight: 800; }
    .hub-sec { text-align: center; color: var(--muted); font-weight: 700; margin: 16px 0 10px; }
    .hub-bar {
      position: fixed; left: 10px; right: 10px;
      bottom: max(10px, env(safe-area-inset-bottom));
      z-index: 40;
      display: none;
      background: color-mix(in srgb, var(--surface) 92%, #fff 8%);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      border: 1px solid var(--border);
      border-radius: 28px;
      padding: 8px 8px;
      gap: 4px;
      overflow-x: auto;
      overflow-y: hidden;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }
    .hub-bar::-webkit-scrollbar { display: none; }
    .hub-bar, #hubHome, #immDrop { display: none !important; }
    .hub-bar {
      background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
      border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
    }
    .hub-bar button {
      flex: 0 0 auto;
      border: 0; background: transparent; color: var(--fg);
      min-height: 58px; min-width: 64px; padding: 4px 8px;
      border-radius: 18px; font-size: 11px; font-weight: 700;
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    }
    .hub-bar button span.ico { font-size: 20px; line-height: 1; }
    .hub-bar button.on {
      color: var(--on-accent);
      background: var(--accent);
    }
    #immDrop {
      display: none; position: fixed; top: max(8px, env(safe-area-inset-top)); left: 10px; z-index: 46;
    }
    body.fs-immersive #immDrop { display: block; }
    #immDropBtn {
      width: 44px; height: 44px; border: 0; border-radius: 14px;
      background: color-mix(in srgb, var(--surface) 86%, var(--accent) 14%);
      color: var(--fg); font-size: 20px;
    }
    #immDropList {
      display: none; position: absolute; top: 50px; left: 0; min-width: 220px;
      background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
      padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.28);
    }
    #immDropList.open { display: block; }
    #immDropList button {
      width: 100%; border: 0; background: transparent; color: var(--fg);
      text-align: left; padding: 12px 12px; border-radius: 12px; font-weight: 700;
    }
    #immDropList button.on { background: var(--accent); color: var(--on-accent); }
    .page-swatch {
      width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); padding: 0;
      pointer-events: auto; touch-action: manipulation;
    }
    .page-swatch.on { box-shadow: 0 0 0 2px var(--accent); }
    .hub-bar { pointer-events: auto; touch-action: pan-x pan-y; overflow-x: auto; overflow-y: hidden; }
    .hub-bar button, .hub-tile { pointer-events: auto; touch-action: manipulation; }


    #setupGate, #appLock { z-index: 90; }
    #setupGate .modal, #appLock .modal { max-width: 400px; }
    .pin-dots { display:flex; justify-content:center; gap:12px; margin:12px 0 16px; }
    .pin-dots i {
      width:14px; height:14px; border-radius:50%;
      border:2px solid var(--border); background:transparent; display:block;
    }
    .pin-dots i.on { background: var(--accent); border-color: var(--accent); }
    #appLock, #setupGate {
      position: fixed !important;
      inset: 0 !important;
      left: 0 !important;
      right: 0 !important;
      top: 0 !important;
      bottom: 0 !important;
      transform: none !important;
      touch-action: manipulation;
      overflow: hidden !important;
      z-index: 4000 !important;
      display: none;
      align-items: center;
      justify-content: center;
    }
    #appLock.on, #setupGate.on {
      display: flex !important;
    }
    #appLock .modal, #setupGate .modal {
      transform: none !important;
      left: auto !important;
      right: auto !important;
      width: min(360px, 92vw);
      max-width: 92vw;
      margin: 0 auto;
      position: relative;
      touch-action: manipulation;
      pointer-events: auto !important;
    }
    #setupGate input, #setupGate button, #setupGate label, #setupGate form {
      pointer-events: auto !important;
      touch-action: manipulation !important;
    }
    body.modal-lock #setupGate,
    body.modal-lock #setupGate * {
      touch-action: manipulation !important;
    }
    #authLoginBox[hidden], #authCreateBox[hidden], #authViewBox[hidden] {
      display: none !important;
      visibility: hidden !important;
      pointer-events: none !important;
      position: absolute !important;
      left: -9999px !important;
      width: 1px !important;
      height: 1px !important;
      overflow: hidden !important;
    }
    #authLoginBox input:disabled, #authCreateBox input:disabled, #authViewBox input:disabled {
      pointer-events: none !important;
    }

    .lock-screen {
      position: fixed !important;
      inset: 0 !important;
      z-index: 99999 !important;
      background: color-mix(in srgb, var(--bg) 90%, #000 10%);
      backdrop-filter: blur(48px) saturate(120%);
      -webkit-backdrop-filter: blur(48px) saturate(120%);
      display: none;
      place-items: center;
      padding: 16px;
      overflow: hidden !important;
      touch-action: none !important;
      transform: none !important;
      left: 0 !important;
      width: 100vw !important;
      height: 100dvh !important;
    }
    .lock-screen::before {
      content: "";
      position: absolute;
      inset: 0;
      background: color-mix(in srgb, var(--bg) 82%, #000 18%);
      backdrop-filter: blur(52px);
      -webkit-backdrop-filter: blur(52px);
    }
    .lock-screen.on { display: grid !important; }
    body.lock-on header,
    body.lock-on main,
    body.lock-on #menuBtn,
    body.lock-on #androidBanner,
    body.lock-on .hub-bar,
    body.lock-on #hubHome,
    body.lock-on #immDrop,
    body.lock-on .page-drawer,
    body.lock-on .page-drawer-bg {
      filter: blur(36px) brightness(0.22) saturate(0.35);
      opacity: 0.22;
      pointer-events: none !important;
      user-select: none !important;
    }
    body.lock-on #appLock,
    body.lock-on #appLock * {
      filter: none !important;
      pointer-events: auto !important;
    }
    .lock-card {
      position: relative;
      z-index: 2;
      width: min(340px, calc(100vw - 32px));
      max-width: 100%;
      background: var(--surface);
      color: var(--fg);
      border-radius: 22px;
      padding: 20px 16px;
      box-sizing: border-box;
      overflow: hidden;
      touch-action: manipulation;
      transform: none !important;
    }
    .lock-card h3 { margin: 0 0 6px; text-align: center; }
    .lock-card .pin-pad {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      width: 100%;
      max-width: none;
    }
    .lock-card .pin-pad button { min-width: 0; width: 100%; }
    .pin-pad {
      display:grid; grid-template-columns: repeat(3, 1fr); gap:10px;
      max-width:280px; margin:0 auto;
    }
    .pin-pad button {
      min-height:58px; border:0; border-radius:16px;
      background: var(--sunken); color: var(--fg);
      font-size:22px; font-weight:650;
    }
    .pin-pad button:active { background: var(--accent); color: var(--on-accent); }
    .pin-pad button.ghost { font-size:14px; color: var(--muted); }
    .remember-row {
      display:flex; align-items:center; gap:10px; margin:10px 0 4px;
      color: var(--fg); font-weight:600;
    }

    html, body {
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      text-rendering: geometricPrecision;
    }
    .card, .modal, .kpi, .day, .btn, .sheet-wrap, .page-drawer {
      box-shadow: 0 1px 0 color-mix(in srgb, var(--fg) 6%, transparent);
    }
    .btn.primary { font-weight: 700; }
    table.sheet td, table.sheet th { font-variant-numeric: tabular-nums; }
    #swatches button {
      box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 12%, transparent);
    }
    .tools-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-top: 10px;
    }
    .tools-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      overflow: visible;
      touch-action: pan-y;
      padding: 2px 2px 10px;
      margin: 0 0 2px;
    }
    .tools-tab {
      flex: 0 0 auto;
      min-height: 40px;
      padding: 8px 12px;
      border: 0;
      border-radius: 999px;
      background: var(--sunken);
      color: var(--fg);
      font-weight: 700;
      font-size: 13px;
      white-space: nowrap;
    }
    .tools-tab.on {
      background: var(--accent);
      color: var(--on-accent);
    }
    .tool-tile {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;
      min-height: 92px;
      padding: 14px;
      border: 0;
      border-radius: 18px;
      background: var(--sunken);
      color: var(--fg);
      text-align: left;
      font-weight: 700;
    }
    .tool-tile span {
      font-size: 22px;
      line-height: 1;
    }
    .tool-tile b { font-size: 15px; font-weight: 750; }
    .tool-tile em {
      font-style: normal;
      font-size: 12px;
      font-weight: 600;
      color: var(--muted);
    }
    .tool-panel { display: none; }
    .tool-panel.on {
      display: block;
      overflow: visible;
      touch-action: pan-y;
    }
    #toolsStage {
      overflow: visible;
      touch-action: pan-y;
    }
    .auth-tabs {
      display: flex;
      gap: 6px;
      margin: 8px 0 14px;
      background: var(--sunken);
      border-radius: 14px;
      padding: 4px;
    }
    .auth-tabs button {
      flex: 1;
      min-height: 40px;
      border: 0;
      border-radius: 11px;
      background: transparent;
      color: var(--muted);
      font-weight: 700;
    }
    .auth-tabs button.on {
      background: var(--surface);
      color: var(--fg);
    }
    .note-card {
      padding: 12px 0;
      border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    }
    .note-card:last-child { border-bottom: 0; }
    .note-card p {
      margin: 4px 0 0;
      white-space: pre-wrap;
      color: var(--fg);
    }
    body.settings-view #menuBtn,
    body.settings-view #pageDrawer,
    body.settings-view #pageDrawerBg { display: none !important; }
    html.android-native header,
    body.android-native header {
      padding-top: max(12px, env(safe-area-inset-top, 28px));
    }
    .note-chip {
      display: inline-flex; align-items: center; gap: 4px;
      font-size: 11px; font-weight: 700; letter-spacing: .02em;
      padding: 3px 8px; border-radius: 999px;
      background: var(--sunken); color: var(--muted); margin-right: 6px;
    }
    .note-chip.sale { color: var(--accent); }
    .note-chip.payout { color: var(--owed); }
    .note-chip.shop { color: var(--ok); }
    .note-amt { font-weight: 700; font-variant-numeric: tabular-nums; }
    .note-card.pinned { background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 14px; padding: 12px 8px; }
    .note-pin { min-width: 36px; min-height: 36px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 16px; }
    .note-pin.on { color: var(--accent); }
    .emp-hist-row { cursor: pointer; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
    .emp-hist-row:last-child { border-bottom: 0; }
    #hdrFit, #hdrShare { display: none !important; }
    main,
    main.screen,
    main.screen.on {
      padding-bottom: 0 !important;
    }
    .board-page,
    .board-page.is-active,
    .board-swipe,
    .board-track,
    #toolsStage,
    .sheet-fit-host {
      padding-bottom: 0 !important;
    }
    .board-page.is-active > :last-child,
    .board-page.is-active .card:last-child,
    .board-page.is-active .sheet-fit-host:last-child,
    .board-page.is-active .sheet-fit-host > :last-child,
    .board-page.is-active .sheet-capture:last-child,
    .board-page.is-active .tool-panel.on,
    .board-page.is-active .tool-panel.on > :last-child,
    main.screen.on > :last-child,
    main.screen.on > .card:last-child,
    main.screen.on > .set-grid:last-child {
      margin-bottom: 0 !important;
    }
    #root, #ledger-root {
      min-height: 0 !important;
      height: auto !important;
      overflow: visible !important;
    }
    .board-swipe.swiping-x .board-page.is-near,
    .board-swipe.is-peeking .board-page.is-near,
    .board-track.dragging .board-page.is-near,
    .board-track.is-settling .board-page.is-near,
    .board-page.is-capturing {
      visibility: visible !important;
      height: auto !important;
      min-height: 0 !important;
      max-height: none !important;
      overflow: visible !important;
    }
    #menuBtn { margin-bottom: 0; }
    .cal-tot-row {
      display: flex; align-items: center; justify-content: space-between; gap: 10px;
      width: 100%; margin-top: 8px; padding: 8px 0 0;
      border: 0; background: transparent; color: var(--fg);
      font: inherit; text-align: left;
    }
    .cal-tot-row span:first-child { font-size: 13px; font-weight: 650; }
    .calc-modal { max-width: 360px; }
    .calc-display {
      min-height: 56px; border-radius: 14px; background: var(--sunken);
      color: var(--fg); font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums;
      text-align: right; padding: 12px 14px; margin-bottom: 10px;
      overflow: hidden; word-break: break-all;
    }
    .calc-pad {
      display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    }
    .calc-pad button {
      min-height: 52px; border: 0; border-radius: 14px;
      background: var(--sunken); color: var(--fg); font-size: 20px; font-weight: 700;
    }
    .calc-pad button.calc-op { background: color-mix(in srgb, var(--accent) 22%, var(--sunken)); color: var(--accent); }
    .calc-pad button.calc-eq {
      grid-row: span 2; background: var(--accent); color: var(--on-accent);
    }
    .calc-pad button.calc-zero { grid-column: span 2; }
    .sheet-wrap { overflow-x: auto; overflow-y: hidden; overscroll-behavior-y: auto; }
    #dayModal.modal-bg.on {
      align-items: flex-start;
      justify-content: center;
      padding-top: max(8px, env(safe-area-inset-top));
      padding-bottom: max(8px, var(--kb-pad, 8px));
    }
    #dayModal .modal {
      max-height: min(88dvh, var(--vv-height, 88dvh));
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      width: min(520px, 100%);
    }
    #dayModalTotal {
      position: sticky;
      top: 0;
      z-index: 3;
      background: var(--surface);
      margin: 0;
      padding: 2px 0 10px;
    }
    .day-all-grid .day-all-row:focus-within {
      position: sticky;
      bottom: 8px;
      z-index: 2;
      outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
      box-shadow: 0 0 0 6px var(--surface);
    }
    #dropModal.modal-bg {
      background: rgba(0,0,0,.28);
    }
    #dropModal.modal-bg.on {
      background: rgba(0,0,0,.46);
      backdrop-filter: blur(18px) saturate(160%);
      -webkit-backdrop-filter: blur(18px) saturate(160%);
    }
    #dropModal .modal {
      opacity: 0;
      transform: translateY(52px) scale(.98);
      transition: transform .4s cubic-bezier(.22,.9,.28,1), opacity .32s ease;
    }
    #dropModal.modal-bg.on .modal {
      transform: translateY(0) scale(1);
      opacity: 1;
    }
    html {
      scroll-behavior: auto;
      -webkit-overflow-scrolling: touch;
    }
    #shareCaptureOverlay {
      position: fixed; inset: 0; z-index: 8000;
      background: color-mix(in srgb, var(--bg) 92%, transparent);
      display: flex; align-items: center; justify-content: center;
      padding: 24px;
    }
    #shareCaptureOverlay[hidden] { display: none !important; }
    #shareCaptureMsg {
      font-size: 16px; font-weight: 700; color: var(--fg); margin: 0; text-align: center;
    }
    #shareCaptureHost {
      position: fixed; left: 0; top: 0; z-index: 7990;
      width: max-content; min-width: 360px; max-width: none;
      background: var(--surface); color: var(--fg);
      overflow: visible; pointer-events: none;
    }
    #shareCaptureHost:empty { display: none; }
    #shareCaptureHost .sheet-wrap,
    #shareCaptureHost .sheet-fit-host,
    #shareCaptureHost .sheet-capture,
    #shareCaptureHost table.sheet {
      overflow: visible !important;
      max-width: none !important;
      max-height: none !important;
      transform: none !important;
      width: max-content !important;
    }
    #shareCaptureHost button.icon,
    #shareCaptureHost .sheet-tools { display: none !important; }
