:root {
  color-scheme: light;
  --sidebar: #183d3b;
  --sidebar-active: #2a5751;
  --primary: #16796d;
  --primary-dark: #106155;
  --primary-soft: #edf6f1;
  --canvas: #f5f6f2;
  --surface: #ffffff;
  --ink: #243e36;
  --text: #425b50;
  --muted: #6b7e71;
  --line: #dfe7dd;
  --line-strong: #c5d5c8;
  --mint: #edf9f1;
  --turquoise: #23c8cc;
  --danger: #ad443c;
  --radius: 8px;
  --sidebar-width: 224px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 14px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--canvas); line-height: 1.65; overflow-wrap: break-word; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, a, input, textarea, select { transition: background-color .15s, color .15s, border-color .15s; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid #8fc5b2; outline-offset: 3px; }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; margin: 0; accent-color: var(--primary); }
input::placeholder, textarea::placeholder { color: #8d9e90; opacity: 1; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { flex-shrink: 0; width: 19px; height: 19px; vertical-align: middle; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--ink); }
h1 { margin-bottom: 7px; font-size: 28px; font-weight: 650; letter-spacing: -.55px; line-height: 1.4; }
h2 { margin-bottom: 9px; font-size: 20px; font-weight: 600; line-height: 1.5; }
h3 { margin-bottom: 8px; font-size: 16px; font-weight: 600; }
p { margin-bottom: 14px; }
small { font-size: 12px; }
strong { font-weight: 600; }
dl, dd { margin: 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .94em; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar { position: sticky; top: 0; z-index: 50; display: flex; flex-direction: column; min-width: 0; height: 100vh; height: 100dvh; padding: 27px 15px 20px; overflow-y: auto; background: var(--sidebar); color: #ccddd4; }
.brand { display: flex; align-items: center; gap: 11px; min-height: 46px; margin: 0 7px 38px; color: #f3f8ee; font-size: 18px; font-weight: 600; line-height: 1.5; letter-spacing: .6px; }
.brand:hover { text-decoration: none; }
.brand > svg, .brand-mark { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 40px; padding: 7px; border: 1px solid #92ad99; border-radius: 8px 8px 12px 12px; color: #e5dfbd; }
.brand small, .brand-sub { display: block; margin-top: 3px; color: #a4bfae; font-size: 10px; font-weight: 400; letter-spacing: 1.35px; }
.sidebar nav { display: flex; flex-direction: column; gap: 6px; }
.sidebar > .nav-label { margin: -8px 15px 12px; color: #93b39a; font-size: 11px; letter-spacing: 1.5px; }
.sidebar nav a, .sidebar nav button { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 47px; padding: 11px 15px; border: 1px solid transparent; border-radius: 6px; color: #ccdbcf; background: transparent; font-size: 14px; text-align: left; }
.sidebar nav a:hover, .sidebar nav button:hover { background: #234c43; color: white; text-decoration: none; }
.sidebar nav .active { border-color: #416b58; background: var(--sidebar-active); color: white; }
.sidebar nav .active::before { position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 2px 2px 0; background: #c4b684; content: ""; }
.sidebar nav svg { width: 19px; height: 19px; }
.sidebar nav a > span:first-child { width: 20px; flex-shrink: 0; font-size: 21px; line-height: 1; text-align: center; }
.sidebar-foot { margin: auto 8px 0; padding-top: 26px; color: #a6beb0; font-size: 12px; line-height: 1.9; }
.sidebar-foot > :first-child { padding-top: 17px; border-top: 1px solid #3e5b49; }
.sidebar-foot strong { display: block; color: #d4e1cc; font-size: 13px; font-weight: 500; }
.sidebar-foot .btn { width: 100%; margin-top: 12px; border-color: #4b6e54; color: #d2e3cb; background: transparent; }
.sidebar-foot .btn:hover { background: #305440; }
.sidebar-foot p { margin-bottom: 10px; }
.online-dot { display: inline-block; width: 6px; height: 6px; margin: 0 7px 2px 0; padding: 0 !important; border: 0 !important; border-radius: 50%; background: #98c496; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 35; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; padding: 12px 32px; border-bottom: 1px solid var(--line); background: #fff; }
.topbar > div:first-child { min-width: 0; }
.topbar > span { flex: 1; min-width: 0; overflow: hidden; color: var(--ink); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.topbar > div:first-child > strong { color: var(--ink); font-size: 14px; font-weight: 500; }
.topbar .muted { font-size: 13px; }
.account { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; }
.account > span { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account .avatar { width: 33px; height: 33px; font-size: 13px; }
.account .btn { min-height: 33px; }
.workspace { width: 100%; max-width: 2000px; min-width: 0; margin: 0 auto; padding: 29px 32px 34px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 17px 24px; margin-bottom: 24px; }
.page-head > div { min-width: 0; }
.page-head p { margin: 0; color: var(--muted); font-size: 14px; }
.eyebrow { margin-bottom: 7px; color: #628576; font-size: 10px; font-weight: 600; letter-spacing: 1.65px; text-transform: uppercase; }
.actions, .form-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.actions { flex-shrink: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 39px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 6px; color: #456652; background: #fff; font-size: 14px; font-weight: 500; line-height: 1.45; text-align: center; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #99b99f; background: #f3f8ef; text-decoration: none; }
.btn.primary { border-color: var(--primary); color: #fff; background: var(--primary); }
.btn.primary:hover { border-color: var(--primary-dark); background: var(--primary-dark); }
.btn.ghost { border-color: transparent; color: #658060; background: transparent; }
.btn.ghost:hover { background: #eef4e8; }
.btn.danger { border-color: #e1bbb1; color: var(--danger); background: #fff8f4; }
.btn.danger:hover { border-color: #ce9789; background: #fbe9e1; }
.btn.small { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.btn:disabled, .btn:disabled:hover { border-color: var(--line); color: #8f9d83; background: #f2f5ec; }
.mobile-nav { display: none; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 23px; }
.stat { position: relative; min-width: 0; min-height: 110px; padding: 19px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; text-align: left; }
.stat:first-child { border-color: #c4ddc6; background: #eff6ec; }
.stat > span, .stat > p { display: block; margin: 0 0 7px; color: #718367; font-size: 13px; }
.stat strong { display: block; color: #31573b; font-size: 30px; font-weight: 600; line-height: 1.2; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat small { display: block; margin-top: 7px; color: #748566; font-size: 12px; }
.stat > svg { position: absolute; top: 20px; right: 18px; color: #96ad86; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; margin-bottom: 17px; }
.search { display: flex; flex: 1; align-items: center; gap: 0; min-width: 210px; max-width: 490px; margin: 0; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; }
.search input { flex: 1; width: 100%; min-width: 0; min-height: 40px; padding: 9px 12px; border: 0; border-radius: 6px; outline: none; color: var(--ink); background: transparent; font-size: 14px; }
.search:focus-within { border-color: #79a87c; box-shadow: 0 0 0 2px #e9f3e4; }
.search input:focus-visible { outline: none; }
.search button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 5px; min-height: 34px; margin: 3px; padding: 5px 10px; border: 0; border-radius: 4px; color: #5c8356; background: #f1f7eb; }
.search button:hover { background: #e4f0dc; }
.org-select { display: flex; align-items: center; gap: 10px; width: auto; max-width: 400px; min-height: 42px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); background: #fff; font-size: 12px; white-space: nowrap; }
.org-select select { flex: 1; width: 100%; min-width: 0; max-width: 300px; min-height: 30px; padding: 3px 2px; border: 0; color: var(--ink); background: transparent; font-size: 14px; }
.view-toggle { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #edf2e7; }
.view-toggle button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px 10px; border: 1px solid transparent; border-radius: 4px; color: #788c68; background: transparent; font-size: 13px; }
.view-toggle button.active, .view-toggle button[aria-pressed="true"] { border-color: #d4e1c8; color: #426d3b; background: white; box-shadow: 0 1px 2px rgb(28 63 31 / 3%); }
.view-cards { display: none; }
body.card-mode .view-table, body.cards-mode .view-table { display: none; }
body.card-mode .view-cards, body.cards-mode .view-cards { display: block; }
.sheet-wrap { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid #accfc1; border-radius: 6px; background: var(--mint); }
table.sheet { width: 100%; min-width: 2100px; border-collapse: separate; border-spacing: 0; color: #244c39; background: var(--mint); font-size: 14px; text-align: left; }
.sheet caption { padding: 0; color: #285341; background: #e9f7eb; text-align: center; }
.sheet-title { display: block; max-width: 100%; padding: 22px 18px 18px; border-bottom: 1px solid #b9dacc; color: #285341; background: #e9f7eb; font-size: 22px; font-weight: 600; letter-spacing: 2px; text-align: left; }
@supports (width: 1cqw) {
  .sheet-wrap { container-type: inline-size; }
  .sheet-title { position: sticky; left: 0; width: 100cqw; text-align: center; }
}
.sheet caption > .org-info { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 10px 16px; border-bottom: 1px solid #bad9c7; color: #46684e; background: #e9f6e8; font-size: 14px; font-weight: 400; line-height: 1.7; letter-spacing: 0; text-align: left; }
.sheet caption > .org-info > span { text-align: right; }
.sheet th, .sheet td { padding: 11px 12px; border-right: 1px solid #c4dfd1; border-bottom: 1px solid #c4dfd1; line-height: 1.55; vertical-align: middle; }
.sheet th:last-child, .sheet td:last-child { border-right: 0; }
.sheet tr:last-child td { border-bottom: 0; }
.sheet thead th { height: 46px; background: var(--turquoise); color: #fff; font-size: 14px; font-weight: 600; text-align: center; white-space: normal; }
.sheet thead tr:last-child th { background: var(--turquoise); font-weight: 500; }
.sheet .org-info th, .sheet .org-info td { height: auto; padding: 10px 15px; border-right: 0; background: #e5f4e9; color: #345b42; font-size: 14px; font-weight: 500; text-align: left; }
.org-info > td, .org-info > th { white-space: normal; }
.sheet tbody td { min-height: 46px; background: #f0faf1; }
.sheet tbody tr:hover td { background-color: #e5f3e7; }
.sheet tbody tr.household-start td { border-top: 2px solid #84b79c; }
.sheet tbody tr.household-start:first-child td { border-top: 0; }
.sheet td:nth-child(1), .sheet td:nth-child(4), .sheet td:nth-child(5), .sheet td:nth-child(7) { text-align: center; }
.sheet td:nth-child(3) { min-width: 110px; font-weight: 500; }
.sheet td:nth-child(6) { min-width: 186px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet td:nth-child(12) { min-width: 240px; max-width: 330px; overflow-wrap: anywhere; }
.sheet td:nth-child(13) { min-width: 132px; white-space: nowrap; }
.sheet td:nth-child(14) { min-width: 160px; max-width: 250px; overflow-wrap: anywhere; }
.sheet td.row-actions, .sheet th.row-actions { position: sticky; right: 0; z-index: 5; width: 120px; min-width: 120px; padding-right: 10px; padding-left: 10px; border-left: 1px solid #a4c9b4; background: #eaf5e8; box-shadow: -4px 0 8px rgb(57 96 47 / 4%); }
.sheet th.row-actions { z-index: 6; background: var(--turquoise); }
.row-actions .btn { min-height: 30px; padding: 4px 6px; border-color: #bdcfb5; font-size: 14px; }
.row-actions .btn + .btn { margin-left: 4px; }
.sheet a, .sheet button.link { padding: 0; border: 0; color: #256e42; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.cell-link { padding: 0; border: 0; color: inherit; background: transparent; font-size: 14px; text-align: inherit; }
.cell-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.sheet-footnote { margin: 11px 2px; color: var(--muted); font-size: 12px; }
.result-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 13px; color: var(--muted); font-size: 13px; }
.result-summary strong { color: #54774a; font-size: 14px; font-weight: 500; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cards.view-cards { display: none; }
body.card-mode .cards.view-cards, body.cards-mode .cards.view-cards { display: grid; }
.member-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: white; }
.card-head { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 18px 19px 15px; }
.avatar { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border: 1px solid #d6e3cd; border-radius: 50%; color: #638853; background: #f0f5e9; font-size: 14px; font-weight: 500; }
.avatar.female { border-color: #e9dfc7; color: #9a8354; background: #f8f4e7; }
.card-head .title { flex: 1; min-width: 0; }
.card-head h3, .card-head .title strong { display: block; margin: 0; color: var(--ink); font-size: 17px; font-weight: 600; }
.card-head .title p, .card-head .title small { display: block; margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.name-link { display: block; min-height: auto; padding: 0; border: 0; color: var(--ink); background: transparent; font-size: 17px; font-weight: 600; text-align: left; }
.name-link:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.card-head > .tag:last-child { align-self: flex-start; }
.tag { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 3px 8px; border: 1px solid #dce7d2; border-radius: 4px; color: #638247; background: #f2f7eb; font-size: 12px; font-weight: 400; line-height: 1.5; white-space: nowrap; }
.tag.amber { border-color: #e8dcb8; color: #8d742e; background: #fbf7e7; }
.tag.error, .tag.red { border-color: #e7c5b9; color: #a5654b; background: #fff2e9; }
.tag.blue { border-color: #cee0dd; color: #4b7b76; background: #eff6f4; }
.tag.gray { border-color: #e0e6d9; color: #75866b; background: #f4f7ef; }
.tag.head { border-color: #bcd8be; color: #4e8053; background: #eaf5e9; }
.card-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; padding: 0 19px 19px; }
.card-fields > div { min-width: 0; }
.card-fields > .wide { grid-column: 1 / -1; }
.card-fields > div:last-child { grid-column: 1 / -1; }
.card-fields dt { margin: 0 0 3px; color: #7a8e6c; font-size: 12px; }
.card-fields dd { color: #496438; font-size: 14px; overflow-wrap: anywhere; }
.card-actions { display: flex; align-items: stretch; border-top: 1px solid #e3e9db; background: #fbfdf8; }
.card-actions button, .card-actions a { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 5px; min-width: 0; min-height: 44px; padding: 9px 5px; border: 0; border-right: 1px solid #e3e9db; border-radius: 0; color: #5c7e45; background: transparent; font-size: 13px; font-weight: 500; }
.card-actions .danger { color: #a06d4e; }
.card-actions > :last-child { border-right: 0; }
.card-actions button:hover, .card-actions a:hover { background: #f0f6e7; text-decoration: none; }
.card-actions svg { width: 16px; height: 16px; }
.household-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.household-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; text-align: left; }
.household-card:hover { border-color: #aac598; background: #fcfff7; }
.household-card > .tag:first-child { margin-bottom: 12px; }
.household-card > div:last-child { display: flex; align-items: baseline; gap: 5px; margin-top: 16px; color: var(--muted); font-size: 13px; }
.household-card > div:last-child > strong { color: #4d7b35; font-size: 22px; font-weight: 500; }
.household-card > div:last-child > span { margin-left: auto; color: var(--primary); font-size: 12px; }
.household-card h3 { margin: 0 0 7px; font-size: 17px; }
.household-card p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.household-card .actions { justify-content: flex-start; margin-top: 17px; }
.household-card .tag { margin: 0 5px 5px 0; }
.pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.pagination > div { display: flex; align-items: center; gap: 9px; }
.pagination > label { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pagination select { min-height: 34px; padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--text); background: white; }
.pagination .btn { min-width: 35px; min-height: 34px; padding: 5px 9px; }
.pagination strong { color: var(--primary); font-weight: 500; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 280px; padding: 44px 24px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); background: white; text-align: center; }
.empty > svg { width: 36px; height: 36px; margin-bottom: 5px; color: #9ab687; }
.empty h2, .empty h3 { margin: 0; font-size: 17px; font-weight: 500; }
.empty p { max-width: 440px; margin: 0; font-size: 14px; }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; margin: 15px 0; border: 1px solid #dce6cd; border-radius: 6px; color: #69864e; background: #f6faef; font-size: 14px; line-height: 1.75; }
.notice svg { width: 18px; height: 18px; margin-top: 3px; }
.notice p { margin: 0; }
.notice.error { border-color: #e6c6b8; color: #a36b4e; background: #fff5ec; }
.notice.success { border-color: #cce1b5; color: #638947; background: #f4fae9; }
.notice.warning { border-color: #e7dfbb; color: #8b7b3c; background: #fffbed; }
.table-standard { width: 100%; border-collapse: collapse; background: white; text-align: left; font-size: 14px; }
.table-standard th, .table-standard td { padding: 14px 17px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-standard th { color: #728861; background: #f8fbf3; font-size: 14px; font-weight: 500; }
.table-standard tbody tr:hover { background: #fbfdf7; }
.table-standard td { overflow-wrap: anywhere; }
.table-standard .mono { white-space: nowrap; }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.panel + .panel { margin-top: 20px; }
.panel > h2 { margin: 0; padding: 21px 22px 17px; font-size: 17px; }
.panel > p:last-child { margin: 0; padding: 17px 22px 20px; font-size: 13px; }
.request-list > article.panel { margin-bottom: 16px; padding: 22px; }
.request-list > article.panel > .tag { margin-bottom: 12px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 16px; }
.table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.timeline { position: relative; padding: 0 0 0 22px; list-style: none; }
.timeline::before { position: absolute; left: 4px; top: 8px; bottom: 20px; width: 1px; background: #d9e5ca; content: ""; }
.timeline > li, .timeline > div { position: relative; padding: 0 0 24px 5px; font-size: 14px; }
.timeline > li::before, .timeline > div::before { position: absolute; top: 8px; left: -22px; width: 9px; height: 9px; border: 2px solid #bdd3a9; border-radius: 50%; background: white; content: ""; }
.timeline strong { display: block; color: #597b3e; font-size: 15px; font-weight: 500; }
.timeline p { margin: 5px 0; color: #748d5b; font-size: 14px; }
.timeline small { color: #82956a; font-size: 12px; }
.panel > .timeline { margin: 26px 24px 0; }
.timeline > article { position: relative; padding: 0 0 24px 5px; }
.timeline-dot { position: absolute; top: 8px; left: -22px; width: 9px; height: 9px; border: 2px solid #b7cfa1; border-radius: 50%; background: white; }
.timeline time { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.panel > .pagination { margin: 0; padding: 16px 22px; border-top: 1px solid var(--line); }

.drawer, .editor-dialog { padding: 0; border: 1px solid var(--line); background: white; color: var(--text); box-shadow: 0 20px 80px rgb(20 49 24 / 18%); }
.drawer::backdrop, .editor-dialog::backdrop { background: rgb(20 42 34 / 36%); }
.drawer { position: fixed; inset: 0 0 0 auto; width: 720px; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100dvh; margin: 0; border-width: 0 0 0 1px; border-radius: 0; }
.editor-dialog { width: 960px; max-width: calc(100vw - 48px); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); border-radius: 10px; }
.drawer[open], .editor-dialog[open] { display: flex; flex-direction: column; animation: reveal .15s ease-out; }
.drawer > form, .editor-dialog > form { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; flex-shrink: 0; padding: 23px 27px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 21px; }
.drawer-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.drawer-head button { flex-shrink: 0; }
.drawer-body { min-height: 0; padding: 24px 27px; overflow-y: auto; overscroll-behavior: contain; }
.drawer-body > h3 { margin-top: 25px; }
.drawer-body > h3:first-child { margin-top: 0; }
.drawer-foot { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; flex-shrink: 0; margin-top: auto; padding: 17px 27px; border-top: 1px solid var(--line); background: #fcfdf8; }
.drawer-foot > .muted:first-child, .drawer-foot > small:first-child { margin-right: auto; }
.details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 25px; margin: 0 0 22px; }
.details-grid > div { min-width: 0; padding: 13px 0; border-bottom: 1px solid #e9eee0; }
.details-grid > .wide { grid-column: 1 / -1; }
.details-grid dt { margin: 0 0 5px; color: #778e60; font-size: 14px; }
.details-grid dd { margin: 0; color: #3f602b; font-size: 14px; overflow-wrap: anywhere; }
.family-row { display: flex; align-items: center; gap: 13px; width: 100%; padding: 13px 0; border: 0; border-bottom: 1px solid var(--line); color: var(--text); background: transparent; text-align: left; }
.family-row > div, .family-row > span:not(.avatar):not(.tag) { flex: 1; min-width: 0; }
.family-row strong { display: block; color: #506e3d; font-size: 14px; font-weight: 500; }
.family-row small { display: block; color: var(--muted); font-size: 12px; }
.family-row > .tag { margin-left: auto; }
.family-row > span:last-child:not(.tag) { flex: 0; color: var(--muted); font-size: 20px; }
.family-row .avatar { width: 35px; height: 35px; font-size: 12px; }
.family-row button { flex-shrink: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
label.field { position: relative; }
label.field > .required { position: absolute; top: 0; right: 2px; }
.field.wide, .form-grid > .wide { grid-column: 1 / -1; }
.field label, label.field { color: #5f7950; font-size: 14px; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea,
.login-card input, .login-card select, .login-card textarea { width: 100%; min-width: 0; min-height: 41px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 5px; background: white; color: var(--ink); font-size: 14px; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover, .login-card input:hover { border-color: #98b77d; }
.field input:focus, .field select:focus, .field textarea:focus, .login-card input:focus { border-color: #6d9e58; }
.field textarea { min-height: 91px; resize: vertical; }
.field input[readonly], .field textarea[readonly] { color: #829568; background: #f7f9f0; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #ce9076; }
.field-hint { margin: 0; color: #7c9067; font-size: 12px; line-height: 1.7; }
.form-error { margin: 8px 0; color: var(--danger); font-size: 14px; }
.form-error:empty { display: none; }
.form-actions { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.editor-dialog > form > .form-actions { flex-shrink: 0; margin: 0; padding: 17px 27px; background: #fcfdf8; }
.household-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 13px; padding: 17px; border: 1px solid #d8e3cb; border-radius: 6px; background: #f8fbf1; }
.household-picker > .field:nth-of-type(2), .household-picker > .field-hint { grid-column: 1 / -1; }
.source-note { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.required { margin-left: 3px; color: #b67b52; }
.editor-dialog .form-grid { margin-bottom: 7px; }
.editor-dialog .notice { margin-top: 0; }
.close { display: inline-grid; place-items: center; width: 33px; height: 33px; padding: 6px; border: 0; border-radius: 5px; color: #829368; background: transparent; }
.close:hover { background: #f0f5e6; }

.login-shell { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); min-height: 100vh; min-height: 100dvh; background: #fafbf6; }
.login-brand { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 60px max(45px, 10vw); background: var(--sidebar); color: #f2f7e9; }
.login-brand > svg { width: 55px; height: 55px; margin-bottom: 29px; padding: 10px; border: 1px solid #8fa979; border-radius: 10px; color: #d6d8ad; }
.login-brand > .brand-mark { width: 52px; height: 58px; margin-bottom: 25px; padding: 0; font-size: 31px; font-weight: 400; }
.login-brand h1 { max-width: 320px; margin-bottom: 21px; color: #f3f6e8; font-size: 34px; line-height: 1.55; letter-spacing: 1.4px; }
.login-brand p { max-width: 350px; color: #afc39e; font-size: 15px; line-height: 2; }
.login-brand .eyebrow { margin-bottom: 16px; color: #a2bb8a; font-size: 11px; letter-spacing: 2px; }
.login-brand footer, .login-brand > small:last-child { position: absolute; bottom: 37px; left: max(45px, 10vw); color: #91ac79; font-size: 12px; }
.login-card { align-self: center; width: 100%; max-width: 470px; margin: 45px auto; padding: 36px 38px; }
.login-card h2 { margin-bottom: 8px; font-size: 25px; font-weight: 600; }
.login-card > p { margin-bottom: 26px; color: var(--muted); font-size: 14px; }
.login-card form { display: flex; flex-direction: column; gap: 18px; }
.login-card form > label { display: flex; flex-direction: column; gap: 7px; color: var(--text); font-size: 14px; }
.login-card form > .btn.primary { width: 100%; min-height: 43px; margin-top: 4px; }
.login-tabs { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; border-bottom: 1px solid var(--line); }
.login-tabs button { position: relative; min-height: 41px; padding: 8px 1px 12px; border: 0; color: #859671; background: transparent; font-size: 14px; }
.login-tabs button.active { color: var(--primary); font-weight: 500; }
.login-tabs button.active::after { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--primary); content: ""; }
.login-card > .login-tabs { justify-content: space-between; gap: 12px; margin: 23px 0 0; padding-top: 12px; border-top: 1px solid var(--line); border-bottom: 0; }
.login-card > .login-tabs .btn { padding-right: 0; padding-left: 0; font-size: 13px; }
.login-foot { margin-top: 17px; color: #859872; font-size: 12px; text-align: center; }
.login-card .notice { font-size: 13px; }
.login-card .field-hint { margin-top: 7px; }
.account-panel { width: 100%; max-width: 810px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.account-panel h2 { font-size: 19px; }
.account-panel form { margin-top: 24px; }
.account-panel .form-actions { justify-content: flex-start; }
.mobile-tabs { display: none; }
.nav-overlay, .nav-backdrop, .shell > [data-action="close-nav"] { display: none; }
.app-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 100vh; min-height: 100dvh; padding: 24px; color: var(--muted); font-size: 14px; text-align: center; }
.loading-mark { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid #c8d9ba; border-radius: 13px; color: #608343; background: #eef5e6; font-size: 23px; }
#toast { position: fixed; top: 86px; right: 24px; z-index: 200; max-width: min(480px, calc(100vw - 32px)); pointer-events: none; }
#toast:empty { display: none; }
#toast:not(.visible) { display: none; }
#toast:not(:empty) { padding: 13px 18px; border: 1px solid #c2dba8; border-radius: 7px; color: #507d32; background: #f7ffee; box-shadow: 0 5px 23px rgb(39 67 18 / 12%); font-size: 14px; line-height: 1.75; }
#toast.error { border-color: #e2c0aa; color: #a86a47; background: #fff8ed; }
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 1700px) {
  .workspace { padding: 34px 42px; }
  .topbar { padding-right: 42px; padding-left: 42px; }
  .cards, .household-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  :root { --sidebar-width: 200px; }
  .sidebar { padding-right: 12px; padding-left: 12px; }
  .brand { gap: 8px; margin-left: 3px; font-size: 16px; letter-spacing: 0; }
  .brand small { font-size: 9px; letter-spacing: 1px; }
  .sidebar nav a, .sidebar nav button { gap: 10px; padding-right: 12px; padding-left: 12px; }
  .workspace { padding: 25px 24px 30px; }
  .topbar { padding-right: 24px; padding-left: 24px; }
  .stats { gap: 12px; }
  .stat { padding: 17px; }
  .cards, .household-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .org-select { max-width: 285px; }
  .login-brand { padding: 50px; }
  .login-brand footer, .login-brand > small:last-child { left: 50px; }
  .login-card { padding: 32px; }
}
@media (max-width: 960px) {
  :root { --sidebar-width: 185px; }
  .brand { font-size: 15px; }
  .brand > svg, .brand-mark { width: 31px; height: 37px; padding: 6px; }
  .brand small { font-size: 8px; letter-spacing: .8px; }
  .sidebar nav a, .sidebar nav button { gap: 8px; padding: 10px; font-size: 13px; }
  .sidebar-foot { margin-right: 4px; margin-left: 4px; }
  .topbar { min-height: 64px; padding-right: 20px; padding-left: 20px; }
  .account > span { max-width: 150px; }
  .workspace { padding: 24px 20px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { min-height: 99px; }
  .toolbar .search { max-width: none; }
  .org-select { max-width: 260px; }
  .view-toggle { margin-left: 0; }
  .login-brand { padding: 38px; }
  .login-brand h1 { font-size: 29px; }
  .login-brand footer, .login-brand > small:last-child { left: 38px; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  button, .btn, .btn.small, .pagination .btn, .search button, .view-toggle button, .mobile-nav, .close { min-height: 44px; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea,
  .field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea,
  .search input, .org-select, .login-card input, .login-card select { min-height: 44px; font-size: 16px; }
  .shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; display: none; width: 248px; padding: 26px 16px max(22px, env(safe-area-inset-bottom)); z-index: 90; box-shadow: 10px 0 45px rgb(13 37 21 / 22%); }
  body.nav-open { overflow: hidden; }
  body.nav-open .sidebar { display: flex; }
  body.nav-open .nav-overlay, body.nav-open .nav-backdrop, body.nav-open .shell > [data-action="close-nav"] { position: fixed; inset: 0; display: block; z-index: 80; width: 100%; height: 100dvh; margin: 0; padding: 0; border: 0; border-radius: 0; background: rgb(17 37 27 / 36%); }
  .sidebar nav a, .sidebar nav button { gap: 12px; min-height: 48px; padding: 12px 16px; font-size: 15px; }
  .brand { gap: 12px; margin: 0 8px 32px; font-size: 18px; }
  .brand > svg, .brand-mark { width: 36px; height: 40px; }
  .brand small { font-size: 10px; letter-spacing: 1.2px; }
  .sidebar-foot { margin-right: 8px; margin-left: 8px; }
  .topbar { gap: 9px; min-height: 64px; padding: max(8px, env(safe-area-inset-top)) 14px 8px; }
  .mobile-nav { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; padding: 10px; border: 0; border-radius: 5px; color: #456b47; background: transparent; }
  .topbar > div:first-child { display: flex; align-items: center; gap: 5px; }
  .topbar .account { gap: 5px; }
  .account > span { max-width: 105px; font-size: 12px; }
  .account .avatar { display: none; }
  .account .btn { min-height: 44px; padding: 8px; font-size: 13px; }
  .topbar > span { font-size: 13px; }
  .topbar .muted { font-size: 12px; }
  .workspace { padding: 22px 16px calc(92px + env(safe-area-inset-bottom)); }
  .page-head { align-items: flex-start; gap: 14px; margin-bottom: 20px; }
  h1 { font-size: 26px; }
  .page-head p { font-size: 13px; line-height: 1.8; }
  .page-head .actions { justify-content: flex-start; gap: 8px; width: 100%; }
  .actions .btn { padding: 9px 12px; }
  .stats { gap: 10px; margin-bottom: 19px; }
  .stat { min-height: 103px; padding: 16px; }
  .stat > span, .stat > p { font-size: 12px; }
  .stat strong { font-size: 29px; }
  .stat small { font-size: 11px; }
  .stat > svg { width: 17px; height: 17px; right: 14px; top: 17px; }
  .toolbar { gap: 10px; margin-bottom: 15px; }
  .toolbar .search { flex-basis: 100%; min-width: 0; max-width: none; }
  .search input { padding: 10px 11px; }
  .search button { margin: 2px; padding: 8px 11px; }
  .org-select { flex: 1 1 100%; width: 100%; max-width: none; min-width: 0; padding-left: 10px; font-size: 12px; }
  .org-select select { width: 100%; max-width: none; min-height: 38px; font-size: 16px; }
  .view-toggle { flex-shrink: 0; gap: 0; margin-left: auto; padding: 2px; }
  .view-toggle button { gap: 4px; min-width: 44px; padding: 8px; font-size: 12px; }
  .view-toggle button svg { width: 16px; height: 16px; }
  .view-table { display: none; }
  .view-cards { display: block; }
  .cards.view-cards { display: grid; }
  body.table-mode .view-table { display: block; }
  body.table-mode .view-cards { display: none; }
  body.table-mode .cards.view-cards { display: none; }
  .sheet-wrap { border-radius: 5px; }
  table.sheet { min-width: 2100px; }
  .sheet th, .sheet td { padding: 10px 11px; }
  .sheet td.row-actions, .sheet th.row-actions { min-width: 140px; width: 140px; }
  .row-actions .btn { min-height: 44px; padding: 7px; }
  .cards, .household-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-head { gap: 10px; padding: 17px 16px 14px; }
  .card-head .title p, .card-head .title small { font-size: 12px; }
  .name-link { min-height: 44px; }
  .card-fields { gap: 12px; padding: 0 16px 18px; }
  .card-fields dt { font-size: 12px; }
  .card-fields dd { font-size: 14px; }
  .card-actions button, .card-actions a { min-height: 46px; font-size: 14px; }
  .household-card { padding: 18px; }
  .pagination { gap: 13px; margin-top: 17px; font-size: 12px; }
  .pagination > div { gap: 7px; }
  .pagination select { min-height: 44px; font-size: 16px; }
  .pagination .btn { min-width: 44px; }
  .table-standard { min-width: 620px; }
  .table-standard th, .table-standard td { padding: 13px; }
  .notice { padding: 12px 13px; font-size: 14px; }
  .drawer, .editor-dialog { top: var(--visual-viewport-top, 0px); right: auto; bottom: auto; left: 0; width: 100%; max-width: 100%; height: 100vh; height: min(100dvh, var(--visual-viewport-height, 100dvh)); max-height: min(100dvh, var(--visual-viewport-height, 100dvh)); margin: 0; border: 0; border-radius: 0; }
  .drawer-head { padding: calc(17px + env(safe-area-inset-top)) 19px 17px; }
  .drawer-head h2 { font-size: 20px; }
  .drawer-body { padding: 21px 19px; scroll-padding-top: 16px; scroll-padding-bottom: 24px; }
  .drawer-foot { gap: 9px; padding: 13px 19px calc(13px + env(safe-area-inset-bottom)); }
  .editor-dialog > form > .form-actions { gap: 9px; padding: 13px 19px calc(13px + env(safe-area-inset-bottom)); }
  .editor-dialog > form > .form-actions > .btn { flex: 1; min-height: 46px; }
  .drawer-foot .btn { flex: 1; min-height: 46px; }
  .drawer-foot > .muted:first-child, .drawer-foot > small:first-child { width: 100%; }
  .details-grid { gap: 0 19px; }
  .details-grid dt, .details-grid dd { font-size: 14px; }
  .form-grid { gap: 18px 17px; }
  .form-actions { gap: 9px; }
  .field textarea { min-height: 100px; }
  .close { min-width: 44px; width: 44px; padding: 10px; }
  .account-panel { padding: 21px 19px; }
  .account-panel .form-actions .btn { width: 100%; }
  .mobile-tabs { position: fixed; inset: auto 0 0; z-index: 45; display: flex; align-items: stretch; justify-content: space-around; min-height: 63px; padding: 5px 8px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid #dce7d3; background: #fffffc; }
  .mobile-tabs a, .mobile-tabs button { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 49px; min-width: 0; padding: 4px; border: 0; border-radius: 6px; color: #7e936c; background: transparent; font-size: 11px; text-align: center; }
  .mobile-tabs a:hover { text-decoration: none; }
  .mobile-tabs .active { color: var(--primary); background: #f0f6e9; }
  .mobile-tabs svg { width: 20px; height: 20px; }
  .mobile-tabs > a > span:first-child, .mobile-tabs > button > span:first-child { display: block; font-size: 23px; line-height: 1; }
  .login-shell { display: flex; flex-direction: column; }
  .login-brand { min-height: 212px; padding: calc(28px + env(safe-area-inset-top)) 29px 26px; }
  .login-brand > svg { width: 43px; height: 43px; padding: 8px; margin-bottom: 15px; }
  .login-brand > .brand-mark { width: 43px; height: 47px; margin-bottom: 18px; font-size: 27px; }
  .login-brand h1 { max-width: none; margin-bottom: 8px; font-size: 26px; line-height: 1.5; letter-spacing: 1px; }
  .login-brand p { max-width: 430px; margin-bottom: 0; font-size: 13px; line-height: 1.85; }
  .login-brand .eyebrow { margin-bottom: 9px; font-size: 10px; }
  .login-brand footer, .login-brand > small:last-child { position: static; margin-top: 15px; font-size: 11px; }
  .login-card { max-width: 490px; margin: 0 auto; padding: 30px 27px calc(32px + env(safe-area-inset-bottom)); }
  .login-card h2 { font-size: 23px; }
  .login-card form { gap: 19px; }
  .login-card form > .btn.primary { min-height: 48px; }
  .login-tabs { gap: 23px; }
  .login-tabs button { min-height: 45px; }
  #toast { top: auto; right: 16px; bottom: calc(82px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); }
}
@media (max-width: 520px) {
  .cards, .household-grid { grid-template-columns: 1fr; }
  .topbar .account > span { display: none; }
  .card-head { padding: 18px 18px 14px; }
  .card-fields { padding: 0 18px 18px; }
  .card-head .title p, .card-head .title small { line-height: 1.6; }
  .details-grid, .form-grid { grid-template-columns: 1fr; }
  .details-grid > .wide, .field.wide, .form-grid > .wide { grid-column: auto; }
  .form-grid { gap: 18px; }
  .household-picker { grid-template-columns: 1fr; }
  .household-picker > * { grid-column: auto; }
  .page-head .actions .btn { flex: 1; }
  .org-select { font-size: 16px; }
  .view-toggle button span { display: none; }
  .pagination { align-items: flex-start; }
  .pagination > div { flex-wrap: wrap; }
  .household-card .actions .btn { flex: 1; }
}
@media (max-width: 380px) {
  .workspace { padding-right: 13px; padding-left: 13px; }
  .topbar { padding-right: 11px; padding-left: 10px; }
  .topbar > div:first-child > strong { font-size: 13px; }
  .stats { gap: 9px; }
  .stat { padding: 14px 13px; }
  .stat strong { font-size: 28px; }
  .stat > svg { display: none; }
  .stat > span, .stat > p { font-size: 12px; }
  .drawer-head, .drawer-body, .drawer-foot { padding-right: 16px; padding-left: 16px; }
  .login-brand { padding-right: 24px; padding-left: 24px; }
  .login-card { padding-right: 23px; padding-left: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .topbar, .mobile-tabs, .actions, .toolbar, .pagination, .row-actions, #toast { display: none !important; }
  .shell { display: block; }
  .workspace { padding: 0; }
  .sheet-wrap, .table-scroll { overflow: visible; border: 0; }
  table.sheet { min-width: 0; font-size: 9pt; }
  .sheet th, .sheet td { min-width: 0 !important; padding: 5px; font-size: 9pt; }
  .view-table { display: block !important; }
  .view-cards { display: none !important; }
  body { background: white; }
}

/* Copy targets remain readable without widening the original spreadsheet. */
.copy-value { display: inline-flex; align-items: flex-start; gap: 6px; max-width: 100%; min-height: 30px; padding: 3px 0; border: 0; color: inherit; background: transparent; line-height: 1.55; text-align: left; vertical-align: middle; }
.copy-value > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.copy-value .copy-icon { flex-shrink: 0; color: var(--primary); opacity: .65; font-size: 15px; }
.copy-value:hover { color: var(--primary-dark); }
.copy-value:hover .copy-icon, .copy-value.copied .copy-icon { opacity: 1; }
.copy-value.copied { color: var(--primary-dark); background: #d8efdf; }
.copy-value.compact { width: 100%; max-width: 230px; }
.copy-value.compact > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet td:nth-child(12) { width: 230px; min-width: 230px; max-width: 230px; }
.sheet td:nth-child(13) { min-width: 154px; }
.sheet td:nth-child(13) .copy-value { white-space: nowrap; }
.card-fields dd { min-width: 0; }
.card-fields .copy-value.compact { max-width: 100%; }
.details-grid .copy-value { display: inline-flex; width: auto; }
.dialog-notice { position: sticky; top: 0; z-index: 1; box-shadow: 0 2px 10px #fff; }
.source-section { margin-top: 26px; padding-top: 23px; border-top: 1px solid var(--line-strong); }
.source-section h3 { margin: 0 0 12px; }
.source-section > .muted { font-size: 12px; overflow-wrap: anywhere; }
.source-raw dd { white-space: pre-wrap; }
.family-member { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.family-member .family-row { border-bottom: 0; }
.family-contact { display: grid; gap: 5px; padding-left: 48px; }
.family-contact > div { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 8px; align-items: center; }
.family-contact dt { color: var(--muted); font-size: 12px; }
.family-contact dd { min-width: 0; }
.family-contact .copy-value.compact { max-width: 100%; }
.clipboard-fallback { position: fixed; top: 0; left: 0; width: 2px; height: 2px; opacity: .01; }
body.card-mode .cards.view-cards { display: grid; }
@media (max-width: 760px) {
  .copy-value { min-height: 44px; align-items: center; }
  .copy-value .copy-icon { opacity: .8; }
  .family-contact { gap: 0; padding-left: 0; }
  .source-section { margin-top: 20px; padding-top: 20px; }
}
@media print {
  .copy-value .copy-icon { display: none; }
  .copy-value.compact, .copy-value.compact > span:first-child { max-width: none; overflow: visible; white-space: normal; }
}
