:root {
    --bg: #f5f7f3;
    --ink: #17211b;
    --muted: #66736b;
    --line: #dce3dd;
    --panel: #ffffff;
    --income: #087f5b;
    --expense: #c2410c;
    --accent: #245b4f;
    --accent-2: #e8b44b;
    --shadow: 0 12px 30px rgba(23, 33, 27, .08);
    --app-viewport-width: 100vw;
}

body[data-theme="dark"] {
    --bg: #101513;
    --ink: #eef5ee;
    --muted: #a8b5ad;
    --line: #2d3832;
    --panel: #18201c;
    --income: #47d49a;
    --expense: #ff896f;
    --accent: #8fc7b4;
    --accent-2: #f2c15d;
    --shadow: 0 16px 32px rgba(0, 0, 0, .28);
}

@media (prefers-color-scheme: dark) {
    body[data-theme="system"] {
        --bg: #101513;
        --ink: #eef5ee;
        --muted: #a8b5ad;
        --line: #2d3832;
        --panel: #18201c;
        --income: #47d49a;
        --expense: #ff896f;
        --accent: #8fc7b4;
        --accent-2: #f2c15d;
        --shadow: 0 16px 32px rgba(0, 0, 0, .28);
    }
}

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background:
        linear-gradient(135deg, rgba(232, 180, 75, .12), transparent 36%),
        linear-gradient(180deg, #fbfcf8 0%, var(--bg) 100%);
    color: var(--ink);
    font-family: "Noto Sans KR", sans-serif;
    letter-spacing: 0;
}

body[data-theme="dark"] {
    background:
        radial-gradient(circle at 18% 10%, rgba(143, 199, 180, .16), transparent 30%),
        linear-gradient(180deg, #151d19 0%, var(--bg) 100%);
}

@media (prefers-color-scheme: dark) {
    body[data-theme="system"] {
        background:
            radial-gradient(circle at 18% 10%, rgba(143, 199, 180, .16), transparent 30%),
            linear-gradient(180deg, #151d19 0%, var(--bg) 100%);
    }
}

.page-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100%;
    height: 3px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .12s ease;
}

.page-progress::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 30%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 12px rgba(36, 91, 79, .35);
    transform: translateX(-100%);
}

.page-progress.is-loading {
    opacity: 1;
}

.page-progress.is-loading::before {
    animation: page-progress-run 1.05s ease-in-out infinite;
}

@keyframes page-progress-run {
    0% {
        width: 22%;
        transform: translateX(-110%);
    }

    45% {
        width: 48%;
    }

    100% {
        width: 28%;
        transform: translateX(360%);
    }
}

.login-shell {
    position: relative;
    width: min(var(--app-viewport-width), 520px);
    max-width: 520px;
    min-height: 100vh;
    display: flex;
    align-items: end;
    margin: 0 auto;
    padding: calc(28px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
    overflow: hidden;
}

.login-backdrop {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: start center;
    padding-top: calc(42px + env(safe-area-inset-top));
    pointer-events: none;
}

.login-backdrop::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 24%, rgba(8, 127, 91, .13), transparent 28%),
        linear-gradient(160deg, rgba(232, 180, 75, .24), transparent 54%);
}

.mock-phone {
    position: relative;
    width: min(76vw, 310px);
    display: grid;
    gap: 10px;
    padding: 18px;
    border: 1px solid rgba(220, 227, 221, .78);
    border-radius: 28px;
    background: rgba(255, 255, 255, .62);
    box-shadow: 0 26px 60px rgba(23, 33, 27, .12);
    transform: rotate(-3deg);
}

.mock-top {
    width: 52%;
    height: 20px;
    border-radius: 99px;
    background: var(--accent);
}

.mock-row {
    height: 12px;
    width: 68%;
    border-radius: 99px;
    background: #dfe7e1;
}

.mock-row.wide {
    width: 88%;
}

.mock-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 4px;
}

.mock-calendar span {
    aspect-ratio: 1;
    border-radius: 8px;
    background: #edf2ee;
}

.mock-calendar .filled {
    background: var(--accent-2);
}

.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    display: grid;
    gap: 14px;
    padding: 24px 18px 18px;
    border: 1px solid rgba(220, 227, 221, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 22px 48px rgba(23, 33, 27, .16);
    backdrop-filter: blur(18px);
}

.login-brand,
.login-card h1 {
    margin: 0;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 9px;
}

.login-brand span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 900;
}

.login-brand p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.login-card h1 {
    font-size: 30px;
    line-height: 1.2;
}

.login-copy {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    font-weight: 700;
}

.google-button {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid #cfd8d2;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(23, 33, 27, .08);
}

.google-button:active {
    transform: translateY(1px);
}

