/* ===== Hours — activity tracker =====
   Cold ink, warm brass, editorial type.

   Everything visual comes from the token layer below: change a token here and
   the whole app follows. No component defines a colour of its own, with one
   deliberate exception — a category's colour, which is user data and arrives
   as an inline custom property.

   Inter is banned, and so is a violet accent. Both were a previous look. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Surfaces — each step one level further from the page */
  --bg-primary: #07080c;
  --bg-secondary: #101219;
  --bg-tertiary: #171a24;
  --bg-hover: #1f232f;

  /* Text — warm off-white against the cold ink */
  --text-primary: #f3f1ec;
  --text-secondary: #9ba1b1;
  --text-muted: #666c7d;

  /* Lines */
  --border-color: #1e2230;
  --border-glow: #333a4b;

  /* Accent ramp — brass. Warm metal on cold ink, and it stays out of the way
     of the category colours, which are the only other hues on screen. */
  --accent: #d9a84e;
  --accent-bright: #f2cd87;
  --accent-dim: #6d5223;
  --accent-soft: rgba(217, 168, 78, .13);
  --accent-wash: rgba(217, 168, 78, .20);
  --accent-ring: rgba(217, 168, 78, .32);
  --accent-contrast: #15110a;   /* dark text ON brass — never white */

  --success: #34d399;
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, .14);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, .13);

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --r-xs: 6px;
  --r-sm: 9px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-full: 999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.45);
  --modal-backdrop: rgba(6, 8, 14, .72);

  --page-pad: 22px;
  --page-max: 1140px;
}

:root[data-theme="light"] {
  --bg-primary: #f8f6f1;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1eee7;
  --bg-hover: #e9e5dc;

  --text-primary: #1b1a17;
  --text-secondary: #5c5950;
  --text-muted: #8c887e;

  --border-color: #e2ded3;
  --border-glow: #cdc7b8;

  --accent: #8a6420;
  --accent-bright: #6d4e18;
  --accent-dim: #d9c89f;
  --accent-soft: rgba(138, 100, 32, .10);
  --accent-wash: rgba(138, 100, 32, .16);
  --accent-ring: rgba(138, 100, 32, .28);
  --accent-contrast: #fffdf7;

  --modal-backdrop: rgba(40, 36, 28, .42);
  --shadow-md: 0 4px 16px rgba(60,50,30,.10);
  --shadow-lg: 0 12px 40px rgba(60,50,30,.16);
}

/* The page colour lives on `html` so the brass wash can sit above it; `body`
   is transparent. */
html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg-primary);
}

body {
  font-family: var(--font-body);
  background: transparent;
  color: var(--text-primary);
  min-height: 100vh;
  padding: 18px var(--page-pad) 72px;
  max-width: var(--page-max);
  margin: 0 auto;
  line-height: 1.5;
}

/* Atmosphere: a fixed brass wash behind the masthead, and a grain over
   everything. Both are decoration and neither takes a pointer event. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 440px at 50% -160px, rgba(217, 168, 78, .11), transparent 72%),
    radial-gradient(760px 380px at 88% 4%, rgba(96, 126, 220, .06), transparent 70%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] body::before {
  background: radial-gradient(900px 440px at 50% -160px, rgba(138, 100, 32, .07), transparent 72%);
}
:root[data-theme="light"] body::after { opacity: .018; }

/* Everything real sits above the wash. */
#login-screen, #app-container, .sync-indicator, .backdrop { position: relative; z-index: 1; }
.backdrop { z-index: 8000; }

::selection { background: var(--accent-ring); color: var(--text-primary); }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- login ---------- */
.login-screen {
  min-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 42px 38px 34px;
  width: min(380px, 92vw);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.login-crest {
  width: 46px; height: 46px;
  margin: 0 auto 18px;
  color: var(--accent);
}
.login-crest svg { width: 100%; height: 100%; }
.login-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
.login-subtitle { color: var(--text-secondary); font-size: .9rem; margin-top: 4px; }
.login-divider {
  height: 1px;
  background: var(--border-color);
  margin: 24px 0;
}
.btn-google {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-sm);
  padding: 11px 16px;
  font: 600 .9rem var(--font-body);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.btn-google:hover { border-color: var(--border-glow); background: var(--bg-hover); }
.login-error { color: var(--danger); font-size: .82rem; margin-top: 14px; min-height: 1em; }

/* ---------- chrome ---------- */
.sync-indicator {
  position: fixed;
  right: 16px; bottom: 14px;
  display: flex; align-items: center; gap: 7px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-full);
  padding: 6px 13px;
  font-size: .72rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
  z-index: 7000;
}
.sync-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted);
}
.sync-indicator.synced .sync-dot { background: var(--success); box-shadow: 0 0 7px var(--success); }
.sync-indicator.error .sync-dot { background: var(--danger); box-shadow: 0 0 7px var(--danger); }

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-right: 4px;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: color .15s, border-color .15s;
}
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { color: var(--text-primary); border-color: var(--border-glow); }

