.theme-drift {
    --bg: #0f0f0f;
    --surface: #1b1b1b;
    --surface-elevated: #242424;
    --surface-muted: #2a2a2a;
    --text: #f5f5f5;
    --muted: #929292;
    --border: rgb(255 255 255 / 0.08);
    --accent: #b8ef45;
    --accent-soft: #263119;
    --comparison: #737373;
    --danger: #ff776f;
    --success: #b8ef45;
    --warning: #efbd63;
    color-scheme: dark;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    letter-spacing: 0;
}

.theme-drift h1,
.theme-drift h2,
.theme-drift h3,
.drift-brand {
    font-family: inherit;
    letter-spacing: -0.025em;
}

.theme-drift a {
    transition: color 150ms ease, background-color 150ms ease, opacity 150ms ease;
}

.theme-drift button,
.theme-drift a,
.theme-drift summary,
.theme-drift input,
.theme-drift select {
    -webkit-tap-highlight-color: transparent;
}

.theme-drift :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.theme-drift .form-control,
.theme-drift .form-select {
    min-height: 3rem;
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    background-color: var(--surface-elevated);
    color: var(--text);
    padding: 0.7rem 0.9rem;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.theme-drift .form-control:focus,
.theme-drift .form-select:focus {
    border-color: var(--accent);
    background-color: var(--surface-elevated);
    color: var(--text);
    box-shadow: 0 0 0 3px rgb(184 239 69 / 0.1);
}

.theme-drift .form-label,
.theme-drift .col-form-label {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 550;
}

.theme-drift .form-text,
.theme-drift .muted {
    color: var(--muted);
}

.theme-drift .form-check-input {
    background-color: var(--surface-muted);
    border-color: var(--border);
}

.theme-drift .form-check-input:checked {
    border-color: var(--accent);
    background-color: var(--accent);
}

.theme-drift .money-input-control:not(.lz-amount-entry) {
    --money-input-shell-bg: var(--surface-elevated);
    --money-input-shell-border: var(--border);
    --money-input-shell-radius: 0.8rem;
}

.theme-drift .money-calculator-key {
    background: var(--surface-muted);
}

.theme-drift .page-primary-action,
.theme-drift .drift-add-button {
    border-color: var(--accent);
    border-radius: 999px;
    background: var(--accent);
    color: #111;
    box-shadow: none;
}

.theme-drift .page-primary-action:hover,
.theme-drift .drift-add-button:hover {
    border-color: #c7f66b;
    background: #c7f66b;
    color: #111;
    filter: none;
}

.theme-drift .page-secondary-action,
.theme-drift .page-action {
    border-color: transparent;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--text);
}

.theme-drift .page-secondary-action:hover,
.theme-drift .page-action:hover {
    border-color: transparent;
    background: #343434;
    color: var(--text);
    filter: none;
}

.theme-drift .page-destructive-action,
.theme-drift .page-destructive-outline-action {
    border-radius: 999px;
}

.theme-drift .page-destructive-action {
    border-color: var(--danger);
    background: var(--danger);
    color: #180808;
}

.theme-drift .surface,
.drift-card {
    border: 0;
    border-radius: 1.25rem;
    background: var(--surface);
    box-shadow: none;
}

.theme-drift .surface {
    padding: 1.25rem;
}

.drift-card {
    min-width: 0;
    padding: 1.25rem;
}

.theme-drift .page {
    width: min(76rem, calc(100% - 3rem));
    padding-top: 2rem;
}

.theme-drift .page-heading {
    margin-bottom: 1.5rem;
}

.theme-drift .page-heading h1 {
    font-size: 2rem;
    font-weight: 700;
}

.theme-drift .page-heading p {
    font-size: 0.85rem;
}

.theme-drift .amount {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.theme-drift .amount-income {
    color: var(--accent);
}

.theme-drift .alert {
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--surface-elevated);
    color: var(--text);
}