.google-mark {
    width: 22px;
    height: 22px;
    display: inline-block;
    border-radius: 50%;
    background:
        conic-gradient(from -45deg, #4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0);
    position: relative;
}

.google-mark::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: #fff;
}

.google-mark::after {
    content: "";
    position: absolute;
    right: 0;
    top: 9px;
    width: 11px;
    height: 4px;
    background: #4285f4;
}

.auth-error {
    padding: 11px 12px;
    border-radius: 8px;
    background: #fff1e8;
    color: var(--expense);
    font-size: 13px;
    font-weight: 800;
}

.logout-link {
    color: var(--expense);
    text-decoration: none;
}

.settings-link {
    color: var(--accent);
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

.app-shell {
    width: min(var(--app-viewport-width), 520px);
    max-width: 520px;
    min-height: 100vh;
    margin: 0 auto;
    padding: calc(18px + env(safe-area-inset-top)) 14px calc(92px + env(safe-area-inset-bottom));
    overflow-x: hidden;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.month-picker {
    position: relative;
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.month-title span,
.page-title p,
.summary-card span,
.panel-list span,
.asset-list span,
.note-list span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    min-height: 44px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 0 12px;
}

.month-control {
    display: grid;
    grid-template-columns: 46px 1fr 46px;
    gap: 7px;
}

.month-step,
.month-picker-button {
    min-height: 46px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}

.month-step {
    display: grid;
    place-items: center;
    text-decoration: none;
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
}

.month-picker-button {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 12px;
    text-align: center;
}

.month-picker-button strong {
    font-size: 16px;
}

.month-picker-button span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.date-picker-native {
    position: absolute;
    inset: auto auto 0 50%;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.month-picker-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 40;
    width: min(100vw - 28px, 330px);
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 40px rgba(23, 33, 27, .16);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity .16s ease, transform .16s ease;
}

.month-picker-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.month-picker-head {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    margin-bottom: 10px;
}

.month-picker-head strong {
    text-align: center;
    font-size: 18px;
}

.month-picker-head button,
.month-grid button {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-weight: 900;
}

.month-picker-head button {
    min-height: 40px;
    font-size: 26px;
    line-height: 1;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.month-grid button {
    min-height: 48px;
    font-size: 15px;
}

.month-grid button.is-selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.form-grid textarea {
    min-height: 88px;
    padding-top: 12px;
    resize: vertical;
}

.month-title {
    flex: 0 0 auto;
    text-align: right;
}

.month-title strong {
    display: block;
    font-size: 22px;
    line-height: 1.15;
}

.sub-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.category-tabs {
    grid-template-columns: repeat(2, 1fr);
}

.settings-tabs {
    grid-template-columns: repeat(3, 1fr);
}

.sub-tabs a,
.bottom-nav a {
    color: inherit;
    text-decoration: none;
}

.sub-tabs a {
    min-height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.sub-tabs a.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.summary-card,
.quick-entry,
.day-group,
.closing-card,
.chart-list article,
.asset-list article,
.note-list article,
.panel-list article,
.add-fields label,
.amount-field {
    border: 1px solid rgba(220, 227, 221, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow);
}

.summary-card {
    padding: 14px;
}

.summary-card strong {
    display: block;
    margin-top: 4px;
    font-size: 20px;
    line-height: 1.15;
}

.income {
    color: var(--income);
}

.expense {
    color: var(--expense);
}

.quick-entry {
    padding: 14px;
    margin-bottom: 14px;
}

.quick-entry h2,
.closing-card h2,
.page-title h1 {
    margin: 0 0 12px;
    font-size: 18px;
}

.add-header {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    margin: 2px 0 14px;
}

.add-header h1 {
    margin: 0;
    text-align: center;
    font-size: 20px;
}

.back-link {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
    font-size: 34px;
    line-height: 1;
}

.add-form {
    display: grid;
    gap: 12px;
}

.receipt-ocr-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.receipt-ocr-form {
    margin: 0;
}

.receipt-ocr-button {
    display: block;
}

.receipt-ocr-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.receipt-ocr-button span {
    min-height: 48px;
    display: grid;
    place-items: center;
    border: 1px dashed #93b9a2;
    border-radius: 8px;
    background: #eef8f1;
    color: var(--accent);
    font-weight: 900;
}

.receipt-ocr-button.is-disabled span {
    opacity: .55;
}

.receipt-ocr-loading {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 2px 10px;
    align-items: center;
    margin: -2px 0 10px;
    padding: 12px;
    border: 1px solid #cfe7d5;
    border-radius: 10px;
    background: #f5fbf6;
}

.receipt-ocr-loading[hidden] {
    display: none;
}

.receipt-ocr-loading span {
    grid-row: 1 / span 2;
    width: 22px;
    height: 22px;
    border: 3px solid #d8eadc;
    border-top-color: var(--accent);
    border-radius: 999px;
    animation: receipt-ocr-spin .8s linear infinite;
}

.receipt-ocr-loading strong {
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
}

.receipt-ocr-loading em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

@keyframes receipt-ocr-spin {
    to {
        transform: rotate(360deg);
    }
}

.receipt-ocr-status {
    margin: -2px 0 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.receipt-ocr-status.is-error {
    color: #d04747;
}

.receipt-candidates {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 0 10px;
    padding-bottom: 2px;
}

.receipt-candidates span,
.receipt-candidates button {
    flex: 0 0 auto;
}

.receipt-candidates span {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.receipt-candidates button {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    padding: 0 12px;
    font-weight: 800;
}

.quick-description-list {
    grid-column: 1 / -1;
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
}

.quick-description-list > span {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    min-height: 36px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.quick-description-list button {
    flex: 0 0 auto;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    padding: 0 12px;
    font-size: 13px;
    font-weight: 900;
}

.description-field {
    position: relative;
}

.description-autocomplete {
    position: absolute;
    top: calc(100% - 6px);
    left: 12px;
    right: 12px;
    z-index: 45;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 16px 34px rgba(23, 33, 27, .16);
}

.description-autocomplete[hidden] {
    display: none;
}

.description-autocomplete button {
    width: 100%;
    min-height: 42px;
    display: block;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    padding: 0 12px;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 900;
}

.description-autocomplete button[hidden] {
    display: none;
}

.description-autocomplete button:last-child {
    border-bottom: 0;
}

.description-autocomplete button:focus,
.description-autocomplete button:active {
    background: rgba(36, 91, 79, .1);
    outline: 0;
}

.add-form.has-open-pad {
    padding-bottom: 244px;
}

.amount-field {
    display: grid;
    gap: 6px;
    padding: 16px;
}

.amount-field span,
.add-fields span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.amount-field input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-size: 34px;
    font-weight: 900;
    text-align: right;
}

.add-fields {
    display: grid;
    gap: 8px;
}

.add-fields label {
    display: grid;
    gap: 7px;
    padding: 12px;
}

.add-fields input,
.add-fields select,
.add-fields textarea {
    width: 100%;
    min-height: 42px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.add-fields textarea {
    min-height: 70px;
    resize: vertical;
}

.number-pad {
    position: fixed;
    left: 50%;
    bottom: calc(82px + env(safe-area-inset-bottom));
    z-index: 25;
    width: min(calc(100% - 28px), 492px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(248, 250, 246, .96);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 36px rgba(23, 33, 27, .16);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 18px);
    transition: opacity .18s ease, transform .18s ease;
}

.number-pad.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.number-pad button {
    min-height: 54px;
    border: 1px solid #d9e2dc;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 20px;
    font-weight: 900;
}

.number-pad .erase {
    font-size: 15px;
}

.number-pad .done {
    grid-column: 1 / -1;
    background: var(--accent-2);
    border-color: var(--accent-2);
}

.save-button {
    margin-bottom: 8px;
}

.delete-edit-form {
    margin-top: 10px;
}

.danger-button {
    width: 100%;
    min-height: 48px;
    border: 1px solid #f0c7b5;
    border-radius: 8px;
    background: #fff5ef;
    color: var(--expense);
    font-weight: 900;
}

.entry-form {
    display: grid;
    gap: 10px;
}

.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
    border-radius: 8px;
    background: #eef3ed;
}

.segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented span {
    min-height: 40px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: var(--muted);
    font-weight: 800;
}

.segmented input:checked + span {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 6px 14px rgba(23, 33, 27, .08);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.form-grid input[name="memo"],
.form-grid textarea {
    grid-column: 1 / -1;
}

.labeled-form-grid label {
    display: grid;
    gap: 5px;
}

.labeled-form-grid label span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.labeled-form-grid label input,
.labeled-form-grid label select {
    min-height: 44px;
}

.primary-button {
    min-height: 48px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 900;
}

.secondary-button {
    min-height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7faf6;
    color: var(--ink);
    text-decoration: none;
    font-weight: 900;
}

.category-manager {
    display: grid;
    gap: 12px;
}

.category-manager article {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(220, 227, 221, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow);
}

.category-manager h2 {
    margin: 0 0 4px;
    font-size: 17px;
}

.more-profile {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid rgba(220, 227, 221, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow);
}

.profile-avatar {
    width: 58px;
    height: 58px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.more-profile strong,
.more-profile span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.more-profile strong {
    font-size: 18px;
}

.more-profile span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.more-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}

.more-menu-button {
    min-height: 96px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 9px;
    border: 1px solid rgba(220, 227, 221, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    color: var(--ink);
    text-decoration: none;
    box-shadow: var(--shadow);
}

.more-menu-button strong {
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
}

.more-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #e9f1eb;
    color: var(--accent);
    font-size: 18px;
    font-weight: 900;
}

.more-icon::before {
    content: "•";
}

.more-icon.pc::before {
    content: "PC";
    font-size: 12px;
}

.more-icon.calc::before {
    content: "=";
}

.more-icon.fixed::before {
    content: "₩";
}

.more-icon.upgrade::before {
    content: "↑";
}

.more-icon.settings::before {
    content: "⚙";
}

.more-icon.sms::before {
    content: "✉";
}

.more-icon.help::before {
    content: "?";
}

.more-icon.backup::before {
    content: "↺";
}

.more-icon.contact::before {
    content: "!";
}

.more-icon.notice::before {
    content: "i";
}

.settings-list {
    display: grid;
    gap: 12px;
}

.settings-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(220, 227, 221, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow);
}

.settings-card h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

.settings-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
}

.settings-card span {
    display: block;
    margin-top: 10px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
}

.settings-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.settings-actions .primary-button,
.settings-actions .secondary-button {
    min-height: 46px;
}

.notification-settings-form {
    display: grid;
    gap: 14px;
}

.theme-settings-form {
    display: grid;
    gap: 14px;
}

.theme-options {
    display: grid;
    gap: 8px;
}

.theme-option {
    min-height: 64px;
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7faf6;
}

.theme-option input {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}

.theme-option strong,
.theme-option em {
    display: block;
}

.theme-option em {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

body[data-theme="dark"] .settings-card,
body[data-theme="dark"] .more-profile,
body[data-theme="dark"] .more-menu-button,
body[data-theme="dark"] .category-manager article,
body[data-theme="dark"] .day-group,
body[data-theme="dark"] .summary-card,
body[data-theme="dark"] .quick-entry,
body[data-theme="dark"] .amount-field,
body[data-theme="dark"] .add-fields label,
body[data-theme="dark"] .budget-overview,
body[data-theme="dark"] .budget-list article,
body[data-theme="dark"] .budget-detail-row,
body[data-theme="dark"] .budget-form-card,
body[data-theme="dark"] .budget-allocation,
body[data-theme="dark"] .budget-total-field,
body[data-theme="dark"] .budget-edit-list label,
body[data-theme="dark"] .fixed-overview,
body[data-theme="dark"] .fixed-list article,
body[data-theme="dark"] .fixed-edit,
body[data-theme="dark"] .chart-list article,
body[data-theme="dark"] .asset-list article,
body[data-theme="dark"] .note-list article,
body[data-theme="dark"] .panel-list article,
body[data-theme="dark"] .closing-card,
body[data-theme="dark"] .bottom-nav,
body[data-theme="dark"] .theme-option,
body[data-theme="dark"] .settings-check,
body[data-theme="dark"] .segmented,
body[data-theme="dark"] .secondary-button {
    background: rgba(24, 32, 28, .94);
    border-color: var(--line);
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] .amount-display,
body[data-theme="dark"] .month-step,
body[data-theme="dark"] .month-picker-button,
body[data-theme="dark"] .month-picker-panel,
body[data-theme="dark"] .month-picker-head button,
body[data-theme="dark"] .month-grid button,
body[data-theme="dark"] .number-pad,
body[data-theme="dark"] .number-pad button,
body[data-theme="dark"] .receipt-candidates button,
body[data-theme="dark"] .quick-description-list button,
body[data-theme="dark"] .description-autocomplete,
body[data-theme="dark"] .budget-total-field input,
body[data-theme="dark"] .budget-edit-list input {
    background: #111814;
    border-color: var(--line);
    color: var(--ink);
}

body[data-theme="dark"] .sub-tabs a,
body[data-theme="dark"] .bottom-nav a.is-active,
body[data-theme="dark"] .more-icon,
body[data-theme="dark"] .segmented input:checked + span,
body[data-theme="dark"] .month-grid button.is-selected {
    background: #213029;
}

body[data-theme="dark"] .segmented input:checked + span {
    color: var(--ink);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
}

body[data-theme="dark"] .month-grid button.is-selected {
    border-color: var(--accent);
    color: var(--ink);
}

body[data-theme="dark"] .sub-tabs a {
    background: rgba(24, 32, 28, .94);
    border-color: var(--line);
    color: var(--muted);
}

body[data-theme="dark"] .sub-tabs a.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #101513;
}

body[data-theme="dark"] .budget-progress,
body[data-theme="dark"] .progress-line,
body[data-theme="dark"] .bar {
    background: #26352e;
}

body[data-theme="dark"] .daily-spend-chip {
    background: rgba(24, 32, 28, .94);
    border-color: var(--line);
    color: var(--ink);
}

body[data-theme="dark"] .daily-spend-chip.is-warning,
body[data-theme="dark"] .danger-button {
    background: rgba(255, 137, 111, .12);
    border-color: rgba(255, 137, 111, .36);
}

body[data-theme="dark"] .fixed-status {
    background: rgba(255, 137, 111, .12);
    color: var(--expense);
}

body[data-theme="dark"] .fixed-status.is-done {
    background: rgba(71, 212, 154, .12);
    color: var(--income);
}

body[data-theme="dark"] .receipt-ocr-button span,
body[data-theme="dark"] .receipt-ocr-loading {
    background: rgba(33, 48, 41, .94);
    border-color: #3f5e50;
    color: var(--accent);
}

body[data-theme="dark"] .receipt-ocr-loading span {
    border-color: #33473d;
    border-top-color: var(--accent);
}

body[data-theme="dark"] .day-group > header {
    background: #213029;
    border-bottom-color: var(--line);
}

body[data-theme="dark"] .transaction-row {
    border-bottom-color: var(--line);
}

body[data-theme="dark"] .calendar-grid article {
    background: rgba(24, 32, 28, .94);
    border-color: var(--line);
}

body[data-theme="dark"] .calendar-grid article.is-today {
    background: rgba(242, 193, 93, .12);
    border-color: var(--accent-2);
}

body[data-theme="dark"] .calendar-grid article.is-selected {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}

body[data-theme="dark"] .calendar-grid article.is-today.is-selected {
    box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 2px rgba(242, 193, 93, .18);
}

body[data-theme="dark"] .calendar-grid em {
    background: rgba(242, 193, 93, .9);
    color: #1f1606;
}

body[data-theme="dark"] .description-autocomplete button:focus,
body[data-theme="dark"] .description-autocomplete button:active {
    background: #213029;
}

@media (prefers-color-scheme: dark) {
    body[data-theme="system"] .settings-card,
    body[data-theme="system"] .more-profile,
    body[data-theme="system"] .more-menu-button,
    body[data-theme="system"] .category-manager article,
    body[data-theme="system"] .day-group,
    body[data-theme="system"] .summary-card,
    body[data-theme="system"] .quick-entry,
    body[data-theme="system"] .amount-field,
    body[data-theme="system"] .add-fields label,
    body[data-theme="system"] .budget-overview,
    body[data-theme="system"] .budget-list article,
    body[data-theme="system"] .budget-detail-row,
    body[data-theme="system"] .budget-form-card,
    body[data-theme="system"] .budget-allocation,
    body[data-theme="system"] .budget-total-field,
    body[data-theme="system"] .budget-edit-list label,
    body[data-theme="system"] .fixed-overview,
    body[data-theme="system"] .fixed-list article,
    body[data-theme="system"] .fixed-edit,
    body[data-theme="system"] .chart-list article,
    body[data-theme="system"] .asset-list article,
    body[data-theme="system"] .note-list article,
    body[data-theme="system"] .panel-list article,
    body[data-theme="system"] .closing-card,
    body[data-theme="system"] .bottom-nav,
    body[data-theme="system"] .theme-option,
    body[data-theme="system"] .settings-check,
    body[data-theme="system"] .segmented,
    body[data-theme="system"] .secondary-button {
        background: rgba(24, 32, 28, .94);
        border-color: var(--line);
    }

    body[data-theme="system"] input,
    body[data-theme="system"] select,
    body[data-theme="system"] textarea,
    body[data-theme="system"] .amount-display,
    body[data-theme="system"] .month-step,
    body[data-theme="system"] .month-picker-button,
    body[data-theme="system"] .month-picker-panel,
    body[data-theme="system"] .month-picker-head button,
    body[data-theme="system"] .month-grid button,
    body[data-theme="system"] .number-pad,
    body[data-theme="system"] .number-pad button,
    body[data-theme="system"] .receipt-candidates button,
    body[data-theme="system"] .quick-description-list button,
    body[data-theme="system"] .description-autocomplete,
    body[data-theme="system"] .budget-total-field input,
    body[data-theme="system"] .budget-edit-list input {
        background: #111814;
        border-color: var(--line);
        color: var(--ink);
    }

    body[data-theme="system"] .sub-tabs a,
    body[data-theme="system"] .bottom-nav a.is-active,
    body[data-theme="system"] .more-icon,
    body[data-theme="system"] .segmented input:checked + span,
    body[data-theme="system"] .month-grid button.is-selected {
        background: #213029;
    }

    body[data-theme="system"] .segmented input:checked + span {
        color: var(--ink);
        box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
    }

    body[data-theme="system"] .month-grid button.is-selected {
        border-color: var(--accent);
        color: var(--ink);
    }

    body[data-theme="system"] .sub-tabs a {
        background: rgba(24, 32, 28, .94);
        border-color: var(--line);
        color: var(--muted);
    }

    body[data-theme="system"] .sub-tabs a.is-active {
        background: var(--accent);
        border-color: var(--accent);
        color: #101513;
    }

    body[data-theme="system"] .budget-progress,
    body[data-theme="system"] .progress-line,
    body[data-theme="system"] .bar {
        background: #26352e;
    }

    body[data-theme="system"] .daily-spend-chip {
        background: rgba(24, 32, 28, .94);
        border-color: var(--line);
        color: var(--ink);
    }

    body[data-theme="system"] .daily-spend-chip.is-warning,
    body[data-theme="system"] .danger-button {
        background: rgba(255, 137, 111, .12);
        border-color: rgba(255, 137, 111, .36);
    }

    body[data-theme="system"] .fixed-status {
        background: rgba(255, 137, 111, .12);
        color: var(--expense);
    }

    body[data-theme="system"] .fixed-status.is-done {
        background: rgba(71, 212, 154, .12);
        color: var(--income);
    }

    body[data-theme="system"] .receipt-ocr-button span,
    body[data-theme="system"] .receipt-ocr-loading {
        background: rgba(33, 48, 41, .94);
        border-color: #3f5e50;
        color: var(--accent);
    }

    body[data-theme="system"] .receipt-ocr-loading span {
        border-color: #33473d;
        border-top-color: var(--accent);
    }

    body[data-theme="system"] .day-group > header {
        background: #213029;
        border-bottom-color: var(--line);
    }

    body[data-theme="system"] .transaction-row {
        border-bottom-color: var(--line);
    }

    body[data-theme="system"] .calendar-grid article {
        background: rgba(24, 32, 28, .94);
        border-color: var(--line);
    }

    body[data-theme="system"] .calendar-grid article.is-today {
        background: rgba(242, 193, 93, .12);
        border-color: var(--accent-2);
    }

    body[data-theme="system"] .calendar-grid article.is-selected {
        border-color: var(--accent);
        box-shadow: inset 0 0 0 1px var(--accent);
    }

    body[data-theme="system"] .calendar-grid article.is-today.is-selected {
        box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 2px rgba(242, 193, 93, .18);
    }

    body[data-theme="system"] .calendar-grid em {
        background: rgba(242, 193, 93, .9);
        color: #1f1606;
    }

    body[data-theme="system"] .description-autocomplete button:focus,
    body[data-theme="system"] .description-autocomplete button:active {
        background: #213029;
    }
}

.settings-check {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7faf6;
    font-weight: 900;
}

.settings-check.inline {
    justify-content: center;
}

.settings-check input {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}

.notification-time-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: end;
}

.notification-time-grid label:not(.settings-check) {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.notification-time-grid input[type="time"] {
    min-height: 46px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 0 12px;
    font-size: 16px;
    font-weight: 900;
}

.notification-content-options {
    display: grid;
    gap: 8px;
}

.notification-content-options > strong {
    font-size: 14px;
}

.category-edit-row {
    display: grid;
    grid-template-columns: 34px 42px 1fr auto auto;
    gap: 7px;
    align-items: center;
    transition: transform .12s ease, opacity .12s ease, box-shadow .12s ease;
}

.category-edit-row.is-dragging {
    opacity: .78;
    transform: scale(.985);
    box-shadow: 0 12px 24px rgba(23, 33, 27, .14);
}

.drag-handle {
    width: 34px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7faf6;
    color: var(--muted);
    font-size: 16px;
    font-weight: 900;
    cursor: grab;
    touch-action: none;
}

.is-sorting-category {
    user-select: none;
}

.category-edit-row input[type="color"] {
    width: 42px;
    height: 42px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.category-edit-row input[type="text"] {
    min-width: 0;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 10px;
}

.asset-edit-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding-top: 8px;
    border-top: 1px solid #eef2ed;
}

.asset-edit-form input,
.asset-edit-form select {
    min-width: 0;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 0 10px;
}

.asset-edit-form input[name="name"] {
    grid-column: 1 / -1;
}

.asset-edit-form button {
    min-height: 38px;
}

.text-button.strong {
    color: var(--accent);
    font-weight: 900;
}

.text-button.danger {
    color: var(--expense);
    font-weight: 900;
}

.day-list,
.chart-list,
.asset-list,
.note-list,
.panel-list {
    display: grid;
    gap: 10px;
}

.day-group {
    overflow: hidden;
}

.day-group > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: #f9fbf7;
    border-bottom: 1px solid var(--line);
}

.day-group > header > div {
    min-width: 0;
}

.day-group header strong {
    font-size: 16px;
}

.day-group header p {
    flex: 0 0 auto;
    display: grid;
    gap: 2px;
    margin: 0;
    text-align: right;
    font-size: 12px;
}

.day-group header b,
.day-group header em {
    white-space: nowrap;
}

.day-group header em {
    color: var(--expense);
    font-style: normal;
    font-weight: 800;
}

.transaction-row {
    display: grid;
    grid-template-columns: 10px 1fr auto 32px;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 10px 10px 10px 14px;
    border-bottom: 1px solid #eef2ed;
}

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

.category-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--dot);
}

.transaction-main {
    min-width: 0;
}

.transaction-edit-link,
.transaction-amount {
    color: inherit;
    text-decoration: none;
}

.transaction-main strong,
.transaction-main span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transaction-main span {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.transaction-row > b,
.transaction-amount {
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}

.icon-button,
.text-button {
    border: 0;
    background: transparent;
    color: var(--muted);
}

.icon-button {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 22px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    touch-action: pan-y;
}

.calendar-grid article {
    min-width: 0;
    min-height: 72px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.calendar-grid article.is-selected {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.calendar-grid article.is-today {
    border-color: var(--accent-2);
    background: #fffaf0;
}

.calendar-grid article.is-today.is-selected {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 2px rgba(232, 180, 75, .28);
}

.calendar-grid article.is-empty {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
}

.calendar-grid a {
    min-width: 0;
    min-height: 72px;
    display: block;
    padding: 7px 5px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

.calendar-grid strong,
.calendar-grid span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.calendar-grid strong {
    margin-bottom: 5px;
    font-size: 13px;
}

.calendar-grid em {
    display: inline-grid;
    place-items: center;
    min-height: 17px;
    margin-bottom: 3px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent-2);
    color: #4b3712;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
}

.panel-list article,
.chart-list article,
.asset-list article,
.note-list article,
.closing-card {
    padding: 14px;
}

.panel-list article {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-list strong {
    font-size: 18px;
}

.closing-card p {
    margin: 0 0 14px;
    color: var(--muted);
}

.progress-line,
.bar {
    display: block;
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 99px;
    background: #e6ebe6;
}

.progress-line span,
.bar i {
    display: block;
    height: 100%;
    background: var(--accent-2);
}

.page-title {
    margin: 10px 0 14px;
}

.title-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
}

.page-title .title-action {
    min-height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
}

.daily-spend-chip {
    min-width: 118px;
    justify-items: start;
    background: #fff;
    border: 1px solid #cfe0d4;
    color: var(--ink);
}

.daily-spend-chip small,
.daily-spend-chip strong {
    line-height: 1.1;
}

.daily-spend-chip small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
}

.daily-spend-chip strong {
    font-size: 13px;
}

.daily-spend-chip.is-warning {
    border-color: #f0c7b5;
    background: #fff5ef;
    color: var(--expense);
}

.daily-spend-chip.is-muted {
    background: #f3f5f2;
    color: var(--muted);
}

.page-title h1 {
    margin-bottom: 4px;
    font-size: 26px;
}

.section-title {
    margin: 8px 0 2px;
    font-size: 16px;
}

.budget-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid rgba(220, 227, 221, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow);
}

.budget-overview article {
    min-width: 0;
}

.budget-overview span,
.budget-overview small,
.budget-list small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.budget-overview strong {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
    white-space: nowrap;
}

.budget-progress {
    grid-column: 1 / -1;
    height: 11px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6ebe6;
}

.budget-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.budget-overview small {
    grid-column: 1 / -1;
}

.budget-list {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding: 1px 2px 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.budget-list::-webkit-scrollbar {
    display: none;
}

.budget-list article {
    flex: 0 0 78%;
    max-width: 320px;
    display: grid;
    gap: 9px;
    padding: 14px;
    border: 1px solid rgba(220, 227, 221, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow);
    scroll-snap-align: start;
}

.budget-list > .empty {
    flex: 1 0 100%;
}

.budget-card-link {
    display: grid;
    gap: 9px;
    color: inherit;
    text-decoration: none;
}

.budget-list header,
.budget-list header div,
.budget-list p,
.budget-edit-list label,
.budget-total-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.budget-list header div {
    justify-content: flex-start;
    min-width: 0;
}

.budget-list p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.inline-back {
    display: inline-grid;
    margin: 0 0 6px -8px;
}

.budget-detail-row {
    display: grid;
    grid-template-columns: 10px 1fr;
    align-items: center;
    gap: 8px 10px;
    min-height: 72px;
    padding: 12px 14px;
    border: 1px solid rgba(220, 227, 221, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow);
}

.budget-detail-row .category-dot {
    align-self: start;
    margin-top: 6px;
}

.budget-detail-row .transaction-main {
    min-width: 0;
}

.budget-detail-row .transaction-main strong {
    font-size: 14px;
}

.budget-detail-row .transaction-main span {
    white-space: normal;
    line-height: 1.45;
}

.budget-detail-row .transaction-amount {
    grid-column: 2;
    justify-self: end;
    font-size: 17px;
}

.budget-form-card {
    margin-top: 4px;
}

.budget-allocation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    padding: 12px;
    border: 1px solid #dbe8de;
    border-radius: 8px;
    background: #f6fbf7;
}

.budget-allocation div:not(.budget-progress) {
    min-width: 0;
}

.budget-allocation span,
.budget-allocation small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.budget-allocation strong {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.budget-allocation .budget-progress,
.budget-allocation small {
    grid-column: 1 / -1;
}

.budget-total-field,
.budget-edit-list label {
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.budget-total-field span,
.budget-edit-list span {
    color: var(--ink);
    font-weight: 900;
}

.budget-total-field input,
.budget-edit-list input {
    width: 45%;
    min-width: 120px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    text-align: right;
    font-weight: 900;
}

.budget-edit-list {
    display: grid;
    gap: 8px;
}

.budget-edit-list h2 {
    margin: 8px 0 0;
    font-size: 16px;
}

.budget-edit-list span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.budget-edit-list i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.fixed-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid rgba(220, 227, 221, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow);
}

.fixed-overview article {
    min-width: 0;
}

.fixed-overview span,
.fixed-list p,
.fixed-list small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.fixed-overview strong {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
}

.fixed-form-card {
    margin-bottom: 12px;
}

.fixed-list {
    display: grid;
    gap: 10px;
}

.fixed-list article {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(220, 227, 221, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow);
}

.fixed-list article.is-disabled {
    opacity: .62;
}

.fixed-list header,
.fixed-list header div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.fixed-list header div {
    justify-content: flex-start;
    min-width: 0;
}

.fixed-list header strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fixed-list header b {
    white-space: nowrap;
}

.fixed-list p,
.fixed-list small {
    margin: 0;
    line-height: 1.45;
}

.fixed-status {
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    justify-self: start;
    padding: 0 11px;
    border-radius: 999px;
    background: #fff5ef;
    color: var(--expense);
    font-size: 12px;
    font-weight: 900;
}

.fixed-status.is-done {
    background: #eaf7ef;
    color: var(--income);
}

.fixed-register-form .primary-button:disabled {
    opacity: .5;
}

.fixed-edit {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7faf6;
}

.fixed-edit summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 900;
}

.fixed-edit form {
    margin-top: 10px;
}

.chart-list article {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 9px;
    align-items: center;
}

.chart-list article div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-list .bar {
    grid-column: 1 / -1;
}

.asset-list article {
    display: grid;
    gap: 8px;
}

.asset-list header,
.asset-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.note-list article {
    display: grid;
    gap: 6px;
}

.note-list p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.empty {
    margin: 18px 0;
    color: var(--muted);
    text-align: center;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 20;
    width: min(var(--app-viewport-width), 520px);
    max-width: 520px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    transform: translateX(-50%);
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px);
}

.bottom-nav a {
    min-height: 58px;
    display: grid;
    place-items: center;
    gap: 2px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.bottom-nav span {
    font-size: 20px;
    line-height: 1;
}

.bottom-nav a.is-active {
    background: #e9f1eb;
    color: var(--accent);
}

.add-fab {
    position: fixed;
    left: 50%;
    bottom: calc(82px + env(safe-area-inset-bottom));
    z-index: 30;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    transform: translateX(calc(min(260px, 50vw) - 84px));
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 16px 30px rgba(36, 91, 79, .34);
    text-decoration: none;
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

@media (max-width: 360px) {
    .app-shell {
        padding-left: 10px;
        padding-right: 10px;
    }

    .settings-actions {
        grid-template-columns: 1fr;
    }

    .month-title strong {
        font-size: 19px;
    }

    .top-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .month-title {
        text-align: left;
    }

    .summary-card strong {
        font-size: 17px;
    }

    .transaction-row {
        grid-template-columns: 8px minmax(0, 1fr) max-content 28px;
        gap: 7px;
        min-height: 56px;
        padding: 8px 8px 8px 12px;
    }

    .transaction-row > b,
    .transaction-amount {
        justify-self: end;
        font-size: 13px;
    }

    .transaction-row form {
        justify-self: end;
    }

    .transaction-row .icon-button {
        width: 28px;
        height: 28px;
    }

    .category-edit-row {
        grid-template-columns: 34px 42px 1fr;
    }

    .category-edit-row button {
        min-height: 36px;
    }

    .category-edit-row .text-button {
        grid-column: span 1;
    }

    .add-fab {
        transform: translateX(calc(50vw - 78px));
    }
}
