:root {
  color-scheme: light;
  --paper: #f7f1e7;
  --surface: #fffbf5;
  --card-tint: #f5eadb;
  --ink: #39271f;
  --muted: #705b4d;
  --primary: #75462f;
  --deep: #54311f;
  --line: #e1d2c1;
  --input-line: #a68c77;
  --brass: #a77535;
  --brass-light: #efe1c4;
  --focus: #895a20;
  --ok: #315b43;
  --ok-soft: #e9efe5;
  --warn: #704c19;
  --warn-soft: #faecd1;
  --danger: #893c32;
  --danger-soft: #fae9e3;
  --shadow: 0 2px 8px rgb(84 49 31 / .045);
  --radius: 16px;
  --control: 10px;
  --nav-height: 68px;
  --body-font: Roboto, "Segoe UI", system-ui, -apple-system, sans-serif;
  --display-font: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 0; background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 0; color: var(--ink); background: var(--paper); font: 400 1rem/1.55 var(--body-font); }
img, video { display: block; max-width: 100%; height: auto; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
::selection { color: var(--ink); background: #eed8b6; }
button, input, select, textarea { font: inherit; }
button, select, summary, [role="button"] { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: default; }
a { color: var(--primary); text-underline-offset: .16em; }
a:hover { color: var(--deep); }
h1, h2, h3, h4, p { margin: 0; overflow-wrap: anywhere; }
h1, h2, h3, h4 { color: var(--ink); }
h1, h2 { font-family: var(--display-font); font-weight: 700; }
h1 { font-size: clamp(1.85rem, 4vw, 2.75rem); line-height: 1.09; letter-spacing: -.035em; }
h2 { font-size: clamp(1.25rem, 2.35vw, 1.65rem); line-height: 1.22; letter-spacing: -.024em; }
h3 { font-size: 1.04rem; line-height: 1.35; }
h4 { font-size: 1rem; line-height: 1.4; }
small, .small { font-size: .85rem; }
strong, b { font-weight: 700; }
ul, ol { margin-block: 0; padding-inline-start: 1.3rem; }
hr { width: 100%; border: 0; border-top: 1px solid var(--line); }
.muted, .hint, .help { color: var(--muted); }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .045em; }
.num, .amount, .money, time { font-variant-numeric: tabular-nums; }
.sr-only, .visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Sign in and account security */
.login { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); }
.login-art {
  position: relative; isolation: isolate; overflow: hidden; min-width: 0; min-height: clamp(144px, 23svh, 242px);
  display: flex; align-items: flex-start; padding: clamp(20px, 4.2vw, 56px);
  padding-top: max(clamp(20px, 4.2vw, 56px), env(safe-area-inset-top)); background: #6a4c39;
}
.login-art .login-scene, .login-art > img:not(.brand-mark) {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none;
  object-fit: cover; object-position: center 55%; filter: sepia(.8) saturate(.75) brightness(.94);
}
.login-art::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(112deg, rgb(52 32 21 / .74), rgb(89 56 34 / .19) 53%, rgb(65 43 27 / .11));
}
.wordmark {
  display: inline-flex; flex-direction: column; align-items: center; font: 700 clamp(1.45rem, 2.9vw, 2.3rem)/.96 var(--display-font);
  letter-spacing: -.04em; text-align: center;
}
.wordmark > span + span { margin-top: .18em; font-size: .71em; letter-spacing: .13em; }
.login-art .wordmark { color: #fff5de; text-shadow: 0 1px 5px rgb(48 28 17 / .6); }
.login-panel {
  display: grid; place-items: center; min-width: 0; background: var(--surface);
  padding: clamp(24px, 6vw, 60px) max(clamp(20px, 5vw, 64px), env(safe-area-inset-right))
    max(clamp(24px, 6vw, 60px), env(safe-area-inset-bottom))
    max(clamp(20px, 5vw, 64px), env(safe-area-inset-left));
}
.login-inner { display: grid; align-content: start; gap: 13px; width: min(100%, 26rem); min-width: 0; }
.login-inner h1 { font-size: clamp(1.95rem, 4vw, 3.05rem); }
.login-inner > .wordmark { justify-self: start; }
.login-inner form, .password-form { display: grid; gap: 17px; min-width: 0; }
.login-inner form { margin-top: 10px; }
.login-panel form > button[type=submit], .password-form > button[type=submit] { width: 100%; min-height: 48px; }
.login .brand-mark, .password-card > .brand-mark { display: block; width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.password-page {
  display: grid; place-items: center; min-height: 100vh; min-height: 100svh; background: var(--paper);
  padding: max(20px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}
.main .password-page { min-height: auto; padding: 0; place-items: start; }
.password-card {
  display: grid; gap: 17px; width: min(100%, 29rem); min-width: 0; padding: clamp(20px, 4.5vw, 38px);
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow);
}
.password-card h1 { font-size: clamp(1.65rem, 3vw, 2.3rem); }
.password-message { color: var(--muted); font-size: .93rem; }
.password-message.error, .password-message[role="alert"] { color: var(--danger); }
.password-message:empty { display: none; }
.password-field { display: grid; gap: 6px; min-width: 0; font-weight: 650; }
.password-control {
  display: flex; align-items: stretch; width: 100%; min-width: 0; min-height: 46px;
  border: 1px solid var(--input-line); border-radius: var(--control); background: var(--surface);
}
.password-control:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.password-control input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]) {
  flex: 1 1 0; width: 0; min-width: 0; min-height: 44px; border: 0; border-radius: inherit; background: transparent;
}
.password-control input:focus-visible { outline: 0; }
.password-control .password-toggle {
  flex: none; display: inline-flex; justify-content: center; align-items: center; gap: 4px; width: auto;
  min-width: 44px; min-height: 44px; padding: 0 10px; border: 0; border-radius: var(--control);
  background: transparent; color: var(--primary); font-size: .88rem; font-weight: 650; line-height: 1.2;
}
.password-control .password-toggle:hover { color: var(--deep); background: var(--card-tint); }
.password-control .password-toggle:focus-visible { outline-offset: -3px; }
.password-toggle svg { width: 20px; height: 20px; }
.password-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.account-security { display: grid; align-items: start; justify-items: start; gap: 10px; min-width: 0; }
.account-security > form, .account-security .password-form { width: min(100%, 30rem); }
@media (min-width: 740px) {
  .login { grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); }
  .login-art { min-height: 100vh; min-height: 100svh; }
  .login-art .login-scene { object-position: center; }
  .login-panel { padding: clamp(30px, 6vw, 90px); }
}

