/* ----------------------------------------------------------------------------
   AIME — a personal thinking partner.
   Aesthetic: warm dark editorial. Aged paper, ink, library.
   Fraunces (serif display) for character. Inter-style sans for input only.
   Mobile-first. Big tap targets. Comfortable for long sessions.
---------------------------------------------------------------------------- */

:root {
  /* Palette: ink on aged paper, inverted */
  --bg: #1a1612;
  --bg-elevated: #221d18;
  --bg-soft: #2a241e;
  --ink: #e8dfd2;
  --ink-dim: #a89a86;
  --ink-faint: #6b5f50;
  --accent: #c97a4a;       /* warm copper */
  --accent-soft: #6b3d23;
  --paper: #e8dfd2;
  --rule: #3a322a;
  --danger: #c95a4a;
  --ok: #7f9b63;           /* muted sage — the "saved / clear to switch" signal */

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Fraunces', Georgia, serif;
  --font-mono: 'JetBrains Mono', Menlo, monospace;

  /* Layout */
  --max-content: 720px;
  --pad: 1.25rem;
  --pad-lg: 2rem;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  /* Subtle paper grain */
  background-image:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(201,122,74,0.05), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(107,61,35,0.04), transparent 50%);
}

/* ----------------------------------------------------------------------------
   Top bar
---------------------------------------------------------------------------- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 0.5rem) var(--pad) 0.75rem;
  padding-top: max(env(safe-area-inset-top, 0), 0.75rem);
  background: linear-gradient(to bottom, var(--bg) 70%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.01em;
}
.brand-mark {
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
}
.brand-name {
  font-size: 1.15rem;
  color: var(--ink);
}

.top-nav { display: flex; gap: 0.5rem; }

.nav-btn {
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--ink-dim);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.nav-btn:hover {
  border-color: var(--ink-dim);
  color: var(--ink);
  background: var(--bg-elevated);
}
.nav-btn:active { transform: scale(0.96); }

/* TTS toggle: two icons inside one button, one shown based on state. */
#tts-btn .tts-off-icon { display: none; }
#tts-btn.off { color: var(--ink-faint); }
#tts-btn.off .tts-on-icon { display: none; }
#tts-btn.off .tts-off-icon { display: block; }

/* ----------------------------------------------------------------------------
   Thread
---------------------------------------------------------------------------- */
.thread {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem var(--pad) 1rem;
  max-width: var(--max-content);
  width: 100%;
  margin: 0 auto;
  scroll-behavior: smooth;
}

.empty-state {
  min-height: 50dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.75rem;
  color: var(--ink-dim);
}
.empty-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.015em;
}
.empty-sub {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-faint);
}

.message {
  display: flex;
  flex-direction: column;
  margin: 1.25rem 0;
  animation: fade-up 0.4s ease-out;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.message-bubble {
  font-size: 1.05rem;
  line-height: 1.65;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.message.user .message-meta { color: var(--accent); }
.message.user .message-bubble {
  color: var(--ink);
  padding-left: 0.75rem;
  border-left: 2px solid var(--accent-soft);
  font-style: italic;
}

.message.assistant .message-bubble {
  color: var(--ink);
}

.message.assistant.thinking .message-bubble::after {
  content: '·';
  display: inline-block;
  animation: thinking 1.4s infinite;
  margin-left: 0.25rem;
  color: var(--accent);
}
@keyframes thinking {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

/* Failed voice recording — visible but muted, with a retry button. The
   audio is still in IndexedDB; tap retry to re-upload with the same
   idempotency_key so the backend dedupes if the original made it through. */
.message.user.failed-recording .message-bubble {
  color: var(--ink-dim);
  border-left-color: var(--danger);
  font-style: normal;
}
.retry-btn {
  margin-top: 0.5rem;
  margin-left: 0.75rem;
  background: transparent;
  border: 1px solid var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.retry-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}
.retry-btn:active { transform: scale(0.96); }

.replay-btn {
  margin-top: 0.5rem;
  background: transparent;
  /* Contrast pass (2026-06-13): was --ink-faint on --rule — barely visible on
     phone. Bump the ink + border one step so the affordance actually reads. */
  border: 1px solid var(--ink-faint);
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s;
}
.replay-btn:hover { color: var(--ink); border-color: var(--ink-dim); }

.error-bubble {
  color: var(--danger);
  font-style: italic;
  font-size: 0.95rem;
}

/* ----------------------------------------------------------------------------
   Composer
---------------------------------------------------------------------------- */
.composer {
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  padding: 0.75rem var(--pad) calc(0.75rem + env(safe-area-inset-bottom, 0));
}

.composer-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.text-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.4rem 0.4rem 0.4rem 0.9rem;
  transition: border-color 0.2s;
}
.text-form:focus-within {
  border-color: var(--accent-soft);
}

#text-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.55rem 0;
  /* Disable iOS auto-zoom on focus */
  font-size: max(16px, 1rem);
}
#text-input::placeholder { color: var(--ink-faint); font-style: italic; }

.send-btn {
  background: var(--accent-soft);
  border: none;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--paper);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.send-btn:hover { background: var(--accent); }
.send-btn:active { transform: scale(0.94); }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Photo button: same footprint as send, quieter (outline) so send stays primary. */
.photo-btn {
  background: transparent;
  border: 1px solid var(--accent-soft);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.photo-btn:hover { background: var(--accent-soft); color: var(--paper); }
.photo-btn:active { transform: scale(0.94); }

/* Thumbnail of a sent photo, shown inside the user bubble. */
.photo-thumb {
  display: block;
  margin-top: 8px;
  max-width: 220px;
  max-height: 220px;
  width: auto;
  height: auto;
  border-radius: 8px;
}

/* Mic row holds the cancel button alongside the mic itself.
   Cancel is hidden by default and appears only while recording. */
.mic-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}
.mic-row .mic-btn {
  flex: 1;
}

.cancel-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  width: 64px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--ink-dim);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.cancel-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
}
.cancel-btn:active { transform: scale(0.96); }
.cancel-btn[hidden] { display: none; }

