@font-face {
  font-family: "Heebo";
  src: url("/heebo-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 500;
  font-display: swap;
}
@font-face {
  font-family: "Heebo";
  src: url("/heebo-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --ink: #172b2a;
  --muted: #6c7a79;
  --line: #e5eae8;
  --teal: #087f73;
  --teal-dark: #05675e;
  --teal-soft: #e9f5f1;
  --lime: #d8ef9b;
  --radius: 20px;
  font-family: "Heebo", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.65; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: var(--teal); }
button, input, textarea, select, a { outline-offset: 4px; }
:focus-visible { outline: 3px solid #44b6a6; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px #087f731a; }
svg { width: 20px; height: 20px; display: block; flex-shrink: 0; stroke-width: 1.8; }
button svg { pointer-events: none; }
h1, h2, h3, p { margin: 0; }
button, .btn, input, textarea, select { transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease; }
[hidden], .hidden { display: none !important; }

.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1244px; min-height: 88px; padding: 16px 32px; margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.app-identity { display: flex; align-items: center; gap: 12px; }
.app-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--ink); color: #e0f4be; }
.app-icon svg { width: 23px; height: 23px; }
.app-title { font-size: 17px; font-weight: 750; letter-spacing: -.35px; }
.app-subtitle { color: var(--muted); font-size: 12px; line-height: 1.6; }
.save-state { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: #677573; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #42a087; box-shadow: 0 0 0 4px #eef8f3; }
.save-state.pending .status-dot { background: #d79833; box-shadow: 0 0 0 4px #fcf4e5; }
.save-state.error { color: #ae5149; }
.save-state.error .status-dot { background: #ce665b; box-shadow: 0 0 0 4px #fbeeec; }
.save-state.online .status-dot { background: #42a087; }
.workspace { max-width: 1244px; padding: 44px 32px 20px; margin: 0 auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 29px; }
.eyebrow { color: var(--teal); font-size: 12px; font-weight: 650; margin-bottom: 6px; letter-spacing: .6px; }
h1 { font-size: clamp(28px, 3vw, 35px); font-weight: 750; letter-spacing: -1.1px; line-height: 1.3; }
.subtitle { color: var(--muted); margin-top: 9px; font-size: 15px; }
.heading-actions { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.btn { appearance: none; border: 1px solid transparent; min-height: 45px; border-radius: 11px; padding: 9px 17px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 600; font-size: 14px; line-height: 1.5; text-decoration: none; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 3px 7px #087f7310; }
.btn-primary:hover:not(:disabled) { background: var(--teal-dark); box-shadow: 0 4px 10px #087f7326; }
.btn-secondary { border-color: #dbe3df; background: #fff; color: #304541; }
.btn-secondary:hover:not(:disabled) { background: #f1f6f3; border-color: #b6c7bf; }
.btn-ghost { color: #596b65; background: transparent; }
.btn-ghost:hover:not(:disabled) { background: #eaf1ed; color: var(--ink); }
.btn-small { min-height: 38px; padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-danger { background: #fff0ee; border-color: #f3d4ce; color: #ad3a2d; }
.btn-danger:hover:not(:disabled) { background: #ffe2dc; border-color: #e2b4ab; }
.text-action { border: 0; background: none; color: var(--teal); padding: 8px; font-weight: 550; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.text-action:hover { color: var(--teal-dark); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 27px; }
.stat-card { position: relative; padding: 23px 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); display: flex; align-items: flex-start; gap: 16px; min-height: 137px; }
.stat-card.is-accent { border-color: #d7e8df; background: #ecf5ee; }
.stat-icon { width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0; color: #668078; background: #f2f5f3; border-radius: 13px; }
.stat-icon svg { width: 21px; height: 21px; }
.is-accent .stat-icon { color: var(--teal); background: #dcecdc; }
.stat-copy { flex: 1; min-width: 0; }
.stat-label { font-size: 13px; font-weight: 500; color: #62736d; }
.stat-value { font-size: 33px; line-height: 1.35; letter-spacing: -1px; font-weight: 700; font-variant-numeric: tabular-nums; }
.is-accent .stat-value { color: #176b56; }
.stat-card.is-maybe { background: #fffbf3; border-color: #efe6d4; }
.stat-card.is-maybe .stat-icon { color: #b58134; background: #faf0dd; }
.stat-card.is-maybe .stat-value { color: #a1712f; }
.stat-card.is-declined { background: #fff8f7; border-color: #efe2de; }
.stat-card.is-declined .stat-icon { color: #b37367; background: #f8e9e5; }
.stat-card.is-declined .stat-value { color: #a9665b; }
.stat-note { font-size: 12px; color: #6e7b72; margin-top: 3px; }
.progress-track { height: 4px; margin-top: 11px; border-radius: 4px; background: #dbe6da; overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; background: #5c9a63; width: 0; transition: width .25s ease; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 275px; align-items: start; gap: 24px; }
.contacts-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 3px 8px #1c3b2d02; }
.panel-top { padding: 25px 25px 18px; display: flex; justify-content: space-between; align-items: start; gap: 14px; }
.panel-title { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 650; letter-spacing: -.3px; }
.count-badge { color: #66766e; background: #f0f4f1; font-size: 12px; font-weight: 550; line-height: 1.2; padding: 4px 7px; border-radius: 6px; }
.panel-subtitle { font-size: 13px; color: var(--muted); margin-top: 4px; }
.toolbar { padding: 0 25px 21px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.search-field { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: #fafcfb; border-radius: 10px; padding: 0 12px; min-height: 43px; flex: 1 1 200px; }
.search-field svg { color: #8d9a95; width: 18px; height: 18px; }
.search-field:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px #087f731a; }
.search-field input { width: 100%; min-width: 0; color: var(--ink); border: none; background: transparent; padding: 10px 0; font-size: 13px; line-height: 1.5; outline: none; box-shadow: none; }
.search-field input::placeholder { color: #8a9690; }
.search-field input:focus { outline: none; box-shadow: none; }
.filters { display: inline-flex; flex-shrink: 1; flex-wrap: wrap; gap: 3px; background: #f2f5f3; border-radius: 9px; padding: 4px; }
.filter { appearance: none; border: 0; border-radius: 6px; min-height: 31px; background: transparent; color: #6e7d76; padding: 5px 12px; font-size: 12px; font-weight: 550; white-space: nowrap; }
.filter.active, .filter[aria-selected="true"], .filter[aria-pressed="true"] { background: #fff; color: #244b3d; box-shadow: 0 1px 4px #1b3b2c10; }
.filter:hover { color: var(--teal); }
.list-head, .contact-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 130px; align-items: center; column-gap: 12px; padding-inline: 25px; }
.list-head { background: #fafbf9; color: #708077; font-size: 12px; padding-block: 10px; border-top: 1px solid #edf0ed; border-bottom: 1px solid #edf0ed; }
.list-head > :last-child { text-align: center; }
.contacts-list { min-height: 328px; }
.contact-row { width: 100%; text-align: start; background: #fff; border: 0; border-bottom: 1px solid #edf1ed; padding-block: 17px; color: var(--ink); }
.contact-row:last-child { border-bottom: 0; }
.contact-row:hover { background: #f7fbf8; }
.contact-row.invited { background: #f6fbf7; }
.contact-row.invited:hover { background: #edf7ef; }
.contact-row.maybe { background: #fffcf6; }
.contact-row.maybe:hover { background: #fff7e8; }
.contact-row.declined { background: #fff9f8; }
.contact-row.declined:hover { background: #fdf0ed; }
.contact-row:focus-visible { position: relative; z-index: 1; outline-offset: -3px; }
.contact-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 50%; background: #f0ecf7; color: #84749b; font-size: 13px; font-weight: 600; }
.contact-row:nth-child(5n + 2) .avatar { background: #f5eee4; color: #9e835c; }
.contact-row:nth-child(5n + 3) .avatar { background: #e9eef8; color: #758aa9; }
.contact-row:nth-child(5n + 4) .avatar { background: #f8e9e6; color: #a8786d; }
.contact-row:nth-child(5n + 5) .avatar { background: #e9f1e5; color: #778e60; }
.contact-info { min-width: 0; }
.contact-name { display: block; font-size: 14px; font-weight: 550; line-height: 1.5; overflow-wrap: anywhere; }
.contact-detail { display: block; width: fit-content; color: #738177; font-size: 12px; margin-top: 2px; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.contact-group { color: #6e7e72; font-size: 12px; overflow-wrap: anywhere; }
.invitation-pill { display: inline-flex; justify-self: center; justify-content: center; align-items: center; gap: 6px; min-width: 101px; min-height: 31px; padding: 5px 10px; border: 1px solid #e3e9e3; color: #879289; border-radius: 7px; background: #f9fbf8; font-size: 12px; font-weight: 550; line-height: 1.35; }
.invitation-pill svg { width: 14px; height: 14px; }
.invitation-pill.is-invited, .invited .invitation-pill { background: #e2f0e4; color: #35784f; border-color: #d5e9d8; }
.invitation-pill.is-maybe, .maybe .invitation-pill { background: #fff0d5; color: #9b6b23; border-color: #f4dfb7; }
.invitation-pill.is-declined, .declined .invitation-pill { background: #fae6e1; color: #a85345; border-color: #efd4cc; }
.invitation-pill.is-unmarked { background: #f3f5f3; color: #68786c; border-color: #e1e7df; }
.list-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 54px; border-top: 1px solid var(--line); padding: 12px 25px; font-size: 12px; color: #748175; }
.list-footer svg { display: inline-block; vertical-align: middle; width: 14px; height: 14px; margin-inline-end: 4px; }
.empty-state { min-height: 360px; padding: 46px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-art { position: relative; width: 77px; height: 77px; display: grid; place-items: center; background: #f0f5ed; border: 1px solid #e5ede2; border-radius: 24px; color: #648874; margin-bottom: 20px; }
.empty-art svg { width: 32px; height: 32px; stroke-width: 1.4; }
.empty-art::after { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 4px; border: 3px solid #fff; background: var(--lime); inset-inline-start: -5px; top: 10px; transform: rotate(-15deg); }
.empty-state h2 { font-weight: 650; font-size: 20px; letter-spacing: -.4px; }
.empty-state p { max-width: 390px; font-size: 14px; line-height: 1.8; margin: 8px 0 20px; color: #6c7d70; }
.empty-state .btn { min-width: 140px; }
.empty-state .text-action { margin-top: 7px; font-size: 13px; }

.help-panel { position: sticky; top: 24px; border: 1px solid #e2e9de; background: #f0f4ec; border-radius: var(--radius); padding: 23px; }
.help-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #e3ecd8; color: #728659; margin-bottom: 13px; }
.help-icon svg { width: 19px; height: 19px; }
.help-panel h3 { font-size: 16px; font-weight: 650; letter-spacing: -.25px; margin-bottom: 7px; }
.help-panel p { color: #6b7b60; font-size: 13px; line-height: 1.8; }
.steps { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 18px; }
.steps li { display: flex; align-items: start; gap: 10px; font-size: 12px; color: #6f7d67; line-height: 1.75; }
.steps li strong { display: block; color: #4e6246; font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.step-number { display: grid; place-items: center; flex-shrink: 0; width: 23px; height: 23px; margin-top: 1px; color: #6c8557; background: #e3ecd9; border-radius: 50%; font-size: 11px; font-weight: 600; }
.local-note { display: flex; gap: 9px; align-items: start; padding-top: 18px; border-top: 1px solid #dce4d6; }
.local-note > svg { width: 16px; height: 16px; margin-top: 3px; color: #8b987d; }
.local-note p { font-size: 12px; line-height: 1.8; color: #758267; }
.export-panel { margin-top: 18px; padding: 18px 0 0; border-top: 1px solid #dce4d6; }
.export-panel h3 { font-size: 14px; }
.export-panel p { font-size: 12px; margin-bottom: 11px; }
.export-options { display: flex; gap: 7px; flex-wrap: wrap; }
.export-options .btn { flex: 1; background: #fff9; border-color: #dae5d4; color: #57704a; }
.footer-note { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 26px 0 10px; font-size: 12px; color: #7c8a7e; text-align: center; }
.footer-note svg { width: 13px; height: 13px; }

.dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid #e3eae3; border-radius: 22px; box-shadow: 0 24px 90px #133c3133; color: var(--ink); overflow: auto; background: #fff; }
.dialog-wide { width: min(760px, calc(100vw - 32px)); }
.dialog::backdrop { background: #182d2861; backdrop-filter: blur(5px); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 26px 19px; border-bottom: 1px solid #edf0ed; }
.dialog-header h2 { font-size: 20px; font-weight: 650; letter-spacing: -.4px; }
.dialog-header p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.close-btn { border: 0; border-radius: 9px; padding: 8px; background: #f5f7f4; color: #7b897f; flex-shrink: 0; }
.close-btn:hover { background: #e9efea; color: var(--ink); }
.close-btn svg { width: 18px; height: 18px; }
.dialog-body { padding: 25px 26px; }
.dialog-body > p { color: var(--muted); margin-bottom: 19px; font-size: 14px; }
.dialog-footer { padding: 18px 26px; border-top: 1px solid #edf0ed; display: flex; justify-content: flex-end; gap: 9px; background: #fcfdfb; }
.import-tabs { display: flex; gap: 5px; padding: 4px; margin-bottom: 20px; border-radius: 10px; background: #f2f5f1; }
.import-tabs button { flex: 1; min-height: 37px; padding: 7px 12px; background: transparent; color: #75816f; border: 0; border-radius: 7px; font-size: 14px; font-weight: 550; }
.import-tabs button.active, .import-tabs button[aria-selected="true"] { background: #fff; color: var(--teal); box-shadow: 0 1px 5px #2440310c; }
.upload-zone { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 26px; border: 1.5px dashed #c6d7c9; border-radius: 15px; background: #fafcf8; cursor: pointer; }
.upload-zone:hover, .upload-zone.dragover, .upload-zone.is-dragging { background: #eff7ec; border-color: var(--teal); }
.upload-zone:focus-within { outline: 3px solid #44b6a6; outline-offset: 3px; }
.upload-zone input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.upload-zone > svg { width: 30px; height: 30px; color: #7c967e; margin-bottom: 11px; }
.upload-zone strong { font-weight: 600; font-size: 15px; }
.upload-zone p { color: #879381; font-size: 13px; margin-top: 4px; }
.file-formats { display: inline-flex; gap: 8px; color: #8e9a87; font-size: 12px; margin-top: 12px; }
.paste-area label { display: block; font-weight: 550; font-size: 14px; margin-bottom: 8px; }
.paste-area textarea { width: 100%; min-height: 180px; resize: vertical; padding: 12px 14px; border: 1px solid #dce4d9; border-radius: 11px; background: #fdfefc; color: var(--ink); font-size: 14px; line-height: 1.8; }
.paste-area p { color: #8b9685; margin-top: 8px; font-size: 12px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin-bottom: 18px; }
.field label { font-size: 13px; font-weight: 550; color: #55694d; }
.field input, .field select, .mapping-grid select { width: 100%; min-height: 45px; border: 1px solid #dbe4d6; background: #fdfefc; border-radius: 9px; padding: 10px 12px; color: var(--ink); font-size: 14px; }
.field input::placeholder, textarea::placeholder { color: #a1ab9c; }
.field small { font-size: 12px; color: #899581; }
.fields-grid, .mapping-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 17px; }
.mapping-grid { margin: 20px 0 4px; }
.mapping-grid label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 550; color: #637459; margin-bottom: 15px; }
.check-label { display: flex; align-items: start; gap: 9px; font-size: 13px; color: #66785d; margin: 14px 0; cursor: pointer; }
.check-label input { accent-color: var(--teal); width: 16px; height: 16px; margin: 3px 0 0; flex-shrink: 0; }
.preview-wrap { max-width: 100%; overflow: auto; max-height: 240px; border: 1px solid #e2e9df; border-radius: 10px; margin: 12px 0; }
.preview-table { width: 100%; border-collapse: collapse; text-align: start; font-size: 12px; }
.preview-table th { color: #718369; font-weight: 550; background: #f4f7f1; position: sticky; top: 0; }
.preview-table th, .preview-table td { text-align: start; padding: 10px 12px; border-bottom: 1px solid #e8eee4; white-space: nowrap; }
.preview-table tr:last-child td { border-bottom: 0; }
.preview-table td { color: #617259; }
.import-summary { padding: 11px 14px; border-radius: 9px; background: #edf6e9; color: #527449; font-size: 13px; margin: 15px 0; }
.notice { border: 1px solid #dce8d4; background: #f3f8ee; color: #6e805f; font-size: 13px; border-radius: 10px; padding: 11px 14px; margin: 14px 0; }
.notice-error { border-color: #f0d5cc; background: #fff4ed; color: #a45b40; }
.history-list { list-style: none; margin: 0; padding: 0; }
.history-item { display: flex; align-items: flex-start; gap: 13px; position: relative; padding: 16px 0; border-bottom: 1px solid #edf1ea; }
.history-item:first-child { padding-top: 0; }
.history-item:last-child { padding-bottom: 0; border-bottom: 0; }
.history-dot { width: 10px; height: 10px; border-radius: 50%; background: #aac6b4; border: 2px solid #e9f2e9; box-sizing: content-box; flex-shrink: 0; margin-top: 5px; }
.history-dot.invited, .history-dot.is-invited { background: #65a67b; }
.history-dot.maybe, .history-dot.is-maybe { background: #daa54f; border-color: #fbf1df; }
.history-dot.declined, .history-dot.is-declined { background: #ca8475; border-color: #faece8; }
.history-content { flex: 1; min-width: 0; font-size: 13px; color: #6c7c63; }
.history-content strong { display: block; font-size: 14px; color: #344d2e; font-weight: 600; }
.history-content p { margin-top: 4px; }
.history-content .invitation-pill { min-width: 0; min-height: 26px; font-size: 11px; padding: 3px 7px; margin-block: 6px 2px; }
.history-time { display: block; font-size: 12px; color: #8d9985; margin-top: 4px; font-variant-numeric: tabular-nums; }
.toast { position: fixed; z-index: 1000; bottom: 25px; inset-inline-start: 50%; transform: translateX(50%); padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #fff; background: #243f34; box-shadow: 0 6px 25px #1c3e3326; border: 1px solid #426253; border-radius: 12px; font-size: 14px; max-width: calc(100vw - 28px); width: max-content; }
.toast-undo { border: 0; padding: 4px 0; background: none; color: #d5eea4; font-size: 13px; font-weight: 550; white-space: nowrap; text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 1300px) {
  .workspace { padding-top: 49px; }
}

@media (max-width: 1050px) {
  .content-grid { grid-template-columns: minmax(0, 1fr) 240px; gap: 18px; }
  .help-panel { padding: 20px; }
  .toolbar { flex-wrap: wrap; }
  .search-field { flex-basis: 100%; }
  .list-head, .contact-row { grid-template-columns: minmax(0, 1fr) 80px 108px; gap: 8px; }
  .stat-card { padding: 18px 16px; gap: 12px; }
  .stat-icon { width: 35px; height: 35px; border-radius: 10px; }
}

@media (max-width: 900px) {
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .help-panel { position: static; display: grid; grid-template-columns: 1fr 1.5fr; column-gap: 30px; padding: 23px; }
  .help-panel > .help-icon { grid-column: 1; }
  .help-panel > h3, .help-panel > p { grid-column: 1; }
  .help-panel .steps { grid-column: 2; grid-row: 1 / span 4; margin: 0; }
  .local-note { margin-top: 20px; grid-column: 1 / -1; padding-top: 15px; }
  .export-panel { grid-column: 1 / -1; }
  .export-options { max-width: 320px; }
  .search-field { flex-basis: 200px; }
  .page-heading { align-items: start; }
  .heading-actions { padding-top: 25px; }
  .stat-card { gap: 12px; }
  .list-head, .contact-row { grid-template-columns: minmax(0, 1fr) 150px 130px; }
}

@media (max-width: 680px) {
  .topbar-inner { min-height: 78px; padding: 14px 20px; }
  .app-title { font-size: 15px; }
  .app-subtitle { font-size: 11px; }
  .app-icon { width: 39px; height: 39px; border-radius: 12px; }
  .save-state { font-size: 11px; gap: 6px; max-width: 110px; }
  .status-dot { width: 6px; height: 6px; flex-shrink: 0; }
  .workspace { padding: 28px 20px 14px; }
  .page-heading { flex-direction: column; gap: 19px; margin-bottom: 23px; }
  h1 { font-size: 29px; }
  .subtitle { font-size: 14px; max-width: 330px; }
  .heading-actions { padding-top: 0; width: 100%; }
  .heading-actions .btn-primary { flex: 1; }
  .heading-actions .btn { min-height: 45px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
  .stat-card { min-height: 112px; padding: 16px 14px; display: flex; gap: 10px; border-radius: 15px; }
  .stat-icon { width: 31px; height: 31px; border-radius: 9px; margin-bottom: 0; }
  .stat-icon svg { width: 16px; height: 16px; }
  .stat-label { font-size: 12px; }
  .stat-value { font-size: 27px; }
  .stat-note { font-size: 11px; line-height: 1.5; }
  .progress-track { margin-top: 8px; }
  .panel-top { padding: 20px 18px 16px; }
  .panel-title { font-size: 17px; }
  .panel-subtitle { font-size: 12px; }
  .toolbar { padding: 0 18px 18px; gap: 12px; }
  .search-field { flex-basis: 100%; }
  .filters { width: 100%; }
  .filter { flex: 1 1 auto; min-height: 35px; font-size: 12px; padding-inline: 8px; }
  .list-head { display: none; }
  .contacts-list { min-height: 300px; border-top: 1px solid var(--line); }
  .contact-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 16px 18px; }
  .contact-group { display: none; }
  .contact-person { gap: 10px; }
  .avatar { width: 36px; height: 36px; font-size: 12px; }
  .contact-name { font-size: 14px; }
  .contact-detail { font-size: 12px; }
  .invitation-pill { min-width: 87px; font-size: 11px; gap: 4px; padding: 5px 7px; }
  .list-footer { padding: 13px 18px; font-size: 11px; flex-wrap: wrap; gap: 5px; }
  .empty-state { min-height: 335px; padding: 34px 22px; }
  .empty-state h2 { font-size: 19px; }
  .empty-state p { font-size: 13px; }
  .help-panel { display: block; padding: 21px; }
  .steps { margin: 20px 0 !important; gap: 15px; }
  .help-panel p { max-width: none; }
  .local-note { margin-top: 16px; }
  .footer-note { padding-top: 22px; font-size: 11px; }
  .dialog { max-height: calc(100dvh - 24px); border-radius: 17px; }
  .dialog-header { padding: 20px 19px 16px; }
  .dialog-header h2 { font-size: 19px; }
  .dialog-body { padding: 20px 19px; }
  .dialog-footer { padding: 15px 19px; }
  .dialog-footer .btn { flex: 1; font-size: 13px; padding-inline: 12px; }
  .upload-zone { padding: 22px 14px; }
  .fields-grid, .mapping-grid { gap: 0 12px; }
  .toast { bottom: 16px; font-size: 13px; gap: 14px; padding: 12px 15px; }
}

@media (max-width: 380px) {
  .workspace { padding-inline: 14px; }
  .topbar-inner { padding-inline: 14px; gap: 10px; }
  .save-state { max-width: 86px; font-size: 10px; line-height: 1.5; }
  .stat-card { padding-inline: 10px; }
  .stat-label { font-size: 11px; }
  .stat-note { font-size: 10px; }
  .panel-top, .toolbar { padding-inline: 14px; }
  .contact-row { padding-inline: 14px; }
  .contact-person { gap: 8px; }
  .avatar { width: 31px; height: 31px; }
  .invitation-pill { min-width: 80px; }
  .fields-grid, .mapping-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* Comfortable control sizes and full names are shared by every screen size. */
body { font-size: 16px; }
.btn, .btn-small, .filter, .import-tabs button, .close-btn, .text-action { min-height: 44px; }
.close-btn { min-width: 44px; display: grid; place-items: center; }
.btn, .btn-small, .contact-detail, .contact-group, .panel-subtitle, .stat-label, .stat-note, .list-head, .list-footer, .help-panel p, .steps li, .steps li strong, .local-note p, .export-panel p, .footer-note, .field label, .mapping-grid label, .check-label, .import-summary, .notice, .history-content, .history-time, .dialog-header p, .paste-area p, .file-formats, .upload-zone p { font-size: 14px; }
.filter { font-size: 13.5px; }
.contact-name, .search-field input, .field input, .field select, .mapping-grid select, .paste-area textarea { font-size: 16px; }
.contact-name { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.contact-row { min-height: 80px; }
.contact-row:disabled { opacity: 1; cursor: progress; }
.invitation-pill { min-height: 34px; font-size: 14px; }
.dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.dialog-header, .dialog-footer { flex-shrink: 0; }
.dialog-body { overflow: auto; overscroll-behavior: contain; }
.dialog-footer { position: sticky; bottom: 0; z-index: 2; }
.preview-table { font-size: 14px; }
.preview-table .preview-name { min-width: 170px; max-width: 300px; white-space: normal; overflow-wrap: anywhere; }
.import-hint { font-size: 14px; color: #67765f; margin: 12px 0; line-height: 1.8; }
.import-file-title { display: flex; align-items: center; gap: 10px; font-size: 16px; overflow-wrap: anywhere; }
.import-file-title svg { color: var(--teal); }
.preview-label { font-size: 14px; font-weight: 600; color: #5f7354; }
.import-progress { width: 100%; height: 8px; accent-color: var(--teal); margin-top: 12px; }
.load-more { display: flex; justify-content: center; padding: 16px; }
.history-change { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 5px; }
.history-change > svg { width: 15px; height: 15px; color: #829579; }
.history-content strong { overflow-wrap: anywhere; }
.history-content .invitation-pill { font-size: 13px; }
.history-empty { min-height: 240px; }
.inline-loading { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 35px; color: var(--muted); }
.loading-icon { width: 34px; height: 34px; margin-bottom: 20px; color: var(--teal); }
.spinning { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.step-green { color: #276f42; background: #deeedf; }
.step-orange { color: #99671e; background: #f9e8c8; }
.step-red { color: #a05345; background: #f6ded6; }
.toast-close { background: transparent; color: #fff; border: 0; min-width: 44px; min-height: 44px; display: grid; place-items: center; margin: -8px; border-radius: 7px; }
.toast-close:hover { background: #ffffff15; }
.toast-undo { min-height: 44px; font-size: 14px; }
.optional { font-weight: 400; color: #7a8871; }
.sort-control { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: #61705b; font-size: 14px; }
.sort-control select { min-height: 45px; min-width: 140px; max-width: 100%; padding: 9px 12px; border: 1px solid #dce4d9; border-radius: 10px; background: #fafcf8; color: #344d2e; font-size: 14px; cursor: pointer; }
.toolbar .filters { flex-basis: 100%; width: max-content; flex-grow: 0; }

@media (max-width: 680px) {
  .topbar-inner { min-height: 72px; }
  .app-title { font-size: 17px; }
  .app-subtitle { display: none; }
  .save-state { font-size: 13px; line-height: 1.5; max-width: 110px; }
  .workspace { padding-top: 25px; }
  .eyebrow { font-size: 14px; }
  .subtitle { font-size: 16px; }
  .heading-actions .btn { font-size: 14px; padding-inline: 12px; }
  .stats { gap: 10px; }
  .stat-card { min-height: 93px; padding: 13px 15px; align-items: center; }
  .stat-label { font-size: 14px; }
  .stat-value { font-size: 29px; }
  .stat-note { display: none; }
  .stat-icon { width: 30px; height: 30px; }
  .panel-top { align-items: start; gap: 8px; }
  .panel-title { font-size: 18px; }
  .panel-subtitle { font-size: 14px; }
  .add-person-button { padding-inline: 7px; gap: 4px; flex-shrink: 0; font-size: 14px; }
  .add-person-button svg { width: 16px; height: 16px; }
  .toolbar { gap: 10px; }
  .sort-control { width: 100%; justify-content: space-between; }
  .sort-control select { flex: 0 1 190px; font-size: 16px; }
  .search-field { min-height: 47px; }
  .filters { gap: 2px; }
  .filter { font-size: 13.5px; min-height: 44px; padding-inline: 7px; }
  .contact-row { min-height: 85px; padding-block: 17px; }
  .contact-name { font-size: 16px; line-height: 1.6; }
  .contact-detail { font-size: 14px; line-height: 1.7; }
  .contact-person { align-items: start; }
  .avatar { margin-top: 2px; width: 33px; height: 33px; }
  .invitation-pill { font-size: 14px; min-width: 93px; min-height: 34px; }
  .list-footer { font-size: 14px; line-height: 1.7; }
  .empty-state p { font-size: 16px; }
  .help-panel { margin-top: 2px; }
  .help-panel p, .steps li, .steps li strong, .local-note p, .export-panel p, .footer-note { font-size: 14px; }
  .footer-note { align-items: start; padding-inline: 7px; }
  .footer-note svg { flex-shrink: 0; margin-top: 5px; }
  .dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .dialog-header { padding: 17px 17px 14px; }
  .dialog-body { padding: 18px 17px; }
  .dialog-footer { padding: 13px 17px; flex-wrap: wrap; }
  .dialog-footer .btn { font-size: 14px; white-space: normal; }
  .fields-grid, .mapping-grid { grid-template-columns: 1fr; }
  .upload-zone { padding: 25px 14px; }
  .upload-zone strong { font-size: 16px; }
  .toast { font-size: 14px; max-width: calc(100vw - 20px); gap: 9px; }
}

@media (prefers-reduced-motion: reduce) { .spinning { animation: none; } }

/* Voice review keeps the name and the next decision at the center of the screen. */
.heading-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 550px; }
.voice-launch { color: var(--teal); border-color: #cfe1d7; background: #f0f8f3; }
.voice-launch:hover { background: #e4f2e8; }
.voice-dialog { width: min(660px, calc(100vw - 28px)); }
.voice-dialog-header { padding-bottom: 18px; }
.voice-dialog-header h2 { font-size: 21px; line-height: 1.5; }
.voice-eyebrow { display: flex; align-items: center; gap: 7px; color: var(--teal); font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.voice-eyebrow svg { width: 17px; height: 17px; }
.voice-body { padding-top: 20px; }
.voice-session-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.voice-session-controls label { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: #61705b; }
.voice-session-controls select { min-height: 44px; border: 1px solid #dce4d9; border-radius: 10px; background: #fafcf8; color: #344d2e; font-size: 14px; padding: 9px 10px; max-width: 100%; }
.voice-position { font-size: 14px; color: #71816b; font-variant-numeric: tabular-nums; }
.voice-progress { height: 5px; background: #e8eee6; margin: 14px 0 19px; border-radius: 10px; overflow: hidden; }
.voice-progress > span { display: block; height: 100%; background: var(--teal); border-radius: inherit; transition: width .2s ease; }
.voice-contact-card { background: #f7faf5; border: 1px solid #e0e9db; border-radius: 18px; padding: 25px 24px 20px; text-align: center; }
.voice-contact-card.stage-listening { border-color: #82b9a4; background: #f2faf4; }
.voice-contact-card.stage-error { border-color: #e8d5c9; }
.voice-stage { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; color: #718769; font-weight: 500; min-height: 26px; }
.voice-stage svg { width: 18px; height: 18px; }
.stage-listening .voice-stage { color: #087f59; }
.stage-listening .voice-stage > svg { animation: voice-breathe 1.6s ease-in-out infinite; }
.voice-contact-name { margin: 20px 0 16px; font-size: 34px; font-weight: 700; line-height: 1.45; letter-spacing: -.6px; white-space: normal; overflow: visible; overflow-wrap: anywhere; text-overflow: clip; }
.voice-contact-card > p { font-size: 14px; color: #728369; }
.voice-contact-card .invitation-pill { justify-self: auto; }
.voice-command-hint { margin: 16px 0 0; line-height: 1.8; }
.voice-command-hint strong { color: #4f6b43; font-weight: 600; }
.voice-transcript { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e2ebdb; font-size: 14px; color: #7a8d70; }
.voice-transcript q { color: #466a36; font-size: 16px; overflow-wrap: anywhere; }
.voice-message { padding: 12px 14px; border: 1px solid #dfe9d8; border-radius: 11px; background: #f3f8ef; font-size: 14px; color: #5b7550; margin-top: 13px; line-height: 1.75; }
.voice-message.is-error { border-color: #edddcf; background: #fff7ef; color: #986044; }
.voice-support-note { font-size: 14px; line-height: 1.75; margin-top: 12px; color: #8b7358; background: #fffbf4; border-radius: 10px; padding: 10px 13px; }
.voice-main-controls { display: flex; align-items: stretch; justify-content: center; gap: 9px; flex-wrap: wrap; margin: 18px 0 14px; }
.voice-main-controls .btn { min-height: 48px; }
.voice-play { flex: 1; font-size: 16px; }
.voice-decisions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.voice-decision { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1px solid transparent; border-radius: 13px; min-height: 97px; padding: 13px 8px; }
.voice-decision svg { width: 22px; height: 22px; margin-bottom: 2px; }
.voice-decision strong { font-size: 18px; font-weight: 650; line-height: 1.5; }
.voice-decision span { font-size: 13px; }
.voice-yes { background: #eaf5eb; border-color: #d6e9d8; color: #377c4e; }
.voice-yes:hover:not(:disabled) { background: #dcefdc; border-color: #9fc8a2; }
.voice-maybe { background: #fff6e5; border-color: #f0e1c6; color: #9c762d; }
.voice-maybe:hover:not(:disabled) { background: #ffedc9; border-color: #dabd83; }
.voice-no { background: #fff0ec; border-color: #efdcd5; color: #a75a4b; }
.voice-no:hover:not(:disabled) { background: #fce1d9; border-color: #dba99d; }
.voice-navigation { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 10px; }
.voice-navigation .btn { flex: 1; font-size: 14px; padding-inline: 10px; }
.voice-navigation svg { width: 17px; height: 17px; }
.voice-control-hint { margin-top: 9px; color: #7c8b73; font-size: 13px; line-height: 1.8; text-align: center; }
.voice-privacy { display: flex; align-items: flex-start; gap: 9px; border-top: 1px solid #e6ece2; padding-top: 16px; margin-top: 18px; }
.voice-privacy > svg { width: 17px; height: 17px; color: #819472; margin-top: 4px; }
.voice-privacy p { color: #7c8a72; font-size: 13px; line-height: 1.85; }
@keyframes voice-breathe { 50% { opacity: .45; } }

@media (max-width: 680px) {
  .heading-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 9px; max-width: none; }
  .heading-actions .voice-launch { grid-column: 1 / -1; grid-row: 1; }
  .heading-actions .btn { width: 100%; }
  .voice-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .voice-dialog-header { padding: 16px 15px 13px; }
  .voice-dialog-header h2 { font-size: 18px; }
  .voice-eyebrow { font-size: 14px; }
  .voice-body { padding: 16px 15px 20px; }
  .voice-session-controls { align-items: stretch; gap: 9px; }
  .voice-session-controls label { width: 100%; justify-content: space-between; font-size: 14px; gap: 7px; }
  .voice-session-controls select { font-size: 16px; max-width: 210px; min-width: 0; }
  .voice-position { width: 100%; text-align: center; font-size: 14px; }
  .voice-progress { margin-top: 10px; margin-bottom: 15px; }
  .voice-contact-card { padding: 20px 16px 17px; border-radius: 15px; }
  .voice-contact-name { font-size: 29px; line-height: 1.5; margin-top: 17px; margin-bottom: 13px; }
  .voice-stage { font-size: 14px; }
  .voice-command-hint { font-size: 14px; }
  .voice-main-controls { margin-top: 15px; }
  .voice-main-controls .btn { font-size: 16px; }
  .voice-decisions { gap: 8px; }
  .voice-decision { min-height: 96px; padding-inline: 5px; }
  .voice-decision strong { font-size: 18px; }
  .voice-decision span { font-size: 14px; }
  .voice-navigation .btn { font-size: 14px; gap: 5px; padding-inline: 6px; }
  .voice-control-hint, .voice-privacy p { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .stage-listening .voice-stage > svg { animation: none; } }

/* Direct attendance choices stay in the same three RTL positions on every device. */
.contacts-list:has(.contact-card) { display: grid; align-content: start; gap: 12px; padding: 17px 20px 20px; background: #fafcf9; }
.contact-card { position: relative; min-width: 0; border: 1px solid #e0e7df; border-radius: 14px; background: #fff; box-shadow: 0 2px 4px #243e2a03; }
.contact-card-header { display: flex; align-items: flex-start; gap: 12px; padding: 16px 17px 15px; }
.contact-card-avatar { flex: 0 0 37px; width: 37px; height: 37px; display: flex; align-items: center; justify-content: center; margin-top: 2px; border-radius: 12px; background: #eef3ed; color: #71846a; font-size: 13px; font-weight: 600; }
.contact-card:nth-child(5n + 2) .contact-card-avatar { background: #f5eee7; color: #958064; }
.contact-card:nth-child(5n + 3) .contact-card-avatar { background: #edf0f7; color: #7585a1; }
.contact-card:nth-child(5n + 4) .contact-card-avatar { background: #f6eae6; color: #a07b6d; }
.contact-card:nth-child(5n + 5) .contact-card-avatar { background: #f1ecf5; color: #8d789e; }
.contact-card-info { flex: 1 1 0; min-width: 0; }
.contact-card-name { margin: 0; color: #233c2a; font-size: 16px; line-height: 1.65; font-weight: 650; letter-spacing: -.1px; white-space: normal; overflow-wrap: anywhere; overflow: visible; text-overflow: clip; }
.contact-card-details { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 13px; margin-top: 5px; font-size: 14px; line-height: 1.65; color: #778572; }
.contact-card-detail { display: inline-flex; align-items: flex-start; gap: 6px; min-width: 0; max-width: 100%; }
.contact-card-detail svg { width: 14px; height: 14px; margin-top: 4px; color: #92a08a; flex: 0 0 14px; }
.contact-card-detail bdi { min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.contact-card-group { display: inline-block; padding: 1px 7px; border: 1px solid #e7ece3; border-radius: 6px; background: #f7f9f4; color: #7b8a70; font-size: 13px; white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
.contact-card-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid #e5ece0; border-radius: 0 0 13px 13px; overflow: hidden; }
.contact-card-choice { appearance: none; display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 51px; padding: 11px 8px; border: 0; border-inline-end: 1px solid #e4eadd; border-bottom: 3px solid transparent; background: #f8faf6; font-size: 15px; font-weight: 550; line-height: 1.5; color: #69805e; cursor: pointer; }
.contact-card-choice:last-child { border-inline-end: 0; }
.contact-card-choice svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.8; }
.contact-card-choice span { min-width: 0; white-space: normal; }
.contact-card-choice.choice-invited { background: #f0f8f1; color: #377a4b; }
.contact-card-choice.choice-maybe { background: #fff9ee; color: #9b752f; }
.contact-card-choice.choice-declined { background: #fff5f1; color: #a35f4e; }
.contact-card-choice.choice-invited:hover:not([aria-disabled="true"]) { background: #e4f2e5; }
.contact-card-choice.choice-maybe:hover:not([aria-disabled="true"]) { background: #fff0d8; }
.contact-card-choice.choice-declined:hover:not([aria-disabled="true"]) { background: #fde7df; }
.contact-card-choice.choice-invited.is-selected { color: #235e35; background: #d8edda; border-bottom-color: #4f955c; font-weight: 700; }
.contact-card-choice.choice-maybe.is-selected { color: #815b1f; background: #ffe8bb; border-bottom-color: #c69232; font-weight: 700; }
.contact-card-choice.choice-declined.is-selected { color: #8c4636; background: #f8dcd2; border-bottom-color: #bd7662; font-weight: 700; }
.contact-card-choice:focus-visible { position: relative; z-index: 1; outline: 3px solid #245d4d; outline-offset: -4px; }
.contact-card-choice[aria-disabled="true"] { opacity: .75; cursor: progress; }
.contact-card-choice.is-selected[aria-disabled="true"] { opacity: 1; }
.contact-card.is-invited { border-color: #bfd9c2; }
.contact-card.is-maybe { border-color: #e5cf9d; }
.contact-card.is-declined { border-color: #e3bbb0; }
.contact-card-announcement { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.event-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; padding: 16px 18px; margin-bottom: 24px; background: #fff; border: 1px solid #e0e8de; border-radius: 15px; }
.event-select { display: flex; flex: 1 1 300px; align-items: center; gap: 12px; min-width: 0; color: #5d7255; font-size: 14px; font-weight: 550; }
.event-select > span, .event-select > label { flex-shrink: 0; }
.event-select > span { display: inline-flex; align-items: center; gap: 8px; }
.event-select > span svg { width: 18px; height: 18px; color: #73916a; }
.event-select select, select.event-select { min-height: 46px; min-width: 0; width: 100%; border: 1px solid #d9e4d3; border-radius: 10px; padding: 10px 13px; color: #294d28; background: #f8fbf5; font-size: 16px; font-weight: 550; }
.event-select select { flex: 1 1 0; max-width: 470px; }
.event-create { flex-shrink: 0; min-height: 46px; }
.event-description { flex-basis: 100%; font-size: 14px; line-height: 1.7; color: #78896d; margin-top: -2px; }

@media (max-width: 680px) {
  .contacts-list:has(.contact-card) { gap: 11px; padding: 13px 12px 16px; }
  .contact-card { border-radius: 12px; }
  .contact-card-header { gap: 10px; padding: 14px 13px 13px; }
  .contact-card-avatar { width: 31px; height: 31px; flex-basis: 31px; border-radius: 10px; font-size: 12px; margin-top: 3px; }
  .contact-card-name { font-size: 16px; line-height: 1.65; }
  .contact-card-details { font-size: 14px; gap: 3px 10px; }
  .contact-card-group { font-size: 14px; }
  .contact-card-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 0 0 11px 11px; }
  .contact-card-choice { min-height: 54px; padding: 12px 5px 10px; font-size: 15px; gap: 5px; }
  .contact-card-choice svg { width: 17px; height: 17px; }
  .event-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; padding: 13px; gap: 9px 10px; margin-bottom: 20px; }
  .event-select { width: 100%; min-width: 0; flex-direction: column; align-items: stretch; gap: 6px; }
  .event-select select { flex-basis: auto; width: 100%; max-width: none; min-height: 47px; font-size: 16px; }
  .event-create { width: auto; min-height: 47px; padding-inline: 11px; gap: 6px; font-size: 14px; }
  .event-create svg { width: 16px; height: 16px; }
  .event-description { grid-column: 1 / -1; margin: 0; font-size: 14px; line-height: 1.6; }
  .stats { gap: 8px; margin-bottom: 18px; }
  .stat-card { min-height: 84px; padding: 10px 13px; }
  .stat-value { font-size: 27px; }
  .stat-icon { width: 28px; height: 28px; }
}

/* Card tools: WhatsApp lookup and name editing, compact on the card's end side. */
.contact-card-tools { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.contact-card-tool { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; min-width: 34px; padding: 0 11px; border: 1px solid #dfe8e1; border-radius: 10px; background: #fff; color: #61796a; font-size: 13.5px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.contact-card-tool svg { width: 16px; height: 16px; flex-shrink: 0; }
.contact-card-whatsapp { color: var(--teal-dark); background: var(--teal-soft); border-color: #cde6dd; }
.contact-card-whatsapp:hover { background: #dcefe8; border-color: #b9dccf; }
.contact-card-edit { width: 34px; padding: 0; }
.contact-card-edit:hover:not(:disabled) { background: var(--teal-soft); color: var(--teal); border-color: #cde6dd; }
.contact-card-edit:disabled { opacity: .5; cursor: progress; }
.contact-card-tool:focus-visible { outline: 3px solid #245d4d; outline-offset: 2px; }
.contact-card-rename { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.contact-card-rename input { flex: 1 1 220px; min-width: 0; min-height: 44px; border: 1px solid #d9e4d3; border-radius: 10px; padding: 8px 12px; font-size: 16px; color: #233c2a; background: #fff; }
.contact-card-rename .btn { min-height: 44px; }
.contact-card-rename-error { flex-basis: 100%; margin: 0; color: #a35f4e; font-size: 14px; }
.history-rename { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; color: #5f7268; }
.history-rename svg { width: 14px; height: 14px; }
@media (max-width: 680px) {
  .contact-card-tools { gap: 6px; }
  .contact-card-tool { width: 36px; height: 36px; min-width: 36px; padding: 0; }
  .contact-card-tool svg { width: 18px; height: 18px; }
  .contact-card-tool-label { display: none; }
  .contact-card-rename .btn { flex: 1 1 0; }
}

/* Extra answers for guests marked as coming: one compact row under the main choices. */
.contact-card-actions:has(+ .contact-card-extras) { border-radius: 0; }
.contact-card-extras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid #e5ece0; background: #fbfcfa; border-radius: 0 0 13px 13px; }
.contact-card-extra { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 9px 6px 10px; border-inline-end: 1px solid #edf1ea; }
.contact-card-extra:last-child { border-inline-end: 0; }
.contact-card-extra-label { font-size: 12.5px; font-weight: 600; line-height: 1.3; color: #6f8268; text-align: center; }
.contact-card-extra-options { display: inline-flex; gap: 4px; }
.contact-card-extra-option { min-width: 46px; height: 32px; padding: 0 10px; border: 1px solid #dde6da; border-radius: 8px; background: #fff; color: #5d7258; font-size: 13.5px; font-weight: 600; line-height: 1; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.contact-card-extra-option:hover:not([aria-disabled="true"]):not(.is-selected) { background: #f2f6f0; }
.contact-card-extra-option.extra-yes.is-selected { background: #d8edda; border-color: #8fc39a; color: #235e35; }
.contact-card-extra-option.extra-no.is-selected { background: #f8dcd2; border-color: #d9a294; color: #8c4636; }
.contact-card-extra-option[aria-disabled="true"] { opacity: .75; cursor: progress; }
.contact-card-extra-option:focus-visible { outline: 3px solid #245d4d; outline-offset: 1px; }
@media (max-width: 680px) {
  .contact-card-extras { border-radius: 0 0 11px 11px; }
  .contact-card-extra { gap: 5px; padding: 8px 3px 9px; }
  .contact-card-extra-label { font-size: 12px; }
  .contact-card-extra-option { min-width: 42px; height: 34px; padding: 0 8px; }
}

/* Partner estimate next to the coming count, and the clickable summary of the extra answers. */
.stat-value:has(.stat-extra) { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.stat-extra { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: #d3ebdc; color: #1f6b4a; font-size: 16px; line-height: 1.3; font-weight: 700; letter-spacing: 0; }
.extras-summary { margin: -10px 0 24px; padding: 14px 16px 15px; background: #fff; border: 1px solid #e0e8de; border-radius: 15px; }
.extras-summary-title { margin-bottom: 11px; font-size: 13px; font-weight: 600; color: #6c7f66; }
.extras-summary-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.extras-summary-item { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; padding: 10px 6px 9px; border: 1px solid #edf1ea; border-radius: 12px; background: #fbfcfa; }
.extras-summary-label { font-size: 13.5px; font-weight: 650; color: #3f5838; text-align: center; }
.extras-summary-values { display: flex; gap: 6px; }
.extras-summary-value { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 11px; border: 1px solid #dde6da; border-radius: 9px; background: #fff; color: #5d7258; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.extras-summary-value strong { font-size: 15.5px; font-variant-numeric: tabular-nums; }
.extras-summary-value.extra-yes strong { color: #2f7a46; }
.extras-summary-value.extra-no strong { color: #a35f4e; }
.extras-summary-value:hover:not(.active) { background: #f2f6f0; }
.extras-summary-value.extra-yes.active { background: #d8edda; border-color: #8fc39a; color: #235e35; }
.extras-summary-value.extra-no.active { background: #f8dcd2; border-color: #d9a294; color: #8c4636; }
.extras-summary-value:focus-visible { outline: 3px solid #245d4d; outline-offset: 2px; }
.extras-summary-open { font-size: 12px; color: #84927d; }
@media (max-width: 680px) {
  .extras-summary { margin: -6px 0 20px; padding: 12px 10px 12px; }
  .extras-summary-title { margin-bottom: 9px; font-size: 12.5px; line-height: 1.5; }
  .extras-summary-grid { gap: 6px; }
  .extras-summary-item { padding: 8px 3px 8px; gap: 6px; }
  .extras-summary-label { font-size: 12.5px; }
  .extras-summary-values { gap: 4px; }
  .extras-summary-value { flex-direction: column; gap: 1px; min-height: 44px; min-width: 42px; padding: 3px 7px; font-size: 12px; }
  .extras-summary-value strong { font-size: 15px; }
  .extras-summary-open { font-size: 11px; }
}

/* Add people: from the phone's contacts list, or by hand. */
.panel-add-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.add-from-phone { color: var(--teal-dark); border-color: #cde6dd; background: var(--teal-soft); }
.add-from-phone:hover:not(:disabled) { background: #dcefe8; }
.add-note { margin: 0 0 14px; }
@media (max-width: 680px) {
  .panel-add-actions { gap: 6px; }
  .add-from-phone, .panel-add-actions .add-person-button { min-height: 44px; }
  .panel-top:has(.panel-add-actions) { flex-direction: column; align-items: stretch; }
  .panel-add-actions { width: 100%; flex-wrap: nowrap; }
  .panel-add-actions > .btn { flex: 1 1 0; justify-content: center; padding-inline: 10px; }
}