/* Shared controls */
button, .btn, a.btn { max-width: 100%; }
.btn, .primary, button[type=submit], button:not([class]) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; min-width: 44px;
  padding: 9px 16px; border: 1px solid transparent; border-radius: var(--control); background: var(--primary);
  color: #fffbf5; font-weight: 650; font-size: .95rem; line-height: 1.29; text-align: center;
  text-decoration: none; white-space: normal; overflow-wrap: anywhere;
}
.btn svg, .primary svg { width: 20px; height: 20px; flex: none; }
.btn:hover, .primary:hover, button[type=submit]:hover, button:not([class]):hover { color: #fffaf2; background: var(--deep); }
.secondary, .btn.secondary, button.secondary {
  border: 1px solid var(--input-line); background: var(--surface); color: var(--primary);
}
.btn.secondary:hover, button.secondary:hover { color: var(--deep); background: var(--card-tint); border-color: var(--primary); }
.btn.danger, button.danger { color: var(--danger); border-color: #cb9a88; background: var(--danger-soft); }
.btn.danger:hover, button.danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
button:disabled, .btn[aria-disabled=true] { opacity: .58; }
form { min-width: 0; }
label, .field { min-width: 0; color: var(--ink); font-size: .93rem; overflow-wrap: anywhere; }
.field { display: grid; gap: 6px; font-weight: 650; }
.field > small, .field > .muted, label small { color: var(--muted); font-size: .82rem; font-weight: 400; }
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]), select, textarea {
  box-sizing: border-box; min-width: 0; max-width: 100%; width: 100%; min-height: 46px;
  padding: 9px 11px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--input-line); border-radius: var(--control); font-size: 1rem; font-weight: 400; line-height: 1.35;
}
input::placeholder, textarea::placeholder { color: #78685a; opacity: 1; }
input[type=file] { font-size: .875rem; }
input[type=file]::file-selector-button {
  background: var(--card-tint); color: var(--primary); border: 0; border-radius: 5px;
  padding: .34rem .6rem; margin-inline-end: 7px; font: inherit; font-weight: 650;
}
input[type=checkbox], input[type=radio] { flex: none; width: 19px; height: 19px; margin: 0; accent-color: var(--primary); }
label:has(> input[type=checkbox]), label:has(> input[type=radio]) {
  display: flex; min-height: 44px; align-items: center; gap: 9px;
}
textarea { resize: vertical; }
input:disabled, select:disabled, textarea:disabled, input[readonly] { color: var(--muted); background: #f2eade; }
fieldset { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--control); }
legend { max-width: 100%; padding: 0 5px; color: var(--ink); font-size: .93rem; font-weight: 700; overflow-wrap: anywhere; }
details { min-width: 0; }
details > summary { min-height: 44px; padding-block: 9px; color: var(--primary); cursor: pointer; font-weight: 650; overflow-wrap: anywhere; }
details[open] > summary { margin-bottom: 6px; }
dialog {
  width: min(28rem, calc(100% - 26px)); max-height: calc(100vh - 36px); max-height: calc(100dvh - 36px);
  overflow: auto; overscroll-behavior: contain; padding: clamp(18px, 4vw, 26px); margin: auto;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 19px;
  box-shadow: 0 16px 50px rgb(55 33 21 / .22);
}
dialog::backdrop { background: rgb(47 32 23 / .5); }
table { width: 100%; border-collapse: collapse; color: var(--ink); font-size: .91rem; }
td, th { padding: 9px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; overflow-wrap: anywhere; }
th { color: var(--deep); background: var(--card-tint); font-weight: 700; }
.table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; }