/* Mic button — the main event. Tap to start, tap to stop. */
.mic-btn {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  overflow: hidden;
}
.mic-btn:hover {
  border-color: var(--accent-soft);
}
.mic-btn.recording {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--paper);
}
.mic-btn.recording .mic-ring {
  animation: pulse 1.2s ease-out infinite;
}
.mic-btn.recording .mic-ring-2 {
  animation: pulse 1.2s ease-out infinite 0.4s;
}
.mic-btn.processing {
  background: var(--bg-soft);
  border-color: var(--accent-soft);
  cursor: wait;
}
/* Recording is durably saved to IndexedDB — safe to background Safari. The one
   color the warm palette lacks: a clear "go" signal for the 20-30s window
   between a DoorDash ding and needing to switch. */
.mic-btn.saved {
  background: var(--bg-soft);
  border-color: var(--ok);
  color: var(--ok);
  cursor: default;
}
.mic-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mic-ring {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 60px;
  height: 60px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  pointer-events: none;
}
@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

.mic-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: -0.005em;
}

/* ----------------------------------------------------------------------------
   History overlay
---------------------------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 20;
  display: flex;
  flex-direction: column;
  animation: slide-up 0.3s ease-out;
}
@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.overlay[hidden] { display: none; }

.overlay-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: var(--max-content);
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.overlay-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(env(safe-area-inset-top, 0), 0.75rem) var(--pad) 0.75rem;
}
.overlay-bar h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.5rem;
  margin: 0;
  letter-spacing: -0.015em;
}

.overlay-search {
  padding: 0 var(--pad) 0.75rem;
}
.overlay-search input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: max(16px, 1rem);
  outline: none;
  transition: border-color 0.2s;
}
.overlay-search input:focus { border-color: var(--accent-soft); }
.overlay-search input::placeholder { color: var(--ink-faint); font-style: italic; }

.cost-panel {
  padding: 0.75rem var(--pad) 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  border-bottom: 1px solid var(--rule);
}
.cost-panel .cost-label { color: var(--ink-faint); }
.cost-balance {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.cost-balance .cost-big {
  font-size: 1.3rem;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}
.cost-balance .cost-sub { color: var(--ink-faint); }
.cost-balance.low .cost-big,
.cost-balance.low .cost-label { color: #d08770; }
.cost-balance .link-btn { margin-left: auto; }
.cost-spend {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.cost-rows {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.3rem;
}
.cost-panel .stat strong {
  color: var(--ink-dim);
  font-weight: 500;
  margin-left: 0.4rem;
}
.cost-panel .stat.note { text-transform: none; }
.cost-panel .link-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: underline;
}

.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem var(--pad) 2rem;
}

.history-entry {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}
.history-entry-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.history-entry.user .history-entry-role { color: var(--accent); }
.history-entry-content {
  font-size: 0.97rem;
  line-height: 1.55;
  color: var(--ink-dim);
  word-wrap: break-word;
}
.history-entry.user .history-entry-content {
  color: var(--ink);
  font-style: italic;
}

.history-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-faint);
  font-style: italic;
}

/* ----------------------------------------------------------------------------
   Scrollbars (subtle)
---------------------------------------------------------------------------- */
.thread::-webkit-scrollbar,
.history-list::-webkit-scrollbar { width: 6px; }
.thread::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb {
  background: var(--rule);
  border-radius: 3px;
}

/* ----------------------------------------------------------------------------
   Larger screens
---------------------------------------------------------------------------- */
@media (min-width: 720px) {
  .mic-btn { height: 72px; }
  .cancel-btn { width: 72px; }
  .empty-title { font-size: 2.25rem; }
}

/* ----------------------------------------------------------------------------
   Login overlay (app-level session)
---------------------------------------------------------------------------- */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pad);
  background: var(--bg);
}
.login-overlay[hidden] { display: none; }