.theme-drift .alert-success {
    border-color: rgb(184 239 69 / 0.2);
    background: var(--accent-soft);
}

.theme-drift .toast-stack {
    top: 5rem;
}

.drift-shell {
    min-height: 100vh;
}

.drift-nav {
    width: min(80rem, calc(100% - 3rem));
    min-height: 4.5rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
    margin: 0 auto;
}

.drift-brand {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
}

.drift-brand-orbit {
    display: none;
}

.drift-brand-dot {
    color: var(--accent);
}

.drift-nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 999px;
    background: #151515;
}

.drift-nav-links a {
    position: relative;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    padding: 0 0.9rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 550;
    text-decoration: none;
    white-space: nowrap;
}

.drift-nav-links a:hover {
    background: var(--surface);
    color: var(--text);
}

.drift-nav-links a.active {
    background: var(--surface-elevated);
    color: var(--accent);
}

.drift-nav-links .nav-attention-dot {
    top: 0.45rem;
    right: 0.55rem;
    box-shadow: 0 0 0 2px var(--surface-elevated);
}

.drift-nav-actions {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 0.5rem;
}

.drift-settings-link {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--muted);
}

.drift-settings-link:hover,
.drift-settings-link.active {
    background: var(--surface);
    color: var(--accent);
}

.drift-settings-link svg,
.drift-add-button svg {
    width: 1.05rem;
    height: 1.05rem;
}

.drift-add-button {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

.drift-mobile-nav {
    display: none;
}

.drift-page {
    width: min(80rem, calc(100% - 3rem));
    margin: 0 auto;
    padding: 1.5rem 0 4rem;
}

.drift-page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.drift-page-title h1 {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 700;
}

.drift-page-title p {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.drift-round-link {
    width: 2.75rem;
    height: 2.75rem;
    display: none;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #111;
}

.drift-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.drift-balance-card {
    grid-column: span 7;
}

.drift-daily-card {
    grid-column: span 5;
}

.drift-pace-card {
    grid-column: span 7;
}

.drift-distribution-card {
    grid-column: span 5;
}

.drift-recent-card {
    grid-column: span 7;
}

.drift-side-column {
    grid-column: span 5;
    display: grid;
    gap: 1rem;
}

.drift-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.drift-card-heading h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 650;
}

.drift-card-heading p {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.45;
}

.drift-card-heading > a,
.drift-text-link,
.drift-card-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.drift-card-heading svg,
.drift-text-link svg,
.drift-card-footer svg {
    width: 0.9rem;
    height: 0.9rem;
}

.drift-icon-tile {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 0.85rem;
    background: var(--surface-muted);
    color: var(--muted);
}

.drift-icon-tile svg {
    width: 1.15rem;
    height: 1.15rem;
}

.drift-balance-value {
    display: block;
    margin: 1.25rem 0 1.5rem;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.1;
}

.drift-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.72rem;
}

.drift-inline-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.drift-daily-card {
    background: #1d2119;
}

.drift-daily-card.is-over {
    background: #291b1a;
}

.drift-daily-value {
    display: block;
    margin: 1.25rem 0 0.75rem;
    color: var(--accent);
    font-size: clamp(1.9rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
}

.drift-daily-card.is-over .drift-daily-value {
    color: var(--danger);
}

.drift-daily-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--muted);
    font-size: 0.75rem;
}

.drift-muted {
    margin: 0.5rem 0 1rem;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.drift-month-pill {
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 600;
}

.drift-pace-canvas {
    position: relative;
    height: 17.5rem;
    margin: 0.5rem 0 1rem;
}

.drift-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    color: var(--muted);
    font-size: 0.7rem;
}

.drift-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.drift-chart-legend i {
    width: 1rem;
    height: 0.18rem;
    display: block;
    border-radius: 999px;
    background: var(--accent);
}

.drift-chart-legend .is-current {
    color: var(--accent);
}

.drift-chart-legend .is-previous i {
    height: 0.12rem;
    background: var(--comparison);
}

