:root {
  --ink: #1c1b19;
  --ink-2: #4a4843;
  --muted: #7a766e;
  --paper: #f6f5f1;
  --card: #ffffff;
  --line: #e2dfd7;
  --accent: #7eb937;
  --accent-dark: #4f7d1b;
  --warn: #b3261e;
  --amber: #a15c00;
  --amber-bg: #fff3d6;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(28, 27, 25, 0.08);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); font-size: 15px; line-height: 1.4; }
button, select, input { font: inherit; }

.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.content { min-width: 0; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; padding: 16px 12px; background: var(--ink); color: #ddd; overflow: hidden auto; }
.sidebar .brand { color: #fff; font-size: 17px; padding: 0 4px 18px; white-space: nowrap; }
.sidebar .brand-icon { width: 26px; height: 26px; margin-right: 8px; }
.nav-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; background: none; border: none; color: #ddd; padding: 9px 10px; border-radius: 8px; text-align: left; }
.nav-count { background: var(--amber); color: #fff; border-radius: 999px; font-size: 12px; padding: 0 7px; }
.page-title { font-size: 22px; margin: 0 8px 0 0; }
.nav-item:hover { background: #2a2825; }
.nav-item.active { background: #34322e; color: #fff; }
.nav-more-toggle { display: none; }
.nav-more { display: flex; flex-direction: column; flex: 1; gap: 2px; }
.nav-group { padding: 14px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: #8a867d; }
.side-user { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: auto; padding: 12px 8px 0; border-top: 1px solid #34322e; font-size: 14px; }
.brand { display: flex; align-items: center; font-weight: 800; letter-spacing: 0.5px; font-size: 20px; }
.brand-icon { margin-right: 10px; border-radius: 6px; }
.brand span { color: var(--accent); }
.brand small { font-weight: 500; font-size: 13px; opacity: 0.7; margin-left: 6px; letter-spacing: 0; }
.pill { background: #34322e; border-radius: 999px; padding: 2px 10px; font-size: 12px; text-transform: capitalize; }

button { white-space: nowrap; cursor: pointer; border: 1px solid var(--accent-dark); background: var(--accent-dark); color: #fff; border-radius: var(--radius); padding: 7px 14px; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.ghost { background: transparent; color: inherit; border-color: currentColor; }
.sidebar button.ghost { border-color: #8a867d; }

.banner { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 10px 16px; background: var(--amber-bg); color: var(--amber); border-bottom: 1px solid #e8cf93; }
.banner button { background: var(--amber); border-color: var(--amber); }

main { max-width: 1400px; margin: 0 auto; padding: 16px 20px 40px; }

.quick-views { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: 14px; }
.chip:hover { border-color: var(--accent); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-count { font-weight: 700; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.toolbar #f-query { flex: 1 1 280px; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.toolbar + .filters { margin-bottom: 10px; }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 280px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); padding: 6px; }
.menu-list button { display: block; width: 100%; background: none; border: none; color: var(--ink); text-align: left; white-space: normal; padding: 8px 10px; border-radius: 6px; }
.menu-list button:hover { background: var(--paper); }
.menu-list label.inline { display: flex; align-items: center; gap: 6px; padding: 4px 10px 8px 22px; font-size: 13px; color: var(--ink-2); }

.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.filters label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--ink-2); }
.filters label.grow { flex: 1 1 240px; }
.filters label.check { flex-direction: row; align-items: center; gap: 6px; font-size: 14px; padding-bottom: 7px; }
.filters select, .filters input[type="search"] { padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; min-width: 130px; }
.filters .grow input { width: 100%; }

.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(28, 27, 25, 0.4); }
.filters.filter-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(380px, 100vw); display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 12px; overflow-y: auto; border: none; border-radius: 0; box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15); padding: 18px 18px 0; }
.filter-drawer fieldset { display: grid; gap: 8px; margin: 0; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 10px; }
.filter-drawer legend { padding: 0 4px; font-weight: 700; font-size: 13px; color: var(--ink); }
.filter-drawer select, .filter-drawer input[type="search"] { width: 100%; min-width: 0; }
.filters.filter-drawer label.check { padding-bottom: 0; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-head h2 { margin: 0; font-size: 18px; }
.drawer-foot { position: sticky; bottom: 0; display: flex; gap: 8px; margin-top: auto; padding: 12px 0 18px; background: var(--card); }
.drawer-foot button:first-child { flex: 1; }

.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 13px; }
.filter-tag { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 10px; background: #eef6e3; border: 1px solid #cfe3b0; border-radius: 999px; color: var(--ink); }
.filter-tag button { background: none; border: none; color: var(--ink-2); padding: 0 6px; font-size: 15px; line-height: 1; }

.status { display: block; min-height: 22px; margin: 10px 2px 4px; color: var(--ink-2); }
.status.error { color: var(--warn); font-weight: 600; }

.table-wrap { overflow: auto; max-height: 68vh; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { position: sticky; top: 0; background: #efede6; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-2); z-index: 1; }
button.sort { background: none; border: none; color: inherit; padding: 0; font: inherit; text-transform: inherit; letter-spacing: inherit; }
button.sort[aria-sort="ascending"]::after { content: " \25B2"; }
button.sort[aria-sort="descending"]::after { content: " \25BC"; }
tbody tr[tabindex] { cursor: pointer; }
tbody tr[tabindex]:hover, tbody tr[tabindex]:focus { background: #f3f8ec; outline: none; }
tbody tr.flag td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
td .second { display: block; color: var(--muted); font-size: 12.5px; }
.contact-link { color: inherit; text-decoration: underline dotted; }
.contact-link:hover, .contact-link:focus-visible { text-decoration: underline; }
.id-tag { display: inline-block; font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); background: #f0eee8; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.field-hint { font-size: 12px; color: var(--warn); }
.filters input[aria-invalid="true"] { border-color: var(--warn); outline-color: var(--warn); }
.badge { display: inline-block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: top; margin: 0 4px 2px 0; background: var(--amber-bg); color: var(--amber); border-radius: 999px; padding: 1px 9px; font-size: 12.5px; }
#customer-table td strong { font-weight: 650; }
#customer-table th { white-space: nowrap; }

.list-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 10px; }
.view-toggle { display: inline-flex; margin: 0; padding: 0; min-width: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.view-toggle button { background: none; border: none; border-radius: 0; color: var(--ink-2); padding: 6px 14px; }
.view-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.sort-by { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.sort-by select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }

.customer-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.contact-card { display: grid; gap: 8px; align-content: start; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); cursor: pointer; }
.contact-card:hover, .contact-card:focus-visible { border-color: var(--accent); outline: none; }
.contact-card.flag { border-left: 4px solid var(--amber); }
.contact-card.inactive { opacity: 0.6; }
.card-top { display: flex; align-items: center; gap: 10px; }
.card-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.card-name strong { display: block; }
.card-name .second { display: block; color: var(--muted); font-size: 13px; }
.card-top .id-tag { align-self: flex-start; }
.avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: #eef6e3; color: var(--accent-dark); font-weight: 700; }
.card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.birthday-tag { background: #eef6e3; color: var(--accent-dark); border-radius: 999px; padding: 1px 9px; }
.card-actions { display: flex; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.contact-link.card-action, .card-action { flex: 1; padding: 7px; border-radius: 8px; background: var(--paper); color: var(--accent-dark); text-align: center; text-decoration: none; }
.card-action.off { color: #b9b5ac; }
.muted { color: var(--muted); }
.empty { padding: 24px; text-align: center; color: var(--muted); }

.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: flex-end; margin-top: 10px; }
.pager #pager-info { margin-right: auto; color: var(--ink-2); }
.pager label { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.pager select { padding: 5px; border: 1px solid var(--line); border-radius: 6px; }

dialog { width: min(640px, calc(100vw - 24px)); border: none; border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }
dialog::backdrop { background: rgba(28, 27, 25, 0.55); }
dialog#detail { margin: 0 0 0 auto; width: min(480px, 100vw); max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; padding: 20px 22px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.dialog-head h2 { margin: 0; font-size: 20px; }
.fields { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; margin: 12px 0; }
.fields dt { color: var(--muted); }
.fields dd { margin: 0; overflow-wrap: anywhere; }
.notes { padding-left: 18px; margin: 6px 0 0; }
.notes li { margin-bottom: 8px; }
.notes .guidance { color: var(--ink-2); display: block; font-size: 13.5px; }

.login-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-card { width: min(380px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.login-card .brand { color: var(--ink); margin-bottom: 8px; }
.login-card h1 { font-size: 20px; margin: 4px 0 14px; }
.login-card form { display: grid; gap: 6px; }
.login-card label { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.login-card input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; width: 100%; }
.login-card button { margin-top: 14px; padding: 10px; }
.login-card .setup-qr { display: block; margin: 4px auto; background: #fff; image-rendering: pixelated; }
.login-card .setup-steps { margin: 0; padding-left: 20px; font-size: 14px; }
.login-card code { font-size: 13px; word-break: break-all; }
.message { background: #fdecea; color: var(--warn); border-radius: 6px; padding: 8px 10px; margin: 0 0 8px; }
.fine-print { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }

@media (max-width: 720px) {
  main { padding: 12px; }
  .app { display: block; padding-bottom: 64px; }
  .sidebar { position: fixed; top: auto; right: 0; bottom: 0; left: 0; height: auto; flex-direction: row; gap: 0; padding: 0; background: #fff; color: var(--ink-2); border-top: 1px solid var(--line); z-index: 30; overflow: visible; }
  .sidebar .brand { display: none; }
  .sidebar > .nav-item { flex: 1; flex-direction: column; justify-content: center; text-align: center; color: var(--ink-2); font-size: 12px; padding: 10px 0 12px; border-radius: 0; }
  .sidebar > .nav-item:hover { background: none; }
  .sidebar > .nav-item.active { background: none; color: var(--accent-dark); font-weight: 700; }
  .nav-more-toggle { display: flex; }
  .nav-more { display: none; position: absolute; right: 8px; bottom: calc(100% + 8px); width: min(280px, calc(100vw - 16px)); flex: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); padding: 8px; color: var(--ink); }
  .sidebar.more-open .nav-more { display: flex; }
  .nav-more .nav-item { color: var(--ink); padding: 10px; font-size: 15px; }
  .nav-more .nav-item:hover { background: var(--paper); }
  .nav-more .nav-item.active { background: #eef6e3; color: var(--ink); }
  .nav-group { color: var(--muted); }
  .side-user { margin-top: 8px; border-top-color: var(--line); }
  .sidebar button.ghost { border-color: var(--line); color: var(--ink); }
  .menu-list { width: min(280px, calc(100vw - 24px)); }
  .page-title, .add-label { display: none; }
  dialog#detail { margin: auto 0 0; width: 100vw; height: auto; max-height: 90vh; border-radius: 16px 16px 0 0; padding: 16px; }
  .quick-views { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
  .chip { flex: none; }
  .toolbar { gap: 8px; }
  .toolbar #f-query { flex-basis: 140px; }
  .table-wrap:not(.customer-table-wrap) { max-height: none; border: none; background: transparent; box-shadow: none; overflow: visible; }
  table:not(#customer-table), table:not(#customer-table) :is(thead, tbody, tr, td) { display: block; }
  table:not(#customer-table) thead { position: absolute; left: -9999px; }
  #staff-table tbody tr, #differences-table tbody tr { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
  table:not(#customer-table) td { border: none; padding: 3px 0; }
  table:not(#customer-table) tbody tr.flag { border-left: 4px solid var(--amber); }
  table:not(#customer-table) tbody tr.flag td:first-child { box-shadow: none; }
  table:not(#customer-table) td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12.5px; }
  table:not(#customer-table) td[data-label=""]::before { content: ""; }
  #customer-table { min-width: 760px; }
  .customer-cards { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; gap: 0; }
  .fields dd { margin-bottom: 8px; }
  .pager { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Phase B: editing, review queue, bulk assign ---------- */
button.secondary { background: transparent; color: var(--accent-dark); border-color: var(--accent-dark); }
button.danger { background: var(--warn); border-color: var(--warn); }
button.add { margin-left: auto; }
.staff-tools { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-bottom: 10px; }
tr.removed td { color: var(--muted); text-decoration: line-through; }
tr.removed td:last-child { text-decoration: none; }
button.link { background: none; border: none; color: var(--accent-dark); text-decoration: underline; padding: 0; }
.filters label.inline { flex-direction: row; align-items: center; gap: 6px; }

.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: #eef6e3; border: 1px solid #cfe3b0; border-radius: var(--radius); padding: 10px 12px; margin-top: 10px; }
.bulk-bar select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.select-col { width: 34px; }
tbody tr.inactive td { color: var(--muted); text-decoration: line-through; }

.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.contact-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 14px; margin-top: 12px; }
.contact-form > .form-banner, .contact-form > .duplicate-warning { grid-column: 1 / -1; }
.form-row { display: grid; gap: 3px; }
.form-row label { font-size: 13px; color: var(--ink-2); }
.form-row input, .form-row select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; width: 100%; background: #fff; }
.form-row.check-row label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.form-row.check-row input { width: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.birthday-inputs { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.field-error { color: var(--warn); font-size: 13px; margin: 0; }
.form-banner { background: #fdecea; color: var(--warn); border-radius: 6px; padding: 8px 10px; margin: 0; }
.duplicate-warning { background: var(--amber-bg); color: var(--amber); border: 1px solid #e8cf93; border-radius: 6px; padding: 10px 12px; }
.duplicate-warning p { margin: 0 0 6px; }
fieldset.form-row.label-group { display: block; grid-column: 1 / -1; border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.form-row legend { font-size: 13px; color: var(--ink-2); padding: 0; margin-bottom: 4px; }
.label-options { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.form-row .label-options label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); white-space: nowrap; }
.form-row .label-options input { width: auto; padding: 0; }
.label-note { margin: 6px 0 0; font-size: 13px; }
.capture-block { display: grid; gap: 6px; margin: 8px 0 14px; padding: 10px 12px; background: #f4f8ec; border: 1px solid #dde8c8; border-radius: 6px; }
.capture-block .form-actions { margin: 0; }
.capture-note { margin: 0; font-size: 13px; }
.capture-note.error { color: var(--warn); }
.contact-form.wide { grid-template-columns: 1fr; }
dialog#edit-dialog.wide { width: min(980px, calc(100vw - 24px)); }
.import-intro { margin: 0; font-size: 13px; }
.import-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.import-tools input[type=search], .import-tools select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.import-table { max-height: 38vh; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.import-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.import-table th, .import-table td { padding: 5px 8px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.import-table tr.blocked { background: #fdf3f1; }
.import-table td.problem { color: var(--warn); }
.change-list { margin: 6px 0 8px 18px; padding: 0; }
.change-list li { margin-bottom: 6px; }
.change-list .muted { font-size: 13px; }
.history { padding-left: 18px; margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); }
.history li { margin-bottom: 4px; }
.history li.undone { text-decoration: line-through; color: var(--ink-3, #8a8a8a); }
.status button.link { margin-left: 4px; }

.queue { display: grid; grid-template-columns: 260px 1fr; gap: 14px; align-items: start; }
.queue-side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.queue-side h2 { font-size: 15px; margin: 0 0 8px; }
.kinds { display: grid; gap: 6px; }
button.kind { display: flex; justify-content: space-between; gap: 8px; text-align: left; background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.kind.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.kind-count { font-weight: 700; }
.queue-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.queue-card h2 { margin: 2px 0 0; }

@media (max-width: 720px) {
  .queue { grid-template-columns: 1fr; }
  .select-col { width: auto; }
  td.select-col { padding-bottom: 6px; }
  button.add { margin-left: 0; }
}

/* ---------- events calendar ---------- */
.cal-bar { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.cal-bar .cal-month { min-width: 150px; text-align: center;  font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.cal-head { background: #efede6; padding: 6px 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-2); }
.cal-day { background: var(--card); min-height: 84px; padding: 4px 6px; display: flex; flex-direction: column; gap: 3px; }
.cal-day.blank { background: var(--paper); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-number { font-size: 12.5px; color: var(--muted); }
button.cal-chip { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; text-align: left; font-size: 12.5px; padding: 2px 6px; background: #eef6e3; color: var(--ink); border-color: #cfe3b0; }
button.cal-chip.cancelled { color: var(--muted); text-decoration: line-through; background: transparent; border-color: var(--line); }
.section-title { font-size: 16px; margin: 6px 0; }
textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; resize: vertical; }

@media (max-width: 720px) {
  .cal-day { min-height: 56px; padding: 2px 3px; }
  button.cal-chip { font-size: 11px; padding: 1px 3px; }
  #event-table tbody tr { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
}
