:root {
    --bg: #f5f0e8;
    --paper: rgba(255, 252, 247, 0.92);
    --ink: #23201c;
    --muted: #6f675d;
    --line: rgba(35, 32, 28, 0.12);
    --accent: #a64b2a;
    --accent-soft: #edd3c3;
    --accent-deep: #70301b;
    --shadow: 0 18px 45px rgba(69, 49, 34, 0.12);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    font-family: "Segoe UI", "Malgun Gothic", sans-serif;
    line-height: 1.45;
    background:
        radial-gradient(circle at top left, rgba(166, 75, 42, 0.16), transparent 30%),
        radial-gradient(circle at right 20%, rgba(117, 134, 88, 0.14), transparent 25%),
        linear-gradient(180deg, #f8f4ed 0%, var(--bg) 100%);
}
.page { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 40px 0 64px; }
.hero {
    padding: 32px; border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 248, 240, 0.98), rgba(251, 236, 224, 0.92));
    box-shadow: var(--shadow); border: 1px solid rgba(166, 75, 42, 0.1);
}
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(2.1rem, 6vw, 4rem); line-height: 1.05; }
.hero-copy { max-width: 720px; margin-bottom: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.shortcut-row {
    margin-top: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.shortcut-chip {
    border: 1px solid rgba(166, 75, 42, 0.24);
    background: rgba(255, 248, 240, 0.96);
    color: var(--accent-deep);
    border-radius: 999px;
    min-height: 40px;
    padding: 9px 16px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.shortcut-chip:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.shortcut-status {
    min-height: 18px;
}
.top-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 999px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.7);
    color: var(--accent-deep);
    border: 1px solid rgba(166, 75, 42, 0.12);
    font-weight: 700;
}

.nav-link.is-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: white;
}

.summary-grid, .two-column, .form-grid { display: grid; gap: 18px; margin-top: 20px; }
.summary-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.two-column { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.form-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.member-form-grid { margin-top: 0; }
.panel, .stat-card { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.panel { margin-top: 20px; padding: 24px; }
.stat-card { padding: 20px; }

.report-page .report-form-shell {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}

.report-page .report-import-launch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.report-page .report-import-trigger,
.report-page .report-import-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.report-page .report-section {
    position: relative;
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(35, 32, 28, 0.08);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.report-page .report-section::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 8px;
    background: linear-gradient(180deg, rgba(166, 75, 42, 0.26), rgba(166, 75, 42, 0.08));
}

.report-page .report-section-basic {
    background: linear-gradient(180deg, rgba(255, 251, 247, 0.98), rgba(248, 242, 235, 0.94));
}

.report-page .report-section-money {
    background: linear-gradient(180deg, rgba(254, 248, 242, 0.98), rgba(244, 235, 226, 0.94));
}

.report-page .report-section-special-fee {
    background: linear-gradient(180deg, rgba(255, 249, 238, 0.99), rgba(248, 232, 210, 0.96));
    border-color: rgba(166, 75, 42, 0.16);
}

.report-page .report-section-special-fee::before {
    background: linear-gradient(180deg, rgba(166, 75, 42, 0.52), rgba(228, 153, 92, 0.18));
}

.report-page .special-fee-collapsed {
    padding-bottom: 18px;
}

.report-page .special-fee-collapsed .report-section-head {
    margin-bottom: 0;
}

.report-page .special-fee-trigger {
    justify-self: start;
    width: fit-content;
    min-height: 42px;
    padding: 10px 16px;
    margin-top: 8px;
    font-size: 0.92rem;
}

.report-page .report-section-items {
    background: linear-gradient(180deg, rgba(252, 249, 244, 0.98), rgba(243, 238, 230, 0.94));
}

.report-page .report-section-text {
    background: linear-gradient(180deg, rgba(253, 250, 246, 0.98), rgba(246, 239, 233, 0.94));
}

.report-page .report-section-actions {
    background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(241, 234, 226, 0.94));
}

.report-page .report-section-head {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
}

.report-page .review-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.report-page .report-section-head h3 {
    margin: 0;
    font-size: 1.18rem;
}

.report-page .report-section-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.report-page .report-section-toggle {
    margin-top: 8px;
    align-self: flex-start;
    min-height: 40px;
    padding: 10px 16px;
    font-size: 0.95rem;
}

.report-page .report-section-body {
    display: grid;
    gap: 14px;
}

.report-page .report-section-body.is-collapsed {
    display: none;
}

.report-page .report-grid-basic,
.report-page .report-grid-money,
.report-page .report-text-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.report-page .report-section .field input,
.report-page .report-section .field textarea {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(35, 32, 28, 0.12);
}

.report-page .report-section .field textarea,
.report-page #report-source-text {
    overflow: hidden;
    resize: none;
    box-sizing: border-box;
}