.drift-chart-legend .is-budget i {
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--muted) 0 3px, transparent 3px 5px);
}

.drift-donut-wrap {
    position: relative;
    width: 12rem;
    height: 12rem;
    margin: 0 auto 1.25rem;
}

.drift-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.drift-donut-center strong {
    max-width: 8rem;
    overflow: hidden;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drift-donut-center span {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.72rem;
}

.drift-distribution-list {
    display: grid;
}

.drift-distribution-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto 2rem;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.65rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
}

.drift-distribution-row:last-child {
    border-bottom: 0;
}

.drift-distribution-row > span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drift-distribution-row small {
    color: var(--muted);
    text-align: right;
}

.drift-distribution-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--category-color);
}

.drift-day-group + .drift-day-group {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.drift-day-group h3 {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin: 0 0 0.4rem;
    font-size: 0.85rem;
    font-weight: 650;
}

.drift-day-group h3 span {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 400;
}

.drift-transaction {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.8rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
}

.drift-transaction:last-child {
    border-bottom: 0;
}

.drift-transaction:hover {
    color: var(--accent);
}

.drift-transaction .category-mark {
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    margin: 0;
    border-radius: 50%;
}

.drift-transaction-copy {
    min-width: 0;
    flex: 1;
}

.drift-transaction-copy strong,
.drift-transaction-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drift-transaction-copy strong {
    font-size: 0.82rem;
    font-weight: 600;
}

.drift-transaction-copy small {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.7rem;
}

.drift-transaction > .amount {
    flex: 0 0 auto;
    font-size: 0.8rem;
}

.drift-account {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.8rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
}

.drift-account:hover {
    color: var(--accent);
}

.drift-account > span:nth-child(2) {
    min-width: 0;
    flex: 1;
}

.drift-account > span strong,
.drift-account > span small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drift-account > span strong,
.drift-account > strong {
    font-size: 0.78rem;
}

.drift-account small {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.68rem;
}

.drift-savings-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3rem;
    margin-top: 0.75rem;
    padding: 0 0.85rem;
    border-radius: 0.85rem;
    background: var(--surface-muted);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}

.drift-savings-link:hover {
    color: var(--accent);
}

.drift-savings-link span {
    flex: 1;
}

.drift-savings-link svg {
    width: 1rem;
}

.drift-runway-value {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.drift-runway-card dl {
    margin: 1rem 0;
    border-top: 1px solid var(--border);
}

.drift-runway-card dl > div {
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
}

.drift-runway-card dd {
    margin: 0;
    font-weight: 650;
}

.drift-long-view {
    margin-top: 1rem;
}

.drift-long-view summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
}

.drift-long-view summary::-webkit-details-marker {
    display: none;
}

.drift-long-view summary strong,
.drift-long-view summary small {
    display: block;
}

.drift-long-view summary strong {
    font-size: 0.95rem;
}

.drift-long-view summary small {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.72rem;
}

.drift-long-view[open] summary > svg {
    transform: rotate(45deg);
}

.drift-long-view > div {
    padding-top: 1.25rem;
}

.drift-long-view .balance-chart {
    margin: 0;
    padding: 0;
    background: transparent;
}

.drift-empty {
    display: grid;
    place-items: center;
    min-height: 8rem;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
}

.theme-drift .data-list,
.theme-drift .transaction-date-group + .transaction-date-group {
    border-color: var(--border);
}

.theme-drift .transactions-layout {
    grid-template-columns: minmax(28rem, 1fr) 20rem;
    gap: 1rem;
}

.theme-drift .transactions-list {
    display: grid;
    gap: 0.85rem;
    padding: 0;
    background: transparent;
}

.theme-drift .transaction-date-group {
    padding: 1rem 1.25rem;
    border-radius: 1.25rem;
    background: var(--surface);
}

