:root {
  color-scheme: light;
  --background: #f6f7f2;
  --surface: #fff;
  --sidebar: #eff1e9;
  --line: #e4e8df;
  --ink: #242f27;
  --muted: #5d6c60;
  --subtle: #667469;
  --green: #426047;
  --deep: #314c37;
  --soft-green: #e6eee0;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif SC", serif;
  font-family: var(--sans);
  font-size: 16px;
}
:root[lang="ko-KR"] {
  --sans: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", "Noto Sans KR", sans-serif;
  --serif: "Noto Serif CJK KR", "Noto Serif KR", "Batang", serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #507653; outline-offset: 3px; }
button:disabled { opacity: .5; cursor: default; }
[hidden] { display: none !important; }
svg { width: 1.18em; height: 1.18em; display: block; }
[data-icon] { display: inline-grid; place-items: center; flex: 0 0 auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 10; padding: 10px; background: var(--surface); transform: translateY(-140%); }
.skip-link:focus { transform: none; }

.layout { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100dvh; padding: 28px 17px 17px; background: var(--sidebar); border-right: 1px solid #e1e6da; overflow: auto; }
.brand { display: flex; align-items: center; gap: 12px; margin: 1px 10px 39px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; color: #f9f4df; background: #49634a; font-size: 28px; }
.brand strong { display: block; font-size: 1.22rem; line-height: 1.25; letter-spacing: .06em; }
.brand small, .sidebar-foot small { display: block; color: var(--subtle); font-size: .76rem; margin-top: 3px; }
.nav-group { display: grid; gap: 4px; margin-bottom: 23px; }
.nav-label { margin: 0 12px 5px; font-size: .75rem; letter-spacing: .08em; color: var(--subtle); font-weight: 650; }
.nav-link { display: flex; align-items: center; gap: 13px; padding: 10px 12px; border-radius: 9px; min-height: 43px; font-size: .9rem; color: #4c5a50; }
.nav-link [data-icon] { font-size: 1rem; }
.nav-link:hover { background: #e7ebe0; }
.nav-link[aria-current="page"] { background: #dce8d7; color: #304b36; font-weight: 750; }
.nav-link[aria-current="page"]::after { width: 6px; height: 6px; border-radius: 50%; background: #628061; margin-left: auto; content: ""; }
.sidebar-foot { display: flex; align-items: center; gap: 10px; padding: 13px 6px 2px; border-top: 1px solid #dfe5d8; margin-top: auto; }
.sidebar-foot strong { display: block; font-size: .83rem; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; background: #dce6d7; color: #456048; border-radius: 50%; font-family: var(--serif); font-weight: 700; }

.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 73px; padding: 10px max(32px, calc((100% - 1260px) / 2)); border-bottom: 1px solid var(--line); background: #fafbf7; }
.topbar-left, .topbar-tools, .topbar-actions, .breadcrumb, .today-label { display: flex; align-items: center; }
.topbar-left, .breadcrumb { min-width: 0; }
.topbar-tools, .topbar-actions { flex-wrap: wrap; justify-content: flex-end; gap: 14px; }
.breadcrumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.language-switch { max-width: 105px; }
.breadcrumb { gap: 9px; font-size: .875rem; white-space: nowrap; }
.breadcrumb > span { color: var(--muted); }
.breadcrumb [data-icon] { font-size: .7rem; }
.today-label { gap: 7px; color: #566558; font-size: .84rem; white-space: nowrap; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 9px 14px; min-height: 39px; background: var(--surface); color: var(--deep); border: 1px solid var(--line); border-radius: 9px; font-size: .875rem; font-weight: 700; white-space: nowrap; }
.button:hover, .icon-button:hover { background: #edf1e9; }
.button.primary { color: #fff; background: var(--green); border-color: var(--green); }
.button.primary:hover { background: var(--deep); border-color: var(--deep); }
.button.danger { color: #914437; }
.topbar .topbar-more { display: none; }
.button.text { background: transparent; border: 0; min-height: 35px; padding: 6px 0 6px 8px; }
.button.text:hover { color: #223e27; text-decoration: underline; text-underline-offset: 4px; }
.icon-button { background: transparent; color: var(--muted); border: 0; border-radius: 8px; width: 38px; height: 38px; display: grid; place-items: center; }
.menu-toggle { display: none; }

.main { width: min(100%, 1324px); margin: 0 auto; padding: 26px 32px 40px; outline: 0; }
.hero { min-height: 142px; display: flex; align-items: flex-start; padding: 23px 28px; color: #fff; background: #52644b; background-image: linear-gradient(90deg, #1d3328e8 0%, #263a2eaa 33%, #283c2f27 70%, transparent), url("assets/valley.db9c9e215e86.webp"); background-size: cover; background-position: center 54%; border-radius: 17px; overflow: hidden; }
.hero-date { display: flex; align-items: center; gap: 8px; margin: 0; color: #f3f4de; font-size: clamp(1rem, 1.55vw, 1.38rem); font-weight: 650; }
.hero-date svg { flex: 0 0 auto; }
.home-calendar { margin-top: 17px; padding: 0 16px 13px; }
.home-calendar .card-header { padding-inline: 0; }
.home-calendar-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 4px; margin-top: -3px; }
.home-calendar-table th { color: var(--muted); padding: 2px 0 6px; font-size: .81rem; font-weight: 650; }
.home-calendar-table td { border: 1px solid var(--line); background: #fcfdfa; border-radius: 6px; text-align: center; height: 37px; font-size: .88rem; }
.home-calendar-table td:empty { background: #f5f7f2; border-color: #eff1eb; }
.home-calendar-table th:nth-child(n+6) { color: #806b57; }
.home-calendar-table time { display: inline-grid; place-items: center; min-width: 27px; height: 27px; border-radius: 7px; font-variant-numeric: tabular-nums; }
.home-calendar-table td:has([aria-current="date"]) { background: #e9f1e5; border-color: #cfdfca; }
.home-calendar-table time[aria-current="date"] { background: var(--green); color: #fff; font-weight: 750; }
.home-weather { margin-top: 17px; background: linear-gradient(145deg, #f0f5eb, #fff 63%); }
.home-weather h2 { display: flex; align-items: center; gap: 8px; }
.home-weather h2 svg { flex-shrink: 0; }
.weather-status { margin: 0; padding: 0 17px 14px; color: var(--muted); font-size: .9rem; }
.weather-body { padding: 0 17px 15px; }
.weather-current { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.weather-place, .weather-temperature { display: grid; gap: 4px; }
.weather-place { overflow-wrap: anywhere; }
.weather-place strong { font-size: 1.18rem; }
.weather-place span, .weather-temperature span { color: var(--muted); font-size: .85rem; }
.weather-temperature { text-align: right; }
.weather-temperature strong { color: var(--deep); font-size: 1.8rem; font-variant-numeric: tabular-nums; line-height: 1; }
.weather-forecast { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.weather-forecast li { display: grid; gap: 5px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #fafcf7; font-size: .85rem; overflow-wrap: anywhere; }
.weather-forecast li time, .weather-forecast li span { color: var(--muted); }
.weather-forecast li strong { font-variant-numeric: tabular-nums; }
.weather-source { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 11px; font-size: .78rem; color: var(--muted); }
.weather-search-status { grid-column: 1 / -1; margin: 0; }
.weather-search-status:empty { display: none; }
.weather-selection { margin-top: 14px; padding: 12px; border-radius: 8px; background: var(--soft-green); }
.weather-selection p { margin: 0 0 8px; overflow-wrap: anywhere; }
.overview { margin-top: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.section-heading h2, .card-header h2 { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.section-meta { color: var(--subtle); font-size: .83rem; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.stat { display: block; text-align: left; min-width: 0; padding: 15px 17px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--ink); }
a.stat:hover { border-color: #a6b6a2; box-shadow: 0 3px 12px #314c370b; }
.stat-top { display: flex; align-items: center; gap: 9px; min-width: 0; color: #505e53; font-size: .86rem; }
.symbol { width: 35px; height: 35px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: #e8efe2; color: #4f6a4b; }
.symbol.clay { background: #f5e8df; color: #9b6548; }
.symbol.lilac { background: #ece9f5; color: #6c6086; }
.symbol.sand { background: #f3eedf; color: #816b38; }
.symbol.blue { background: #e5edf2; color: #4b6778; }
.stat-value { display: block; margin: 8px 0 3px; font-size: clamp(1.45rem, 2.35vw, 2rem); font-weight: 690; line-height: 1.1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat small { color: var(--subtle); font-size: .78rem; }
.home-columns { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-top: 19px; align-items: start; }
.card { min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 57px; padding: 11px 17px; }
.activity { margin: 0; padding: 0 17px 5px; list-style: none; }
.activity li { border-top: 1px solid #edf0e9; }
.activity-link { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; color: inherit; border: 0; background: transparent; padding: 10px 0; }
.activity-link:hover .activity-title { text-decoration: underline; text-underline-offset: 3px; }
.activity-info { min-width: 0; flex: 1; }
.activity-title { display: block; font-size: .91rem; font-weight: 660; overflow-wrap: anywhere; }
.activity-meta { display: block; color: var(--subtle); font-size: .77rem; margin-top: 4px; }
.activity-value { font-size: .86rem; font-weight: 650; white-space: nowrap; }
.activity-value.income { color: #426648; }
.meal-body { padding: 0 17px 16px; }
.meal-caption { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 11px; }
.meal-preview { display: flex; align-items: center; gap: 12px; min-width: 0; }
.meal-preview .symbol { width: 44px; height: 44px; }
.meal-caption h3 { font-size: 1rem; margin: 0 0 3px; overflow-wrap: anywhere; }
.meal-caption p { color: var(--subtle); font-size: .8rem; margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; width: fit-content; border-radius: 100px; padding: 4px 9px; background: #eaf0e5; color: #4a6349; font-size: .78rem; font-weight: 680; white-space: nowrap; }
.chip.clay { background: #f5eae3; color: #8a513c; }
.chip.lilac { background: #eeebf6; color: #695881; }
.muted { color: var(--subtle); }
.page-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin: 3px 0 23px; }
.page-heading h1 { font-family: var(--serif); font-size: clamp(2rem, 3.3vw, 2.85rem); margin: 0; line-height: 1.15; letter-spacing: .04em; }
.page-heading p { color: var(--muted); margin: 8px 0 0; line-height: 1.55; }
.page-stats { margin-bottom: 19px; }
.filters { min-height: 62px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 17px; border-bottom: 1px solid var(--line); }
.filters h2 { font-size: 1rem; margin: 0 auto 0 0; }
.control { min-width: 0; padding: 8px 10px; border: 1px solid #d9e0d6; border-radius: 8px; color: var(--ink); background: #fff; font-size: .88rem; }
select.control { appearance: none; padding-right: 31px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23576757' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-position: right 10px center; background-repeat: no-repeat; }
.table-scroll { overflow-x: auto; }
.records { width: 100%; border-collapse: collapse; text-align: left; }
.records th, .records td { padding: 12px 15px; }
.records th { color: var(--muted); font-size: .84rem; background: #f8faf6; font-weight: 650; white-space: nowrap; }
.records td { font-size: .9rem; border-top: 1px solid #edf0eb; }
.records td:first-child { padding-left: 17px; }
.records td:not(:first-child) { white-space: nowrap; }
.records td:last-child { text-align: right; }
.records tbody tr:hover { background: #fafbf8; }
.ledger-records .ledger-note { display: block; min-width: 5rem; max-width: 28rem; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }
.payroll-records th:not(:first-child):not(:last-child),
.payroll-records td:not(:first-child):not(:last-child) { text-align: right; }
.payroll-records td { font-variant-numeric: tabular-nums; }
.row-title { display: block; font-weight: 680; overflow-wrap: anywhere; }
.row-meta { display: block; color: var(--subtle); font-size: .77rem; margin-top: 4px; }
.empty { display: grid; justify-items: center; text-align: center; gap: 9px; padding: 32px 18px; color: var(--muted); }
.empty strong { color: var(--ink); }
.empty p { margin: 0; font-size: .875rem; }
.record-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 15px; }
.record-cards.single-column { grid-template-columns: minmax(0, 1fr); }
.entry-card { border: 1px solid var(--line); border-radius: 11px; padding: 15px; background: #fbfcfa; min-width: 0; }
.entry-card h3 { margin: 9px 0 5px; font-size: 1.05rem; overflow-wrap: anywhere; }
.entry-card p { margin: 6px 0 0; color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.entry-top, .entry-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.entry-bottom { margin-top: 10px; }
.memo-check { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .875rem; cursor: pointer; }
.memo-check input { accent-color: var(--green); width: 17px; height: 17px; }
.meal-schedule { padding: 4px clamp(10px, 1.5vw, 17px) 14px; }
.meal-day + .meal-day { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 13px; }
.meal-day > h3 { margin: 4px 0 11px; font-size: .95rem; color: var(--muted); }
.meal-slot { background: #fbfcfa; border: 1px solid var(--line); border-radius: 10px; padding: 8px 13px; margin-top: 8px; }
.meal-slot-header, .meal-slot li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.meal-slot-header h3, .meal-slot-header h4 { margin: 0; font-size: .96rem; }
.meal-slot-header .button { min-height: 29px; padding: 4px 0 4px 8px; }
.meal-slot ul { list-style: none; margin: 0; padding: 0; }
.meal-slot li { border-top: 1px solid var(--line); padding: 6px 0; }
.meal-slot li strong { display: block; font-size: .91rem; overflow-wrap: anywhere; }
.meal-slot li small, .meal-slot > p { display: block; font-size: .83rem; color: var(--muted); margin: 4px 0 0; }
.meal-slot > p { padding-bottom: 4px; }
.detail { display: grid; gap: 13px; }
.detail p { margin: 0; color: var(--muted); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail h3 { font-size: .9rem; margin: 0 0 4px; }
.detail dl { margin: 0; }
.detail dl div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.detail dd { margin: 0; }

dialog { width: min(490px, calc(100% - 28px)); max-height: calc(100dvh - 32px); overflow: auto; border: 1px solid var(--line); border-radius: 15px; padding: 0; color: var(--ink); background: var(--surface); box-shadow: 0 22px 80px #1e2e2640; }
dialog::backdrop { background: #1b2c23a0; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 17px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 1.13rem; overflow-wrap: anywhere; }
.dialog-body { padding: 16px 18px 20px; }
.release-channel { display: inline-block; padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: .75rem; line-height: 1.3; }
.release-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.release-stats > div { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; }
.release-stats dt, .release-row time, .release-meta { color: var(--muted); font-size: .8rem; }
.release-stats dd { margin: 2px 0 0; font-size: 1.2rem; font-weight: 750; }
.release-list { display: grid; gap: 7px; list-style: none; padding: 0; margin: 0; }
.release-list .release-row { display: grid; justify-content: stretch; justify-items: start; gap: 4px; width: 100%; text-align: start; white-space: normal; overflow-wrap: anywhere; }
.release-row-heading, .release-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.release-detail { display: grid; gap: 14px; line-height: 1.55; }
.release-detail h3 { margin: 0 0 4px; font-size: .95rem; }
.release-detail ul { display: grid; gap: 5px; margin: 0; padding-inline-start: 1.3em; }
.release-back { justify-self: start; }
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.quick-choice { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); padding: 9px; border-radius: 10px; min-height: 55px; color: var(--ink); background: #fafbf8; text-align: left; font-size: .875rem; }
.quick-choice:hover { border-color: #9cb69c; background: #f0f4ec; }
.record-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: grid; align-content: start; gap: 5px; min-width: 0; color: var(--ink); font-size: .86rem; font-weight: 650; }
.field.wide { grid-column: 1 / -1; }
.field input, .field textarea, .field select { width: 100%; font-weight: 400; }
.field textarea { resize: vertical; min-height: 62px; }
.comp-fields { grid-column: 1 / -1; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 9px 10px 11px; border: 1px solid var(--line); border-radius: 8px; }
.comp-fields legend { font-size: .86rem; font-weight: 650; padding-inline: 3px; }
.payroll-total { display: flex; justify-content: space-between; align-items: center; gap: 10px; grid-column: 1 / -1; border-radius: 8px; background: #edf3e9; color: var(--deep); padding: 10px 12px; font-size: .9rem; }
.payroll-total output { font-weight: 750; font-variant-numeric: tabular-nums; }
.pay-breakdown dd { font-variant-numeric: tabular-nums; }
.form-actions { display: flex; justify-content: end; flex-wrap: wrap; gap: 8px; margin-top: 6px; grid-column: 1 / -1; }
.form-actions .danger { margin-right: auto; }
.toast { position: fixed; z-index: 12; right: 22px; bottom: 22px; max-width: min(440px, calc(100% - 44px)); opacity: 0; pointer-events: none; transform: translateY(8px); padding: 11px 16px; border-radius: 10px; background: #2e4433; color: #fff; font-size: .9rem; transition: opacity .18s, transform .18s; }
.toast.visible { opacity: 1; transform: none; }
.scrim { border: 0; }

@media (max-width: 1050px) {
  .layout { grid-template-columns: 192px minmax(0, 1fr); }
  .main { padding-inline: 23px; }
  .topbar { padding-inline: 23px; }
}
@media (max-width: 800px) {
  .layout { display: block; }
  .sidebar { position: fixed; z-index: 6; inset: 0 auto 0 0; width: 225px; transform: translateX(-100%); transition: transform .2s; visibility: hidden; }
  .sidebar.open { transform: none; visibility: visible; }
  .scrim { position: fixed; inset: 0; z-index: 5; background: #17281f6b; }
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 7px; min-height: 0; padding: 8px 13px; }
  .topbar-tools { display: contents; }
  .topbar .breadcrumb > [data-text], .topbar .breadcrumb > [data-icon], .topbar .today-label { display: none; }
  .menu-toggle { display: grid; flex: 0 0 44px; width: 44px; height: 44px; margin-inline: -6px 4px; }
  .topbar .topbar-more { display: inline-flex; grid-column: 2; grid-row: 1; }
  .topbar #quick-add { grid-column: 3; grid-row: 1; }
  .topbar :is(.button, .language-switch) { min-height: 44px; }
  .topbar .button { padding: 7px 9px; }
  .topbar-actions { display: none; grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; gap: 7px; padding-top: 8px; border-top: 1px solid var(--line); }
  .topbar-more[aria-expanded="true"] + .topbar-actions { display: flex; }
}
@media (max-width: 580px) {
  .main { padding: 15px 13px 25px; }
  .hero { min-height: 105px; padding: 19px; background-position: 61% center; }
  .home-calendar { padding: 0 8px 8px; }
  .home-calendar .card-header { padding-inline: 4px; }
  .home-calendar-table { border-spacing: 2px; }
  .overview { margin-top: 19px; }
  .stats { gap: 6px; }
  .stat { padding: 9px 7px 10px; }
  .stat-top { gap: 5px; font-size: .78rem; }
  .stat-top .symbol { width: 25px; height: 25px; font-size: .79rem; border-radius: 7px; }
  .stat-value { font-size: clamp(.91rem, 4.4vw, 1.46rem); }
  .stat small { font-size: .73rem; }
  .home-columns, .record-cards { grid-template-columns: 1fr; }
  .home-columns { margin-top: 13px; gap: 11px; }
  .card-header { padding-inline: 12px; }
  .activity, .meal-body { padding-inline: 12px; }
  .filters { padding-inline: 10px; gap: 7px; }
  .filters h2 { flex: 1 0 100%; }
  .records th, .records td { padding-inline: 9px; }
  .records td:first-child { padding-left: 10px; min-width: 105px; }
  .page-heading { align-items: flex-start; gap: 10px; margin-bottom: 16px; }
  .page-heading h1 { font-size: clamp(1.65rem, 6.7vw, 2rem); }
  .page-heading p { font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Grouped overview */
.nav-group { gap: 3px; margin-bottom: 15px; }
.nav-link { min-height: 40px; padding-block: 8px; }
.brand { margin-bottom: 29px; }
.home-columns { margin-top: 0; align-items: stretch; }
.home-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.home-link { padding: 13px 16px; border-radius: 13px; min-height: 63px; }
.home-link:hover { background: #f4f7f1; }
.home-list { padding: 5px; display: grid; grid-template-rows: repeat(3, 1fr); }
.home-list .home-link { border-radius: 9px; }
.home-list .home-link + .home-link { border-top: 1px solid #edf0e9; }
.expense-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quick-section h3 { font-size: .85rem; color: var(--muted); margin: 0 0 7px; }
.quick-section + .quick-section { margin-top: 13px; }
.field-hint { color: var(--muted); margin: 0; font-size: .84rem; line-height: 1.6; grid-column: 1 / -1; }

/* Work lists and calendar */
.member-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; margin-bottom: 20px; }
.member-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 650; font-size: .87rem; }
.member-switch { display: flex; gap: 3px; padding: 3px; max-width: 100%; min-width: 0; border: 1px solid #e1e6dc; border-radius: 10px; background: #eaf0e7; }
.member-switch a { display: grid; place-items: center; min-width: 0; overflow-wrap: anywhere; text-align: center; padding: 6px 13px; border-radius: 7px; color: #4d5c50; font-size: .86rem; font-weight: 650; }
.member-switch a:hover { background: #f3f6f1; }
.member-switch a[aria-current="page"] { background: #fff; box-shadow: 0 1px 3px #27432c1a; color: var(--deep); font-weight: 750; }
.overtime-stats { grid-template-columns: minmax(0, 15rem); }
.overtime-stats .stat-value { font-size: clamp(1.03rem, 1.7vw, 1.6rem); letter-spacing: -.04em; }
.comp-balance { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 13px 16px; margin-bottom: 16px; }
.comp-balance > div { flex: 1 1 12rem; }
.comp-balance h2 { font-size: 1rem; margin: 0; }
.comp-balance p { margin: 4px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.comp-balance > strong { color: var(--deep); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.calendar-layout { display: grid; grid-template-columns: minmax(0, 2.08fr) minmax(235px, 1fr); align-items: start; gap: 15px; }
.calendar-card { padding: 14px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 0 0 12px; }
.calendar-head h2 { margin: 0; font-size: 1.12rem; }
.calendar-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.calendar-controls .button, .calendar-controls .control { min-height: 34px; padding: 6px 9px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-weekday { padding: 5px 0 8px; text-align: center; color: var(--muted); font-size: .81rem; }
.cal-weekday:nth-child(n+6) { color: #806b57; }
.cal-day, .cal-empty { min-height: 62px; border: 1px solid #eaede7; border-radius: 8px; }
.cal-empty { background: #f7f8f5; border-color: #f0f2ee; }
.cal-day { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 2px; min-width: 0; padding: 6px; color: var(--ink); background: #fdfdfc; font-size: .87rem; text-align: left; }
.cal-day:hover { border-color: #9db097; background: #f3f6f1; }
.cal-day.has-records { background: #eff4ec; border-color: #e1eade; }
.cal-day[aria-pressed="true"] { border-color: #759174; box-shadow: inset 0 0 0 1px #759174; background: #e6efe1; }
.cal-day[aria-current="date"] .cal-number { background: var(--green); color: #fff; }
.cal-number { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.cal-duration { padding: 2px 4px; border-radius: 4px; background: #dee9db; color: #325333; font-size: .73rem; font-weight: 730; white-space: nowrap; }
.day-card .card-header { flex-wrap: wrap; }
.day-total { padding: 0 17px 11px; color: var(--muted); font-size: .88rem; }
.day-total strong { color: var(--deep); }
.day-entries { padding: 0 17px 8px; margin: 0; list-style: none; }
.day-entries li { padding: 12px 0 6px; border-top: 1px solid var(--line); }
.day-item-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.day-item-top strong { font-size: .9rem; overflow-wrap: anywhere; }
.day-entries p { margin: 5px 0 0; font-size: .84rem; color: var(--muted); }
.day-entries .button { padding-left: 0; }

/* Shopping */
.shopping-list { list-style: none; margin: 0; padding: 0 17px; }
.shopping-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; }
.shopping-list li + li { border-top: 1px solid var(--line); }
.shopping-check { display: flex; align-items: center; gap: 11px; cursor: pointer; min-width: 0; }
.shopping-check input { width: 20px; height: 20px; flex: none; accent-color: var(--green); }
.shopping-check strong { display: block; overflow-wrap: anywhere; }
.shopping-check small { color: var(--muted); display: block; margin-top: 3px; font-size: .82rem; overflow-wrap: anywhere; }
.shopping-check input:checked + span strong { text-decoration: line-through; color: var(--muted); }
.shopping-actions, .shopping-price { display: flex; align-items: center; gap: 6px; }
.shopping-actions { flex-shrink: 0; gap: 10px; }
.shopping-price { color: var(--muted); font-size: .87rem; }
.shopping-price .control { width: clamp(74px, 10vw, 115px); font-variant-numeric: tabular-nums; }

@media (max-width: 1000px) {
  .calendar-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 580px) {
  .home-pair { gap: 8px; }
  .home-pair .home-link { padding-inline: 8px; gap: 7px; }
  .home-pair .symbol { width: 28px; height: 28px; font-size: .82rem; }
  .member-bar { margin-bottom: 14px; }
  .calendar-card { padding: 10px 8px; }
  .calendar-grid { gap: 3px; }
  .cal-day, .cal-empty { min-height: 48px; border-radius: 6px; }
  .cal-day { padding: 3px 2px; }
  .cal-duration { padding: 1px 2px; font-size: .69rem; }
  .cal-weekday { font-size: .77rem; }
  .shopping-list { padding-inline: 10px; }
  .shopping-actions { gap: 3px; }
}