/* Application shell */
.app-header {
  display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 62px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: max(7px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 7px max(14px, env(safe-area-inset-left));
}
.brand, .brand-small {
  display: inline-flex; align-items: center; gap: 9px; min-width: 0; flex-shrink: 0;
  color: var(--deep); text-decoration: none; font: 700 1.2rem/1.1 var(--display-font); letter-spacing: -.026em;
}
.brand-mark, .brand > img, .brand-small > img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; flex: none; }
.brand-small, .brand .wordmark, .brand-small .wordmark { font-size: 1.07rem; }
.brand-small > img, .brand-small .brand-mark { width: 32px; height: 32px; }
.app-header > .row { justify-content: flex-end; min-width: 0; flex-wrap: nowrap; gap: 8px; }
.account-name { min-width: 0; max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .88rem; line-height: 1.25; }
.app-header .btn { flex: none; min-height: 44px; padding: 7px 12px; font-size: .88rem; }
.layout { min-width: 0; min-height: calc(100svh - 62px); }
.main {
  width: 100%; min-width: 0; max-width: 78rem; margin-inline: auto;
  padding: clamp(16px, 3.5vw, 42px) max(clamp(12px, 3.6vw, 47px), env(safe-area-inset-right))
    calc(var(--nav-height) + env(safe-area-inset-bottom) + 16px) max(clamp(12px, 3.6vw, 47px), env(safe-area-inset-left));
}
.screen-head { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(14px, 2vw, 24px); }
.page-content { display: grid; align-content: start; gap: 14px; min-width: 0; }
.page-content > *, .layout > *, .main > * { min-width: 0; }
.sidebar { display: none; }
.bottom-nav {
  display: flex; align-items: stretch; position: fixed; z-index: 40; inset: auto 0 0; gap: 2px;
  padding: 5px max(5px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -3px 18px rgb(84 49 31 / .085);
}
.navitem {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0; min-height: 46px;
  padding: 9px 12px; border: 1px solid transparent; border-radius: var(--control); color: #604c3c;
  background: transparent; font-size: .95rem; font-weight: 600; line-height: 1.22; text-decoration: none; text-align: start;
}
.nav-icon, .navitem > svg { display: inline-grid; place-items: center; width: 21px; height: 21px; flex: none; color: inherit; }
.nav-icon svg { width: 100%; height: 100%; }
.navitem:hover { color: var(--deep); background: var(--card-tint); }
.navitem.active, .navitem.is-active, .navitem[aria-current=page], .navitem[aria-selected=true] { color: var(--surface); background: var(--primary); }
.bottom-nav .navitem {
  flex: 1 1 auto; justify-content: center; flex-direction: column; min-height: 54px;
  padding: 4px 1px; gap: 3px; text-align: center; font-size: clamp(.75rem, 2.8vw, .8rem); line-height: 1.12;
}
.bottom-nav .navitem span:not(.nav-icon) { white-space: nowrap; }
.bottom-nav .navitem:focus-visible { outline-offset: -3px; }
.bottom-nav .navitem[aria-current=page]:focus-visible { outline-color: #f2dfbd; }
#extra .navitem { width: 100%; min-height: 46px; background: var(--card-tint); }
#extra .navitem[aria-current=page] { background: var(--primary); }
@media (min-width: 900px) {
  .app-header { min-height: 68px; padding: 9px max(30px, calc((100vw - 95rem) / 2)); }
  .layout { display: grid; grid-template-columns: 14.2rem minmax(0, 1fr); max-width: 100rem; margin-inline: auto; min-height: calc(100vh - 68px); }
  .sidebar { display: block; position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; padding: 28px 10px 24px 18px; }
  .sidebar nav { display: grid; gap: 5px; }
  .sidebar .navitem { width: 100%; min-height: 46px; }
  .bottom-nav { display: none; }
  .main { padding-bottom: 46px; }
}
@media (max-width: 410px) {
  .account-name { max-width: 16ch; font-size: .82rem; }
}
@media (max-width: 350px) {
  .bottom-nav { padding-inline: max(2px, env(safe-area-inset-left)) max(2px, env(safe-area-inset-right)); }
  .bottom-nav .navitem { padding-inline: 0; letter-spacing: -.015em; }
  .app-header { padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right)); }
  .brand-small { gap: 6px; font-size: 1rem; }
  .account-name { max-width: 10ch; }
  .main { padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right)); }
}

