:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-muted: #f2f5fb;
  --border: #dfe4ee;
  --border-strong: #c9d1df;
  --text: #1f2430;
  --muted: #6f7787;
  --primary: #276ef1;
  --primary-strong: #1557c9;
  --primary-soft: #e8f0ff;
  --danger: #c63a46;
  --warning: #b86600;
  --success: #147a48;
  --personal-bg: #fff4bf;
  --personal-border: #ead27a;
  --personal-text: #594a12;
  --personal-accent: #d5ae31;
  --lunch-bg: #dff4df;
  --lunch-border: #acd7af;
  --lunch-text: #295a32;
  --shadow: 0 16px 50px rgba(31, 36, 48, 0.16);
  --sidebar-width: 350px;
  --calendar-min-width: 920px;
  --hour-height: 72px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at top, #edf4ff, var(--bg) 52%);
  overflow: auto;
}
.auth-card {
  width: min(100%, 420px);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.auth-card h1 { margin: 13px 0 5px; font-size: 24px; }
.auth-card > p { margin: 0 0 22px; color: var(--muted); line-height: 1.45; }
.auth-logo { width: 52px; height: 52px; overflow: hidden; border-radius: 15px; background: #eef9e9; border: 1px solid #cfe6c6; }
.auth-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.auth-form { display: grid; gap: 14px; }
.auth-error { margin-top: 15px !important; padding: 10px 12px; border-radius: 10px; background: #fff0f1; color: var(--danger) !important; font-size: 13px; }
.logout-button { min-height: 34px; }

.app-shell { height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  grid-template-columns: minmax(270px, 1fr) auto minmax(270px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 20;
}
.brand { display: flex; gap: 12px; align-items: center; min-width: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: white; font-size: 22px; background: linear-gradient(145deg, #4a8cff, #1557c9); box-shadow: 0 8px 20px rgba(39, 110, 241, .24); }
.brand-title { font-size: 17px; font-weight: 750; }
.brand-subtitle { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.calendar-controls { display: flex; align-items: center; gap: 8px; }
.week-label { min-width: 190px; font-weight: 700; text-align: center; }
.topbar-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.mobile-tasks-button { display: none; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #9aa2b2; }
.google-button.connected .status-dot { background: #20a060; box-shadow: 0 0 0 4px rgba(32, 160, 96, .12); }

button, .file-button, .link-button { border: 0; cursor: pointer; }
.primary-button, .secondary-button, .icon-button, .file-button, .link-button {
  border-radius: 10px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 650;
  transition: 140ms ease;
}
.primary-button { color: white; background: var(--primary); padding: 0 16px; box-shadow: 0 5px 14px rgba(39, 110, 241, .2); }
.primary-button:hover { background: var(--primary-strong); transform: translateY(-1px); }
.secondary-button, .file-button { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); padding: 0 14px; }
.secondary-button:hover, .file-button:hover { background: var(--surface-muted); }
.icon-button { width: 40px; min-width: 40px; padding: 0; background: transparent; font-size: 22px; }
.icon-button:hover { background: var(--surface-muted); }
.icon-button.small { width: 32px; min-width: 32px; min-height: 32px; font-size: 16px; }
.full-width { width: 100%; }

.workspace { flex: 1; min-height: 0; display: flex; }
.sidebar-backdrop { display: none; }
.sidebar {
  width: var(--sidebar-width);
  min-width: 280px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  z-index: 10;
}
.sidebar-header { padding: 16px 16px 0; }
.sidebar-title-row { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 12px; }
.sidebar h1 { margin: 0; font-size: 20px; }
.sidebar-title-row p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.search-box { min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); }
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(39, 110, 241, .1); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; }
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 12px; padding: 4px; background: var(--surface-muted); border-radius: 10px; }
.tab { min-width: 0; min-height: 34px; border-radius: 8px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; padding: 0 4px; white-space: nowrap; }
.tab span { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: rgba(111, 119, 135, .12); margin-left: 3px; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: 0 2px 7px rgba(31,36,48,.08); }
.task-list { flex: 1; overflow-y: auto; padding: 14px 12px 20px; }
.task-card {
  position: relative;
  padding: 12px 12px 11px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(31,36,48,.045);
  cursor: grab;
  user-select: none;
}
.task-card::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: #89aaf7; }
.task-card.priority-high::before { background: #dc5a65; }
.task-card.priority-low::before { background: #70b995; }
.task-card.task-personal { background: var(--personal-bg); border-color: var(--personal-border); color: var(--personal-text); }
.task-card.task-personal::before,
.task-card.task-personal.priority-high::before,
.task-card.task-personal.priority-low::before { background: var(--personal-accent); }
.task-card.task-personal:hover { border-color: #d8bb55; }
.task-card.task-personal .meta-pill { background: rgba(255,255,255,.58); color: #6a5817; }
.task-card.task-personal .task-card-edit { color: #78651c; }
.task-card.task-personal .task-card-edit:hover { background: rgba(255,255,255,.5); color: #4d410f; }
.task-card.task-personal .task-scheduled-note { color: #806500; }
.task-card:hover { border-color: #aebee1; box-shadow: 0 7px 18px rgba(31,36,48,.09); transform: translateY(-1px); }
.task-card:active { cursor: grabbing; }
.task-card.dragging { opacity: .45; }
.task-card-title { font-size: 14px; line-height: 1.32; font-weight: 720; padding-right: 24px; overflow-wrap: anywhere; }
.task-card-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.meta-pill { height: 22px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 99px; background: var(--surface-muted); color: var(--muted); font-size: 11px; font-weight: 650; }
.task-card-edit { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 7px; background: transparent; color: var(--muted); }
.task-card-edit:hover { background: var(--surface-muted); color: var(--text); }
.task-drag-handle { display: none; }
.task-scheduled-note { color: var(--primary-strong); font-size: 11px; font-weight: 700; margin-top: 7px; }
.empty-state { flex: 1; display: grid; align-content: center; justify-items: center; gap: 6px; color: var(--muted); text-align: center; padding: 30px; }
.empty-icon { font-size: 34px; color: #9db4ea; }
.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }
.capacity-card { padding: 12px; background: var(--surface-muted); border-radius: 12px; }
.capacity-header { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.capacity-track { height: 7px; border-radius: 99px; background: #dce3f0; overflow: hidden; margin: 9px 0 7px; }
.capacity-fill { height: 100%; width: 0; border-radius: inherit; background: var(--primary); transition: width 220ms ease; }
.capacity-fill.over { background: #d04b58; }
.capacity-caption { color: var(--muted); font-size: 11px; line-height: 1.35; }
.sidebar.collapsed { display: none; }
.sidebar-resizer { width: 5px; flex: 0 0 5px; cursor: col-resize; background: transparent; position: relative; z-index: 12; }
.sidebar-resizer:hover, .sidebar-resizer.active { background: var(--primary-soft); }

.calendar-panel { min-width: 0; flex: 1; position: relative; background: var(--surface); }
.calendar-scroll { height: 100%; overflow: auto; }
.calendar { min-width: var(--calendar-min-width); background: var(--surface); }
.expand-sidebar { position: absolute; left: 8px; top: 8px; z-index: 15; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); padding: 8px 10px; box-shadow: 0 5px 16px rgba(31,36,48,.12); }

.calendar-header { position: sticky; top: 0; z-index: 8; display: grid; background: var(--surface); border-bottom: 1px solid var(--border); }
.corner-cell { min-height: 68px; border-right: 1px solid var(--border); }
.day-header { min-height: 80px; border-right: 1px solid var(--border); padding: 10px 8px 7px; text-align: center; }
.day-header:last-child { border-right: 0; }
.day-name { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.day-number { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 50%; margin-top: 4px; font-size: 19px; }
.day-header.today .day-number { background: var(--primary); color: white; }
.day-capacity { margin-top: 4px; font-size: 10px; color: var(--muted); white-space: nowrap; }
.all-day-strip { display: grid; min-height: 28px; background: var(--surface); border-bottom: 1px solid var(--border); }
.all-day-label { padding: 6px 7px; text-align: right; color: var(--muted); font-size: 10px; border-right: 1px solid var(--border); }
.all-day-cell { min-width: 0; padding: 3px 4px; border-right: 1px solid var(--border); }
.all-day-cell:last-child { border-right: 0; }
.all-day-chip { display: block; max-width: 100%; padding: 3px 6px; margin: 1px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 5px; background: #e8ebf1; color: #4b5362; font-size: 10px; font-weight: 700; }

.time-grid { display: grid; position: relative; }
.time-axis { border-right: 1px solid var(--border); background: var(--surface); }
.time-label { height: var(--hour-height); position: relative; color: var(--muted); font-size: 10px; text-align: right; padding-right: 8px; transform: translateY(-6px); }
.day-column { position: relative; border-right: 1px solid var(--border); min-height: calc(var(--hour-height) * var(--work-hours)); background-image: linear-gradient(to bottom, transparent calc(25% - 1px), rgba(223,228,238,.45) calc(25% - 1px), rgba(223,228,238,.45) 25%, transparent 25%, transparent calc(50% - 1px), rgba(223,228,238,.55) calc(50% - 1px), rgba(223,228,238,.55) 50%, transparent 50%, transparent calc(75% - 1px), rgba(223,228,238,.45) calc(75% - 1px), rgba(223,228,238,.45) 75%, transparent 75%), linear-gradient(to bottom, transparent calc(100% - 1px), var(--border) calc(100% - 1px)); background-size: 100% var(--hour-height); }
.day-column:last-child { border-right: 0; }
.day-column.drop-target { background-color: rgba(39,110,241,.055); }
.current-time-line { position: absolute; left: 0; right: 0; height: 2px; background: #e34b55; z-index: 6; pointer-events: none; }
.current-time-line::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #e34b55; }

.calendar-event { position: absolute; z-index: 3; min-height: 18px; border-radius: 7px; padding: 4px 6px; overflow: hidden; border: 1px solid rgba(255,255,255,.72); box-shadow: 0 2px 5px rgba(31,36,48,.12); font-size: 11px; line-height: 1.22; cursor: pointer; user-select: none; transition: box-shadow 120ms ease; }
.calendar-event:hover { z-index: 5; box-shadow: 0 6px 16px rgba(31,36,48,.18); }
.calendar-event.task-event { background: #2f7df3; color: white; cursor: grab; }
.calendar-event.task-event.priority-high { background: #cf4c59; }
.calendar-event.task-event.priority-low { background: #268a62; }
.calendar-event.task-event.task-personal,
.calendar-event.task-event.task-personal.priority-high,
.calendar-event.task-event.task-personal.priority-low { background: var(--personal-bg); color: var(--personal-text); border-color: var(--personal-border); }
.calendar-event.lunch-event { background: var(--lunch-bg); color: var(--lunch-text); border-color: var(--lunch-border); cursor: grab; }
.calendar-event.google-event { background: #e5e8ee; color: #3e4552; border-color: #d6dbe4; }
.calendar-event.google-focusTime { background: #dde7ff; color: #294e9a; border-color: #c8d8ff; }
.calendar-event.google-outOfOffice { background: #f2e3e6; color: #8b3742; border-color: #ebcdd2; }
.event-title { font-weight: 760; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-time { opacity: .9; margin-top: 1px; white-space: nowrap; }
.resize-handle { position: absolute; left: 2px; right: 2px; height: 8px; cursor: ns-resize; z-index: 8; }
.resize-handle.top { top: -1px; }
.resize-handle.bottom { bottom: -1px; }
.calendar-event.dragging, .calendar-event.resizing { opacity: .72; z-index: 20; cursor: grabbing; pointer-events: none; }

.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(23,27,36,.38); backdrop-filter: blur(2px); }
.modal { position: fixed; z-index: 100; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 36px); overflow: auto; background: var(--surface); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.compact-modal { width: min(540px, calc(100vw - 32px)); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.modal h2 { margin: 0; font-size: 22px; }
.modal-header p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.modal-close { margin-top: -6px; margin-right: -6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.schedule-fields { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-muted); }
.schedule-heading { grid-column: 1 / -1; font-size: 12px; font-weight: 800; }
.full-span { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 750; }
.field small { color: var(--muted); }
.field input, .field select, .field textarea, .rich-text-editor { width: 100%; border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 11px; outline: 0; background: var(--surface); color: var(--text); }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus, .rich-text-editor:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(39,110,241,.1); }
.task-modal-close-row { display: flex; justify-content: flex-end; height: 2px; }
.task-modal-close-row .modal-close { position: relative; z-index: 1; }
#task-title { font-size: 18px; font-weight: 650; }
.task-title-field > span { font-size: 16px; }
.notes-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notes-link-button { padding: 2px 5px; border-radius: 6px; color: var(--primary-strong); font-size: 11px; font-weight: 750; }
.notes-link-button:hover { background: var(--primary-soft); }
.rich-text-editor { min-height: 110px; resize: none; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.rich-text-editor:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.rich-text-editor a { color: var(--primary-strong); text-decoration: underline; }
.notes-field #task-notes { min-height: 110px; resize: none; overflow: hidden; line-height: 1.45; }
.task-notes-links { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0; }
.task-notes-links a { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--primary-strong); font-size: 12px; text-decoration: underline; }
.completed-heading { display: flex; align-items: center; gap: 4px; }
.completed-heading .completed-link { flex: 1; }
.clear-completed-button { display: grid; flex: 0 0 auto; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 7px; background: transparent; color: var(--danger); font-size: 15px; }
.clear-completed-button:hover { background: #fff0f1; }
.danger-button { border: 1px solid #d74250; border-radius: 9px; padding: 9px 12px; background: #d74250; color: white; font-weight: 750; }
.danger-button:hover { background: #bd3340; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.split-actions { justify-content: space-between; }
.left-actions, .right-actions, .button-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.danger-link { background: transparent; color: var(--danger); padding: 8px 6px; font-weight: 700; }
.data-actions { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 20px; padding: 14px; background: var(--surface-muted); border-radius: 12px; }
.data-actions strong { font-size: 13px; }
.data-actions p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.file-button input { display: none; }
.google-event-description { white-space: pre-wrap; line-height: 1.5; color: #414958; max-height: 260px; overflow: auto; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); min-width: 240px; max-width: min(520px, calc(100vw - 30px)); padding: 12px 16px; border-radius: 11px; background: #262c38; color: white; box-shadow: 0 12px 34px rgba(31,36,48,.26); font-size: 13px; text-align: center; }

@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; height: auto; min-height: 70px; padding: 10px 12px; }
  .calendar-controls { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .brand-subtitle { display: none; }
  .brand-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .workspace { position: relative; min-height: 0; }
  .sidebar { position: absolute; inset: 0 auto 0 0; z-index: 40; width: min(92vw, 420px); min-width: min(92vw, 280px); height: 100%; box-shadow: 8px 0 28px rgba(31,36,48,.18); transition: transform 180ms ease; }
  .sidebar.collapsed { display: flex; transform: translateX(-105%); }
  .sidebar-backdrop { position: absolute; z-index: 30; inset: 0; display: block; border: 0; background: rgba(23,27,36,.28); }
  .sidebar-backdrop.hidden { display: none !important; }
  .mobile-tasks-button { display: inline-flex; }
  .sidebar-resizer { display: none; }
  .expand-sidebar { display: none !important; }
  .task-card-title { padding-right: 90px; }
  .task-drag-handle { position: absolute; top: 8px; right: 68px; z-index: 4; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; touch-action: none; }
  .task-drag-handle:active { background: var(--primary-soft); color: var(--primary-strong); }
  .mobile-task-drag-ghost { position: fixed; z-index: 120; top: 0; left: 0; max-width: min(260px, calc(100vw - 30px)); padding: 9px 12px; overflow: hidden; border-radius: 9px; background: var(--primary); color: white; box-shadow: 0 10px 24px rgba(21,87,201,.3); font-size: 13px; font-weight: 750; pointer-events: none; text-overflow: ellipsis; white-space: nowrap; }
  .calendar-event.task-event, .calendar-event.lunch-event { touch-action: none; }
  .calendar-event.touch-holding { opacity: .82; box-shadow: 0 0 0 3px rgba(39,110,241,.35); }
}

/* v3.2.0: compact task drawer and mobile-safe comment input */
@media (max-width: 900px) {
  .topbar > .mobile-tasks-button {
    display: inline-flex;
    flex: 0 0 auto;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }
  .topbar > .mobile-tasks-button::before { content: "☰"; font-size: 18px; }
  .sidebar {
    width: min(62vw, 320px);
    min-width: min(62vw, 220px);
  }
  .sidebar-backdrop { display: none !important; pointer-events: none; }
}

@media (max-width: 620px) {
  .brand { gap: 8px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-mark img { width: 30px; height: 30px; }
  .brand-title { font-size: 15px; }
  .mobile-tasks-button { width: 40px; min-width: 40px; padding: 0; overflow: hidden; font-size: 0; }
  .mobile-tasks-button::before { content: "☰"; font-size: 20px; }
  .topbar-actions .google-button { max-width: 44px; padding: 0 12px; overflow: hidden; }
  .google-button span:last-child { display: none; }
  .week-label { min-width: 130px; font-size: 13px; }
  .form-grid, .schedule-fields { grid-template-columns: 1fr; }
  .full-span { grid-column: auto; }
  .split-actions, .data-actions { align-items: stretch; flex-direction: column; }
  .right-actions { justify-content: flex-end; }
  .modal { padding: 18px; }
  .logout-button { width: 40px; min-width: 40px; padding: 0; overflow: hidden; font-size: 0; }
  .logout-button::before { content: "↪"; font-size: 21px; }
  .auth-card { padding: 24px 20px; border-radius: 16px; }
}

/* v2.0.0: frog branding, completion controls, and completed-task archive */
.brand-copy { min-width: 0; }
.brand-title-row { display: flex; align-items: center; gap: 7px; min-width: 0; }
.brand-mark {
  overflow: hidden;
  background: #eef9e9;
  border: 1px solid #cfe6c6;
  box-shadow: 0 7px 18px rgba(45, 113, 51, .14);
}
.brand-mark img { width: 34px; height: 34px; object-fit: contain; display: block; }
.version-badge { padding: 2px 6px; border-radius: 99px; background: #edf1f7; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .02em; }

.task-card-title { padding-right: 58px; }
.task-complete-toggle,
.event-complete-toggle,
.completed-restore-button {
  display: inline-grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgba(255,255,255,.82);
  color: #647085;
  font-weight: 900;
}
.task-complete-toggle {
  position: absolute;
  top: 9px;
  right: 39px;
  width: 24px;
  height: 24px;
  z-index: 3;
}
.task-complete-toggle span { opacity: 0; transform: scale(.7); transition: 120ms ease; }
.task-complete-toggle:hover { color: var(--success); background: #effaf4; }
.task-complete-toggle:hover span { opacity: 1; transform: scale(1); }
.task-card.task-personal .task-complete-toggle { background: rgba(255,255,255,.58); color: #806b1d; }

.event-complete-toggle {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  z-index: 10;
  padding: 0;
  font-size: 10px;
  color: inherit;
  opacity: .72;
}
.event-complete-toggle span { opacity: 0; }
.event-complete-toggle:hover { opacity: 1; background: rgba(255,255,255,.96); color: var(--success); }
.event-complete-toggle:hover span,
.event-complete-toggle.is-complete span { opacity: 1; }
.event-complete-toggle.is-complete { opacity: 1; background: rgba(255,255,255,.94); color: var(--success); }
.calendar-event.task-event .event-title,
.calendar-event.task-event .event-time { padding-right: 17px; }
.calendar-event.completed-event { opacity: .7; filter: saturate(.55); }
.calendar-event.completed-event .event-title { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.calendar-event.completed-event:hover { opacity: .9; }

.completed-link {
  width: 100%;
  min-height: 28px;
  margin-top: 8px;
  padding: 4px 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}
.completed-link:hover { color: var(--text); background: var(--surface-muted); }
.completed-count { min-width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 99px; background: #e9edf4; color: #5f6878; padding: 0 6px; }
.completed-search-box { margin-bottom: 12px; }
.completed-list { display: flex; flex-direction: column; gap: 8px; max-height: min(52vh, 460px); overflow: auto; padding-right: 2px; }
.completed-empty { padding: 30px 12px; text-align: center; color: var(--muted); font-size: 13px; }
.completed-task-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #f7f8fb;
  cursor: pointer;
}
.completed-task-card:hover { border-color: #b8c2d4; background: #f2f5fa; }
.completed-task-card.task-personal { background: #fff9dc; border-color: var(--personal-border); color: var(--personal-text); }
.completed-restore-button { width: 24px; height: 24px; color: var(--success); background: #effaf4; font-size: 11px; }
.completed-restore-button:hover { background: #dff4e8; }
.completed-task-copy { min-width: 0; }
.completed-task-title { font-size: 13px; font-weight: 750; text-decoration: line-through; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.completed-task-meta { margin-top: 3px; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.completed-task-card.task-personal .completed-task-meta { color: #806b1d; }
.completed-edit-button { width: 28px; height: 28px; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 800; }
.completed-edit-button:hover { background: rgba(111,119,135,.1); color: var(--text); }
.restore-action { color: var(--success); border-color: #b7d9c8; background: #f2faf6; }
@media (max-width: 620px) {
  .version-badge { display: none; }
  .completed-task-card { grid-template-columns: 26px minmax(0, 1fr) 26px; gap: 7px; }
}

/* v2.1.0: daily call and completed-task reporting */
.today-report-card { display: grid; gap: 9px; }
.today-report-card .capacity-header { font-size: 12px; }
.today-report-card .capacity-header strong { font-size: 12px; }
.today-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.today-report-stat { min-width: 0; padding: 8px; border: 1px solid #dfe5ef; border-radius: 9px; background: rgba(255,255,255,.72); }
.today-report-stat span { display: block; color: var(--muted); font-size: 9px; line-height: 1.2; }
.today-report-stat strong { display: block; margin-top: 3px; color: var(--text); font-size: 11px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-report-card .capacity-track { margin: 0; }
.today-report-card .capacity-fill { background: #4aa56d; }
@media (max-width: 420px) {
  .today-report-grid { grid-template-columns: 1fr; }
}


/* v2.2.1: local call cards included in daily reports */
.day-header { cursor: pointer; transition: background 140ms ease, box-shadow 140ms ease; outline: none; }
.day-header:hover { background: #f7f9fd; }
.day-header:focus-visible { box-shadow: inset 0 0 0 2px var(--primary); }
.day-header.selected-report-day { background: #f0f5ff; box-shadow: inset 0 -3px 0 var(--primary); }
.day-header.selected-report-day.today { background: #edf4ff; }

.today-report-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.today-report-stat { padding: 7px 6px; }
.today-report-stat strong { font-size: 10px; }

.task-checklist-block { padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #fafbfe; }
.task-checklist-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.task-checklist-label { display: block; font-size: 12px; font-weight: 800; }
.task-checklist-summary { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.checklist-add-button { min-height: 32px; padding: 0 11px; font-size: 11px; }
.task-checklist-editor { margin-top: 10px; }
.task-checklist-items { display: flex; flex-direction: column; gap: 7px; }
.checklist-item-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 28px; align-items: start; gap: 7px; }
.checklist-item-done { width: 17px; height: 17px; margin: 10px 0 0; accent-color: var(--success); cursor: pointer; }
.checklist-item-text { width: 100%; min-width: 0; min-height: 44px; max-height: none; border: 1px solid var(--border-strong); border-radius: 9px; padding: 8px 9px; outline: 0; resize: none; overflow: hidden; background: var(--surface); color: var(--text); line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; font: inherit; }
.checklist-item-text:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(39,110,241,.1); }
.checklist-item-row:has(.checklist-item-done:checked) .checklist-item-text { color: var(--muted); text-decoration: line-through; background: #f3f5f8; }
.checklist-item-remove { width: 28px; height: 28px; margin-top: 5px; border-radius: 8px; background: transparent; color: var(--muted); font-size: 18px; }
.checklist-item-remove:hover { color: var(--danger); background: #fff0f1; }
.checklist-item-add { margin-top: 8px; padding: 5px 0; background: transparent; color: var(--primary-strong); font-size: 11px; font-weight: 750; }
.checklist-item-add:hover { text-decoration: underline; }
.checklist-pill { color: #4a5f88; }
.event-checklist { margin-top: 2px; font-size: 9px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.google-event-meta { color: #566172 !important; font-weight: 700; }

@media (max-width: 420px) {
  .today-report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-checklist-toolbar { align-items: flex-start; flex-direction: column; }
}


/* v2.4.0: personal section, multiline checklists, duplicate tasks, compact calendar header */
.personal-tab.active { background: #fff6c9; color: #66520c; }
.day-header { min-height: 68px; }
.day-capacity, .all-day-strip { display: none !important; }
@media (max-width: 360px) {
  .tab { font-size: 10px; padding: 0 2px; }
  .tab span { min-width: 16px; padding: 0 4px; margin-left: 1px; }
}


/* v2.4.0: collapsible daily report and completed-task preview */
.collapsible-section-header {
  width: 100%;
  min-height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  border-radius: 7px;
}
.collapsible-section-header:hover { color: var(--primary-strong); }
.collapsible-section-header:focus-visible,
.completed-link:focus-visible,
.completed-open-button:focus-visible,
.completed-preview-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.collapsible-section-meta,
.completed-link-meta { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.section-chevron { min-width: 14px; color: var(--muted); font-size: 16px; line-height: 1; text-align: center; }
.collapsible-section-body { display: grid; gap: 9px; }
.today-report-card { gap: 8px; }
.today-report-card .capacity-header { display: contents; }
.report-section-header strong { font-size: 12px; }

.completed-section { margin-top: 6px; }
.completed-link { margin-top: 0; }
.completed-preview-body { padding: 2px 4px 0; }
.completed-preview-list { display: grid; gap: 4px; max-height: 156px; overflow: auto; padding: 2px 0; }
.completed-preview-item {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 7px;
  border-radius: 8px;
  background: #f6f8fb;
  color: var(--text);
  text-align: left;
}
.completed-preview-item:hover { background: #edf1f7; }
.completed-preview-item.task-personal { background: #fff9dc; color: var(--personal-text); }
.completed-preview-item.task-personal:hover { background: #fff4bf; }
.completed-preview-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; text-decoration: line-through; }
.completed-preview-date { color: var(--muted); font-size: 9px; white-space: nowrap; }
.completed-preview-empty { padding: 7px; color: var(--muted); font-size: 10px; text-align: center; }
.completed-open-button {
  width: 100%;
  margin-top: 4px;
  padding: 6px 7px;
  border-radius: 8px;
  background: transparent;
  color: var(--primary-strong);
  font-size: 10px;
  font-weight: 700;
}
.completed-open-button:hover { background: var(--primary-soft); }


/* v2.4.0: cleaner sidebar and fully expanding checklist fields */
.sidebar-footer { display: grid; gap: 6px; }
.completed-section { min-width: 0; }
.checklist-item-text { height: auto; overflow-y: hidden !important; }
@media (max-width: 360px) {
  .tab { font-size: 10px; padding-inline: 3px; }
}


/* v2.6.1: quick weekend view */
.calendar-weekend-button {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 18;
  min-width: 94px;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(31, 36, 48, .1);
}
.calendar-weekend-button.active {
  border-color: #8fb4ff;
  background: var(--primary-soft);
  color: var(--primary-strong);
}
.calendar-weekend-button.compact {
  min-width: 34px;
  width: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 20px;
}
.day-header.weekend-day { background: #fbfcff; }
.day-header.weekend-day:hover { background: #f3f7ff; }
.day-header.weekend-day.selected-report-day { background: #eef4ff; }
.day-column.weekend-day { background-color: #fcfdff; }

@media (max-width: 760px) {
  .calendar-weekend-button { right: 8px; min-width: 76px; padding: 0 9px; font-size: 11px; }
  .calendar-weekend-button.compact { min-width: 32px; width: 32px; padding: 0; font-size: 18px; }
}


/* v2.6.1: scheduled personal tasks and frog weekend toggle */
.task-card.task-personal.task-scheduled-inactive {
  background: #fffbed;
  border-color: #eee5bd;
  color: #8a815d;
  box-shadow: none;
  opacity: .72;
}
.task-card.task-personal.task-scheduled-inactive::before { background: #e6dba8; }
.task-card.task-personal.task-scheduled-inactive .meta-pill { background: rgba(255,255,255,.5); color: #8a815d; }
.task-card.task-personal.task-scheduled-inactive .task-scheduled-note { color: #94865a; }
.task-card.task-personal.task-scheduled-inactive:hover {
  border-color: #e2d49c;
  box-shadow: 0 3px 10px rgba(89,74,18,.05);
  transform: none;
}

.calendar-weekend-button {
  top: 2px;
  right: 8px;
  width: 84px;
  min-width: 84px;
  height: 76px;
  min-height: 76px;
  padding: 2px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
.calendar-weekend-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.calendar-weekend-button:hover { background: #f1faed; border-color: #d2e8c9; }
.calendar-weekend-button.active {
  border-color: #9dcc8d;
  background: #eef9e9;
  color: inherit;
  box-shadow: inset 0 0 0 2px rgba(80,153,61,.1);
}
@media (max-width: 760px) {
  .calendar-weekend-button { right: 4px; width: 68px; min-width: 68px; height: 64px; min-height: 64px; padding: 2px; }
}

/* v2.7.0: touch planning from the mobile task drawer */
@media (max-width: 900px) {
  .task-card-title { padding-right: 90px; }
}

/* v2.8.0: calendar navigation is separate from the day header; compact frozen time axis */
.topbar {
  grid-template-columns: minmax(0, 1fr) auto;
}
.calendar-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.calendar-panel > .calendar-controls {
  position: relative;
  z-index: 16;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  grid-column: auto;
  grid-row: auto;
  justify-self: stretch;
}
.calendar-panel > .calendar-controls .week-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  text-align: center;
}
.calendar-panel > .calendar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}
.calendar-weekend-button {
  position: static;
  z-index: auto;
  flex: 0 0 auto;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 2px;
  border-radius: 10px;
}
.calendar-header { z-index: 8; }
.corner-cell {
  position: sticky;
  left: 0;
  z-index: 10;
  background: var(--surface);
}
.time-axis {
  position: sticky;
  left: 0;
  z-index: 6;
  align-self: start;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border);
}
.time-label {
  padding-right: 0;
  font-size: 10px;
  text-align: center;
}

@media (max-width: 900px) {
  .calendar-panel > .calendar-controls {
    gap: 6px;
    min-height: 54px;
    padding: 6px 8px;
  }
  .calendar-panel > .calendar-controls .icon-button {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
  }
  .calendar-panel > .calendar-controls .secondary-button {
    min-height: 36px;
    padding-inline: 12px;
  }
  .calendar-panel > .calendar-controls .week-label {
    font-size: 12px;
  }
  .calendar-weekend-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
  }
}

/* v2.9.0: compact single-line mobile toolbar and slimmer day headers */
.topbar {
  grid-template-columns: minmax(270px, 1fr) auto minmax(270px, 1fr);
}
.topbar > .calendar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: center;
}
.today-date-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 5px 2px 1px;
  border: 2px solid #514b43;
  border-radius: 8px;
  background: #fffaf5;
  color: #514b43;
  font-size: 17px;
  font-weight: 850;
  line-height: 1;
}
.today-date-button::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  opacity: .85;
}
.today-date-button span { transform: translateY(4px); }
.today-date-button:hover { background: #f5efe8; }
.day-header {
  min-height: 60px;
  padding: 6px 5px 4px;
}
.day-name { font-size: 10px; }
.day-number {
  width: 28px;
  height: 28px;
  margin-top: 1px;
  font-size: 16px;
}

@media (max-width: 900px) {
  .topbar {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 52px;
    min-height: 52px;
    padding: 6px 8px;
  }
  .topbar > .brand { display: none; }
  .topbar > .calendar-controls {
    flex: 0 0 auto;
    gap: 3px;
    justify-self: auto;
  }
  .topbar > .calendar-controls .icon-button,
  .topbar > .calendar-controls .calendar-weekend-button,
  .topbar > .calendar-controls .today-date-button,
  .topbar-actions .mobile-tasks-button,
  .topbar-actions .google-button,
  .topbar-actions .icon-button,
  .topbar-actions .logout-button {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
  }
  .topbar > .calendar-controls .icon-button { font-size: 20px; }
  .topbar > .calendar-controls .calendar-weekend-button { border-radius: 8px; }
  .topbar > .calendar-controls .today-date-button {
    border-width: 2px;
    border-radius: 7px;
    font-size: 14px;
  }
  .topbar > .calendar-controls .today-date-button::before {
    top: 5px;
    left: 5px;
    right: 5px;
    height: 2px;
  }
  .topbar > .calendar-controls .today-date-button span { transform: translateY(3px); }
  .topbar-actions {
    flex: 1 1 auto;
    gap: 3px;
    min-width: 0;
  }
  .topbar-actions .mobile-tasks-button,
  .topbar-actions .logout-button { overflow: hidden; font-size: 0; }
  .topbar-actions .mobile-tasks-button::before { content: "☰"; font-size: 18px; }
  .topbar-actions .logout-button::before { content: "↪"; font-size: 19px; }
  .topbar-actions .google-button { overflow: hidden; }
  .topbar-actions .google-button span:last-child { display: none; }
  .day-header {
    min-height: 54px;
    padding: 5px 3px 3px;
  }
  .day-name { font-size: 9px; }
  .day-number {
    width: 26px;
    height: 26px;
    font-size: 15px;
  }
}

/* v3.2.3: side-by-side mobile drawer and compact task controls */
.tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tabs .tab { width: 100%; }

@media (max-width: 900px) {
  .workspace { display: flex; }
  .sidebar {
    position: relative;
    inset: auto;
    z-index: 10;
    flex: 0 0 min(62vw, 320px);
    width: min(62vw, 320px);
    min-width: min(62vw, 220px);
    max-width: 320px;
    height: auto;
    box-shadow: none;
    transform: none;
    transition: none;
  }
  .sidebar.collapsed { display: none; transform: none; }
  .calendar-panel { flex: 1 1 auto; min-width: 0; }
  .calendar-scroll { overscroll-behavior: contain; }
  .sidebar-backdrop { display: none !important; pointer-events: none; }

  .today-report-card { padding: 8px; gap: 4px; }
  .report-section-header { min-height: 24px; font-size: 11px; line-height: 1.15; }
  .report-section-header > span:first-child { font-size: 11px; }
  .report-section-header strong { font-size: 11px; }
  .report-section-header .section-chevron { font-size: 13px; }
  .collapsible-section-body { gap: 4px; }
  .calls-caption { font-size: 10px; line-height: 1.25; }
}

.task-checklist-toolbar { justify-content: flex-start; }

/* v3.2.0 final mobile toolbar overrides */
@media (max-width: 900px) {
  .topbar > .mobile-tasks-button {
    display: inline-flex;
    flex: 0 0 auto;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }
  .topbar > .mobile-tasks-button::before { content: "☰"; font-size: 18px; }
  .sidebar {
    width: min(62vw, 320px);
    min-width: min(62vw, 220px);
  }
  .sidebar-backdrop { display: none !important; pointer-events: none; }
}

@media (max-width: 360px) {
  .topbar-actions .google-button { display: none; }
}

/* v3.0.0: restore the logo on mobile and reclaim vertical calendar space */
@media (max-width: 900px) {
  .topbar {
    gap: 0;
    justify-content: space-between;
  }
  .topbar > .brand {
    display: flex;
    flex: 0 0 auto;
    margin-right: 2px;
  }
  .topbar > .brand .brand-copy { display: none; }
  .topbar > .brand .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }
  .topbar > .brand .brand-mark img {
    width: 28px;
    height: 28px;
  }
  .topbar > .calendar-controls,
  .topbar-actions {
    flex: 1 1 0;
    gap: 0;
    justify-content: space-around;
  }
  .corner-cell { min-height: 42px; }
  .day-header {
    min-height: 42px;
    padding: 3px 2px;
  }
  .day-name {
    font-size: 9px;
    line-height: 11px;
  }
  .day-number {
    width: 23px;
    height: 23px;
    margin-top: 0;
    font-size: 14px;
  }
}

/* v3.3.2: image-only frog controls */
.brand-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.calendar-weekend-button,
.calendar-weekend-button.active {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.personal-new-task { background: #e1b72d; box-shadow: 0 5px 14px rgba(177, 135, 10, .22); }
.personal-new-task:hover { background: #cda31c; }
.settings-account-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--surface-muted);
}
.settings-account-actions > span { font-size: 12px; font-weight: 800; }

#task-modal {
  scroll-padding-top: 44px;
  scroll-padding-bottom: 70px;
}
#task-modal .task-modal-close-row {
  position: sticky;
  top: 0;
  z-index: 8;
  height: 0;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}
#task-modal .task-modal-close-row .modal-close {
  pointer-events: auto;
  margin: 0;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(31, 36, 48, .12);
}
.task-modal-secondary-actions { margin-top: 18px; }
#task-modal .task-modal-footer {
  position: sticky;
  bottom: -22px;
  z-index: 8;
  justify-content: flex-end;
  margin: 18px 0 0;
  padding: 11px 0 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0), var(--surface) 28%);
}
#task-modal .task-modal-footer .secondary-button,
#task-modal .task-modal-footer .primary-button { min-height: 34px; padding: 0 11px; font-size: 12px; }

@media (min-width: 901px) {
  .topbar { display: flex; gap: 12px; }
  .topbar > .brand { flex: 1 1 auto; }
  .topbar > .calendar-controls { flex: 0 0 auto; }
  .topbar-actions { flex: 0 0 auto; margin-left: auto; }
  .calendar-weekend-button { position: static; flex: 0 0 auto; }
}

@media (max-width: 900px) {
  .topbar {
    display: flex;
    height: 52px;
    min-height: 52px;
    padding: 2px 8px;
    gap: 0;
    justify-content: space-between;
  }
  .topbar > .calendar-controls,
  .topbar > .topbar-actions { display: contents; }
  .topbar > .brand.brand-button {
    display: grid;
    flex: 0 0 70px;
    width: 70px;
    height: 48px;
    min-width: 70px;
    min-height: 48px;
    place-items: center;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .topbar > .brand .brand-copy { display: none; }
  .topbar > .brand .brand-mark,
  .topbar > .calendar-weekend-button {
    width: 70px;
    height: 48px;
    min-width: 70px;
    min-height: 48px;
    border-radius: 12px;
  }
  .topbar > .brand .brand-mark {
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .topbar > .brand .brand-mark img {
    width: 70px;
    height: 48px;
    object-fit: contain;
  }
  .topbar > .calendar-weekend-button {
    order: 10;
    position: static;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .topbar > .calendar-weekend-button img {
    width: 70px;
    height: 48px;
    object-fit: contain;
  }
  .topbar > .calendar-weekend-button.active {
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .topbar > .calendar-controls .icon-button,
  .topbar > .calendar-controls .today-date-button,
  .topbar > .topbar-actions .icon-button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
  }
  .topbar > .mobile-tasks-button::before { content: none; }

  .sidebar-header { padding: 10px 12px 0; }
  .sidebar-header .primary-button { min-height: 40px; font-size: 13px; }
  .sidebar-title-row { margin: 11px 0 8px; }
  .sidebar h1 { font-size: 18px; }
  .search-box { min-height: 36px; }
  .tabs { margin-top: 8px; }
  .tab { min-height: 32px; font-size: 10px; }
  .task-list { padding: 9px 10px 12px; }
  .empty-state { padding: 14px; gap: 3px; }
  .empty-icon { font-size: 24px; }
  .sidebar-footer { padding: 7px 10px; }
  .completed-section { margin-top: 2px; }
  .completed-link { min-height: 28px; font-size: 11px; }
  .clear-completed-button { width: 24px; height: 24px; font-size: 13px; }

  #task-modal { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 14px; border-radius: 16px; }
  #task-modal .task-modal-close-row .modal-close { width: 30px; min-width: 30px; height: 30px; min-height: 30px; font-size: 20px; }
  #task-modal .task-modal-footer { bottom: -14px; padding-top: 9px; }
  #task-modal .task-modal-footer .secondary-button,
  #task-modal .task-modal-footer .primary-button { min-height: 32px; padding: 0 10px; font-size: 11px; }
  #task-modal select,
  #settings-modal select,
  #lunch-modal select { font-size: 80%; }
  #task-modal option,
  #settings-modal option,
  #lunch-modal option { font-size: inherit; }
  .settings-account-actions { align-items: stretch; flex-direction: column; }
  .settings-account-actions .button-row { width: 100%; }
  .settings-account-actions .button-row > * { flex: 1 1 0; }
  .settings-account-actions .google-button { max-width: none; padding: 0 12px; overflow: visible; }
  .settings-account-actions .google-button span:last-child { display: inline; }
  .settings-account-actions .logout-button { width: auto; min-width: 0; padding: 0 12px; overflow: visible; font-size: inherit; }
  .settings-account-actions .logout-button::before { content: none; }
}

@media (max-width: 620px) {
  .settings-account-actions .google-button span:last-child { display: inline; }
  .settings-account-actions .logout-button { width: auto; min-width: 0; padding: 0 12px; font-size: inherit; }
  .settings-account-actions .logout-button::before { content: none; }
}

@media (max-width: 900px) {
  .app-shell { height: 100dvh; }
  .sidebar-footer { flex: 0 0 auto; }
  .today-report-card .collapsible-section-body { display: none; }
}