.theme-drift .transaction-date-group + .transaction-date-group {
    margin-top: 0;
    padding-top: 1rem;
    border-top: 0;
}

.theme-drift .transaction-date-primary {
    font-size: 0.95rem;
    font-weight: 650;
}

.theme-drift .transaction-date-weekday {
    font-size: 0.75rem;
}

.theme-drift .tx-row-num {
    display: none;
}

.theme-drift .data-row,
.theme-drift .data-row-selectable {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 0.75rem;
    min-height: 4rem;
    padding: 0.65rem 0;
}

.theme-drift .data-row:not(.data-row-selectable) {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.theme-drift .data-row:hover {
    background: transparent;
}

.theme-drift .data-row-selectable .tx-row-num + div {
    min-width: 0;
}

.theme-drift .data-row strong {
    font-size: 0.82rem;
}

.theme-drift .data-row .small {
    font-size: 0.7rem;
}

.theme-drift .category-mark {
    border-radius: 50%;
}

.theme-drift .data-actions {
    gap: 0.75rem;
}

.theme-drift .data-actions a {
    color: var(--muted);
    font-size: 0.72rem;
    text-decoration: none;
}

.theme-drift .data-actions a:hover {
    color: var(--accent);
}

.theme-drift .transactions-sidebar {
    top: 1rem;
    gap: 1rem;
}

.theme-drift .bulk-bar {
    border: 0;
    border-radius: 1rem;
    background: var(--surface-elevated);
}

.theme-drift .filter-chip,
.theme-drift .kind-badge {
    border-color: transparent;
    background: var(--surface-elevated);
    text-decoration: none;
}

.theme-drift .filter-chip {
    min-height: 2.25rem;
    display: inline-flex;
    align-items: center;
}

.theme-drift .filter-chip.active,
.theme-drift .filter-chip:hover {
    background: var(--accent);
    color: #111;
}

.theme-drift .budget-summary {
    gap: 0;
    overflow: hidden;
    margin: 1rem 0;
    border: 0;
    border-radius: 1.25rem;
    background: var(--surface);
}

.theme-drift .budget-summary > div {
    border: 0;
    border-right: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    padding: 1.25rem;
}

.theme-drift .budget-summary > div:nth-child(4) {
    border-right: 0;
}

.theme-drift .budget-summary strong {
    font-size: 1.25rem;
}

.theme-drift .budget-pies {
    gap: 1rem;
    margin-bottom: 1rem;
}

.theme-drift .budget-pie-card {
    padding: 1.25rem;
}

.theme-drift .budget-pie-canvas,
.theme-drift .budget-pie-empty {
    height: 20rem;
    min-height: 20rem;
}

.theme-drift .budget-track {
    height: 0.4rem;
    background: var(--surface-muted);
}

.theme-drift .budget-row {
    border-color: var(--border);
}

.theme-drift .budget-month-nav {
    width: fit-content;
    padding: 0.25rem;
    border-radius: 999px;
    background: var(--surface);
}

.theme-drift .budget-month-nav-btn {
    border: 0;
    background: transparent;
}

.theme-drift .budget-month-nav-btn:hover {
    background: var(--surface-muted);
}

.theme-drift .budget-month-label {
    font-size: 0.85rem;
}

.theme-drift .budget-month-today {
    margin-left: 0.5rem;
}

.theme-drift .segmented-control,
.theme-drift .budget-kind-filter {
    border: 0;
    background: var(--surface-elevated);
}

.theme-drift .segmented-control button,
.theme-drift .segmented-control a,
.theme-drift .budget-kind-filter button,
.theme-drift .budget-kind-filter a {
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
}

.theme-drift .segmented-control button.active,
.theme-drift .segmented-control a.active,
.theme-drift .budget-kind-filter button.active,
.theme-drift .budget-kind-filter a.active {
    background: var(--accent);
    color: #111;
    box-shadow: none;
}

.theme-drift .chart-periods {
    border: 0;
    gap: 0.25rem;
}

.theme-drift .chart-periods button {
    border: 0;
    border-radius: 999px;
}

.theme-drift .chart-periods button.active {
    background: var(--accent);
    color: #111;
}

.theme-drift .balance-chart-canvas {
    height: 16rem;
}

.theme-drift .savings-summary {
    gap: 1rem;
}

.theme-drift .savings-summary > div {
    border: 0;
    border-radius: 1.25rem;
    background: var(--surface);
}

.theme-drift .theme-option {
    border-color: transparent;
    border-radius: 1rem;
    background: var(--surface-elevated);
}

.theme-drift .theme-option:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.theme-drift .deposit-row,
.theme-drift .budget-history-list li,
.theme-drift .mcp-token-row {
    border-color: var(--border);
}

.theme-drift .auth-shell {
    background: var(--bg);
}

.theme-drift .auth-card {
    border: 0;
    border-radius: 1.5rem;
    background: var(--surface);
    box-shadow: none;
}

.theme-drift .auth-mark {
    border-radius: 50%;
    background: var(--accent);
    color: #111;
}

.theme-drift .expense-heatmap-cell.level-1 {
    background: #2c361c;
}

.theme-drift .expense-heatmap-cell.level-2 {
    background: #4b6424;
}

.theme-drift .expense-heatmap-cell.level-3 {
    background: #7ba832;
}

.theme-drift .expense-heatmap-cell.level-4 {
    background: var(--accent);
}

.theme-drift .budget-view-tabs {
    display: none;
}

@media (max-width: 1100px) {
    .drift-nav {
        grid-template-columns: auto 1fr auto;
        gap: 0.75rem;
    }

    .drift-nav-links a {
        padding-inline: 0.65rem;
    }

    .drift-add-button span {
        display: none;
    }

    .drift-add-button {
        width: 2.75rem;
        justify-content: center;
        padding: 0;
    }

    .drift-balance-card,
    .drift-daily-card {
        grid-column: span 6;
    }

    .drift-pace-card,
    .drift-distribution-card,
    .drift-recent-card,
    .drift-side-column {
        grid-column: 1 / -1;
    }

    .drift-side-column {
        grid-template-columns: 1fr 1fr;
    }

    .theme-drift .transactions-layout {
        grid-template-columns: 1fr;
    }

    .theme-drift .transactions-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .drift-nav {
        width: calc(100% - 2rem);
        min-height: 3.5rem;
        grid-template-columns: 1fr auto;
    }

    .drift-nav-links,
    .drift-add-button {
        display: none;
    }

    .drift-brand {
        font-size: 1.25rem;
    }

    .drift-content {
        padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
    }

    .drift-mobile-nav {
        position: fixed;
        z-index: 100;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        align-items: center;
        min-height: calc(4.25rem + env(safe-area-inset-bottom));
        padding: 0.35rem 0.5rem env(safe-area-inset-bottom);
        border-top: 1px solid var(--border);
        background: rgb(17 17 17 / 0.97);
        backdrop-filter: blur(16px);
    }

    .drift-mobile-nav > a,
    .drift-mobile-nav .drift-more-summary {
        min-height: 3.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        color: var(--muted);
        font-size: 0.63rem;
        font-weight: 500;
        text-decoration: none;
        cursor: pointer;
    }

    .drift-mobile-nav > a.active,
    .drift-mobile-nav .drift-more-summary.active {
        color: var(--accent);
        font-weight: 650;
    }

    .drift-mobile-nav svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .drift-mobile-nav .drift-mobile-add {
        width: 3rem;
        height: 3rem;
        min-height: 3rem;
        justify-self: center;
        border-radius: 50%;
        background: var(--accent);
        color: #111;
    }

    .drift-more {
        position: relative;
    }

    .drift-more-menu {
        position: absolute;
        right: 0.5rem;
        bottom: calc(100% + 0.5rem);
        width: 12rem;
        display: grid;
        padding: 0.5rem;
        border: 1px solid var(--border);
        border-radius: 1rem;
        background: var(--surface-elevated);
        box-shadow: 0 12px 30px rgb(0 0 0 / 0.4);
    }

    .drift-more-menu a {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        min-height: 2.75rem;
        padding: 0 0.75rem;
        border-radius: 0.65rem;
        color: var(--text);
        font-size: 0.8rem;
        text-decoration: none;
    }

    .drift-more-menu a:hover,
    .drift-more-menu a.active {
        background: var(--surface-muted);
        color: var(--accent);
    }

    .drift-more-menu svg {
        width: 1rem;
    }

    .drift-page {
        width: calc(100% - 2rem);
        padding-top: 1rem;
    }

    .drift-round-link {
        display: grid;
    }

    .drift-dashboard-grid {
        gap: 0.75rem;
    }

    .drift-side-column {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .theme-drift .transactions-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .theme-drift {
        font-size: 14px;
    }

    .theme-drift .page {
        width: calc(100% - 2rem);
        padding-top: 1.25rem;
    }

    .theme-drift .page-heading {
        align-items: flex-start;
        margin-bottom: 1.25rem;
    }

    .theme-drift .page-heading h1 {
        font-size: 1.75rem;
    }

    .theme-drift .page-heading .page-primary-action {
        display: none;
    }

    .theme-drift .surface,
    .drift-card {
        border-radius: 1.15rem;
    }

    .drift-card,
    .theme-drift .surface {
        padding: 1rem;
    }

    .drift-balance-card,
    .drift-daily-card {
        grid-column: 1 / -1;
    }

    .drift-balance-value {
        margin-block: 1rem 1.25rem;
        font-size: 2.15rem;
    }

    .drift-daily-value {
        font-size: 2rem;
    }

    .drift-card-footer {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .drift-pace-canvas {
        height: 13.75rem;
    }

    .drift-chart-legend {
        display: grid;
        gap: 0.5rem;
    }

    .drift-donut-wrap {
        width: 10.5rem;
        height: 10.5rem;
    }

    .drift-transaction {
        min-height: 4rem;
    }

    .theme-drift .transaction-date-group {
        padding: 0.9rem 1rem;
    }

    .theme-drift .data-row,
    .theme-drift .data-row-selectable {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .theme-drift .data-row:not(.data-row-selectable) {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .theme-drift .data-actions {
        grid-column: 2 / -1;
    }

    .theme-drift .data-row:not(.data-row-selectable) .data-actions {
        grid-column: 1 / -1;
    }

    .theme-drift .budget-summary {
        grid-template-columns: 1fr 1fr;
    }

    .theme-drift .budget-summary > div {
        padding: 1rem;
    }

    .theme-drift .budget-summary > div:nth-child(2) {
        border-right: 0;
    }

    .theme-drift .budget-summary > div:nth-child(-n+2) {
        border-bottom: 1px solid var(--border);
    }

    .theme-drift .budget-pies {
        grid-template-columns: 1fr;
    }

    .theme-drift .budget-view-tabs {
        display: inline-flex;
        margin-bottom: 0.25rem;
    }

    .theme-drift .budget-pies[data-budget-display="actual"] [data-budget-card="planned"],
    .theme-drift .budget-pies[data-budget-display="planned"] [data-budget-card="actual"] {
        display: none;
    }

    .theme-drift .budget-row-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .theme-drift .budget-amounts {
        width: 100%;
        align-items: flex-start;
    }

    .theme-drift .budget-amount-primary {
        justify-content: flex-start;
    }

    .theme-drift .budget-row-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }

    .theme-drift .budget-month-nav {
        width: 100%;
        justify-content: space-between;
    }

    .theme-drift .budget-month-today {
        margin-left: 0;
    }

    .theme-drift .deposit-metrics {
        grid-template-columns: 1fr 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .theme-drift *,
    .theme-drift *::before,
    .theme-drift *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