/* Cards, messages, and navigation within a screen */
.card {
  min-width: 0; padding: clamp(15px, 2.8vw, 26px); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card > h2 + *, .card > h3 + *, .card > h4 + * { margin-top: 8px; }
.card.stack > h2 + *, .card.co-stack > h2 + *, .card.stack > h3 + *, .card.co-stack > h3 + * { margin-top: 0; }
.card .card { padding: 13px; background: #fcf5eb; border-radius: 12px; box-shadow: none; }
.stack, .co-stack { display: grid; align-content: start; gap: 12px; min-width: 0; }
.row, .section-head, .split-row, .co-line, .co-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.row > *, .grid > *, .stack > *, .co-stack > *, .section-head > *, .split-row > *, .co-line > * { min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 13px; min-width: 0; }
.section-head, .split-row, .co-line { justify-content: space-between; }
.section-head + * { margin-top: 8px; }
.card header { min-width: 0; }
.list, .co-list, .pos-list { display: grid; min-width: 0; gap: 0; }
.empty-state, .empty, .co-empty { color: var(--muted); font-size: .93rem; overflow-wrap: anywhere; }
.tag, .pill, .co-tag {
  display: inline-flex; align-items: center; justify-content: center; width: fit-content; max-width: 100%;
  padding: .22rem .6rem; border-radius: 999px; color: #654c37; background: var(--card-tint);
  font-size: .78rem; font-weight: 700; line-height: 1.3; white-space: normal; overflow-wrap: anywhere;
}
.tag.warn, .tag.pending, .pill.pending, .co-tag.attn { color: var(--warn); background: var(--warn-soft); }
.tag.danger, .tag.error, .pill.danger { color: var(--danger); background: var(--danger-soft); }
.tag.ok, .tag.success, .pill.ok, .co-tag.ok { color: var(--ok); background: var(--ok-soft); }
.notice {
  min-width: 0; padding: 11px 15px; border: 1px solid #c5ab82; border-radius: var(--control);
  background: #fcf2dd; color: var(--deep); font-weight: 550; overflow-wrap: anywhere;
}
.notice.error, .notice.danger, .notice[role=alert], .error-box { color: var(--danger); border-color: #d7ac9c; background: var(--danger-soft); }
.notice:empty { display: none; }
.floating-toast {
  position: fixed; z-index: 60; bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 8px);
  left: 50%; transform: translateX(-50%); width: max-content; max-width: min(calc(100vw - 24px), 38rem); box-shadow: 0 5px 22px rgb(63 39 23 / .17);
}
.tabs, .co-tabs { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; min-width: 0; }
.tabs > button, .tabs > a, .co-tabs > button {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
  padding: 8px 12px; border: 1px solid #c8b39c; border-radius: var(--control); color: var(--primary);
  background: var(--surface); font-size: .89rem; font-weight: 650; line-height: 1.24; text-align: center; overflow-wrap: anywhere; text-decoration: none;
}
.tabs > button:hover, .tabs > a:hover, .co-tabs > button:hover { color: var(--deep); background: var(--card-tint); }
.tabs > .active, .tabs > [aria-selected=true], .tabs > [aria-current=page], .tabs > .primary,
.co-tabs > button[aria-pressed=true] { color: var(--surface); background: var(--primary); border-color: var(--primary); }
@media (min-width: 900px) { .floating-toast { bottom: 22px; } }

/* Household payments and treasury */
.money-summary {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px;
  padding: 13px 15px; color: var(--deep); background: #f3e5cd; border: 1px solid #d8bd94;
  border-radius: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.money-summary strong { font-size: clamp(1.14rem, 3.2vw, 1.42rem); line-height: 1.2; }
.money-summary > .split-row { flex: 1 1 auto; }
.pos-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(6.8rem, 8.5rem); align-items: center;
  gap: 6px 12px; padding: 8px 0; min-width: 0; border-bottom: 1px solid var(--line);
}
.pos-row > span, .finance-line strong, .list-item { overflow-wrap: anywhere; }
.pos-row input { text-align: end; font-variant-numeric: tabular-nums; }
.person-check { display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; background: var(--surface); }
.person-check:has(input:checked) { color: var(--deep); background: #f3e7d5; border-color: var(--input-line); }
.person-check > span { min-width: 0; overflow-wrap: anywhere; }
.finance-form, .tab-panel { min-width: 0; }
.co-item-box { display: grid; gap: 10px; }
.finance-line, .co-item-box { min-width: 0; padding: clamp(10px, 2vw, 16px); border: 1px solid var(--line); border-radius: 12px; background: #fbf4e9; }
.list-item { min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.list .list-item + .list-item { margin-top: 7px; }
details.list-item > summary {
  list-style: none; display: grid; gap: 2px; align-content: center; position: relative; min-height: 44px; padding: 3px 22px 3px 0;
}
details.list-item > summary::-webkit-details-marker { display: none; }
details.list-item > summary::after { content: "+"; position: absolute; right: 1px; top: 50%; transform: translateY(-50%); color: var(--primary); font-size: 1.25rem; }
details.list-item[open] > summary::after { content: "−"; }
.tab-panel .grid > .split-row { padding: 11px; border-radius: 9px; background: var(--card-tint); }

/* Agenda, attendance, announcements, and household details */
.co { min-width: 0; display: grid; gap: 14px; }
.co h2, .co h3, .co p { min-width: 0; }
.co p { overflow-wrap: anywhere; }
.co-field { display: grid; gap: 6px; min-width: 0; font-size: .93rem; font-weight: 650; line-height: 1.38; }
.co-field textarea { min-height: 78px; }
.co-fields, .co-split, .co-calendar-layout { display: grid; gap: 12px; min-width: 0; }
.co-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.co-split { align-items: start; }
.co .co-wide { width: 100%; }
.co-small { color: var(--muted); font-size: .87rem; line-height: 1.45; }
.co-list > article, .co-list > div, .co-list > details { min-width: 0; padding-block: 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.co-list > :first-child { padding-top: 0; }
.co-list > :last-child { padding-bottom: 0; border-bottom: 0; }
.co-list article p + p, .co-list article h3 + p { margin-top: 4px; }
.co-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.co-day { min-width: 0; }
.co-day .co-dow, .co-day .co-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.co-day .co-dow span { min-width: 0; padding: 3px 0; color: var(--muted); font-size: .77rem; font-weight: 700; text-align: center; }
.co-day .co-days > button {
  position: relative; width: 100%; min-width: 0; min-height: 44px; padding: 5px 0 8px; color: var(--ink); background: transparent;
  border: 1px solid transparent; border-radius: 9px; font-size: .94rem; font-weight: 550; font-variant-numeric: tabular-nums;
}
.co-day .co-days > button:hover { background: var(--card-tint); color: var(--deep); }
.co-day .co-days > button[aria-current=date] { color: var(--primary); border-color: var(--brass); font-weight: 750; }
.co-day .co-days > button[aria-pressed=true] { color: var(--surface); background: var(--primary); border-color: var(--primary); }
.co-day button i { position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; background: currentColor; border-radius: 100%; }
.co .co-icon-btn { width: 44px; min-height: 44px; padding: 0; font-size: 1.65rem; line-height: 1; }
.co .co-calendar-title { flex: 1 1 auto; margin: 0; text-align: center; font: 700 clamp(1.05rem, 3.8vw, 1.35rem)/1.16 var(--display-font); }
.co .co-jump-month { width: auto; max-width: 64%; }
.co .co-end { align-self: end; }
.co .co-summary { font-size: .95rem; }
.co .co-status-row { display: grid; gap: 8px 14px; align-items: center; }
.co-status-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.co-status-controls label { position: relative; display: inline-flex; cursor: pointer; }
.co-status-controls input {
  position: absolute; top: 50%; left: 50%; width: 1px; height: 1px; opacity: 0; margin: 0; transform: translate(-50%, -50%);
}
.co-status-controls span {
  display: inline-flex; justify-content: center; align-items: center; min-width: 65px; min-height: 44px; padding: 7px 14px;
  border: 1px solid var(--input-line); border-radius: 9px; color: var(--primary); font-weight: 650; background: var(--surface);
}
.co-status-controls input:checked + span { color: var(--surface); background: var(--primary); border-color: var(--primary); }
.co-status-controls input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.co-check { display: flex; align-items: center; min-height: 44px; gap: 9px; }
.co-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.co-date-inline { display: flex; align-items: center; gap: 11px; }
.co-date-inline > div { min-width: 0; }
.co-date-inline .co-date-chip {
  display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 9px;
  background: var(--brass-light); color: var(--deep); font-size: .98rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.co-notice:target, .co-notice[data-focus=true] { outline: 2px solid var(--focus); outline-offset: 3px; scroll-margin-block: 16px; }
.co-hero {
  position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 6px;
  padding: clamp(20px, 4vw, 36px); color: #fff4df; background: #63412e; border-radius: var(--radius);
}
.co-hero::before {
  content: ""; position: absolute; z-index: -2; inset: 0 0 0 auto; width: 57%; pointer-events: none;
  background: #836748 url("./assets/kampung-suradita.webp") center 65% / cover no-repeat;
  filter: sepia(.85) saturate(.7) brightness(.91);
}
.co-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(92deg, #573724 3%, #63412e 39%, rgb(91 57 37 / .88) 59%, rgb(81 53 37 / .21));
}
.co-hero h2, .co-hero p { max-width: 78%; }
.co-hero h2 { color: #fff7e9; font-size: clamp(1.7rem, 3.7vw, 2.55rem); line-height: 1.1; }
.co-hero p { color: #fff0dd; font-size: .94rem; }
.co-hero p:first-child { color: #f8e3c3; font-size: .83rem; font-weight: 600; }
.co-hero .btn { justify-self: start; margin-top: 6px; background: #fff4df; color: var(--deep); border-color: #fff4df; }
.co-hero .btn:hover { background: #f1ddbb; color: var(--deep); }

@media (min-width: 760px) {
  .co-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-calendar-layout { grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr); }
  .co .co-status-row { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 500px) {
  .co-hero h2, .co-hero p { max-width: 89%; }
  .co-hero::before { width: 50%; }
  .co-hero::after { background: linear-gradient(92deg, #573724 0%, #63412e 48%, rgb(87 55 36 / .84) 75%, rgb(81 53 37 / .32)); }
  .co-field, .field { gap: 5px; }
  .password-actions > .btn { flex: 1 1 9rem; }
}
@media (max-width: 350px) {
  .card { padding: 13px; }
  .co-day { margin-inline: -5px; }
  .co-day .co-days, .co-day .co-dow { gap: 1px; }
  .pos-row { grid-template-columns: minmax(0, 1fr) minmax(6.2rem, 7.1rem); column-gap: 8px; }
  .tabs > button, .co-tabs > button { padding-inline: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
  :root { --paper: #fff; --surface: #fff; --ink: #241f1a; --line: #c9c5bc; }
  body { background: #fff; font-size: 10pt; }
  .app-header, .sidebar, .bottom-nav, .notice, .tabs, .co-tabs, .no-print, .screen-head > .btn, .page-content button { display: none !important; }
  .layout, .main, .page-content { display: block; max-width: none; padding: 0; margin: 0; }
  .card { box-shadow: none; margin: .35cm 0; }
  h1, h2, h3 { break-after: avoid; }
  tr, .tag { break-inside: avoid; }
}