.text-btn {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font: 500 .78rem var(--font-body);
  letter-spacing: .04em;
  cursor: pointer;
  padding: 4px 6px;
}
.text-btn:hover { color: var(--accent); }

.theme-icon-light { display: none; }
:root[data-theme="light"] .theme-icon-dark { display: none; }
:root[data-theme="light"] .theme-icon-light { display: inline-flex; }

.month-nav { display: flex; align-items: center; gap: 10px; }
.nav-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.nav-btn svg { width: 14px; height: 14px; }
.nav-btn:hover { color: var(--accent); border-color: var(--accent-ring); }

.month-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  min-width: 150px;
  text-align: center;
}

.view-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--r-sm);
  overflow: hidden;
  width: fit-content;
  margin-bottom: 22px;
}
.view-tab {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent;
  color: var(--text-muted);
  border: 0;
  border-right: 1px solid var(--border-color);
  padding: 9px 18px;
  font: 600 .78rem var(--font-body);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.view-tab:last-child { border-right: 0; }
.view-tab svg { width: 14px; height: 14px; }
.view-tab:hover { color: var(--text-secondary); background: var(--bg-secondary); }
.view-tab.active { color: var(--accent-contrast); background: var(--accent); }

.view { display: none; }
.view.active { display: block; }

.eyebrow {
  display: block;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}

/* ---------- the timer ---------- */
.timer-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--bg-secondary);
  border: 1px solid var(--accent-ring);
  border-radius: var(--r-md);
  padding: 15px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.timer-left { display: flex; align-items: center; gap: 14px; }
.timer-pulse {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-ring);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 11px rgba(217,168,78,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,168,78,0); }
}
@media (prefers-reduced-motion: reduce) { .timer-pulse { animation: none; } }

.timer-elapsed {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.timer-meta { color: var(--text-secondary); font-size: .82rem; }
.timer-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.timer-warn {
  color: var(--warning);
  background: var(--warning-soft);
  border-radius: var(--r-xs);
  padding: 5px 10px;
  font-size: .76rem;
  max-width: 320px;
}

/* ---------- today ---------- */
.today-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-md);
}
.today-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}
.today-date {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
.today-total-wrap { text-align: right; }
.today-total {
  display: block;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.today-total-label {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.entry-list { display: flex; flex-direction: column; }
.entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background .14s;
}
.entry:last-child { border-bottom: 0; }
.entry:hover { background: var(--bg-tertiary); }
.entry-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--dot, var(--text-muted));
  flex-shrink: 0;
}
.entry-main { flex: 1; min-width: 0; }
.entry-category { font-weight: 600; font-size: .92rem; }
.entry-note {
  color: var(--text-secondary);
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entry-docs {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-muted);
  font-size: .76rem;
  flex-shrink: 0;
}
.entry-docs svg { width: 13px; height: 13px; }
.entry-duration {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  min-width: 72px;
  text-align: right;
  flex-shrink: 0;
}

.entry-empty {
  color: var(--text-muted);
  font-size: .88rem;
  padding: 26px 2px;
  text-align: center;
}

.today-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: var(--r-sm);
  padding: 9px 17px;
  font: 600 .83rem var(--font-body);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-accent { background: var(--accent); color: var(--accent-contrast); }
.btn-accent:hover { background: var(--accent-bright); }
.btn-quiet {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-color);
}
.btn-quiet:hover { color: var(--text-primary); border-color: var(--border-glow); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger-soft); }
.btn-danger:hover { background: var(--danger-soft); }

/* ---------- calendar ---------- */
.calendar-section { margin-top: 30px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
}
.section-title .month-label { min-width: 0; text-align: left; }
.section-nav { display: flex; align-items: center; gap: 6px; }

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  margin-bottom: 7px;
}
.weekday {
  text-align: center;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ONE RULED SHEET, not 35 boxes: the 1px gap lets the grid's own background
   show through as a hairline, so there are no borders and no radii on the
   cells themselves. */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.day-cell {
  background: var(--bg-secondary);
  border: none;
  border-radius: 0;
  min-height: 92px;
  padding: 9px 10px;
  position: relative;
  cursor: pointer;
  transition: background .18s;
}
.day-cell:hover { background: var(--bg-tertiary); }
/* Days outside the month take the page colour, so the month's shape reads. */
.day-cell.empty { background: var(--bg-primary); cursor: default; }
.day-cell.today {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}
.day-cell.today:hover { background: var(--accent-wash); }

.day-number {
  font-family: var(--font-display);
  font-size: .84rem;
  font-weight: 500;
  color: var(--text-muted);
  display: block;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.day-cell.today .day-number { color: var(--accent-bright); font-weight: 600; }

.day-hours {
  display: block;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}
.day-dots {
  position: absolute;
  left: 10px; bottom: 9px;
  display: flex;
  align-items: center;
  gap: 4px;
}
/* 7px, not 4: a category dot on a near-black cell has to survive being
   glanced at, and the smaller version read as dust. */
.day-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--dot, var(--text-muted));
  display: block;
}
.day-more { font-size: .64rem; color: var(--text-muted); }