.report-page .report-section .field span {
    color: var(--ink);
    font-weight: 800;
}

.report-page .field {
    gap: 6px;
}

.report-page .report-section .field input,
.report-page .report-section .field textarea {
    padding: 8px 11px;
    border-radius: 14px;
    min-height: 40px;
    line-height: 1.42;
    font-size: 14px;
}

.report-page .report-section .field textarea {
    min-height: 72px;
}

.report-page .review-ai-button {
    min-height: 30px;
    padding: 6px 11px;
    font-size: 0.78rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.report-page .review-ai-row {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.report-page .review-ai-status {
    min-height: 18px;
    margin: 0;
    font-size: 0.86rem;
    text-align: right;
    flex: 1;
}

.report-import-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.report-page .review-ai-dialog {
    width: min(720px, 100%);
}

.report-page .review-ai-result-field textarea {
    min-height: 200px;
    line-height: 1.6;
}

.report-page .review-ai-actions {
    margin-top: 4px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.report-page .review-ai-actions .secondary-button {
    min-width: 120px;
}

.report-page .review-ai-backdrop {
    cursor: default;
}

.report-page .import-field {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 248, 240, 0.82);
    border: 1px solid rgba(166, 75, 42, 0.12);
}

.report-page .import-actions {
    margin-top: 14px;
}

.report-page .calculator-results {
    margin-top: 14px;
    gap: 8px;
}

.report-page .calculator-results .stat-card {
    padding: 10px 12px;
    border-radius: 16px;
}

.report-page .calculator-results .stat-label {
    font-size: 0.76rem;
    line-height: 1.1;
}

.report-page .calculator-results .stat-value {
    margin-top: 3px;
    font-size: 0.98rem;
    line-height: 1.08;
}

.report-page .report-section-actions .action-row {
    align-items: center;
}

.report-page .report-section-actions .status-text {
    font-weight: 700;
}

.report-page .report-section-actions .draft-status {
    font-size: 0.9rem;
    opacity: 0.9;
}

.report-import-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(30, 24, 20, 0.42);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    z-index: 50;
}

.report-import-modal:target {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.report-import-backdrop {
    position: absolute;
    inset: 0;
    display: block;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
}

.report-import-dialog {
    position: relative;
    z-index: 1;
    width: min(860px, 100%);
    max-height: min(92vh, 920px);
    overflow: auto;
    padding: 24px;
    border-radius: 26px;
    background: rgba(255, 249, 243, 0.98);
    border: 1px solid rgba(35, 32, 28, 0.12);
    box-shadow: 0 26px 70px rgba(28, 18, 14, 0.34);
}

.report-import-dialog-head {
    margin-bottom: 16px;
}

.report-page .special-fee-dialog .report-grid-special-fee {
    margin-top: 10px;
}

.report-page .special-fee-actions {
    margin: 10px 0 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.report-page .special-fee-actions-top {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-top: 4px;
    padding-bottom: 6px;
    background: linear-gradient(180deg, rgba(255, 249, 243, 0.98), rgba(255, 249, 243, 0.94));
    backdrop-filter: blur(6px);
}

.report-page .special-fee-actions .secondary-button,
.report-page .special-fee-actions .report-import-close {
    min-width: 110px;
}
.field { display: grid; gap: 10px; font-size: 0.95rem; color: var(--muted); }
.field-wide { grid-column: 1 / -1; }
.field-help {
    margin: -2px 0 0;
    color: rgba(94, 79, 68, 0.78);
    font-size: 0.86rem;
    line-height: 1.35;
    font-weight: 700;
}
.field input, .field textarea {
    width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px;
    background: rgba(255, 255, 255, 0.86); color: var(--ink); font: inherit;
    font-size: 16px;
}
.field input:focus, .field textarea:focus { outline: 2px solid rgba(166, 75, 42, 0.18); border-color: rgba(166, 75, 42, 0.3); }
.editable-label {
    display: inline-block;
    padding: 6px 4px;
    border-bottom: 1px dashed rgba(166, 75, 42, 0.35);
    cursor: text;
}
.editable-label:focus {
    outline: 2px solid rgba(166, 75, 42, 0.18);
    border-radius: 8px;
}
.action-row { display: flex; gap: 16px; align-items: center; }
.primary-button, .secondary-button {
    border: 0; border-radius: 999px; padding: 14px 22px; cursor: pointer; font: inherit; font-weight: 700;
    min-height: 46px;
}
.primary-button { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: white; }
.secondary-button { background: rgba(35, 32, 28, 0.08); color: var(--ink); }
.status-text { margin: 0; color: var(--muted); }
.members-page .member-snapshot-banner {
    margin: 0 0 14px;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid rgba(166, 75, 42, 0.18);
    background: rgba(166, 75, 42, 0.06);
    color: var(--ink);
    font-weight: 700;
}
.flow-explain { margin-top: 16px; display: grid; gap: 8px; }
.flow-title { margin: 0; font-weight: 700; color: var(--ink); }
.flow-line { margin: 0; color: var(--muted); font-size: 0.95rem; }
.member-save-status { margin-top: 8px; }
.stat-label { color: var(--muted); font-size: 0.9rem; }
.stat-value { margin-top: 10px; font-size: 1.8rem; font-weight: 700; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-bottom: 16px; }
.section-head p { margin-bottom: 0; color: var(--muted); }
.stack { display: grid; gap: 22px; }
.item-card { padding: 16px 18px; border-radius: 18px; background: rgba(255, 255, 255, 0.72); border: 1px solid rgba(35, 32, 28, 0.08); }
.item-card.button-card { text-align: left; cursor: pointer; }
.item-card.button-card:hover { border-color: rgba(166, 75, 42, 0.28); }
.item-card.is-highlighted {
    border-color: rgba(166, 75, 42, 0.58);
    box-shadow: 0 0 0 3px rgba(166, 75, 42, 0.12);
}
.member-card-actions { display: flex; gap: 10px; margin-top: 12px; }
.member-card-actions .inline-button {
    border: 1px solid rgba(166, 75, 42, 0.18);
    background: rgba(255, 255, 255, 0.78);
    color: var(--accent-deep);
    cursor: pointer;
    padding: 8px 10px;
    min-height: 36px;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    font-size: 0.84rem;
}
.inline-button { border: 0; background: transparent; color: var(--accent-deep); cursor: pointer; padding: 0; font: inherit; font-weight: 700; }
.item-title, .money-row strong { display: block; margin-bottom: 8px; font-size: 1.08rem; }
.item-card p, .money-note, .money-amount { color: var(--muted); line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { padding: 8px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); font-size: 0.92rem; }
.member-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.member-title-row .item-title {
    margin-bottom: 0;
    min-width: 0;
    flex: 1 1 auto;
}

.member-title-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 2px;
}

.members-page .member-chip {
    padding: 5px 8px;
    font-size: 0.86rem;
    line-height: 1.2;
    font-weight: 900;
}

.members-page .member-chip-latest {
    max-width: 100%;
}

.members-page .member-chip-absence {
    background: rgba(35, 32, 28, 0.06);
    color: var(--muted);
}

.money-field {
    display: grid;
    gap: 6px;
}

.money-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.money-label {
    color: var(--muted);
    font-weight: 800;
}

.money-input {
    width: 100%;
}

.members-page .money-field {
    gap: 6px;
}

.members-page .money-input {
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 14px;
    font-size: 0.95rem;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
}

.members-page .money-input:disabled {
    opacity: 0.72;
}

.dues-money-field {
    gap: 10px;
}

.dues-money-field .money-field-head {
    flex-wrap: wrap;
}

.money-inline-field {
    grid-template-columns: minmax(0, 1fr) minmax(86px, 114px);
    align-items: center;
    gap: 8px;
}

.money-inline-field .money-label {
    margin-bottom: 0;
}

.money-inline-field .money-input {
    min-width: 0;
}

.money-stack {
    display: grid;
    gap: 10px;
}

.members-page .special-fee-field.is-disabled .money-label {
    color: rgba(111, 103, 93, 0.72);
}

.members-page .special-fee-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.members-page .special-fee-toggle input {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
    margin: 0;
}

.members-page .special-fee-head {
    gap: 6px;
}

.arrears-inline {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-left: auto;
    flex-wrap: wrap;
}

.members-page .arrears-panel.arrears-inline {
    margin-top: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.members-page .arrears-panel.arrears-inline .arrears-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 0;
}

.members-page .arrears-panel.arrears-inline .inline-button {
    min-height: 34px;
    min-width: 34px;
    padding: 0 8px;
    border: 1px solid rgba(166, 75, 42, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
}

.arrears-inline .arrears-title {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(166, 75, 42, 0.08);
    color: var(--accent-deep);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.arrears-inline .arrears-actions {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.arrears-inline .inline-button {
    min-width: 34px;
    min-height: 34px;
    padding: 0 8px;
    border: 1px solid rgba(166, 75, 42, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
}

.dues-summary-line {
    margin: 0;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.35;
    font-weight: 900;
}

.dues-status-toggle-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.dues-status-toggle-row .attendance-toggle {
    width: 100%;
    margin: 0;
}

.dues-status-toggle-row .attendance-option {
    width: 100%;
}
.attendance-history { margin: 12px 0; }
.history-title { margin: 0 0 8px; font-weight: 800; color: var(--muted); }
.chip-status-accompanied { background: rgba(166, 75, 42, 0.18); }
.chip-status-solo { background: rgba(117, 134, 88, 0.18); }
.chip-status-absent { background: rgba(140, 52, 26, 0.16); color: #7a2f18; }
.chip-status-attend { background: rgba(35, 32, 28, 0.12); }
.chip-status-unknown { background: rgba(35, 32, 28, 0.06); color: var(--muted); }
.money-row { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.money-amount { font-weight: 700; color: var(--accent-deep); }
.check-row { display: flex; align-items: center; gap: 12px; }
.check-row input { width: 18px; height: 18px; }
.notes { padding-left: 18px; color: var(--muted); }
.closing { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); font-weight: 600; }
.error { margin-top: 20px; padding: 18px; border-radius: 18px; background: #fff1ec; color: #8c341a; border: 1px solid rgba(166, 75, 42, 0.18); }
@media (max-width: 720px) {
    .page { width: min(100% - 20px, 1120px); padding-top: 20px; }
    .hero, .panel, .stat-card { border-radius: 20px; }
    .section-head, .money-row, .action-row, .member-card-actions { flex-direction: column; align-items: flex-start; }
    .section-head {
        align-items: flex-start;
        gap: 8px;
    }
    h1 {
        font-size: clamp(1.55rem, 7vw, 2.05rem);
        line-height: 1.2;
    }
    h2 {
        font-size: 1.2rem;
    }
    .hero {
        padding: 20px;
    }
    .panel {
        padding: 18px;
    }
    .form-grid, .two-column, .summary-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .action-row, .import-actions, .utility-actions, .member-card-actions {
        width: 100%;
        gap: 10px;
    }
    .action-row .status-text, .import-actions .status-text {
        width: 100%;
    }
    .primary-button, .secondary-button {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        min-height: 48px;
    }
    .top-nav {
        display: none;
    }
    .file-input {
        width: 100%;
        justify-content: space-between;
    }
    .shortcut-row {
        width: 100%;
        gap: 8px;
    }
    .shortcut-chip {
        width: 100%;
        min-height: 46px;
    }
}

@media (max-width: 720px) {
    .report-page .report-form-shell {
        gap: 14px;
    }

    .report-page .hero {
        padding: 18px;
    }

    .report-page .hero-copy {
        font-size: 0.92rem;
        line-height: 1.55;
    }

    .report-page .report-import-launch {
        gap: 10px;
        margin-top: 12px;
    }

    .report-page .report-import-trigger {
        width: 100%;
        min-height: 46px;
    }

    .report-page .report-section {
        padding: 16px;
        border-radius: 18px;
    }

    .report-page .report-section::before {
        width: 6px;
    }

    .report-page .report-section-head {
        gap: 2px;
        margin-bottom: 12px;
    }

    .report-page .report-section-head h3 {
        font-size: 1.18rem;
    }

    .report-page .report-section-head p {
        font-size: 0.94rem;
        line-height: 1.5;
    }

    .report-page .review-field-head {
        gap: 8px;
    }

    .report-page .review-ai-button {
        min-height: 28px;
        padding: 6px 10px;
        font-size: 0.72rem;
    }

    .report-page .review-ai-row {
        justify-content: space-between;
        gap: 8px;
    }

    .report-page .review-ai-dialog {
        width: 100%;
    }

    .report-page .review-ai-result-field textarea {
        min-height: 180px;
    }

    .report-page .review-ai-actions .secondary-button {
        min-width: 0;
        width: 100%;
    }

    .report-page .report-section-toggle {
        width: 100%;
        margin-top: 6px;
        min-height: 42px;
        padding: 10px 14px;
        font-size: 0.92rem;
    }

    .report-page .special-fee-trigger {
        width: 100%;
        justify-self: stretch;
    }

    .report-page .report-section-items .report-section-head p {
        display: none;
    }

    .report-page .report-grid-basic,
    .report-page .report-grid-money,
    .report-page .report-text-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .report-page .report-section .field span {
        font-size: 0.98rem;
    }

    .report-page .report-section .field input,
    .report-page .report-section .field textarea {
        font-size: 15px;
        line-height: 1.42;
        padding: 7px 10px;
        min-height: 36px;
        border-radius: 12px;
    }

    .report-page .report-section .field textarea {
        min-height: 68px;
    }

    .field-help {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .report-page .report-section-body {
        gap: 10px;
    }

    .report-page .report-section-items .field.field-wide {
        gap: 8px;
    }

    .report-page .report-section-items .status-text {
        font-size: 0.86rem;
        line-height: 1.45;
    }

    .report-page .calculator-results {
        margin-top: 10px;
        gap: 6px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-page .calculator-results .stat-card {
        padding: 8px 9px;
        border-radius: 12px;
    }

    .report-page .calculator-results .stat-label {
        font-size: 0.78rem;
        line-height: 1.05;
    }

    .report-page .calculator-results .stat-value {
        margin-top: 1px;
        font-size: 0.98rem;
        line-height: 1.08;
    }

    .report-page .import-field {
        padding: 14px;
    }

    .report-page .import-actions {
        gap: 10px;
    }

    .report-import-modal {
        padding: 12px;
    }

    .report-import-dialog {
        width: 100%;
        max-height: 92vh;
        padding: 16px;
        border-radius: 20px;
    }

    .report-import-dialog .import-actions .secondary-button,
    .report-import-dialog .import-actions .report-import-close {
        width: 100%;
    }

}

@media (max-width: 720px) {
    .reports-page .hero {
        padding: 18px;
    }

    .reports-page .hero-copy {
        font-size: 0.92rem;
        line-height: 1.55;
    }

    .reports-page .shortcut-row {
        gap: 8px;
        margin-top: 12px;
    }

    .reports-page .shortcut-chip {
        min-height: 42px;
        padding: 8px 14px;
        font-size: 0.92rem;
    }

    .reports-page .panel {
        padding: 14px;
        border-radius: 18px;
    }

    .reports-page .section-head {
        gap: 6px;
        margin-bottom: 10px;
    }

    .reports-page .section-head h2 {
        font-size: 1rem;
    }

    .reports-page .section-head p {
        font-size: 0.84rem;
        line-height: 1.42;
    }

    .reports-page .two-column {
        gap: 10px;
    }

    .reports-page .stack {
        gap: 10px;
    }

    .reports-page .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        margin-top: 10px;
    }

    .reports-page .summary-grid .stat-card {
        padding: 10px 11px;
        border-radius: 14px;
        min-height: 0;
    }

    .reports-page .summary-grid .stat-label {
        font-size: 0.72rem;
        line-height: 1;
    }

    .reports-page .summary-grid .stat-value {
        margin-top: 1px;
        font-size: 1rem;
        line-height: 1.08;
        letter-spacing: -0.02em;
        word-break: keep-all;
        overflow-wrap: anywhere;
    }

    .reports-page .calculator-results {
        margin-top: 8px;
        gap: 6px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reports-page .calculator-results .stat-card {
        padding: 10px 11px;
        border-radius: 14px;
        min-height: 0;
    }

    .reports-page .calculator-results .stat-label {
        font-size: 0.7rem;
        line-height: 1;
    }

    .reports-page .calculator-results .stat-value {
        margin-top: 1px;
        font-size: 0.88rem;
        line-height: 1.08;
        letter-spacing: -0.02em;
        word-break: keep-all;
        overflow-wrap: anywhere;
    }

    .reports-page .flow-explain {
        margin-top: 10px;
        gap: 4px;
    }

    .reports-page .flow-line {
        font-size: 0.82rem;
        line-height: 1.3;
    }

    .reports-page #report-source-text {
        min-height: 120px;
    }

    .reports-page .import-field {
        padding: 10px;
    }

    .reports-page .import-actions {
        gap: 8px;
    }

    .reports-page .import-actions .secondary-button,
    .reports-page .import-actions .report-import-close {
        width: 100%;
    }

    .reports-page #report-list .item-card,
    .reports-page #agendas .item-card,
    .reports-page #attendance .item-card,
    .reports-page #balances .item-card,
    .reports-page #incomes .item-card,
    .reports-page #expenses .item-card,
    .reports-page #sponsorships .item-card {
        padding: 12px 14px;
        border-radius: 14px;
    }

    .reports-page #review,
    .reports-page #greeting,
    .reports-page #closing-message,
    .reports-page #meeting-meta,
    .reports-page #sponsorship-note {
        font-size: 0.9rem;
        line-height: 1.45;
    }
}

.attendance-toggle {
    display: inline-flex;
    gap: 8px;
    margin: 8px 0 6px;
}

.attendance-option {
    border: 1px solid rgba(35, 32, 28, 0.12);
    background: rgba(35, 32, 28, 0.06);
    color: var(--muted);
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.attendance-option.is-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: white;
    border-color: rgba(166, 75, 42, 0.32);
}

.attendance-state {
    font-weight: 800;
}
.expense-editor {
    display: grid;
    gap: 12px;
}

.expense-row {
    display: grid;
    grid-template-columns: minmax(160px, 1.3fr) minmax(120px, 0.8fr) minmax(160px, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(35, 32, 28, 0.08);
    background: rgba(255, 255, 255, 0.6);
}

.income-editor {
    display: grid;
    gap: 12px;
}

.income-row {
    display: grid;
    grid-template-columns: minmax(160px, 1.3fr) minmax(120px, 0.8fr) minmax(160px, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(35, 32, 28, 0.08);
    background: rgba(255, 255, 255, 0.6);
}

.income-add-button {
    justify-self: flex-start;
}

.income-remove-button {
    align-self: center;
    padding-top: 12px;
}

.expense-add-button {
    justify-self: flex-start;
}

.expense-remove-button {
    align-self: center;
    padding-top: 12px;
}

@media (max-width: 720px) {
    .expense-row {
        grid-template-columns: 1fr;
    }

    .expense-remove-button {
        padding-top: 0;
    }

    .income-row {
        grid-template-columns: 1fr;
    }

    .income-remove-button {
        padding-top: 0;
    }
}
.absence-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.absence-text {
    margin: 0;
    font-weight: 600;
}

.absence-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff1ec;
    color: #8c341a;
    border: 1px solid rgba(166, 75, 42, 0.16);
    font-size: 0.88rem;
    font-weight: 800;
}
.attendance-toggle-wide {
    flex-wrap: wrap;
}

.attendance-toggle.is-disabled {
    opacity: 0.55;
}

.import-field {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(166, 75, 42, 0.12);
    background: rgba(255, 248, 240, 0.72);
}

.import-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.utility-panel {
    margin-top: 20px;
}

.backup-panel {
    padding: 16px 20px;
}

.backup-panel-top {
    display: flex;
    justify-content: flex-end;
}

.backup-chip {
    border: 1px solid rgba(166, 75, 42, 0.24);
    background: rgba(255, 248, 240, 0.94);
    color: var(--accent-deep);
    border-radius: 999px;
    min-height: 38px;
    padding: 8px 14px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.backup-panel-body {
    margin-top: 14px;
}

.backup-panel.is-collapsed .backup-panel-body {
    display: none;
}

.utility-actions {
    flex-wrap: wrap;
}

.file-input {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px dashed rgba(35, 32, 28, 0.18);
    background: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    color: var(--muted);
}

.file-input input[type="file"] {
    font-size: 0.9rem;
}

.floating-chip-nav {
    position: fixed;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 20;
}

.chip-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 12px 16px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--accent-deep);
    background: rgba(255, 252, 247, 0.92);
    border: 1px solid rgba(166, 75, 42, 0.18);
    box-shadow: 0 14px 30px rgba(69, 49, 34, 0.14);
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.chip-nav-link.is-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: white;
}

.member-inline-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 16px;
}

.member-inline-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--accent-deep);
    background: rgba(255, 252, 247, 0.92);
    border: 1px solid rgba(166, 75, 42, 0.18);
    box-shadow: 0 10px 22px rgba(69, 49, 34, 0.10);
    font-weight: 800;
    white-space: nowrap;
}

.member-inline-link.is-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: white;
}

.is-hidden {
    display: none !important;
}

.members-page .member-card {
    padding: 18px;
    position: relative;
    overflow: hidden;
}

.members-page .member-card--even {
    background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(239, 235, 229, 0.98));
    border-color: rgba(35, 32, 28, 0.16);
    box-shadow: 0 12px 26px rgba(35, 32, 28, 0.06);
}

.members-page .member-card--odd {
    background: linear-gradient(180deg, rgba(255, 232, 208, 1), rgba(255, 210, 173, 0.99));
    border-color: rgba(166, 75, 42, 0.38);
    box-shadow: 0 12px 26px rgba(166, 75, 42, 0.10), inset 0 0 0 1px rgba(166, 75, 42, 0.08);
}

.members-page .member-card--even::before,
.members-page .member-card--odd::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    border-radius: 18px 0 0 18px;
    opacity: 0.95;
    pointer-events: none;
}

.members-page .member-card--even::before {
    background: linear-gradient(180deg, rgba(35, 32, 28, 0.26), rgba(35, 32, 28, 0.08));
}

.members-page .member-card--odd::before {
    background: linear-gradient(180deg, rgba(166, 75, 42, 0.76), rgba(166, 75, 42, 0.30));
}

.members-page .member-card > * {
    position: relative;
    z-index: 1;
}

.members-page .member-card--odd .member-title-row {
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(166, 75, 42, 0.24);
}

.members-toolbar {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    margin-bottom: 2px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.members-toolbar .backup-chip {
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
    font-size: 0.94rem;
    padding: 11px 12px;
}

.members-toolbar .backup-chip.is-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: white;
    border-color: rgba(166, 75, 42, 0.32);
}

.members-page .dues-quick-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
    gap: 12px;
    align-items: start;
    margin-top: 12px;
}

