:root {
  color-scheme: light;
  --canvas: #f7f5ef;
  --ink: #172720;
  --muted: #4a5b51;
  --brand: #234b36;
  --surface: #fff;
  --line: #d7ded6;
  --warm: #ece0c8;
  --gutter: clamp(16px, 5vw, 36px);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  font-size: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100dvh; }
.shell { width: min(100%, 700px); margin-inline: auto; padding-inline: var(--gutter); }
.masthead { color: #fff; background: var(--ink); padding-top: env(safe-area-inset-top); }
.mast-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { flex: none; border-radius: 12px; }
.brand-title { font-size: 1.24rem; font-weight: 720; line-height: 1.15; display: block; }
.agency { display: block; color: #dbdcd1; font-size: .79rem; margin-top: 3px; }
main { padding-top: 26px; padding-bottom: max(42px, env(safe-area-inset-bottom)); }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
h1 { margin: 0; font-size: clamp(1.7rem, 7vw, 2.45rem); letter-spacing: -.05em; line-height: 1.05; }
button, .primary { min-height: 44px; padding: 8px 14px; cursor: pointer; border: 0; border-radius: 10px; font: inherit; font-weight: 650; }
button:disabled, button[aria-disabled=true] { opacity: .63; cursor: progress; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #ac6531; outline-offset: 3px; }
.logout { color: #fff; background: transparent; border: 1px solid #76907e; }
.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.primary { display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--brand); text-decoration: none; text-align: center; }
.tabs { display: flex; gap: 3px; background: #e8ebe4; border-radius: 12px; padding: 4px; margin-bottom: 15px; }
.tabs button { flex: 1; background: transparent; color: var(--muted); }
.tabs button[aria-pressed=true] { color: var(--ink); background: var(--surface); box-shadow: 0 1px 3px #1628201c; }
#contacts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.panel, .card { background: var(--surface); border: 1px solid var(--line); border-radius: 17px; }
.card { padding: clamp(14px, 4vw, 21px); min-width: 0; }
.card h2 { font-size: 1.13rem; line-height: 1.3; margin: 0 0 5px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.house { margin: 0; font-weight: 540; overflow-wrap: anywhere; }
.called-at { color: var(--muted); font-size: .88rem; margin: 8px 0 0; }
.number-bar { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.phone { margin: 0; color: var(--ink); font-size: 1.07rem; font-weight: 750; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.number-caption { color: var(--muted); font-size: .8rem; margin: 3px 0 0; }
.mark { color: var(--brand); background: #eef4ed; margin-top: 10px; font-size: .91rem; text-align: left; }
.notice { padding: 13px 15px; background: #e8ebe4; color: var(--ink); border-radius: 12px; line-height: 1.45; }
.error { background: #fae9e1; color: #742e1e; }
.warning { background: #f2e7d0; }
.login-panel { padding: clamp(18px, 6vw, 30px); max-width: 445px; margin-inline: auto; }
form { display: grid; margin-top: 23px; gap: 9px; }
label { font-weight: 650; }
input { font: inherit; color: var(--ink); padding: 10px 12px; min-height: 46px; border: 1px solid #758478; border-radius: 10px; }
form .primary { margin-top: 8px; }
.undo { position: sticky; bottom: max(10px, env(safe-area-inset-bottom)); background: var(--ink); color: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 6px 13px; margin-top: 16px; box-shadow: 0 2px 9px #13291e38; font-size: .91rem; }
.undo button { background: var(--warm); color: var(--ink); }