.login-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 320px;
  text-align: center;
}
.login-brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--ink);
}
.login-brand .brand-mark { color: var(--accent); }
.login-sub {
  color: var(--ink-dim);
  font-size: 0.95rem;
  margin: 0;
}
#login-password {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  text-align: center;
}
#login-password:focus {
  outline: none;
  border-color: var(--accent);
}
.login-btn {
  padding: 0.85rem 1rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}
.login-btn:hover { background: var(--accent); color: var(--bg); }
.login-error {
  color: var(--danger);
  font-size: 0.9rem;
  min-height: 1.2em;
  margin: 0;
}

/* ---------------------------------------------------------------------------
   Driving Day widget (Phase 1 — read-only verification card)
   Renders today's Driving Day group as checkable rows; ✓ = filled slot,
   "missing" = empty slot. Reuses the .overlay shell.
--------------------------------------------------------------------------- */
.nav-btn { position: relative; }
.nav-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg);
}
.nav-badge[hidden] { display: none; }

.driving-card {
  padding: 0.5rem var(--pad) 1.5rem;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink);
}
.dhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0 0.75rem;
}
.dhead-date {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-dim);
}
.dnav {
  background: transparent;
  border: none;
  color: var(--ink-dim);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.1rem 0.7rem;
  cursor: pointer;
}
.dnav:disabled { opacity: 0.2; cursor: default; }
.dnav:active:not(:disabled) { color: var(--accent); }
.dopen { color: var(--accent); font-style: normal; font-size: 0.85rem; }

.dsection { border-top: 1px solid var(--rule); padding: 0.4rem 0; }

.dfield {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.3rem 0;
  gap: 1rem;
}
.dfield.indent { padding-left: 1rem; }
.dlabel { color: var(--ink-dim); }
.dval { color: var(--ink); text-align: right; white-space: nowrap; margin-left: auto; }
.dcheck { color: var(--ok); margin-left: 0.2rem; }
.dfield.missing .dval { color: var(--ink-faint); }
.dfield.missing em { color: var(--accent); font-style: normal; }

.ddash {
  border-top: 1px solid var(--rule);
  padding: 0.5rem 0 0.3rem;
}
.ddash-title {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--paper);
  padding-bottom: 0.2rem;
}
.dderived {
  padding: 0.4rem 0 0.2rem 1rem;
  color: var(--accent);
  font-size: 0.82rem;
}
.ddash-empty {
  border-top: 1px solid var(--rule);
  padding: 0.9rem 0;
  color: var(--ink-faint);
  font-style: italic;
  text-align: center;
}
.dfooter {
  border-top: 1px solid var(--rule);
  margin-top: 0.4rem;
  padding-top: 0.7rem;
  color: var(--ink);
  font-size: 0.95rem;
  text-align: center;
  letter-spacing: 0.02em;
}

/* Driving Day — tactile entry (Phase 2): editable odometer rows + inline input */
.dfield.editable { cursor: pointer; }
.dfield.editable .dedit {
  color: var(--ink-faint);
  font-size: 0.8rem;
  margin-left: 0.5rem;
}
.dfield.editable:hover .dedit,
.dfield.editable.missing .dedit { color: var(--accent); }
.dfield.editable.missing em { color: var(--accent); font-style: normal; }

.dinput {
  width: 7rem;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: max(16px, 0.9rem);
  text-align: right;
  outline: none;
}
.dsave {
  margin-left: 0.4rem;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
}
.dsave:active { transform: scale(0.96); }

/* Multi-field tactile entry (Phase 2): fuel + dash mini-forms */
.ddash.editable { cursor: pointer; }
.ddash.editable .dedit {
  color: var(--ink-faint);
  font-size: 0.8rem;
  margin-left: 0.5rem;
}
.ddash.editable:hover .dedit { color: var(--accent); }
.dform { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.3rem 0; }
.dfld {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.dfld span { color: var(--ink-dim); font-size: 0.85rem; }
.dfld .dfinput {
  width: 8rem;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: max(16px, 0.9rem);
  text-align: right;
  outline: none;
}
.dform-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.3rem; }
.dcancel {
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
}
.dcancel:active { transform: scale(0.96); }
.dphoto {
  margin-right: auto;            /* push it left, away from confirm/cancel */
  background: transparent;
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
}
.dphoto:active { transform: scale(0.96); }

.driving-status {
  margin: 0 var(--pad) 1rem;
  padding: 0.7rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  border-radius: 8px;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
}
.driving-status[hidden] { display: none; }

.dhint { color: var(--ink-faint); font-size: 0.72rem; font-style: italic; }
.dval.dmuted { color: var(--ink-faint); }

/* Driving Day — full dash blocks + totals (collection-order layout) */
.ddash-empty-slot {
  padding: 0.4rem 0 0.3rem 1rem;
  color: var(--ink-faint);
  font-style: italic;
  font-size: 0.85rem;
}
.dpending { color: var(--ink-faint); font-style: italic; }
.dtotals {
  border-top: 2px solid var(--accent-soft);
  margin-top: 0.7rem;
  padding-top: 0.6rem;
}
.dtotals .dval { color: var(--ink); }