.members-page .member-meta-line {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.55;
    word-break: break-word;
    font-weight: 800;
}

.members-page #member-directory {
    gap: 16px;
}

.members-page .arrears-panel {
    margin-top: 0;
    padding: 10px 12px;
    border: 1px solid rgba(166, 75, 42, 0.16);
    border-radius: 14px;
    background: rgba(255, 248, 240, 0.75);
}

.members-page .arrears-title {
    margin: 0;
    font-weight: 800;
    color: var(--accent-deep);
}

.members-page .arrears-guide {
    margin: 4px 0 0;
    color: var(--muted);
    line-height: 1.45;
    font-size: 0.92rem;
}

.members-page .arrears-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.members-page .arrears-actions .inline-button {
    min-height: 34px;
    border: 1px solid rgba(166, 75, 42, 0.2);
    border-radius: 999px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
}

.members-page .arrears-actions .inline-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.members-page .arrears-status {
    margin-top: 8px;
    min-height: 18px;
}

.members-page .backup-panel-top {
    display: none;
}

.members-page .dues-status-field .attendance-state {
    margin: 6px 0 0;
    font-weight: 800;
}

.members-page .advance-amount-field {
    gap: 4px;
}

.members-page .advance-amount-field .money-label {
    font-size: 0.9rem;
}