.month-foot {
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 13px;
}
.month-total {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.month-total-label {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- breakdown ---------- */
.breakdown-body { display: flex; flex-direction: column; gap: 2px; }
.break-row {
  display: grid;
  grid-template-columns: 150px 1fr 108px;
  align-items: center;
  gap: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-sm);
  padding: 13px 16px;
}
.break-name { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: .9rem; }
.break-bar {
  height: 9px;
  border-radius: var(--r-full);
  background: var(--bg-tertiary);
  overflow: hidden;
}
.break-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: var(--dot, var(--accent));
  min-width: 2px;
}
.break-figures { text-align: right; }
.break-duration {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: block;
  line-height: 1.2;
}
.break-share { font-size: .74rem; color: var(--text-muted); }
.break-empty { color: var(--text-muted); padding: 40px 0; text-align: center; }

/* ---------- modals ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 16px;
  overflow-y: auto;
}
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  width: min(560px, 100%);
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal-wide { width: min(900px, 100%); }
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-color);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--border-color);
}
.modal-foot-right { display: flex; gap: 8px; margin-left: auto; }

.field { display: block; margin-bottom: 15px; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row .field { flex: 0 0 110px; }
.field-grow { flex: 1 1 140px; }
.field-label {
  display: block;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.field-hint { text-transform: none; letter-spacing: 0; opacity: .8; }
.field-output {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  padding: 9px 0;
}
.field-error { color: var(--danger); font-size: .8rem; margin-top: 7px; }

input, textarea, select {
  width: 100%;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  font: .9rem var(--font-body);
}
input[type="color"] { padding: 3px; height: 38px; cursor: pointer; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; }

.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-full);
  padding: 6px 13px;
  font: 500 .83rem var(--font-body);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.chip:hover { color: var(--text-primary); border-color: var(--border-glow); }
.chip.on {
  color: var(--text-primary);
  border-color: var(--dot, var(--accent));
  background: var(--bg-tertiary);
}
.chip-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--dot, var(--text-muted));
}

.dropzone {
  border: 1px dashed var(--border-glow);
  border-radius: var(--r-sm);
  padding: 14px;
  background: var(--bg-primary);
  transition: border-color .15s, background .15s;
}
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone-hint { color: var(--text-muted); font-size: .8rem; margin-bottom: 9px; }
.dropzone-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem;
  color: var(--text-secondary);
}
.dropzone-paste { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }

.doc-list { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.doc-item {
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-xs);
  padding: 8px 11px;
  font-size: .83rem;
}
.doc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-size { color: var(--text-muted); font-size: .76rem; }

.doc-frame {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--border-color);
  border-radius: var(--r-sm);
  background: #fff;
}

.day-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.day-total {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.category-list { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.category-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-xs);
  padding: 8px 11px;
}
.category-row input[type="text"] { flex: 1; background: transparent; border: 0; padding: 0; }
.category-row input[type="text"]:focus { box-shadow: none; }
.category-row input[type="color"] { width: 34px; flex-shrink: 0; }

/* ---------- phone ---------- */
@media (max-width: 720px) {
  :root { --page-pad: 13px; }
  .header { gap: 10px; }
  .logo { font-size: 1.25rem; }
  .month-label { min-width: 118px; font-size: .9rem; }
  .view-tabs { width: 100%; }
  .view-tab { flex: 1; justify-content: center; padding: 9px 10px; }
  .today-panel { padding: 17px 15px; }
  .today-total { font-size: 1.7rem; }

  /* Still a ruled sheet at phone width — without this the cells revert to
     floating boxes and the month loses its shape. */
  .calendar-grid { gap: 1px; }
  .day-cell { min-height: 62px; padding: 6px 5px; }
  .day-hours { font-size: .86rem; margin-top: 6px; }
  .day-dot { width: 6px; height: 6px; }
  .day-dots { left: 5px; bottom: 5px; gap: 3px; }

  .break-row { grid-template-columns: 1fr 86px; }
  .break-bar { grid-column: 1 / -1; order: 3; }
  .today-actions .btn { flex: 1; justify-content: center; }
}