.members-page .advance-amount-field .money-input {
    min-height: 38px;
    padding: 7px 10px;
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .page {
        padding-right: 120px;
    }
}

@media (max-width: 720px) {
    .floating-chip-nav {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        bottom: auto;
        transform: none;
        display: block;
        margin: 0 0 10px;
        line-height: 1.2;
    }

    .chip-nav-link {
        display: inline;
        min-width: 0;
        flex: none;
        padding: 0;
        margin: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        font-size: 17px;
        line-height: 1.35;
        color: var(--accent-deep);
    }

    .chip-nav-link:not(:last-child)::after {
        content: " · ";
        color: var(--muted);
    }

    .page {
        padding-right: 0;
        padding-bottom: 32px;
    }

    .backup-panel {
        padding: 14px;
    }

    .members-toolbar {
        display: flex;
        gap: 6px;
        margin-top: 10px;
        margin-bottom: 8px;
        overflow-x: auto;
    }

    .members-toolbar .backup-chip {
        font-size: 0.88rem;
        padding: 9px 10px;
    }

    .member-inline-nav {
        gap: 6px;
        margin: 12px 0 14px;
    }

    .member-inline-link {
        padding: 9px 11px;
        font-size: 0.95rem;
    }
}

@media (max-width: 720px) {
    .members-page .hero-copy {
        font-size: 0.96rem;
        line-height: 1.6;
    }

    .members-page .member-form-grid .field {
        gap: 8px;
    }

    .members-page .member-card {
        border-radius: 16px;
        padding: 14px;
    }

    .members-page .member-card--even {
        background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(236, 232, 226, 0.98));
    }

    .members-page .member-card--odd {
        background: linear-gradient(180deg, rgba(255, 228, 202, 1), rgba(255, 200, 156, 1));
    }

    .members-page .member-card--odd .member-title-row {
        border-bottom-color: rgba(166, 75, 42, 0.24);
    }

    .members-page .member-card--even::before,
    .members-page .member-card--odd::before {
        width: 14px;
    }

    .members-page .member-title-row {
        gap: 8px;
        flex-wrap: wrap;
    }

    .members-page .member-card .item-title {
        font-size: 1.18rem;
        margin-bottom: 0;
        line-height: 1.15;
    }

    .members-page .member-title-chips {
        justify-content: flex-start;
        margin-top: 0;
        gap: 5px;
    }

    .members-page .member-chip {
        padding: 4px 7px;
        font-size: 0.88rem;
        font-weight: 900;
    }

    .members-page .attendance-history {
        display: none;
    }

    .members-page .attendance-state {
        display: none;
    }

    .members-page .arrears-inline {
        gap: 5px;
    }

    .members-page .arrears-inline .arrears-title {
        font-size: 0.8rem;
        padding: 4px 7px;
    }

    .members-page .arrears-inline .inline-button {
        min-width: 30px;
        min-height: 30px;
        padding: 0 7px;
        font-size: 0.8rem;
        font-weight: 800;
    }

    .members-page .attendance-toggle {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5px;
        margin-top: 4px;
    }

    .members-page .attendance-toggle.attendance-toggle-wide {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .members-page .attendance-option {
        width: 100%;
        min-height: 34px;
        padding: 6px 7px;
        font-size: 0.84rem;
        font-weight: 900;
    }

    .members-page .member-card .form-grid {
        gap: 10px;
    }

    .members-page .dues-status-field {
        padding: 10px;
        border: 1px solid rgba(35, 32, 28, 0.08);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.66);
    }

    .members-page .member-meta-line {
        display: none;
    }

    .members-page .dues-summary-line {
        font-size: 0.98rem;
    }

    .members-page .dues-status-toggle-row {
        gap: 6px;
    }

    .members-page .dues-status-toggle-row .attendance-toggle {
        grid-template-columns: 1fr 1fr;
    }

    .members-page .dues-status-toggle-row .attendance-toggle.attendance-toggle-wide {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .members-page .dues-status-toggle-row .attendance-option {
        font-size: 0.86rem;
        min-height: 32px;
        padding: 6px 7px;
        font-weight: 900;
    }

    .members-page .money-inline-field {
        grid-template-columns: minmax(0, 1fr) minmax(80px, 102px);
        gap: 6px;
    }

    .members-page .money-stack {
        gap: 8px;
    }

    .members-page .member-card-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        margin-top: 10px;
    }

    .members-page .member-card-actions .inline-button {
        min-height: 36px;
        border: 1px solid rgba(166, 75, 42, 0.2);
        border-radius: 999px;
        padding: 8px 10px;
        background: rgba(255, 255, 255, 0.76);
        text-align: center;
        font-weight: 800;
        font-size: 0.8rem;
    }

    .members-page .member-save-status {
        margin-top: 8px;
        min-height: 20px;
        font-size: 0.98rem;
        font-weight: 800;
    }

    .members-page .money-label {
        font-size: 1rem;
        font-weight: 800;
    }
}




