@font-face {
  font-family: "Noto Sans Hebrew";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/noto-sans-hebrew-400.ttf") format("truetype");
}

/* Nova everyday errands */
.rail-life-zone {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.life-action svg {
  color: var(--red);
}

.life-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px;
}

.life-summary button {
  min-height: 76px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 18px;
  color: #111315;
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), background 220ms ease, box-shadow 220ms ease;
}

.life-summary button:hover,
.life-summary button.active {
  transform: translateY(-2px);
  background: #111315;
  color: #fff;
  box-shadow: 0 18px 44px rgba(17, 19, 21, 0.18);
}

.life-summary span,
.life-summary strong {
  display: block;
}

.life-summary span {
  font-size: 12px;
  color: inherit;
  opacity: 0.72;
}

.life-summary strong {
  margin-top: 4px;
  font-size: 26px;
}

.life-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.life-form {
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
}

.life-form input,
.life-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 14px;
  padding: 9px 11px;
  color: #111315;
  background: rgba(255, 255, 255, 0.86);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  outline: 0;
}

.life-form input:focus,
.life-form select:focus {
  border-color: rgba(243, 35, 53, 0.34);
  box-shadow: 0 0 0 4px rgba(243, 35, 53, 0.08);
}

.life-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mini-switch {
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 14px;
}

.life-list {
  display: grid;
  gap: 8px;
}

.life-empty {
  padding: 15px 12px;
  border: 1px dashed rgba(17, 19, 21, 0.12);
  border-radius: 16px;
  color: #7b8289;
  background: rgba(255, 255, 255, 0.54);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.life-item {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 18px;
  color: #111315;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(247, 248, 250, 0.74));
  box-shadow: 0 14px 34px rgba(17, 19, 21, 0.07);
}

.life-item.due {
  border-color: rgba(243, 35, 53, 0.3);
  background: linear-gradient(135deg, rgba(255, 241, 243, 0.95), rgba(255, 255, 255, 0.84));
}

.life-item.done {
  opacity: 0.62;
}

.life-item-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  color: #fff;
  background: #111315;
}

.life-item-icon svg {
  width: 18px;
  height: 18px;
}

.life-item strong,
.life-item small {
  display: block;
  min-width: 0;
}

.life-item strong {
  color: #111315;
  font-size: 14px;
  line-height: 1.25;
}

.life-item small {
  margin-top: 3px;
  color: #727982;
  font-size: 12px;
  font-weight: 800;
}

.life-item em {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--red);
  background: rgba(243, 35, 53, 0.08);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.life-item-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.life-item-actions .soft-button,
.life-item-actions .text-button {
  min-height: 31px;
  padding-inline: 10px;
  border-radius: 11px;
  font-size: 12px;
}

@media (max-width: 1180px) {
  .life-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .life-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .life-form-row {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
  }

  .bottom-nav button {
    min-width: 0;
    padding-inline: 4px;
    font-size: 10px;
  }
}

/* Nova cloud sync */
.cloud-sync-panel {
  position: relative;
  overflow: hidden;
}

.cloud-sync-panel::before {
  content: "";
  position: absolute;
  inset: auto -18% -34% auto;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(244, 25, 48, 0.24), rgba(244, 25, 48, 0));
  pointer-events: none;
}

.cloud-sync-panel > * {
  position: relative;
  z-index: 1;
}

.cloud-sync-status {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: #111315;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.cloud-sync-status[data-status="online"],
.cloud-sync-status[data-status="saving"] {
  border-color: rgba(16, 185, 129, 0.28);
  background: rgba(236, 253, 245, 0.86);
  color: #065f46;
}

.cloud-sync-status[data-status="checking"] {
  border-color: rgba(244, 25, 48, 0.22);
  background: rgba(255, 241, 243, 0.88);
  color: #9f1239;
}

.cloud-sync-status[data-status="offline"] {
  border-color: rgba(244, 25, 48, 0.26);
  background: rgba(254, 226, 226, 0.9);
  color: #991b1b;
}

.cloud-launch-card {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(244, 25, 48, 0.14), transparent 44%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.62));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 18px 44px rgba(17, 19, 21, 0.06);
}

.cloud-launch-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.cloud-launch-head > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #111315, var(--red));
  box-shadow: 0 16px 34px rgba(244, 25, 48, 0.22);
}

.cloud-launch-head svg {
  width: 18px;
  height: 18px;
}

.cloud-launch-head small,
.cloud-launch-head strong,
.cloud-launch-head em {
  display: block;
  min-width: 0;
}

.cloud-launch-head small {
  color: #9a2430;
  font-size: 10px;
  font-weight: 950;
}

.cloud-launch-head strong {
  margin-top: 1px;
  color: #111315;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.15;
}

.cloud-launch-head em {
  margin-top: 3px;
  color: #727780;
  font-size: 11px;
  font-style: normal;
  font-weight: 820;
  line-height: 1.35;
}

.cloud-launch-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.cloud-launch-steps span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 9px 10px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.68);
  color: #111315;
  font-size: 11px;
  font-weight: 920;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.cloud-launch-steps span::before {
  content: attr(data-step);
  display: grid;
  flex: 0 0 17px;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 7px;
  color: #fff;
  background: #111315;
  font-size: 10px;
}

.cloud-launch-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.cloud-launch-actions .soft-button {
  min-height: 38px;
  padding-inline: 10px;
  font-size: 11px;
}

.cloud-sync-form {
  display: grid;
  gap: 12px;
}

.cloud-sync-form label {
  display: grid;
  gap: 7px;
  color: #111315;
  font-size: 12px;
  font-weight: 900;
}

.cloud-sync-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(17, 19, 21, 0.1);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.86);
  color: #111315;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.cloud-sync-form input:focus {
  border-color: rgba(244, 25, 48, 0.46);
  box-shadow: 0 0 0 4px rgba(244, 25, 48, 0.12);
  transform: translateY(-1px);
}

@media (max-width: 520px) {
  .cloud-launch-card {
    padding: 10px;
    border-radius: 16px;
  }

  .cloud-launch-head {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
  }

  .cloud-launch-head > span {
    width: 36px;
    height: 36px;
    border-radius: 13px;
  }

  .cloud-launch-steps,
  .cloud-launch-actions {
    grid-template-columns: 1fr;
  }

  .cloud-launch-steps span,
  .cloud-launch-actions .soft-button {
    min-height: 36px;
  }
}

@font-face {
  font-family: "Noto Sans Hebrew";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./assets/fonts/noto-sans-hebrew-500.ttf") format("truetype");
}

@font-face {
  font-family: "Noto Sans Hebrew";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./assets/fonts/noto-sans-hebrew-600.ttf") format("truetype");
}

@font-face {
  font-family: "Noto Sans Hebrew";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./assets/fonts/noto-sans-hebrew-700.ttf") format("truetype");
}

@font-face {
  font-family: "Noto Sans Hebrew";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("./assets/fonts/noto-sans-hebrew-800.ttf") format("truetype");
}

@font-face {
  font-family: "Noto Sans Hebrew";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("./assets/fonts/noto-sans-hebrew-900.ttf") format("truetype");
}

:root {
  color-scheme: dark;
  --bg: #070609;
  --bg-soft: #100d12;
  --surface: rgba(20, 18, 24, 0.66);
  --surface-strong: rgba(28, 25, 34, 0.82);
  --surface-soft: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.24);
  --text: #fbf7fb;
  --muted: #b7afbd;
  --muted-2: #817985;
  --red: #ff304a;
  --red-2: #d90f2e;
  --red-soft: rgba(255, 48, 74, 0.18);
  --blue: #6ee7f9;
  --green: #66f2a3;
  --purple: #a78bfa;
  --warning: #ffb45e;
  --danger: #ff5d6e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
  --inner: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 12px;
  --font: "Noto Sans Hebrew", "Arial Hebrew", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  direction: rtl;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    linear-gradient(120deg, rgba(255, 48, 74, 0.15), transparent 28%, rgba(110, 231, 249, 0.08) 62%, transparent),
    linear-gradient(180deg, #080609 0%, #120d12 48%, #060507 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(150deg, transparent 0 18%, rgba(255, 48, 74, 0.08) 18% 38%, transparent 38% 100%),
    linear-gradient(30deg, transparent 0 52%, rgba(167, 139, 250, 0.08) 52% 70%, transparent 70% 100%);
  opacity: 0.8;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

input,
select,
textarea {
  min-width: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
}

select {
  color-scheme: dark;
}

textarea {
  resize: vertical;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(255, 48, 74, 0.35);
  outline-offset: 2px;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.glass {
  border: 1px solid var(--line);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035)),
    var(--surface);
  box-shadow: var(--shadow), var(--inner);
  backdrop-filter: blur(28px) saturate(130%);
  -webkit-backdrop-filter: blur(28px) saturate(130%);
}

.app-root {
  width: min(1480px, calc(100vw - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 310px;
  gap: 14px;
}

.room-rail {
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background: rgba(8, 7, 10, 0.68);
  box-shadow: var(--shadow), var(--inner);
  backdrop-filter: blur(26px) saturate(130%);
  -webkit-backdrop-filter: blur(26px) saturate(130%);
}

.logo-button,
.rail-action,
.room-dot,
.icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.logo-button {
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 17px;
  overflow: hidden;
  background: #c90821;
}

.logo-button img {
  width: 100%;
  height: 100%;
  display: block;
}

.rail-action,
.room-dot {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 16px;
}

.room-dot {
  color: color-mix(in srgb, var(--room-color) 72%, white);
}

.rail-action:hover,
.room-dot:hover,
.icon-button:hover,
.logo-button:hover {
  transform: translateY(-1px);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
}

.rail-action.active,
.room-dot.active {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-2));
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 16px 42px rgba(255, 48, 74, 0.32), var(--inner);
}

.room-dot.active {
  background: linear-gradient(135deg, color-mix(in srgb, var(--room-color) 85%, white), var(--red-2));
}

.rail-action span,
.room-dot span {
  position: absolute;
  top: -5px;
  left: -5px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: #161219;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 11px;
  font-weight: 900;
}

.rail-separator {
  width: 34px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.rail-rooms {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
  overflow-y: auto;
  padding: 2px;
}

.rail-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.topbar {
  min-height: 98px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border-radius: var(--radius-xl);
}

.eyebrow,
.topbar h1,
.topbar p,
.section-head h2,
.section-head p,
.panel-title h3,
.entry-content p,
.entry-meta,
.empty-state p {
  margin: 0;
}

.eyebrow {
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}

.topbar h1 {
  margin-top: 4px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

.topbar p:not(.eyebrow) {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.search-box {
  width: min(300px, 34vw);
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-settings {
  width: 46px;
  height: 46px;
  border-radius: 16px;
}

.search-box input {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  outline: 0;
}

.capture-panel {
  padding: 12px;
  border-radius: var(--radius-xl);
}

.capture-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.capture-form textarea {
  width: 100%;
  min-height: 80px;
  max-height: 220px;
  padding: 18px 18px 12px;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.055));
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  outline: 0;
}

.capture-form textarea::placeholder,
input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.44);
}

.capture-controls {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto auto auto auto;
  gap: 8px;
  align-items: center;
}

.segmented,
.screen-tabs,
.pill-row,
.status-pills,
.focus-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.segmented button,
.screen-tabs button,
.pill-row button,
.status-pills button,
.focus-actions button {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.segmented button.active,
.screen-tabs button.active,
.pill-row button.active,
.status-pills button.active,
.focus-actions button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: var(--inner);
}

.capture-controls select,
.capture-controls input[type="date"],
.capture-controls input[type="time"] {
  height: 44px;
  padding: 0 12px;
}

.deadline-toggle {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 800;
  white-space: nowrap;
}

.deadline-toggle input {
  accent-color: var(--red);
}

.capture-due {
  display: none;
}

.capture-due.visible {
  display: block;
}

.primary-button,
.soft-button,
.danger-button,
.tiny-button,
.text-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 900;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-2));
  box-shadow: 0 16px 42px rgba(255, 48, 74, 0.34), var(--inner);
}

.soft-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.danger-button {
  color: #fff;
  background: rgba(255, 93, 110, 0.15);
  border: 1px solid rgba(255, 93, 110, 0.34);
}

.tiny-button {
  min-height: 34px;
  padding: 0 12px;
  color: #fff;
  background: rgba(255, 48, 74, 0.17);
  border: 1px solid rgba(255, 48, 74, 0.28);
}

.text-button {
  min-height: 34px;
  padding: 0 8px;
  color: color-mix(in srgb, var(--red) 68%, white);
  background: transparent;
}

.primary-button:hover,
.soft-button:hover,
.danger-button:hover,
.tiny-button:hover {
  transform: translateY(-1px);
}

.capture-hint {
  margin: 8px 10px 0;
  color: var(--muted-2);
  font-size: 13px;
}

.screen-tabs {
  align-self: start;
  border-radius: 20px;
  padding: 6px;
}

.screen-tabs button {
  min-width: 88px;
  min-height: 40px;
}

.screen {
  display: none;
  min-width: 0;
}

.screen.active {
  display: block;
  animation: rise 0.22s ease both;
}

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

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 6px 2px 14px;
}

.section-head h2 {
  font-size: 25px;
  line-height: 1.2;
}

.section-head p {
  margin-top: 6px;
  color: var(--muted);
}

.pill-row {
  flex-wrap: wrap;
  border-radius: 18px;
}

.pill-row button {
  min-height: 36px;
}

.rooms-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
}

.room-picker {
  position: sticky;
  top: 16px;
  align-self: start;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-lg);
}

.room-row,
.dock-room {
  width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 9px;
  border-radius: 16px;
  color: var(--muted);
  text-align: right;
  background: transparent;
}

.room-row:hover,
.room-row.active,
.dock-room:hover,
.dock-room.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.room-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  color: color-mix(in srgb, var(--room-color) 78%, white);
  background: color-mix(in srgb, var(--room-color) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--room-color) 35%, transparent);
}

.room-row strong,
.room-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-row strong {
  color: inherit;
  font-size: 15px;
}

.room-row small {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 12px;
}

.room-row em {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.entry-stream,
.task-list {
  display: grid;
  gap: 10px;
}

.entry-stream.compact {
  gap: 8px;
}

.entry-card {
  position: relative;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 12px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--room-color) 12%, transparent), rgba(255, 255, 255, 0.035)),
    rgba(18, 16, 22, 0.66);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22), var(--inner);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
}

.entry-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 99px;
  background: var(--room-color);
  opacity: 0.9;
}

.entry-card.done {
  opacity: 0.72;
}

.entry-card.done .entry-content p {
  text-decoration: line-through;
  color: var(--muted);
}

.entry-card.overdue {
  border-color: rgba(255, 93, 110, 0.36);
}

.entry-line {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
}

.done-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.done .done-button,
.done-button:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-2));
}

.entry-content {
  min-width: 0;
}

.entry-content p {
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}

.entry-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.075);
  font-size: 12px;
  font-weight: 800;
}

.entry-meta .danger-meta {
  color: #fff;
  background: rgba(255, 93, 110, 0.18);
}

.entry-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 14px;
}

.more-menu {
  position: relative;
}

.more-menu summary {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: var(--muted);
  list-style: none;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.more-menu summary::-webkit-details-marker {
  display: none;
}

.more-menu[open] summary {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
}

.more-menu div {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  left: 0;
  width: 160px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background: rgba(14, 12, 18, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
}

.more-menu button {
  min-height: 36px;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  text-align: right;
  font-weight: 800;
}

.more-menu button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.entry-notes {
  margin: 10px 52px 0 0;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}

.task-extras {
  margin: 10px 52px 0 0;
  display: grid;
  gap: 10px;
}

.status-pills {
  width: max-content;
  max-width: 100%;
  border-radius: 15px;
  padding: 4px;
}

.status-pills button {
  min-height: 30px;
  padding: 0 11px;
  font-size: 12px;
}

.checklist {
  display: grid;
  gap: 8px;
}

.checklist-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.checklist-head i {
  position: relative;
  display: block;
  flex: 1;
  height: 7px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.checklist-head i::before {
  content: "";
  position: absolute;
  inset: 0;
  width: calc(var(--progress) * 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--blue));
}

.checklist-items {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.checklist-items button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 12px;
  font-weight: 800;
}

.checklist-items button span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid currentColor;
}

.checklist-items button.done {
  color: #fff;
  background: rgba(102, 242, 163, 0.16);
}

.checklist-items button.done span {
  background: var(--green);
  border-color: var(--green);
}

.compact-card {
  padding: 10px;
  border-radius: 18px;
}

.compact-card .entry-line {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.compact-card .done-button,
.compact-card .icon-button,
.compact-card .more-menu summary {
  width: 32px;
  height: 32px;
  border-radius: 12px;
}

.compact-card .entry-content p {
  font-size: 15px;
}

.empty-state {
  min-height: 150px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
}

.empty-state strong {
  color: #fff;
  font-size: 18px;
}

.today-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border-radius: var(--radius-lg);
  color: var(--text);
  text-align: right;
}

.metric.hot {
  background:
    linear-gradient(135deg, rgba(255, 48, 74, 0.28), rgba(255, 255, 255, 0.035)),
    rgba(22, 18, 26, 0.78);
}

.metric span {
  color: var(--muted);
  font-weight: 800;
}

.metric strong {
  font-size: 38px;
  line-height: 1;
}

.today-layout,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.settings-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-panel {
  min-width: 0;
  padding: 16px;
  border-radius: var(--radius-lg);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title h3 {
  font-size: 18px;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-copy,
.storage-info {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

.storage-info {
  margin: 12px 0 0;
  font-size: 13px;
}

.sync-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.sync-info::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #9ca3af;
  box-shadow: 0 0 0 4px rgba(156, 163, 175, 0.12);
}

.sync-info.online::before {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

.sync-info.offline::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 48, 74, 0.16);
}

.hidden-file {
  display: none;
}

.room-manager {
  display: grid;
  gap: 8px;
}

.manager-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--room-color) 12%, rgba(255, 255, 255, 0.045));
}

.manager-row strong,
.manager-row small {
  display: block;
}

.manager-row small {
  color: var(--muted);
  margin-top: 2px;
}

.restore-panel {
  order: -8;
}

.restore-point-list {
  display: grid;
  gap: 8px;
}

.restore-point-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 17px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.56)),
    rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 14px 30px rgba(17, 19, 21, 0.045);
}

.restore-point-row > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #111315, var(--red));
  box-shadow: 0 12px 28px rgba(243, 35, 53, 0.2);
}

.restore-point-row svg {
  width: 18px;
  height: 18px;
}

.restore-point-row strong,
.restore-point-row small,
.restore-empty strong,
.restore-empty small {
  display: block;
}

.restore-point-row strong {
  overflow: hidden;
  color: #111315;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restore-point-row small,
.restore-empty small {
  margin-top: 2px;
  color: #737983;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.restore-empty {
  padding: 12px;
  border: 1px dashed rgba(17, 19, 21, 0.14);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.5);
}

.restore-empty strong {
  color: #111315;
  font-size: 13px;
  font-weight: 950;
}

.side-dock {
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 28px;
  overflow: hidden;
}

.dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 900;
}

.dock-head strong {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #fff;
  background: var(--red-soft);
}

.dock-rooms {
  display: grid;
  gap: 8px;
}

.dock-room {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 42px;
  border-radius: 14px;
  padding: 0 10px;
}

.dock-room span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock-room strong {
  color: color-mix(in srgb, var(--room-color) 75%, white);
}

.focus-card {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.focus-card span,
.focus-card p {
  margin: 0;
  color: var(--muted);
}

.focus-card strong {
  font-size: 36px;
  line-height: 1;
}

.focus-actions {
  justify-content: space-between;
  border-radius: 16px;
}

.focus-actions button {
  flex: 1;
  min-height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

.dialog {
  width: min(640px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  padding: 0;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045)),
    rgba(12, 10, 15, 0.96);
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.62), var(--inner);
  backdrop-filter: blur(30px) saturate(135%);
  -webkit-backdrop-filter: blur(30px) saturate(135%);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.small-dialog {
  width: min(460px, calc(100vw - 28px));
}

.confirm-dialog {
  width: min(460px, calc(100vw - 28px));
  overflow: hidden;
  color: #111315;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background:
    radial-gradient(circle at 18% 12%, rgba(243, 35, 53, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 244, 247, 0.84));
  box-shadow:
    0 38px 120px rgba(17, 19, 21, 0.34),
    0 16px 42px rgba(243, 35, 53, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.confirm-dialog::backdrop {
  background: rgba(17, 19, 21, 0.34);
  backdrop-filter: blur(12px) saturate(1.08);
}

.confirm-shell {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 15px;
  padding: 18px;
}

.confirm-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #8f1022);
  box-shadow: 0 18px 38px rgba(243, 35, 53, 0.3);
}

.confirm-mark svg {
  width: 25px;
  height: 25px;
}

.confirm-copy {
  min-width: 0;
}

.confirm-copy h2,
.confirm-copy p {
  margin: 0;
}

.confirm-copy h2 {
  font-size: 22px;
  font-weight: 950;
  line-height: 1.1;
}

.confirm-copy p {
  margin-top: 8px;
  color: #69717a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.confirm-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding-top: 6px;
}

.confirm-actions button {
  min-height: 42px;
  border-radius: 14px;
}

.confirm-actions .danger-button {
  color: #fff;
  background: linear-gradient(135deg, var(--red), #9d1023);
  border-color: rgba(157, 16, 35, 0.58);
  box-shadow: 0 14px 28px rgba(220, 18, 45, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.confirm-actions .soft-button {
  color: #111315;
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(17, 19, 21, 0.1);
}

.dialog form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.dialog-head,
.dialog-actions {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.dialog-head h2,
.dialog-head p {
  margin: 0;
}

.dialog-head h2 {
  font-size: 24px;
}

.dialog-head p {
  margin-top: 5px;
  color: var(--muted);
}

.dialog label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.dialog input,
.dialog select,
.dialog textarea {
  width: 100%;
  padding: 11px 12px;
}

.form-grid,
.deadline-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.switch-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.switch-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-weight: 700;
}

.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.switch-track::before {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.18s ease, background 0.18s ease;
}

.switch-row input:checked + .switch-track {
  background: rgba(255, 48, 74, 0.42);
}

.switch-row input:checked + .switch-track::before {
  transform: translateX(-24px);
  background: #fff;
}

.bottom-nav {
  display: none;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 50%;
  bottom: 22px;
  transform: translate(50%, 20px);
  max-width: min(420px, calc(100vw - 24px));
  padding: 12px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(14, 12, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-weight: 900;
}

.toast.show {
  opacity: 1;
  transform: translate(50%, 0);
}

.action-receipt {
  position: fixed;
  z-index: 70;
  right: clamp(18px, 4vw, 42px);
  bottom: clamp(18px, 3vw, 34px);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(370px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 18px;
  color: #111315;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 246, 248, 0.78)),
    rgba(255, 255, 255, 0.74);
  box-shadow:
    0 24px 70px rgba(17, 19, 21, 0.22),
    0 12px 36px rgba(243, 35, 53, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.976);
  filter: blur(8px);
  direction: rtl;
}

@supports (backdrop-filter: blur(20px)) {
  .action-receipt {
    backdrop-filter: blur(22px) saturate(1.28);
  }
}

.action-receipt::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 16% 18%, rgba(243, 35, 53, 0.22), transparent 36%),
    linear-gradient(90deg, rgba(243, 35, 53, 0.16), transparent 54%);
  opacity: 0.74;
  pointer-events: none;
}

.action-receipt::after {
  content: "";
  position: absolute;
  inset-inline: 16px;
  bottom: 0;
  height: 3px;
  border-radius: 99px 99px 0 0;
  background: linear-gradient(90deg, var(--red), #111315);
  transform-origin: right center;
}

.action-receipt.show {
  animation: receipt-in 520ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

.action-receipt.show::after {
  animation: receipt-line 2600ms linear forwards;
}

.action-receipt.leaving {
  animation: receipt-out 360ms ease forwards;
}

.receipt-mark,
.receipt-copy,
.receipt-undo {
  position: relative;
  z-index: 1;
}

.receipt-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #8f1022);
  box-shadow: 0 12px 28px rgba(243, 35, 53, 0.3);
}

.receipt-mark svg {
  width: 22px;
  height: 22px;
}

.receipt-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.receipt-copy strong,
.receipt-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt-copy strong {
  font-size: 15px;
  font-weight: 950;
}

.receipt-copy small {
  color: #747b84;
  font-size: 12px;
  font-weight: 800;
}

.receipt-undo {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(17, 19, 21, 0.1);
  border-radius: 12px;
  color: #111315;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 950;
}

.receipt-undo:hover,
.receipt-undo:focus-visible {
  color: #fff;
  background: #111315;
  transform: translateY(-1px);
}

@keyframes receipt-in {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.976);
    filter: blur(8px);
  }
  66% {
    opacity: 1;
    transform: translateY(-3px) scale(1.012);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes receipt-out {
  to {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
    filter: blur(7px);
  }
}

@keyframes receipt-line {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

@media (max-width: 1180px) {
  .app-root {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .side-dock {
    display: none;
  }

  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-root {
    width: min(100%, calc(100vw - 20px));
    margin: 10px auto 92px;
    grid-template-columns: 1fr;
  }

  .room-rail {
    display: none;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    min-height: unset;
    padding: 16px;
  }

  .topbar h1 {
    font-size: 34px;
  }

  .search-box {
    width: 100%;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions .search-box {
    flex: 1;
  }

  .capture-controls {
    grid-template-columns: 1fr 1fr;
  }

  .capture-controls .primary-button,
  .capture-controls select,
  .capture-controls .segmented,
  .deadline-toggle,
  .capture-due.visible {
    width: 100%;
  }

  .segmented {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .segmented button {
    flex: 1;
  }

  .screen-tabs {
    display: none;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .rooms-layout,
  .today-layout,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .room-picker {
    position: static;
  }

  .today-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-line {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .entry-actions {
    grid-column: 2;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 8px;
  }

  .entry-notes,
  .task-extras {
    margin-right: 49px;
  }

  .bottom-nav {
    position: fixed;
    z-index: 30;
    right: 10px;
    left: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 7px;
    border-radius: 24px;
  }

  .bottom-nav button {
    min-height: 54px;
    display: grid;
    place-items: center;
    gap: 2px;
    border-radius: 18px;
    color: var(--muted);
    background: transparent;
    font-size: 12px;
    font-weight: 900;
  }

  .bottom-nav button.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
  }

  .bottom-nav svg {
    width: 19px;
    height: 19px;
  }

  .toast {
    bottom: 88px;
  }
}

@media (max-width: 560px) {
  .app-root {
    width: calc(100vw - 14px);
    margin-top: 7px;
  }

  .room-rail {
    padding: 8px;
    gap: 8px;
  }

  .logo-button,
  .rail-action,
  .room-dot {
    width: 44px;
    height: 44px;
    border-radius: 15px;
  }

  .capture-form textarea {
    min-height: 72px;
    font-size: 17px;
    padding: 14px;
  }

  .capture-controls {
    grid-template-columns: 1fr;
  }

  .today-grid {
    gap: 8px;
  }

  .metric {
    min-height: 92px;
    padding: 14px;
  }

  .metric strong {
    font-size: 32px;
  }

  .entry-card {
    padding: 10px;
    border-radius: 18px;
  }

  .entry-content p {
    font-size: 15px;
  }

  .entry-meta span {
    min-height: 22px;
    font-size: 11px;
  }

  .entry-notes,
  .task-extras {
    margin-right: 0;
  }

  .form-grid,
  .deadline-inputs {
    grid-template-columns: 1fr;
  }

  .dialog form {
    padding: 15px;
  }
}

/* Compact capture redesign */
body {
  background:
    radial-gradient(circle at 82% -10%, rgba(255, 48, 74, 0.22), transparent 34%),
    linear-gradient(180deg, #08070a 0%, #0c090d 52%, #060507 100%);
}

.app-root {
  width: min(1120px, calc(100vw - 24px));
  min-height: calc(100vh - 24px);
  margin: 12px auto;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 10px;
}

.side-dock {
  display: none;
}

.room-rail {
  top: 12px;
  height: calc(100vh - 24px);
  gap: 7px;
  padding: 7px;
  border-radius: 22px;
  background: rgba(9, 8, 12, 0.78);
}

.logo-button,
.rail-action,
.room-dot {
  width: 44px;
  height: 44px;
  border-radius: 15px;
}

.logo-button {
  width: 46px;
  height: 46px;
}

.topbar {
  min-height: 76px;
  padding: 13px 15px;
  border-radius: 22px;
}

.eyebrow {
  font-size: 12px;
}

.topbar h1 {
  margin-top: 2px;
  font-size: clamp(24px, 3vw, 34px);
}

.topbar p:not(.eyebrow) {
  margin-top: 4px;
  font-size: 13px;
}

.search-box {
  min-height: 40px;
}

.top-settings {
  width: 40px;
  height: 40px;
}

.capture-panel {
  padding: 9px;
  border-radius: 22px;
}

.capture-form {
  gap: 8px;
}

.capture-form textarea {
  min-height: 58px;
  padding: 13px 15px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 800;
}

.capture-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.capture-controls select,
.capture-controls input[type="date"],
.capture-controls input[type="time"],
.deadline-toggle,
.primary-button,
.soft-button {
  min-height: 38px;
  height: 38px;
}

.capture-controls select {
  width: min(170px, 100%);
  padding: 0 10px;
}

.segmented {
  height: 38px;
  padding: 4px;
}

.segmented button,
.screen-tabs button,
.pill-row button,
.status-pills button {
  min-height: 30px;
  padding: 0 11px;
  font-size: 13px;
}

.image-button svg {
  width: 18px;
  height: 18px;
}

.image-button {
  border-color: rgba(255, 48, 74, 0.28);
  background: rgba(255, 48, 74, 0.11);
}

.capture-image-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.capture-hint {
  margin: 0 8px;
  font-size: 12px;
}

.screen-tabs {
  padding: 5px;
  border-radius: 18px;
}

.screen-tabs button {
  min-width: 76px;
  min-height: 34px;
}

.section-head {
  align-items: center;
  margin: 3px 0 9px;
}

.section-head h2 {
  font-size: 21px;
}

.section-head p {
  margin-top: 3px;
  font-size: 13px;
}

.rooms-layout {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 10px;
}

.room-picker {
  gap: 6px;
  padding: 8px;
  border-radius: 18px;
}

.room-row {
  min-height: 52px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 7px;
  border-radius: 14px;
}

.room-mark {
  width: 32px;
  height: 32px;
  border-radius: 11px;
}

.room-main {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.subroom-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border-radius: 17px;
}

.subroom-picker button {
  min-height: 31px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.subroom-picker button.active,
.subroom-picker button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.entry-stream,
.task-list {
  gap: 8px;
}

.entry-card {
  padding: 9px;
  border-radius: 17px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.2), var(--inner);
}

.entry-card::before {
  top: 12px;
  bottom: 12px;
}

.entry-line {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
}

.done-button,
.icon-button,
.more-menu summary {
  width: 32px;
  height: 32px;
  border-radius: 12px;
}

.entry-content p {
  font-size: 15px;
  line-height: 1.36;
}

.entry-meta {
  gap: 5px;
  margin-top: 5px;
}

.entry-meta span {
  min-height: 21px;
  padding: 0 8px;
  font-size: 11px;
}

.entry-actions {
  gap: 5px;
}

.tiny-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.entry-notes,
.task-extras,
.entry-images,
.entry-voices {
  margin: 8px 43px 0 0;
}

.entry-images,
.image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.entry-images figure,
.image-preview figure {
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.entry-images figure {
  width: min(210px, 46vw);
  aspect-ratio: 16 / 10;
}

.image-preview figure {
  width: 72px;
  height: 54px;
}

.entry-images img,
.image-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.entry-voices,
.voice-preview {
  display: grid;
  gap: 7px;
}

.voice-note {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  max-width: 520px;
  padding: 9px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 48, 74, 0.12), transparent 44%),
    rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 26px rgba(17, 19, 21, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.voice-note-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #8f0b19);
  box-shadow: 0 12px 24px rgba(255, 48, 74, 0.28), var(--inner);
}

.voice-note-icon svg {
  width: 17px;
  height: 17px;
}

.voice-note strong,
.voice-note small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-note strong {
  color: #111315;
  font-size: 12px;
  font-weight: 950;
}

.voice-note small {
  margin-top: 1px;
  color: #737a82;
  font-size: 11px;
  font-weight: 800;
}

.voice-note audio {
  width: 100%;
  height: 34px;
  margin-top: 6px;
  display: block;
}

.voice-button.recording,
#entryVoiceButton.recording {
  color: #fff;
  border-color: rgba(255, 48, 74, 0.35);
  background: linear-gradient(135deg, var(--red), #960b1c);
  box-shadow: 0 16px 34px rgba(255, 48, 74, 0.32), var(--inner);
  animation: voice-recording-pulse 1.35s ease-in-out infinite;
}

.capture-voice-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
}

.dialog-preview {
  margin-top: 8px;
}

.image-field,
.voice-field {
  display: grid;
  gap: 8px;
}

.image-field-head,
.voice-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-weight: 900;
}

.image-field-head div,
.voice-field-head div {
  display: flex;
  gap: 6px;
}

.today-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.metric {
  min-height: 78px;
  padding: 12px;
  border-radius: 17px;
}

.metric strong {
  font-size: 28px;
}

.mini-panel {
  padding: 12px;
  border-radius: 18px;
}

.manager-row {
  min-height: 48px;
}

@media (max-width: 860px) {
  .app-root {
    width: calc(100vw - 14px);
    margin: 7px auto 84px;
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 12px;
    border-radius: 20px;
  }

  .topbar h1 {
    font-size: 30px;
  }

  .capture-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .capture-controls select,
  .capture-controls .primary-button,
  .capture-controls .soft-button,
  .deadline-toggle {
    width: 100%;
  }

  .segmented,
  .capture-image-row {
    grid-column: 1 / -1;
  }

  .rooms-layout,
  .today-layout,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .room-picker {
    display: flex;
    overflow-x: auto;
  }

  .room-row {
    min-width: 180px;
  }

  .entry-line {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .entry-actions {
    grid-column: 2;
    margin-top: 4px;
  }

  .entry-notes,
  .task-extras,
  .entry-images {
    margin-right: 0;
  }
}

@media (max-width: 560px) {
  .capture-controls {
    grid-template-columns: 1fr;
  }

  .today-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-images figure {
    width: 100%;
  }
}

/* Wide control-board redesign */
:root {
  color-scheme: light;
  --bg: #d4d4d4;
  --bg-soft: #ececec;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(20, 20, 20, 0.04);
  --line: rgba(18, 18, 18, 0.1);
  --line-strong: rgba(18, 18, 18, 0.16);
  --text: #161313;
  --muted: #777174;
  --muted-2: #9b9698;
  --red: #ef1f2f;
  --red-2: #c90b1d;
  --red-soft: rgba(239, 31, 47, 0.12);
  --blue: #2f80ed;
  --green: #24b26b;
  --purple: #7c5cff;
  --warning: #d17b00;
  --danger: #e02d3f;
  --shadow: 0 22px 64px rgba(20, 20, 20, 0.13);
  --inner: inset 0 1px 0 rgba(255, 255, 255, 0.84), inset 0 -1px 0 rgba(0, 0, 0, 0.04);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 9px;
}

body {
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), transparent 35%),
    linear-gradient(180deg, #d5d5d5 0%, #cfcfcf 100%);
}

body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 84px 84px;
  opacity: 0.4;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

body::after {
  display: none;
}

.glass {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.54)),
    var(--surface);
  box-shadow: var(--shadow), var(--inner);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.app-root {
  width: min(1320px, calc(100vw - 56px));
  min-height: calc(100vh - 64px);
  margin: 32px auto;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 282px;
  gap: 0;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(247, 247, 247, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 32px 90px rgba(20, 20, 20, 0.18), var(--inner);
  backdrop-filter: blur(34px) saturate(140%);
  -webkit-backdrop-filter: blur(34px) saturate(140%);
}

.room-rail {
  position: relative;
  top: auto;
  height: auto;
  align-items: stretch;
  gap: 10px;
  padding: 28px 20px;
  border: 0;
  border-left: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.logo-button {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: #df0f22;
  box-shadow: 0 16px 34px rgba(239, 31, 47, 0.24);
}

.rail-separator {
  width: 100%;
  background: rgba(0, 0, 0, 0.08);
}

.rail-rooms,
.rail-bottom {
  gap: 8px;
}

.rail-action,
.room-dot {
  width: 100%;
  height: 44px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  place-items: center start;
  gap: 9px;
  padding: 0 12px;
  border-radius: 9px;
  color: #5f5a5d;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.rail-action svg,
.room-dot svg {
  width: 19px;
  height: 19px;
  justify-self: center;
}

.rail-action::after {
  content: attr(title);
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-dot b {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-action span,
.room-dot span {
  position: static;
  grid-column: 3;
  grid-row: 1;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  color: #fff;
  background: var(--red);
  border: 0;
  font-size: 11px;
}

.rail-action:hover,
.room-dot:hover,
.icon-button:hover,
.logo-button:hover {
  color: #151313;
  background: rgba(0, 0, 0, 0.05);
  transform: none;
  border-color: transparent;
}

.rail-action.active,
.room-dot.active {
  color: #151313;
  background: rgba(0, 0, 0, 0.08);
  border-color: transparent;
  box-shadow: none;
}

.room-dot.active {
  background: linear-gradient(90deg, rgba(239, 31, 47, 0.16), rgba(0, 0, 0, 0.05));
}

.workspace {
  gap: 16px;
  padding: 30px 34px 26px;
  border-left: 1px solid rgba(0, 0, 0, 0.07);
  background: rgba(250, 250, 250, 0.46);
}

.topbar {
  min-height: 76px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.eyebrow {
  color: var(--red);
  font-size: 12px;
}

.topbar h1 {
  margin-top: 2px;
  color: #111;
  font-size: clamp(27px, 2.4vw, 34px);
  letter-spacing: 0;
}

.topbar p:not(.eyebrow) {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.search-box {
  width: min(285px, 30vw);
  min-height: 42px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0;
}

.top-settings,
.top-reminders,
.icon-button {
  color: #444;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: var(--inner);
}

.top-reminders.active {
  color: #fff;
  background: var(--red);
}

.capture-panel {
  padding: 14px;
  border-radius: 20px;
}

.capture-form textarea {
  min-height: 76px;
  padding: 16px;
  color: #111;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  font-size: 18px;
}

.capture-form textarea::placeholder,
input::placeholder,
textarea::placeholder {
  color: rgba(20, 20, 20, 0.38);
}

input,
select,
textarea {
  color: #171515;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(0, 0, 0, 0.1);
}

select {
  color-scheme: light;
}

.capture-controls select,
.capture-controls input[type="date"],
.capture-controls input[type="time"],
.deadline-toggle,
.reminder-toggle,
.primary-button,
.soft-button {
  height: 38px;
  min-height: 38px;
}

.deadline-toggle,
.reminder-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 999px;
  color: #514d50;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 900;
  white-space: nowrap;
}

.deadline-toggle input,
.reminder-toggle input {
  accent-color: var(--red);
}

.capture-reminder {
  display: none;
}

.capture-reminder.visible {
  display: block;
}

.segmented,
.screen-tabs,
.pill-row,
.status-pills,
.focus-actions {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(0, 0, 0, 0.08);
}

.segmented button,
.screen-tabs button,
.pill-row button,
.status-pills button,
.focus-actions button {
  color: var(--muted);
}

.segmented button.active,
.screen-tabs button.active,
.pill-row button.active,
.status-pills button.active,
.focus-actions button:hover {
  color: #111;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07), var(--inner);
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-2));
  box-shadow: 0 14px 28px rgba(239, 31, 47, 0.22), var(--inner);
}

.soft-button,
.tiny-button {
  color: #171515;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(0, 0, 0, 0.08);
}

.image-button {
  color: var(--red);
  background: rgba(239, 31, 47, 0.08);
  border-color: rgba(239, 31, 47, 0.18);
}

.text-button {
  color: var(--red);
}

.capture-hint {
  color: var(--muted);
}

.screen-tabs {
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 5px;
  border-radius: 13px;
}

.screen-tabs button {
  min-width: 0;
  border-radius: 10px;
}

.section-head {
  margin: 2px 0 12px;
}

.section-head h2 {
  color: #111;
  font-size: 22px;
}

.section-head p {
  color: var(--muted);
  font-size: 13px;
}

.rooms-layout {
  grid-template-columns: 230px minmax(0, 1fr);
}

.room-picker,
.subroom-picker,
.mini-panel,
.entry-card,
.metric,
.dialog {
  border-color: rgba(255, 255, 255, 0.76);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.65);
  box-shadow: 0 16px 42px rgba(25, 25, 25, 0.08), var(--inner);
}

.entry-card {
  overflow: hidden;
  padding: 11px;
  border-radius: 14px;
}

.entry-card::before {
  top: 0;
  bottom: 0;
  width: 4px;
}

.entry-content p,
.panel-title h3,
.dialog-head h2 {
  color: #111;
}

.entry-meta span {
  color: #656064;
  background: rgba(0, 0, 0, 0.045);
}

.entry-meta .danger-meta {
  color: #fff;
  background: rgba(224, 45, 63, 0.8);
}

.reminder-meta {
  gap: 5px;
  color: var(--red) !important;
  background: rgba(239, 31, 47, 0.1) !important;
}

.reminder-meta svg {
  width: 14px;
  height: 14px;
}

.done-button,
.more-menu summary {
  color: #595456;
  background: rgba(0, 0, 0, 0.045);
  border-color: rgba(0, 0, 0, 0.08);
}

.done .done-button,
.done-button:hover {
  color: #fff;
  background: var(--red);
}

.more-menu div {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(0, 0, 0, 0.08);
}

.more-menu button {
  color: #4f4a4d;
}

.more-menu button:hover {
  color: #111;
  background: rgba(0, 0, 0, 0.05);
}

.today-grid {
  gap: 12px;
}

.metric {
  min-height: 86px;
  color: #111;
  text-align: right;
}

.metric.hot {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(239, 31, 47, 0.94), rgba(201, 11, 29, 0.88)),
    rgba(239, 31, 47, 0.72);
}

.metric.hot span,
.metric.hot strong {
  color: #fff;
}

.side-dock {
  position: relative;
  top: auto;
  height: auto;
  display: flex;
  padding: 30px 22px;
  border: 0;
  border-radius: 0;
  background: rgba(245, 245, 245, 0.66);
  box-shadow: none;
}

.dock-head {
  color: #111;
}

.dock-head strong {
  background: var(--red);
}

.dock-room {
  color: #514d50;
  background: transparent;
  border-radius: 9px;
}

.dock-room:hover,
.dock-room.active {
  color: #111;
  background: rgba(0, 0, 0, 0.05);
}

.focus-card {
  color: #111;
  background: #171515;
  border: 0;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.focus-card span,
.focus-card p {
  color: rgba(255, 255, 255, 0.68);
}

.focus-card strong {
  color: #fff;
}

.focus-actions {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.focus-actions button {
  color: rgba(255, 255, 255, 0.75);
}

.focus-actions button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dialog {
  color: var(--text);
}

.dialog label,
.dialog-head p,
.switch-row small,
.settings-copy,
.storage-info,
.entry-notes {
  color: var(--muted);
}

.form-grid,
.deadline-inputs,
.reminder-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.toast {
  color: #fff;
  background: rgba(17, 17, 17, 0.92);
}

@media (max-width: 1180px) {
  .app-root {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .side-dock {
    display: none;
  }
}

@media (max-width: 860px) {
  .app-root {
    width: calc(100vw - 16px);
    margin: 8px auto 86px;
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .room-rail {
    display: none;
  }

  .workspace {
    padding: 16px;
    border-left: 0;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .capture-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .capture-controls select,
  .capture-controls .primary-button,
  .capture-controls .soft-button,
  .deadline-toggle,
  .reminder-toggle,
  .capture-due.visible,
  .capture-reminder.visible {
    width: 100%;
  }

  .segmented,
  .capture-image-row {
    grid-column: 1 / -1;
  }

  .screen-tabs {
    display: none;
  }

  .rooms-layout,
  .today-layout,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    display: grid;
  }
}

@media (max-width: 560px) {
  .workspace {
    padding: 12px;
  }

  .capture-controls,
  .form-grid,
  .deadline-inputs,
  .reminder-inputs {
    grid-template-columns: 1fr;
  }

  .topbar h1 {
    font-size: 28px;
  }
}

/* Reference-style red workspace */
:root {
  color-scheme: light;
  --bg: #d1d1d1;
  --app: #f4f4f4;
  --sidebar: #ffffff;
  --panel: #f8f8f8;
  --card: #ffffff;
  --line: #dddddd;
  --line-soft: #ededed;
  --text: #111111;
  --muted: #777777;
  --muted-2: #a0a0a0;
  --red: #ef1f2f;
  --red-2: #c90b1d;
  --red-soft: rgba(239, 31, 47, 0.12);
  --shadow: 0 18px 58px rgba(0, 0, 0, 0.08);
  --inner: none;
  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius: 9px;
  --radius-sm: 8px;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--text);
  background: var(--bg);
}

body::before,
body::after {
  display: none;
}

.app-root {
  direction: ltr;
  width: min(1190px, calc(100vw - 64px));
  min-height: min(786px, calc(100vh - 72px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr) 300px;
  gap: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--app);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.glass {
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.room-rail,
.workspace,
.side-dock {
  direction: rtl;
  height: auto;
  min-height: 0;
}

.room-rail {
  position: relative;
  top: auto;
  align-items: stretch;
  gap: 0;
  padding: 36px 26px 26px;
  border: 0;
  border-radius: 0;
  background: var(--sidebar);
  box-shadow: none;
}

.brand-lockup {
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 44px;
}

.brand-lockup span {
  display: grid;
  gap: 1px;
}

.brand-lockup strong {
  color: #111;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
}

.brand-lockup small {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
}

.logo-button {
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
}

.logo-button img {
  border-radius: 9px;
}

.rail-separator {
  display: none;
}

.rail-rooms {
  display: grid;
  gap: 11px;
  overflow: visible;
}

.rail-bottom {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.rail-action,
.room-dot {
  direction: ltr;
  width: 100%;
  height: 40px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  place-items: center start;
  gap: 11px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: #3d3d3d;
  background: transparent;
  box-shadow: none;
}

.rail-action::after,
.room-dot b {
  direction: rtl;
  color: inherit;
  font-size: 14px;
  font-weight: 700;
}

.rail-action svg,
.room-dot svg {
  width: 19px;
  height: 19px;
  color: #7c7c7c;
  stroke-width: 2.15;
}

.rail-action.active,
.room-dot.active,
.rail-action:hover,
.room-dot:hover {
  color: #111;
  background: #e5e5e5;
  transform: none;
}

.rail-action.active svg,
.room-dot.active svg {
  color: #111;
}

.room-dot.active {
  background: linear-gradient(90deg, #eeeeee, #e2e2e2);
}

.rail-action span,
.room-dot span {
  position: static;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid #e3e3e3;
  color: var(--red);
  background: #fff;
  font-size: 10px;
  font-weight: 900;
}

.workspace {
  padding: 38px 42px 34px;
  border-inline-start: 1px solid #dfdfdf;
  border-inline-end: 1px solid #dfdfdf;
  background: #f5f5f5;
  gap: 26px;
}

.topbar {
  min-height: 55px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.eyebrow {
  display: none;
}

.topbar h1 {
  margin: 0;
  color: #111;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.05;
}

.topbar p:not(.eyebrow) {
  margin-top: 7px;
  color: #8b8b8b;
  font-size: 13px;
  font-weight: 500;
}

.topbar .search-box {
  display: none;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.top-settings,
.top-reminders,
.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #eeeeee;
  border-radius: 9px;
  color: #111;
  background: #fff;
  box-shadow: none;
}

.top-settings:hover,
.top-reminders:hover,
.icon-button:hover {
  background: #f1f1f1;
  transform: none;
}

.top-reminders.active {
  color: #fff;
  background: var(--red);
}

.capture-panel {
  padding: 20px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.capture-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.capture-title h2,
.capture-title p {
  margin: 0;
}

.capture-title h2 {
  color: #111;
  font-size: 20px;
  font-weight: 900;
}

.capture-title p {
  margin-top: 4px;
  color: #8b8b8b;
  font-size: 13px;
}

.compact-only {
  min-height: 30px;
  padding: 0 14px;
  border-radius: 7px;
}

.capture-form textarea {
  min-height: 86px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid #e1e1e1;
  border-radius: 0;
  color: #111;
  background: transparent;
  font-size: 20px;
  font-weight: 600;
}

.capture-form textarea::placeholder,
input::placeholder,
textarea::placeholder {
  color: #9a9a9a;
}

.capture-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding-top: 10px;
}

.capture-controls select,
.capture-controls input[type="date"],
.capture-controls input[type="time"] {
  width: auto;
  max-width: 150px;
  height: 33px;
  padding: 0 9px;
  border: 1px solid #e6e6e6;
  border-radius: 7px;
  color: #444;
  background: #fafafa;
  font-size: 12px;
  font-weight: 700;
}

.segmented,
.pill-row,
.status-pills,
.focus-actions {
  gap: 0;
  padding: 3px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #f4f4f4;
}

.screen-tabs {
  display: none;
}

.segmented button,
.pill-row button,
.status-pills button,
.focus-actions button {
  min-height: 29px;
  padding: 0 11px;
  border-radius: 6px;
  color: #777;
  font-size: 12px;
  font-weight: 800;
  background: transparent;
  box-shadow: none;
}

.segmented button.active,
.pill-row button.active,
.status-pills button.active,
.focus-actions button:hover {
  color: #111;
  background: #fff;
  box-shadow: none;
}

.deadline-toggle,
.reminder-toggle {
  height: 33px;
  padding: 0 10px;
  border: 1px solid #e6e6e6;
  border-radius: 7px;
  color: #4e4e4e;
  background: #fafafa;
  font-size: 12px;
  font-weight: 800;
}

.primary-button,
.soft-button,
.danger-button,
.tiny-button,
.text-button {
  min-height: 33px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: none;
}

.primary-button {
  color: #fff;
  background: #151515;
}

.primary-button:hover {
  background: var(--red);
}

.soft-button,
.tiny-button {
  color: #111;
  background: #fff;
  border: 1px solid #e4e4e4;
}

.image-button {
  color: var(--red);
  background: #fff5f6;
  border-color: #ffd1d6;
}

.text-button {
  color: var(--red);
  background: transparent;
}

.capture-hint {
  margin: 10px 0 0;
  color: #9b9b9b;
  font-size: 12px;
}

.section-head {
  margin: 0 0 18px;
  align-items: center;
}

.section-head h2 {
  margin: 0;
  color: #111;
  font-size: 22px;
  font-weight: 900;
}

.section-head p {
  margin: 6px 0 0;
  color: #8a8a8a;
  font-size: 13px;
}

.rooms-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
}

.room-picker,
.subroom-picker,
.mini-panel,
.entry-card,
.metric,
.dialog {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.room-picker {
  position: static;
  align-self: start;
  gap: 10px;
  padding: 0;
}

.room-row {
  min-height: 48px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 8px;
  color: #555;
}

.room-row:hover,
.room-row.active {
  color: #111;
  background: #e8e8e8;
}

.room-mark {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  color: #777;
  background: #e9e9e9;
}

.room-row.active .room-mark {
  color: #fff;
  background: var(--red);
}

.room-row strong {
  font-size: 13px;
  font-weight: 900;
}

.room-row small {
  color: #9a9a9a;
  font-size: 11px;
}

.room-main {
  display: grid;
  gap: 16px;
}

.subroom-picker {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 0;
}

.subroom-picker button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #e6e6e6;
  border-radius: 7px;
  color: #777;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.subroom-picker button.active,
.subroom-picker button:hover {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.entry-stream,
.task-list {
  gap: 0;
}

.entry-card {
  padding: 15px 0;
  border-top: 1px dashed #dedede;
  overflow: visible;
}

.entry-card:first-child {
  border-top: 0;
}

.entry-card::before {
  display: none;
}

.entry-line {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
}

.done-button,
.more-menu summary {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  color: #777;
  background: #e9e9e9;
}

.done .done-button,
.done-button:hover {
  color: #fff;
  background: var(--red);
}

.entry-content p {
  color: #111;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.38;
}

.entry-meta {
  gap: 6px;
  margin-top: 5px;
}

.entry-meta span {
  min-height: auto;
  padding: 0;
  color: #8d8d8d;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
}

.entry-meta span + span::before {
  content: "·";
  margin: 0 4px;
  color: #b0b0b0;
}

.reminder-meta {
  color: var(--red) !important;
  background: transparent !important;
}

.entry-actions {
  gap: 6px;
}

.entry-actions .tiny-button {
  display: none;
}

.more-menu div {
  width: 150px;
  border: 1px solid #e7e7e7;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.1);
}

.more-menu button {
  min-height: 32px;
  border-radius: 7px;
  color: #555;
  font-size: 12px;
}

.more-menu button:hover {
  color: #111;
  background: #f2f2f2;
}

.entry-notes,
.task-extras,
.entry-images {
  margin: 10px 44px 0 0;
}

.entry-notes {
  color: #777;
  font-size: 13px;
}

.entry-images,
.image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.image-thumb,
.entry-images figure,
.image-preview figure {
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 9px;
  background: #eee;
}

.image-thumb {
  width: 176px;
  aspect-ratio: 16 / 10;
  padding: 0;
  cursor: zoom-in;
}

.image-thumb:hover {
  filter: brightness(0.96);
}

.image-thumb img,
.entry-images img,
.image-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.image-preview figure {
  width: 72px;
  height: 54px;
}

.today-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric {
  min-height: 94px;
  padding: 18px;
  border-radius: 0;
  color: #111;
  background: #fff;
}

.metric span {
  color: #8a8a8a;
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  color: #111;
  font-size: 36px;
  font-weight: 900;
}

.metric.hot {
  color: #fff;
  background: var(--red);
}

.today-layout,
.settings-grid {
  grid-template-columns: 1fr;
  gap: 22px;
}

.mini-panel {
  padding: 0;
}

.panel-title {
  margin-bottom: 12px;
}

.panel-title h3 {
  color: #111;
  font-size: 20px;
  font-weight: 900;
}

.side-dock {
  position: relative;
  top: auto;
  height: auto;
  display: flex;
  padding: 38px 30px 32px;
  border-radius: 0;
  background: var(--panel);
  box-shadow: none;
  gap: 28px;
}

.dock-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: end;
  gap: 8px;
  color: #888;
}

.dock-search span {
  grid-column: 1 / -1;
  color: #999;
  font-size: 11px;
  font-weight: 800;
}

.dock-search input {
  min-height: 34px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #dedede;
  border-radius: 0;
  background: transparent;
  outline: 0;
  font-size: 13px;
}

.dock-search svg {
  width: 18px;
  height: 18px;
  color: #111;
}

.red-promo {
  min-height: 136px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 18px;
  border-radius: 10px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent 38%),
    var(--red);
}

.red-promo strong {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.red-promo p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.red-promo button {
  justify-self: start;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  color: #111;
  background: #fff;
  font-weight: 900;
}

.dock-head {
  padding-bottom: 16px;
  border-bottom: 1px solid #dddddd;
  color: #111;
}

.dock-head span {
  font-size: 20px;
  font-weight: 900;
}

.dock-head strong {
  color: #111;
  background: #fff;
}

.dock-rooms {
  gap: 0;
}

.dock-room {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0;
  border-bottom: 1px dashed #dddddd;
  border-radius: 0;
  color: #111;
  background: transparent;
}

.dock-room:hover,
.dock-room.active {
  background: transparent;
}

.dock-room strong {
  color: #111;
}

.focus-card {
  margin-top: auto;
  padding: 18px;
  border-radius: 9px;
  background: #151515;
}

.focus-card strong {
  font-size: 34px;
}

.focus-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border: 0;
  background: transparent;
}

.focus-actions button {
  min-height: 28px;
  padding: 0;
  border-radius: 6px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.dialog,
.image-dialog {
  border: 0;
  border-radius: 14px;
  color: #111;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.18);
}

.dialog form {
  padding: 22px;
}

.dialog::backdrop,
.image-dialog::backdrop {
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(6px);
}

.image-dialog {
  width: min(920px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  padding: 18px;
}

.image-dialog figure {
  margin: 0;
  display: grid;
  gap: 12px;
}

.image-dialog img {
  max-width: 100%;
  max-height: min(70vh, 720px);
  object-fit: contain;
  border-radius: 10px;
  background: #efefef;
}

.image-dialog figcaption {
  color: #777;
  font-size: 13px;
}

.image-dialog-close {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.image-dialog .primary-button {
  margin-top: 14px;
}

.toast {
  color: #fff;
  background: #151515;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

@media (max-width: 1180px) {
  body {
    display: block;
  }

  .app-root {
    width: calc(100vw - 24px);
    min-height: calc(100vh - 24px);
    margin: 12px auto;
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .side-dock {
    display: none;
  }
}

@media (max-width: 860px) {
  .app-root {
    width: calc(100vw - 14px);
    margin: 7px auto 86px;
    grid-template-columns: 1fr;
    border-radius: 14px;
  }

  .room-rail {
    display: none;
  }

  .workspace {
    padding: 20px;
    border: 0;
  }

  .topbar {
    flex-direction: column;
  }

  .capture-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .segmented,
  .capture-image-row,
  .capture-controls .primary-button,
  .capture-controls .soft-button {
    grid-column: 1 / -1;
  }

  .capture-controls select,
  .deadline-toggle,
  .reminder-toggle,
  .capture-due.visible,
  .capture-reminder.visible {
    width: 100%;
    max-width: none;
  }

  .rooms-layout,
  .today-layout,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    display: grid;
    background: #fff;
    border: 1px solid #e3e3e3;
  }

  .bottom-nav button.active {
    color: #fff;
    background: var(--red);
  }
}

@media (max-width: 560px) {
  .workspace {
    padding: 15px;
  }

  .capture-controls,
  .form-grid,
  .deadline-inputs,
  .reminder-inputs,
  .today-grid {
    grid-template-columns: 1fr;
  }

  .image-thumb {
    width: 100%;
  }
}

/* Apex red-black fusion */
:root {
  --bg: #eef0f3;
  --app: #f7f8fa;
  --sidebar: #07100d;
  --sidebar-2: #0a1712;
  --panel: #fbfbfc;
  --card: #ffffff;
  --line: #e3e6ea;
  --line-soft: #f0f1f3;
  --text: #111315;
  --muted: #73777d;
  --muted-2: #a2a7ae;
  --red: #f32335;
  --red-2: #bb0919;
  --red-soft: rgba(243, 35, 53, 0.11);
  --black: #0b0e10;
  --shadow: 0 24px 80px rgba(16, 20, 24, 0.16);
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 0%, rgba(243, 35, 53, 0.12), transparent 26%),
    linear-gradient(180deg, #f6f7f9 0%, var(--bg) 46%, #dfe2e6 100%);
}

.app-root {
  position: relative;
  width: min(1180px, calc(100vw - 58px));
  min-height: min(820px, calc(100vh - 58px));
  padding-top: 42px;
  grid-template-columns: 220px minmax(0, 1fr) 318px;
  border-radius: 18px;
  background: var(--app);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow), 0 0 0 1px rgba(17, 19, 21, 0.035);
}

.app-root::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 42px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 247, 249, 0.82));
  border-bottom: 1px solid #e3e5e8;
  z-index: 0;
}

.app-root::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 18px;
  width: 132px;
  height: 10px;
  border-radius: 999px;
  background: rgba(17, 19, 21, 0.08);
  box-shadow: none;
  z-index: 1;
}

.room-rail,
.workspace,
.side-dock {
  position: relative;
  z-index: 2;
}

.room-rail {
  padding: 24px 18px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 24%),
    linear-gradient(180deg, var(--sidebar), #050907);
  color: rgba(255, 255, 255, 0.72);
}

.brand-lockup {
  margin-bottom: 38px;
}

.brand-lockup strong {
  color: #ffffff;
  font-size: 19px;
}

.brand-lockup small {
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.logo-button {
  width: 42px;
  height: 42px;
  padding: 5px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 48%),
    var(--red);
  box-shadow: 0 14px 26px rgba(243, 35, 53, 0.26);
}

.logo-button img {
  border-radius: 9px;
}

.rail-rooms {
  gap: 5px;
}

.rail-action,
.room-dot {
  height: 38px;
  padding: 0 10px;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.62);
}

.rail-action svg,
.room-dot svg {
  color: rgba(255, 255, 255, 0.46);
}

.rail-action::after,
.room-dot b {
  font-size: 13px;
  font-weight: 800;
}

.rail-action.active,
.room-dot.active,
.rail-action:hover,
.room-dot:hover {
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(243, 35, 53, 0.22), rgba(255, 255, 255, 0.045));
}

.rail-action.active svg,
.room-dot.active svg {
  color: var(--red);
}

.room-dot.active {
  box-shadow: inset 3px 0 0 var(--red);
}

.rail-action span,
.room-dot span {
  color: #fff;
  background: rgba(243, 35, 53, 0.18);
  border: 1px solid rgba(243, 35, 53, 0.34);
}

.workspace {
  padding: 30px 20px 26px;
  border-inline: 0;
  background:
    radial-gradient(circle at 70% 0%, rgba(243, 35, 53, 0.045), transparent 30%),
    #f8f9fb;
  gap: 20px;
}

.topbar {
  min-height: 74px;
}

.topbar h1 {
  font-size: 30px;
  letter-spacing: 0;
}

.topbar p:not(.eyebrow) {
  color: #7b8188;
}

.top-settings,
.top-reminders,
.icon-button {
  width: 39px;
  height: 39px;
  border-radius: 10px;
  color: #202326;
  background: #ffffff;
  border: 1px solid var(--line);
}

.top-reminders {
  color: var(--red);
}

.top-reminders.active,
.top-reminders:hover {
  color: #fff;
  background: var(--red);
}

.capture-panel {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(18, 23, 28, 0.055);
}

.capture-panel::before {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 4px;
  border-radius: 99px 99px 0 0;
  background: linear-gradient(90deg, var(--red), #111315);
}

.capture-title h2 {
  font-size: 18px;
}

.capture-title p {
  color: #8a9098;
}

.capture-form textarea {
  min-height: 72px;
  font-size: 17px;
}

.segmented,
.pill-row,
.status-pills,
.focus-actions {
  border-color: #e8ebef;
  background: #f1f3f6;
}

.segmented button.active,
.pill-row button.active,
.status-pills button.active {
  color: #fff;
  background: #111315;
}

.primary-button {
  color: #fff;
  background: var(--red);
}

.primary-button:hover {
  background: #111315;
}

.soft-button,
.tiny-button {
  border-color: #e4e7eb;
  background: #fff;
}

.image-button {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(243, 35, 53, 0.2);
}

.screen.active {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(18, 23, 28, 0.05);
}

.section-head h2 {
  font-size: 19px;
}

.section-head p {
  color: #858b92;
}

.entry-card {
  padding: 13px 0;
}

.entry-content p {
  font-size: 14.5px;
}

.done-button,
.more-menu summary {
  background: #f0f2f5;
}

.done .done-button,
.done-button:hover {
  background: var(--red);
}

.entry-images {
  margin-top: 12px;
}

.image-thumb {
  width: 154px;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(17, 19, 21, 0.08);
}

.today-grid {
  gap: 12px;
}

.metric {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(18, 23, 28, 0.055);
}

.metric::after {
  content: "";
  position: absolute;
  right: 14px;
  left: 14px;
  bottom: 13px;
  height: 32px;
  opacity: 0.7;
  background:
    linear-gradient(135deg, transparent 0 12%, rgba(243, 35, 53, 0.18) 12% 28%, transparent 28% 38%, rgba(243, 35, 53, 0.2) 38% 52%, transparent 52% 62%, rgba(243, 35, 53, 0.22) 62% 78%, transparent 78%),
    linear-gradient(180deg, transparent, rgba(243, 35, 53, 0.06));
  clip-path: polygon(0 72%, 12% 58%, 24% 66%, 38% 38%, 50% 52%, 63% 28%, 77% 42%, 100% 18%, 100% 100%, 0 100%);
}

.metric strong {
  position: relative;
  z-index: 1;
  font-size: 34px;
}

.metric.hot {
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(135deg, var(--red), var(--red-2));
  border-color: transparent;
}

.metric.hot::after {
  background: rgba(255, 255, 255, 0.28);
}

.rooms-layout {
  gap: 18px;
}

.room-row.active .room-mark {
  background: var(--red);
}

.subroom-picker button.active,
.subroom-picker button:hover {
  background: #111315;
  border-color: #111315;
}

.side-dock {
  padding: 30px 20px 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(250, 251, 252, 0.94)),
    var(--panel);
  gap: 22px;
}

.dock-search {
  padding: 0 0 10px;
}

.red-promo {
  min-height: 154px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 34%),
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, 0.12) 14px 15px),
    linear-gradient(135deg, var(--red), var(--red-2));
  box-shadow: 0 18px 38px rgba(243, 35, 53, 0.22);
}

.red-promo strong {
  max-width: 190px;
  font-size: 30px;
}

.dock-head {
  padding-bottom: 13px;
}

.dock-room {
  min-height: 48px;
}

.dock-room:hover strong,
.dock-room.active strong {
  color: var(--red);
}

.focus-card {
  border-radius: 14px;
  background:
    radial-gradient(circle at 85% 0%, rgba(243, 35, 53, 0.3), transparent 34%),
    linear-gradient(180deg, #15191b, #080a0b);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.focus-actions button:hover {
  background: var(--red);
}

.dialog,
.image-dialog {
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
}

.image-dialog img {
  background: #111315;
}

@media (max-width: 1180px) {
  .app-root {
    grid-template-columns: 210px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  body {
    place-items: stretch;
  }

  .app-root {
    padding-top: 0;
  }

  .app-root::before,
  .app-root::after {
    display: none;
  }

  .screen.active {
    padding: 14px;
  }
}

/* Interaction and work-lane polish */
button:not(:disabled),
.entry-card,
.room-row,
.room-dot,
.dock-task,
.image-thumb {
  transform-origin: 50% 50%;
  transition:
    transform 320ms cubic-bezier(0.2, 0.9, 0.2, 1),
    box-shadow 360ms ease,
    border-color 300ms ease,
    background 360ms ease,
    color 240ms ease,
    filter 320ms ease;
}

button:not(:disabled):active,
button.is-pressing {
  animation: tap-pop 780ms cubic-bezier(0.18, 0.9, 0.18, 1);
}

.primary-button.is-pressing,
.rail-action.is-pressing,
.room-dot.is-pressing,
.dock-task.is-pressing {
  box-shadow: 0 0 0 6px rgba(243, 35, 53, 0.14), 0 18px 38px rgba(243, 35, 53, 0.22);
}

.icon-button.is-pressing,
.soft-button.is-pressing,
.text-button.is-pressing,
.tiny-button.is-pressing {
  box-shadow: 0 0 0 5px rgba(17, 19, 21, 0.08), 0 12px 28px rgba(17, 19, 21, 0.1);
}

.screen.active {
  animation: screen-rise 680ms cubic-bezier(0.18, 0.9, 0.18, 1);
}

.app-root.screen-shift .workspace {
  animation: workspace-shift 820ms cubic-bezier(0.18, 0.9, 0.18, 1);
}

.app-root.room-transition .rooms-layout,
.app-root.room-transition .room-main,
.app-root.room-transition .room-picker {
  animation: room-sweep 880ms cubic-bezier(0.18, 0.9, 0.18, 1);
}

.app-root.work-transition [data-panel="tasks"].active,
.app-root.work-transition .work-action.active {
  animation: work-lock 900ms cubic-bezier(0.18, 0.9, 0.18, 1);
}

.entry-card {
  animation: card-in 520ms cubic-bezier(0.18, 0.9, 0.18, 1) both;
}

.entry-card:nth-child(2) { animation-delay: 26ms; }
.entry-card:nth-child(3) { animation-delay: 52ms; }
.entry-card:nth-child(4) { animation-delay: 78ms; }
.entry-card:nth-child(5) { animation-delay: 104ms; }

.dialog[open],
.image-dialog[open] {
  animation: dialog-glide 460ms cubic-bezier(0.18, 0.9, 0.18, 1);
}

.room-dot.new-room,
.room-row.new-room {
  animation: new-room-birth 1200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.rail-work-zone {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.rail-divider-label {
  display: block;
  padding-inline: 11px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.work-action {
  min-height: 44px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
}

.work-action b {
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-action.active {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(243, 35, 53, 0.32), rgba(255, 255, 255, 0.06));
  box-shadow: inset 3px 0 0 var(--red), 0 14px 32px rgba(243, 35, 53, 0.16);
}

.work-action.active svg {
  color: var(--red);
}

.dock-tasks {
  display: grid;
  gap: 9px;
}

.dock-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px dashed #d9dce1;
  border-radius: 12px;
  color: var(--text);
  background: transparent;
  text-align: right;
}

.dock-task:hover,
.dock-task.active {
  border-color: rgba(243, 35, 53, 0.18);
  background: linear-gradient(90deg, rgba(243, 35, 53, 0.11), rgba(255, 255, 255, 0.86));
  transform: translateX(-3px);
}

.dock-task span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dock-task strong,
.dock-task small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock-task strong {
  color: #111315;
  font-size: 13px;
  font-weight: 900;
}

.dock-task small {
  color: #777d84;
  font-size: 11px;
  font-weight: 700;
}

.dock-task em {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: #fff;
  font-style: normal;
  font-weight: 900;
  background: #111315;
}

.dock-task.empty {
  border: 1px dashed rgba(243, 35, 53, 0.3);
  background: rgba(243, 35, 53, 0.06);
}

.work-meta {
  color: var(--red) !important;
  background: rgba(243, 35, 53, 0.08) !important;
  border-color: rgba(243, 35, 53, 0.16) !important;
}

/* Contrast guard: keeps old white-on-white declarations from leaking through. */
.workspace,
.workspace .screen.active,
.workspace .capture-panel,
.workspace .mini-panel,
.workspace .metric,
.side-dock,
.dialog form {
  color: var(--text);
}

.soft-button,
.tiny-button,
.text-button,
.done-button,
.more-menu summary,
.more-menu button,
.segmented button,
.pill-row button,
.status-pills button,
.dialog input,
.dialog select,
.dialog textarea,
.capture-form textarea,
.capture-controls select,
.deadline-toggle,
.reminder-toggle {
  color: var(--text);
}

.workspace p,
.workspace small,
.entry-meta,
.entry-notes,
.section-head p,
.capture-title p,
.dialog-head p,
.dialog label,
.settings-copy,
.storage-info,
.dock-search span,
.dock-search input {
  color: var(--muted);
}

.primary-button,
.danger-button,
.red-promo button,
.metric.hot,
.metric.hot *,
.segmented button.active,
.pill-row button.active,
.status-pills button.active,
.done .done-button,
.done-button:hover,
.more-menu button:hover,
.subroom-picker button.active,
.subroom-picker button:hover,
.focus-actions button:hover,
.bottom-nav button.active {
  color: #fff;
}

.room-rail,
.room-rail .rail-action,
.room-rail .room-dot,
.room-rail .work-action {
  color: rgba(255, 255, 255, 0.66);
}

.room-rail .brand-lockup strong,
.room-rail .rail-action.active,
.room-rail .room-dot.active,
.room-rail .work-action.active,
.room-rail .rail-action:hover,
.room-rail .room-dot:hover,
.room-rail .work-action:hover {
  color: #fff;
}

.focus-card {
  color: #fff;
}

.focus-card strong {
  color: #fff;
}

.focus-card span,
.focus-card p {
  color: rgba(255, 255, 255, 0.68);
}

.focus-actions button {
  color: #111315;
  background: rgba(255, 255, 255, 0.92);
}

.dock-head strong {
  color: #fff;
  background: #111315;
}

.icon-button svg,
.rail-action svg,
.room-dot svg,
.work-action svg {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(74px, 1fr);
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  gap: 3px;
  border-radius: 13px;
}

.segmented button,
.pill-row button,
.status-pills button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
}

.segmented button.active,
.pill-row button.active,
.status-pills button.active {
  box-shadow: 0 10px 22px rgba(17, 19, 21, 0.16);
}

.task-filter-row {
  align-items: center;
  gap: 7px;
}

.subroom-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.subroom-picker button {
  width: auto;
  min-width: 74px;
  max-width: 100%;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.work-action {
  gap: 5px;
  min-height: 40px;
  padding-inline: 8px 9px;
  grid-template-columns: 17px minmax(0, 1fr) 24px;
  border-radius: 10px;
}

.work-action::after {
  display: none;
  content: none;
}

.work-action b {
  font-size: 12px;
  line-height: 1.05;
}

.work-action span {
  min-width: 23px;
  height: 23px;
  padding-inline: 0;
  font-size: 11px;
}

.status-card {
  margin-top: auto;
  display: grid;
  gap: 9px;
  padding: 15px;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 0%, rgba(243, 35, 53, 0.34), transparent 34%),
    linear-gradient(150deg, #111516, #070909 68%, #1a0508);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.status-card span,
.status-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
}

.status-card strong {
  overflow: hidden;
  color: #fff;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-actions {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
}

.status-actions button {
  flex: 1;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  color: #111315;
  font-size: 12px;
  font-weight: 900;
}

.status-actions button:hover {
  color: #fff;
  background: var(--red);
}

@keyframes tap-pop {
  0% { transform: translateY(0) scale(1); }
  34% { transform: translateY(1px) scale(0.982); filter: saturate(1.06); }
  62% { transform: translateY(-1px) scale(1.008); }
  82% { transform: translateY(0) scale(0.998); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes screen-rise {
  0% { opacity: 0; transform: translateY(14px) scale(0.992); filter: blur(10px); }
  72% { opacity: 1; transform: translateY(-1px) scale(1.002); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes workspace-shift {
  0% { transform: translateX(12px); filter: blur(8px); }
  66% { transform: translateX(-2px); filter: blur(0); }
  100% { transform: translateX(0); }
}

@keyframes room-sweep {
  0% { opacity: 0.12; transform: translateX(-16px) scale(0.992); filter: blur(12px); }
  62% { opacity: 1; transform: translateX(3px) scale(1.002); filter: blur(0); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes work-lock {
  0% { transform: translateY(12px) scale(0.99); box-shadow: 0 0 0 0 rgba(243, 35, 53, 0); }
  46% { transform: translateY(-3px) scale(1.002); box-shadow: 0 0 0 10px rgba(243, 35, 53, 0.075); }
  100% { transform: translateY(0) scale(1); box-shadow: inherit; }
}

@keyframes card-in {
  0% { opacity: 0; transform: translateY(8px); filter: blur(5px); }
  70% { filter: blur(0); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes dialog-glide {
  0% { opacity: 0; transform: translateY(18px) scale(0.976); filter: blur(12px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes new-room-birth {
  0% { transform: scale(0.86); box-shadow: 0 0 0 0 rgba(243, 35, 53, 0.38); }
  36% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(243, 35, 53, 0.12); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(243, 35, 53, 0); }
}

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

/* Image viewer polish: make saved screenshots feel intentional, not like a tiny preview. */
.image-dialog[open] {
  width: min(920px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: min(780px, calc(100vh - 42px));
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 251, 253, 0.9)),
    rgba(255, 255, 255, 0.9);
  box-shadow:
    0 34px 90px rgba(17, 19, 21, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.image-dialog::backdrop {
  background:
    radial-gradient(circle at 70% 15%, rgba(243, 35, 53, 0.22), transparent 34%),
    rgba(8, 9, 10, 0.58);
  backdrop-filter: blur(18px) saturate(115%);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
}

.image-dialog figure {
  display: grid;
  place-items: center;
  gap: 13px;
  min-height: 260px;
  margin: 0;
}

.image-dialog img {
  width: min(100%, 820px);
  max-height: min(64vh, 620px);
  object-fit: contain;
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 12%, rgba(243, 35, 53, 0.2), transparent 36%),
    linear-gradient(135deg, #111315, #030405);
  box-shadow:
    0 22px 58px rgba(17, 19, 21, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.image-dialog figcaption {
  max-width: min(640px, 100%);
  color: #5f656d;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.image-dialog-close {
  top: 14px;
  right: 14px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(243, 35, 53, 0.22);
}

.image-dialog .primary-button {
  justify-self: center;
}

@media (max-width: 720px) {
  .image-dialog[open] {
    width: calc(100vw - 18px);
    max-width: calc(100vw - 18px);
    padding: 12px;
    border-radius: 24px;
  }

  .image-dialog figure {
    min-height: 220px;
  }

  .image-dialog img {
    max-height: 58vh;
    border-radius: 18px;
  }
}

/* Final interaction tuning */
button:not(:disabled),
.entry-card,
.room-row,
.room-dot,
.dock-task,
.image-thumb {
  transition:
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 420ms ease,
    background-color 320ms ease,
    background 420ms ease,
    border-color 320ms ease,
    color 220ms ease,
    filter 360ms ease;
}

.primary-button:hover,
.soft-button:hover,
.tiny-button:hover,
.text-button:hover,
.icon-button:hover,
.segmented button:hover,
.pill-row button:hover,
.status-pills button:hover,
.subroom-picker button:hover,
.status-actions button:hover,
.dock-task:hover,
.room-row:hover,
.image-thumb:hover {
  transform: translateY(-2px);
  filter: saturate(1.04);
}

.primary-button:hover,
.soft-button:hover,
.icon-button:hover,
.segmented button:hover,
.pill-row button:hover,
.subroom-picker button:hover {
  box-shadow: 0 12px 26px rgba(17, 19, 21, 0.1);
}

.room-dot:hover,
.rail-action:hover,
.work-action:hover {
  transform: translateX(-2px);
  box-shadow: inset 3px 0 0 rgba(243, 35, 53, 0.55), 0 12px 28px rgba(243, 35, 53, 0.1);
}

button:not(:disabled):active,
button.is-pressing {
  animation: soft-press 640ms cubic-bezier(0.16, 1, 0.3, 1);
}

.primary-button.is-pressing,
.rail-action.is-pressing,
.room-dot.is-pressing,
.dock-task.is-pressing,
.work-action.is-pressing {
  box-shadow: 0 0 0 4px rgba(243, 35, 53, 0.09), 0 10px 24px rgba(243, 35, 53, 0.18);
}

.icon-button.is-pressing,
.soft-button.is-pressing,
.text-button.is-pressing,
.tiny-button.is-pressing,
.segmented button.is-pressing,
.pill-row button.is-pressing {
  box-shadow: 0 0 0 4px rgba(17, 19, 21, 0.055), 0 8px 18px rgba(17, 19, 21, 0.08);
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(64px, 1fr);
  align-items: stretch;
  width: fit-content;
  max-width: 100%;
  height: 40px;
  padding: 3px;
  gap: 3px;
  overflow: hidden;
  border-radius: 12px;
  box-sizing: border-box;
}

.segmented button,
.pill-row button,
.status-pills button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: 100%;
  padding: 0 13px;
  border-radius: 9px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.segmented button.active,
.pill-row button.active,
.status-pills button.active {
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 5px 14px rgba(17, 19, 21, 0.12);
}

.segmented button.active:hover,
.pill-row button.active:hover,
.status-pills button.active:hover {
  transform: none;
}

.capture-controls select,
.dialog select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 13px;
  padding-left: 34px;
  text-align: center;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23111315' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 15px center;
  background-size: 13px;
}

.capture-controls select:hover,
.dialog select:hover {
  border-color: rgba(17, 19, 21, 0.16);
  background-color: #fff;
  box-shadow: 0 10px 22px rgba(17, 19, 21, 0.07);
}

@keyframes soft-press {
  0% {
    transform: translateY(0) scale(1);
    filter: brightness(1) saturate(1);
  }
  32% {
    transform: translateY(1px) scale(0.992);
    filter: brightness(0.985) saturate(1.03);
  }
  68% {
    transform: translateY(-0.5px) scale(1.003);
    filter: brightness(1.01) saturate(1.02);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1) saturate(1);
  }
}

/* Final polish guards for the compact app shell. */
.section-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.section-actions .soft-button {
  min-height: 38px;
  padding-inline: 13px;
}

.app-root.screen-shift .workspace {
  animation: none;
}

.red-promo button {
  color: #111315 !important;
  background: #fff !important;
}

.red-promo button:hover,
.red-promo button:focus-visible {
  color: #fff !important;
  background: #111315 !important;
}

/* Mobile app mode: keep iPhone-sized screens compact, full-width, and usable. */
@media (max-width: 860px) {
  html,
  body {
    width: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
  }

  body {
    display: block;
    place-items: unset;
    background:
      radial-gradient(circle at 16% -8%, rgba(243, 35, 53, 0.12), transparent 34%),
      linear-gradient(180deg, #f7f8fa 0%, #eef0f4 100%);
  }

  .app-root {
    direction: rtl;
    display: block;
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    padding: 0 0 104px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .app-root::before,
  .app-root::after,
  .room-rail,
  .side-dock {
    display: none !important;
  }

  .workspace {
    width: min(100%, 560px);
    margin: 0 auto;
    padding: 18px 14px 112px;
    gap: 14px;
    border: 0;
    background: transparent;
  }

  .topbar {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 10px 2px 2px;
    background: transparent;
    box-shadow: none;
  }

  .topbar > div:first-child {
    min-width: 0;
  }

  .topbar h1 {
    font-size: 30px;
    line-height: 1.05;
  }

  .topbar p:not(.eyebrow) {
    max-width: 24ch;
    font-size: 14px;
    line-height: 1.45;
  }

  .top-actions {
    justify-content: end;
    width: auto;
  }

  .top-actions .search-box {
    display: none;
  }

  .top-settings,
  .top-reminders,
  .icon-button {
    width: 44px;
    height: 44px;
    border-radius: 15px;
  }

  .capture-panel,
  .screen.active {
    width: 100%;
    padding: 14px;
    border-radius: 18px;
  }

  .capture-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .capture-title h2,
  .section-head h2 {
    font-size: 20px;
    line-height: 1.2;
  }

  .capture-title p,
  .section-head p,
  .capture-hint {
    font-size: 12px;
    line-height: 1.45;
  }

  .capture-form textarea {
    min-height: 92px;
    max-height: none;
    padding: 15px;
    font-size: 17px;
    line-height: 1.45;
  }

  .capture-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
  }

  .segmented,
  .capture-image-row,
  .capture-controls .primary-button {
    grid-column: 1 / -1;
  }

  .segmented {
    display: grid;
    grid-auto-flow: unset;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    height: 42px;
  }

  .segmented button,
  .pill-row button,
  .status-pills button {
    min-width: 0;
    padding: 0 8px;
    font-size: 12px;
  }

  .capture-controls select,
  .capture-controls input[type="date"],
  .capture-controls input[type="time"],
  .deadline-toggle,
  .reminder-toggle,
  .capture-controls .soft-button,
  .capture-controls .primary-button {
    width: 100%;
    max-width: none;
    min-height: 44px;
    height: auto;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .section-actions,
  .pill-row,
  .subroom-picker {
    width: 100%;
  }

  .rooms-layout,
  .today-layout,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .room-picker {
    position: static;
  }

  .entry-line {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .entry-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-inline-start: 49px;
  }

  .entry-notes,
  .task-extras,
  .entry-images {
    margin-right: 0;
  }

  .toast {
    right: 16px;
    left: 16px;
    bottom: 96px;
    width: auto;
    transform: translateY(12px);
    border-radius: 18px;
  }

  .toast.show {
    transform: translateY(0);
  }

  .bottom-nav {
    right: max(12px, env(safe-area-inset-right));
    left: max(12px, env(safe-area-inset-left));
    bottom: max(10px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 7px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(17, 19, 21, 0.08);
    box-shadow: 0 22px 60px rgba(17, 19, 21, 0.16);
    backdrop-filter: blur(22px) saturate(130%);
    -webkit-backdrop-filter: blur(22px) saturate(130%);
  }

  .bottom-nav button {
    min-height: 56px;
    border-radius: 20px;
    color: #6f767d;
  }

  .bottom-nav button.active {
    color: #fff;
    background: var(--red);
    box-shadow: 0 14px 30px rgba(243, 35, 53, 0.26);
  }
}

@media (max-width: 420px) {
  .workspace {
    padding-inline: 12px;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .capture-controls {
    grid-template-columns: 1fr;
  }

  .segmented {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Spotlight command center and premium motion pass */
.top-command {
  position: relative;
  overflow: visible;
}

.top-command::after {
  content: none;
}

.spotlight-dialog {
  width: min(680px, calc(100vw - 30px));
  max-height: min(720px, calc(100dvh - 34px));
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 30px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(246, 247, 250, 0.82)),
    rgba(255, 255, 255, 0.78);
  box-shadow:
    0 36px 90px rgba(17, 19, 21, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(26px) saturate(145%);
  -webkit-backdrop-filter: blur(26px) saturate(145%);
}

.spotlight-dialog::backdrop {
  background:
    radial-gradient(circle at 52% 18%, rgba(243, 35, 53, 0.22), transparent 34%),
    rgba(8, 10, 11, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.spotlight-shell {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.spotlight-search {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 10px 12px 10px 10px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 249, 251, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 34px rgba(17, 19, 21, 0.08);
}

.spotlight-search svg {
  width: 21px;
  height: 21px;
  color: var(--red);
}

.spotlight-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #111315;
  background: transparent;
  font: inherit;
  font-size: 20px;
  font-weight: 900;
}

.spotlight-search input::placeholder {
  color: #7c8289;
}

.spotlight-list {
  display: grid;
  gap: 8px;
  max-height: min(540px, calc(100dvh - 150px));
  overflow: auto;
  padding: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.spotlight-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.spotlight-item {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 11px 12px;
  border: 1px solid rgba(17, 19, 21, 0.07);
  border-radius: 20px;
  color: #111315;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(246, 247, 250, 0.78));
  box-shadow: 0 10px 26px rgba(17, 19, 21, 0.045);
  text-align: right;
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  animation: spotlight-row 620ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--spotlight-delay, 0ms);
}

.spotlight-item::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 19px;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.88), transparent);
  opacity: 0;
  transform: translateX(18%);
  transition: opacity 420ms ease, transform 540ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.spotlight-item:hover {
  border-color: rgba(243, 35, 53, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(255, 237, 239, 0.72));
  box-shadow: 0 18px 42px rgba(243, 35, 53, 0.14);
  transform: translateY(-3px) scale(1.006);
}

.spotlight-item:hover::before {
  opacity: 1;
  transform: translateX(-18%);
}

.spotlight-item:active,
.spotlight-item.is-pressing {
  animation: premium-press 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.spotlight-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  color: #fff;
  background:
    linear-gradient(135deg, #ff2f43, #111315);
  box-shadow: 0 14px 28px rgba(243, 35, 53, 0.2);
}

.spotlight-icon svg {
  width: 21px;
  height: 21px;
}

.spotlight-item strong,
.spotlight-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotlight-item strong {
  color: #111315;
  font-size: 15px;
  font-weight: 900;
}

.spotlight-item small {
  margin-top: 4px;
  color: #6f767d;
  font-size: 12px;
  font-weight: 700;
}

.spotlight-item em {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #111315;
  background: rgba(17, 19, 21, 0.06);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.spotlight-empty {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px dashed rgba(17, 19, 21, 0.12);
  border-radius: 22px;
  color: #6f767d;
  background: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.rail-work-list,
.work-category-manager {
  display: grid;
  gap: 8px;
}

.work-category-form {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.work-category-form label {
  display: grid;
  gap: 6px;
  color: #111315;
  font-size: 12px;
  font-weight: 900;
}

.work-category-form input,
.work-category-form textarea {
  width: 100%;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 14px;
  padding: 11px 12px;
  color: #111315;
  background: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  outline: 0;
  resize: vertical;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.work-category-form input:focus,
.work-category-form textarea:focus {
  border-color: rgba(243, 35, 53, 0.34);
  box-shadow: 0 0 0 4px rgba(243, 35, 53, 0.08);
}

.work-category-row {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(243, 35, 53, 0.08), rgba(255, 255, 255, 0.82));
}

.work-category-row::before {
  content: "";
  position: absolute;
  inset-block: 10px;
  inset-inline-start: 0;
  width: 4px;
  border-radius: 999px;
  background: var(--red);
}

.manager-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.manager-actions .text-button {
  min-height: 30px;
  padding-inline: 9px;
  border-radius: 10px;
  font-size: 11px;
}

.icon-mini {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 10px;
  color: #111315;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 6px 14px rgba(17, 19, 21, 0.055);
}

.icon-mini svg {
  width: 15px;
  height: 15px;
}

.icon-mini:hover {
  color: #fff;
  background: #111315;
  transform: translateY(-2px);
}

.manager-row:has(.icon-mini:not(:disabled):hover) {
  border-color: rgba(243, 35, 53, 0.16);
  box-shadow: 0 16px 38px rgba(243, 35, 53, 0.08);
}

.manager-actions .text-button:disabled,
.manager-actions .icon-mini:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

button:not(:disabled):active,
button.is-pressing {
  animation: premium-press 920ms cubic-bezier(0.16, 1, 0.3, 1);
}

.primary-button.is-pressing,
.rail-action.is-pressing,
.room-dot.is-pressing,
.dock-task.is-pressing,
.work-action.is-pressing,
.spotlight-item.is-pressing {
  box-shadow:
    0 0 0 5px rgba(243, 35, 53, 0.08),
    0 18px 42px rgba(243, 35, 53, 0.18);
}

.primary-button:hover,
.soft-button:hover,
.tiny-button:hover,
.text-button:hover,
.icon-button:hover,
.segmented button:hover,
.pill-row button:hover,
.status-pills button:hover,
.subroom-picker button:hover,
.status-actions button:hover {
  transform: translateY(-2px) scale(1.006);
}

.segmented {
  align-items: center;
  min-height: 42px;
  overflow: visible;
  border-radius: 13px;
}

.segmented button,
.pill-row button,
.status-pills button {
  align-items: center;
  justify-content: center;
  min-height: 34px;
  line-height: 1.1;
}

.capture-controls select,
.dialog select {
  padding-right: 36px;
  padding-left: 13px;
  background-position: right 15px center;
}

@keyframes spotlight-row {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.982);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes premium-press {
  0% {
    transform: translateY(0) scale(1);
    filter: brightness(1) saturate(1);
  }
  24% {
    transform: translateY(1px) scale(0.982);
    filter: brightness(0.97) saturate(1.04);
  }
  54% {
    transform: translateY(-1px) scale(1.012);
    filter: brightness(1.025) saturate(1.07);
  }
  78% {
    transform: translateY(0) scale(0.997);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1) saturate(1);
  }
}

@media (max-width: 860px) {
  .top-command::after {
    display: none;
  }

  .spotlight-dialog {
    width: calc(100vw - 18px);
    border-radius: 24px;
  }

  .spotlight-shell {
    padding: 10px;
  }

  .spotlight-search {
    grid-template-columns: 22px minmax(0, 1fr) 40px;
    min-height: 58px;
    border-radius: 19px;
  }

  .spotlight-search input {
    font-size: 17px;
  }

  .spotlight-item {
    grid-template-columns: 40px minmax(0, 1fr);
    min-height: 66px;
  }

  .spotlight-item em {
    display: none;
  }

  .work-category-form {
    gap: 8px;
  }

  .manager-row,
  .work-category-row {
    align-items: stretch;
    flex-direction: column;
  }

  .manager-actions {
    justify-content: stretch;
  }

  .manager-actions .text-button {
    flex: 1;
  }
}

/* Daily capture polish: keep the first screen light, with details one tap away. */
.workspace {
  --paper: #ffffff;
  --paper-soft: #f6f7f9;
}

.capture-panel,
.screen.active,
.mini-panel,
.side-dock {
  border-radius: 22px;
}

.capture-panel {
  padding: 18px 18px 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 251, 0.92)),
    var(--paper);
  box-shadow:
    0 18px 46px rgba(17, 19, 21, 0.065),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.capture-panel::before {
  inset-inline: 18px;
  height: 3px;
  background: linear-gradient(90deg, var(--red), rgba(17, 19, 21, 0.92));
}

.capture-form textarea {
  min-height: 66px;
  padding-block: 4px 12px;
  line-height: 1.45;
}

.capture-controls {
  display: grid;
  grid-template-columns: auto minmax(132px, 0.8fr) minmax(132px, 0.8fr) auto auto auto;
  align-items: center;
  gap: 8px;
}

.capture-controls select,
.capture-controls input[type="date"],
.capture-controls input[type="time"],
.deadline-toggle,
.reminder-toggle,
.capture-controls .soft-button,
.capture-controls .primary-button {
  height: 38px;
  min-height: 38px;
}

.capture-controls .primary-button {
  min-width: 96px;
}

.capture-details-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}

.capture-details-toggle svg {
  width: 16px;
  height: 16px;
}

.capture-details-toggle[aria-expanded="true"] {
  color: #fff;
  background: #111315;
  border-color: #111315;
}

.capture-advanced {
  display: none !important;
}

.capture-panel.details-open .deadline-toggle,
.capture-panel.details-open .reminder-toggle {
  display: inline-flex !important;
}

.capture-panel.details-open .capture-due.visible,
.capture-panel.details-open .capture-reminder.visible {
  display: block !important;
}

.capture-panel.details-open .capture-controls {
  grid-template-columns: auto minmax(132px, 0.8fr) minmax(132px, 0.8fr) auto repeat(4, minmax(112px, 0.6fr)) auto auto;
}

.capture-hint {
  margin-top: 8px;
  opacity: 0.74;
}

.screen.active {
  border-color: rgba(17, 19, 21, 0.075);
  box-shadow: 0 18px 46px rgba(17, 19, 21, 0.055);
}

.screen.active,
.capture-panel {
  transition:
    border-radius 360ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 360ms ease,
    transform 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.capture-panel:focus-within {
  transform: translateY(-1px);
  box-shadow:
    0 24px 60px rgba(17, 19, 21, 0.08),
    0 0 0 4px rgba(243, 35, 53, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.primary-button:hover,
.soft-button:hover,
.tiny-button:hover,
.text-button:hover,
.icon-button:hover,
.segmented button:hover,
.pill-row button:hover,
.status-pills button:hover,
.subroom-picker button:hover,
.status-actions button:hover,
.capture-details-toggle:hover {
  transform: translateY(-2px) scale(1.008);
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 1180px) {
  .capture-controls,
  .capture-panel.details-open .capture-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .segmented,
  .capture-image-row {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .capture-panel,
  .screen.active,
  .mini-panel,
  .side-dock {
    border-radius: 20px;
  }

  .capture-controls,
  .capture-panel.details-open .capture-controls {
    grid-template-columns: 1fr;
  }

  .capture-controls select,
  .capture-controls input[type="date"],
  .capture-controls input[type="time"],
  .deadline-toggle,
  .reminder-toggle,
  .capture-controls .soft-button,
  .capture-controls .primary-button {
    width: 100%;
    max-width: none;
  }
}

/* Capture controls must wrap inside the actual center column, not the whole viewport. */
.capture-controls,
.capture-panel.details-open .capture-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.capture-controls .segmented {
  flex: 0 0 auto;
}

.capture-controls select,
.capture-controls input[type="date"],
.capture-controls input[type="time"],
.deadline-toggle,
.reminder-toggle,
.capture-details-toggle,
.capture-controls .soft-button {
  flex: 0 1 auto;
  max-width: 168px;
}

.capture-controls .primary-button {
  flex: 0 0 auto;
  margin-inline-start: auto;
}

@media (max-width: 860px) {
  .capture-controls .segmented,
  .capture-controls select,
  .capture-controls input[type="date"],
  .capture-controls input[type="time"],
  .deadline-toggle,
  .reminder-toggle,
  .capture-details-toggle,
  .capture-controls .soft-button,
  .capture-controls .primary-button {
    flex: 1 1 calc(50% - 8px);
    max-width: none;
  }

  .capture-controls .primary-button,
  .capture-image-row {
    flex-basis: 100%;
    margin-inline-start: 0;
  }
}

@media (max-width: 520px) {
  .capture-controls .segmented,
  .capture-controls select,
  .capture-controls input[type="date"],
  .capture-controls input[type="time"],
  .deadline-toggle,
  .reminder-toggle,
  .capture-details-toggle,
  .capture-controls .soft-button,
  .capture-controls .primary-button {
    flex-basis: 100%;
  }
}

/* Empty states should invite one tiny action, not feel like a dead end. */
.empty-state {
  position: relative;
  min-height: 220px;
  place-content: center;
  gap: 10px;
  overflow: hidden;
  padding: 26px;
  border: 1px solid rgba(17, 19, 21, 0.075);
  border-radius: 24px;
  color: #737a82;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 251, 0.86)),
    #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.empty-state::before {
  content: "";
  position: absolute;
  inset-inline: 24px;
  bottom: 18px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(243, 35, 53, 0.92), rgba(17, 19, 21, 0.88));
  transform: scaleX(0.34);
  transform-origin: center;
  opacity: 0.72;
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1), opacity 320ms ease;
}

.empty-state:hover::before {
  transform: scaleX(0.72);
  opacity: 1;
}

.empty-mark {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-inline: auto;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #111315);
  box-shadow: 0 14px 32px rgba(243, 35, 53, 0.18);
}

.empty-mark svg {
  width: 18px;
  height: 18px;
}

.empty-state strong,
.empty-state p,
.empty-actions {
  position: relative;
  z-index: 1;
}

.empty-state strong {
  color: #111315;
  font-size: 20px;
}

.empty-state p {
  max-width: 420px;
  margin-inline: auto;
  color: #7b8188;
  line-height: 1.55;
}

.empty-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.empty-actions button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 12px;
  color: #111315;
  background: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(17, 19, 21, 0.055);
}

.empty-actions button:hover,
.empty-actions button:focus-visible {
  color: #fff;
  background: #111315;
  transform: translateY(-2px);
}

.empty-actions button:first-child {
  color: #fff;
  background: var(--red);
  border-color: rgba(243, 35, 53, 0.34);
}

.empty-actions button:first-child:hover,
.empty-actions button:first-child:focus-visible {
  background: #111315;
}

@media (max-width: 520px) {
  .empty-state {
    min-height: 190px;
    padding: 22px 16px;
    border-radius: 22px;
  }

  .empty-state strong {
    font-size: 18px;
  }

  .empty-state p {
    font-size: 13px;
  }

  .empty-actions button {
    flex: 1 1 calc(50% - 8px);
    padding-inline: 8px;
  }
}

.entry-card.new-entry {
  position: relative;
  border-radius: 18px;
  padding-inline: 12px;
  border-color: rgba(243, 35, 53, 0.22);
  background:
    linear-gradient(90deg, rgba(243, 35, 53, 0.08), rgba(255, 255, 255, 0.92));
  box-shadow:
    0 16px 42px rgba(243, 35, 53, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  animation:
    card-in 520ms cubic-bezier(0.18, 0.9, 0.18, 1) both,
    saved-entry-glow 1800ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.entry-card.new-entry::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(243, 35, 53, 0.18);
  border-radius: 16px;
  pointer-events: none;
  animation: saved-entry-ring 1800ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes saved-entry-glow {
  0% {
    transform: translateY(8px) scale(0.992);
    filter: blur(5px);
  }
  32% {
    transform: translateY(-2px) scale(1.006);
    filter: blur(0);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes saved-entry-ring {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }
  32% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.018);
  }
}

@media (max-width: 520px) {
  .capture-controls,
  .capture-panel.details-open .capture-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .capture-controls .segmented,
  .capture-controls .primary-button {
    grid-column: 1 / -1;
  }

  .capture-controls select,
  .capture-controls input[type="date"],
  .capture-controls input[type="time"],
  .deadline-toggle,
  .reminder-toggle,
  .capture-details-toggle,
  .capture-controls .soft-button,
  .capture-controls .primary-button {
    width: 100%;
    max-width: none;
    margin-inline-start: 0;
  }

  .capture-controls .soft-button.image-button,
  .capture-details-toggle {
    min-width: 0;
  }

  .capture-hint {
    font-size: 11px;
    line-height: 1.45;
  }
}

/* Right-side command center: useful actions instead of a static promo block. */
.side-dock {
  gap: 18px;
  padding: 28px 26px;
  background:
    radial-gradient(circle at 14% 0%, rgba(243, 35, 53, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 251, 0.96));
}

.dock-command {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 16px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(17, 19, 21, 0.1);
  border-radius: 22px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 34%),
    radial-gradient(circle at 10% 18%, rgba(255, 255, 255, 0.2), transparent 28%),
    linear-gradient(145deg, #101314 0%, #1a0a0d 54%, #f32335 148%);
  box-shadow:
    0 24px 58px rgba(17, 19, 21, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.dock-command::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px),
    linear-gradient(45deg, transparent 0 84%, rgba(255, 255, 255, 0.1) 84% 85%, transparent 85%);
  opacity: 0.78;
}

.dock-command-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.dock-command-head span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 900;
}

.dock-command-head strong {
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}

.dock-command-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dock-command-actions button {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 950;
  backdrop-filter: blur(16px);
}

.dock-command-actions button::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 58%);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 320ms ease, transform 480ms cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-command-actions button:hover,
.dock-command-actions button:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-3px) scale(1.018);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.dock-command-actions button:hover::after,
.dock-command-actions button:focus-visible::after,
.dock-command-actions button.is-pressing::after {
  opacity: 1;
  transform: scale(1);
}

.dock-command-actions button.command-primary {
  background: linear-gradient(135deg, var(--red), #b80f1d);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    0 14px 32px rgba(243, 35, 53, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.dock-command-actions svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.4;
}

.dock-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dock-stat {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 10px 8px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 18px;
  color: #111315;
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 16px 32px rgba(17, 19, 21, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  text-align: center;
  backdrop-filter: blur(14px);
}

.dock-stat span {
  color: #777d84;
  font-size: 10px;
  font-weight: 900;
}

.dock-stat strong {
  color: #111315;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}

.dock-stat.hot {
  color: #fff;
  border-color: rgba(243, 35, 53, 0.18);
  background: linear-gradient(145deg, var(--red), #101314);
  box-shadow: 0 18px 38px rgba(243, 35, 53, 0.18);
}

.dock-stat.hot span,
.dock-stat.hot strong {
  color: #fff;
}

.dock-stat:hover,
.dock-stat:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(243, 35, 53, 0.18);
  box-shadow:
    0 22px 42px rgba(17, 19, 21, 0.1),
    0 0 0 5px rgba(243, 35, 53, 0.06);
}

.dock-head {
  margin-top: 2px;
}

.status-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
}

.install-guide-dialog {
  width: min(720px, calc(100vw - 28px));
  overflow: auto;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 18% 0%, rgba(243, 35, 53, 0.28), transparent 38%),
    linear-gradient(145deg, #101315 0%, #16080b 58%, #f32335 155%);
}

.install-guide-shell {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 20px;
  color: #fff;
}

.install-guide-shell::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 25px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), transparent 42%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 18px);
  pointer-events: none;
}

.install-orb,
.install-guide-copy,
.install-steps,
.install-cloud-card,
.install-qr-card,
.install-guide-actions,
.install-guide-close {
  position: relative;
  z-index: 1;
}

.install-orb {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #111315);
  box-shadow:
    0 20px 42px rgba(243, 35, 53, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.install-orb svg {
  width: 26px;
  height: 26px;
}

.install-guide-close {
  position: absolute;
  inset-inline-end: 16px;
  top: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.install-guide-copy h2,
.install-guide-copy p {
  margin: 0;
}

.install-guide-copy h2 {
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
}

.install-guide-copy p {
  max-width: 42ch;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.install-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.install-steps div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.install-steps strong {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #111315;
  background: #fff;
  font-size: 15px;
  font-weight: 950;
}

.install-steps span {
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}

.install-steps small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.install-phone-link {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.install-phone-link span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 950;
}

.install-phone-link strong {
  direction: ltr;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  text-align: left;
}

.install-phone-link small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 800;
}

.install-cloud-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(243, 35, 53, 0.22), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 16px 34px rgba(0, 0, 0, 0.12);
}

.install-cloud-card[data-status="online"] {
  border-color: rgba(255, 255, 255, 0.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.16), transparent 46%),
    linear-gradient(135deg, rgba(243, 35, 53, 0.34), rgba(255, 255, 255, 0.08));
}

.install-cloud-card[data-status="warn"] {
  border-color: rgba(251, 146, 60, 0.28);
}

.install-cloud-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #111315;
  background: #fff;
}

.install-cloud-icon svg {
  width: 19px;
  height: 19px;
}

.install-cloud-card small,
.install-cloud-card strong,
.install-cloud-card em {
  display: block;
  min-width: 0;
}

.install-cloud-card small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.install-cloud-card strong {
  margin-top: 1px;
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.15;
}

.install-cloud-card em {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.install-cloud-card .soft-button {
  min-height: 38px;
  padding: 0 14px;
  color: #111315;
  border-color: rgba(255, 255, 255, 0.24);
  background: #fff;
  white-space: nowrap;
}

.install-qr-card {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.phone-qr {
  width: 90px;
  height: 90px;
  padding: 8px;
  border-radius: 18px;
  background: #fff;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(17, 19, 21, 0.08);
}

.install-qr-card strong,
.install-qr-card small {
  display: block;
}

.install-qr-card strong {
  color: #fff;
  font-size: 15px;
  font-weight: 950;
}

.install-qr-card small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.install-guide-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.install-guide-actions .soft-button {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.install-guide-actions .primary-button {
  background: #fff;
  color: #111315;
  box-shadow: 0 16px 32px rgba(255, 255, 255, 0.08);
}

@media (max-width: 520px) {
  .install-guide-dialog {
    width: calc(100vw - 22px);
    max-height: calc(100dvh - 22px);
    border-radius: 24px;
  }

  .install-guide-shell {
    gap: 9px;
    padding: 14px;
  }

  .install-orb {
    width: 42px;
    height: 42px;
    border-radius: 15px;
  }

  .install-guide-copy h2 {
    font-size: 23px;
  }

  .install-guide-copy p {
    max-width: 100%;
    font-size: 12px;
    line-height: 1.35;
  }

  .install-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .install-steps div {
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 7px;
    padding: 8px;
    border-radius: 14px;
  }

  .install-steps strong {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 13px;
  }

  .install-steps span {
    font-size: 11px;
  }

  .install-steps small {
    display: none;
  }

  .install-phone-link {
    padding: 8px 10px;
    border-radius: 15px;
  }

  .install-cloud-card {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
    border-radius: 15px;
  }

  .install-cloud-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .install-cloud-card strong {
    font-size: 12px;
  }

  .install-cloud-card em {
    font-size: 10px;
    line-height: 1.25;
  }

  .install-cloud-card .soft-button {
    grid-column: 1 / -1;
    min-height: 34px;
    width: 100%;
  }

  .install-qr-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 10px;
    border-radius: 16px;
  }

  .install-qr-card .phone-qr {
    width: 72px;
    height: 72px;
    border-radius: 15px;
  }

  .install-qr-card strong {
    font-size: 13px;
  }

  .install-qr-card small {
    font-size: 11px;
    line-height: 1.3;
  }

  .install-guide-actions {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
}

.reminder-dialog {
  width: min(620px, calc(100vw - 28px));
  border-color: rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 86% 0%, rgba(243, 35, 53, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 250, 0.94));
  color: #111315;
}

.reminder-shell {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.reminder-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.reminder-head > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #111315);
  box-shadow: 0 16px 34px rgba(243, 35, 53, 0.28);
}

.reminder-head svg {
  width: 21px;
  height: 21px;
}

.reminder-head h2,
.reminder-head p {
  margin: 0;
}

.reminder-head h2 {
  color: #111315;
  font-size: 24px;
  font-weight: 950;
}

.reminder-head p {
  margin-top: 3px;
  color: #777d85;
  font-size: 12px;
  font-weight: 800;
}

.reminder-center-list {
  display: grid;
  gap: 8px;
  max-height: min(48vh, 360px);
  overflow: auto;
  padding: 2px;
}

.reminder-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 30px rgba(17, 19, 21, 0.06);
}

.reminder-row.overdue {
  border-color: rgba(243, 35, 53, 0.24);
  background: linear-gradient(135deg, rgba(243, 35, 53, 0.08), rgba(255, 255, 255, 0.86));
}

.reminder-row.fired {
  opacity: 0.72;
}

.reminder-row-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: var(--red);
  background: rgba(243, 35, 53, 0.1);
}

.reminder-row strong,
.reminder-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reminder-row strong {
  color: #111315;
  font-size: 14px;
  font-weight: 950;
}

.reminder-row small {
  margin-top: 3px;
  color: #858b92;
  font-size: 11px;
  font-weight: 800;
}

.reminder-empty {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 20px;
  border: 1px dashed rgba(17, 19, 21, 0.14);
  border-radius: 20px;
  text-align: center;
}

.reminder-empty strong {
  color: #111315;
  font-size: 17px;
  font-weight: 950;
}

.reminder-empty p {
  max-width: 34ch;
  margin: 7px 0 0;
  color: #7d838c;
  font-size: 13px;
  font-weight: 800;
}

.reminder-center-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

@media (max-width: 520px) {
  .reminder-dialog {
    width: calc(100vw - 18px);
    border-radius: 24px;
  }

  .reminder-shell {
    padding: 13px;
  }

  .reminder-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .reminder-row .icon-button {
    grid-column: 3;
  }

  .reminder-row .soft-button {
    display: none;
  }

  .reminder-center-actions {
    grid-template-columns: 1fr;
  }
}

/* iPhone density pass: keep the app feeling native instead of zoomed-in. */
@media (max-width: 520px) {
  .action-receipt {
    right: 50%;
    bottom: calc(96px + env(safe-area-inset-bottom));
    grid-template-columns: 38px minmax(0, 1fr) auto;
    width: min(342px, calc(100vw - 28px));
    padding: 10px 12px;
    border-radius: 17px;
    transform: translate(50%, 16px) scale(0.976);
  }

  .action-receipt.show {
    animation-name: receipt-in-mobile;
  }

  .action-receipt.leaving {
    animation-name: receipt-out-mobile;
  }

  .receipt-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .receipt-copy strong {
    font-size: 14px;
  }

  .receipt-copy small {
    font-size: 11px;
  }

  .receipt-undo {
    min-height: 32px;
    padding-inline: 10px;
    border-radius: 11px;
    font-size: 11px;
  }

  .workspace {
    padding: 10px 12px 90px;
    gap: 10px;
  }

  .topbar {
    gap: 9px;
    padding: 4px 0 0;
  }

  .topbar h1 {
    font-size: 22px;
    line-height: 1.05;
  }

  .topbar p:not(.eyebrow) {
    max-width: 25ch;
    font-size: 11.5px;
    line-height: 1.35;
  }

  .top-settings,
  .top-reminders,
  .icon-button {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .top-actions {
    gap: 7px;
  }

  .capture-panel,
  .screen.active {
    padding: 11px;
    border-radius: 19px;
  }

  .capture-title h2,
  .section-head h2 {
    font-size: 17px;
    line-height: 1.14;
  }

  .capture-title p {
    display: none;
  }

  .section-head p {
    font-size: 11px;
    line-height: 1.35;
  }

  .capture-form textarea {
    min-height: 58px;
    padding: 8px 2px 9px;
    font-size: 15px;
    line-height: 1.32;
  }

  .capture-controls,
  .capture-panel.details-open .capture-controls {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: stretch;
    gap: 6px;
  }

  .capture-controls .segmented {
    grid-column: 1 / 5;
    min-height: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .capture-controls .primary-button {
    grid-column: 5 / -1;
    grid-row: 1;
    margin-inline-start: 0;
  }

  #captureRoom {
    grid-column: 1 / 4;
  }

  #captureSubroom {
    grid-column: 4 / -1;
  }

  .capture-controls .capture-details-toggle {
    grid-column: 1 / 4;
  }

  .capture-controls .image-button {
    grid-column: 4 / -1;
  }

  .capture-panel.details-open .deadline-toggle,
  .capture-panel.details-open .reminder-toggle {
    grid-column: span 3;
  }

  .capture-panel.details-open .capture-due.visible,
  .capture-panel.details-open .capture-reminder.visible {
    grid-column: span 3;
  }

  .segmented button,
  .pill-row button,
  .status-pills button {
    min-height: 31px;
    padding-inline: 6px;
    font-size: 11px;
  }

  .capture-controls select,
  .capture-controls input[type="date"],
  .capture-controls input[type="time"],
  .deadline-toggle,
  .reminder-toggle,
  .capture-details-toggle,
  .capture-controls .soft-button,
  .capture-controls .primary-button {
    min-height: 36px;
    border-radius: 12px;
    font-size: 11px;
  }

  .capture-controls .primary-button {
    min-width: 0;
    min-height: 38px;
    padding-inline: 6px;
  }

  .capture-hint {
    display: none;
  }

  .room-row {
    min-height: 58px;
    padding: 8px;
    border-radius: 15px;
  }

  .room-row strong {
    font-size: 13px;
  }

  .room-row small {
    font-size: 10.5px;
  }

  .empty-state {
    min-height: 168px;
    padding: 18px 14px;
    border-radius: 20px;
  }

  .empty-state strong {
    font-size: 16px;
  }

  .empty-state p {
    font-size: 12px;
  }

  .bottom-nav {
    bottom: max(8px, env(safe-area-inset-bottom));
    gap: 5px;
    padding: 6px;
    border-radius: 23px;
  }

  .bottom-nav button {
    min-height: 48px;
    border-radius: 18px;
    font-size: 11px;
  }

  .bottom-nav svg {
    width: 20px;
    height: 20px;
  }

  .toast {
    right: 50%;
    left: auto;
    bottom: 82px;
    width: auto;
    max-width: min(320px, calc(100vw - 56px));
    min-height: 42px;
    padding: 10px 15px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    transform: translate(50%, 14px) scale(0.98);
  }

  .toast.show {
    transform: translate(50%, 0) scale(1);
  }
}

/* Entry dialog polish: the core create/edit flow should feel like a real product surface. */
.entry-dialog {
  width: min(760px, calc(100vw - 28px));
  max-width: none;
  overflow: hidden;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 26px;
  color: #111315;
  background:
    radial-gradient(circle at 9% 0%, rgba(243, 35, 53, 0.12), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 247, 250, 0.92));
  box-shadow:
    0 34px 94px rgba(17, 19, 21, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.entry-dialog::backdrop {
  background:
    radial-gradient(circle at 52% 18%, rgba(243, 35, 53, 0.18), transparent 34%),
    rgba(9, 10, 12, 0.46);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.entry-dialog form {
  max-height: min(760px, calc(100dvh - 28px));
  padding: 18px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(243, 35, 53, 0.38) transparent;
}

.entry-dialog .dialog-head {
  position: sticky;
  top: -18px;
  z-index: 4;
  margin: -18px -18px 0;
  padding: 18px 18px 14px;
  align-items: center;
  border-bottom: 1px solid rgba(17, 19, 21, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.9));
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.entry-dialog .dialog-head h2 {
  color: #111315;
  font-size: 26px;
  font-weight: 950;
  line-height: 1.05;
}

.entry-dialog .dialog-head p {
  max-width: 42ch;
  margin-top: 5px;
  color: #747a82;
  font-size: 13px;
  line-height: 1.45;
}

.entry-dialog .dialog-head .icon-button {
  color: #111315;
  background: rgba(17, 19, 21, 0.045);
  border-color: rgba(17, 19, 21, 0.07);
}

.entry-dialog label {
  gap: 7px;
  color: #111315;
  font-size: 12px;
  font-weight: 950;
}

.entry-dialog input,
.entry-dialog select,
.entry-dialog textarea {
  min-height: 40px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 14px;
  color: #111315;
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  outline: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.entry-dialog input:focus,
.entry-dialog select:focus,
.entry-dialog textarea:focus {
  border-color: rgba(243, 35, 53, 0.34);
  box-shadow:
    0 0 0 4px rgba(243, 35, 53, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.entry-dialog textarea[name="text"] {
  min-height: 96px;
  padding: 15px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.45;
  resize: vertical;
}

.entry-dialog .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.entry-dialog .task-only,
.entry-dialog .deadline-control,
.entry-dialog .reminder-control,
.entry-dialog .image-field,
.entry-dialog .voice-field {
  padding: 12px;
  border: 1px solid rgba(17, 19, 21, 0.075);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(247, 248, 250, 0.7));
  box-shadow:
    0 10px 28px rgba(17, 19, 21, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.entry-dialog .switch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  color: #111315;
}

.entry-dialog .switch-row small {
  color: #737a82;
  font-size: 11px;
  line-height: 1.35;
}

.entry-dialog .switch-track {
  background: rgba(17, 19, 21, 0.08);
  border-color: rgba(17, 19, 21, 0.1);
}

.entry-dialog .switch-row input:checked + .switch-track {
  background: rgba(243, 35, 53, 0.9);
  border-color: rgba(243, 35, 53, 0.35);
}

.entry-dialog .deadline-inputs,
.entry-dialog .reminder-inputs {
  margin-top: 10px;
}

.entry-dialog .image-field-head,
.entry-dialog .voice-field-head {
  color: #111315;
}

.entry-dialog .image-field-head span,
.entry-dialog .voice-field-head span {
  font-size: 12px;
  font-weight: 950;
}

.entry-dialog .dialog-preview {
  margin-top: 10px;
}

.entry-dialog .dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin: 0 -18px -18px;
  padding: 13px 18px;
  align-items: center;
  border-top: 1px solid rgba(17, 19, 21, 0.07);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.entry-dialog .dialog-actions .primary-button,
.entry-dialog .dialog-actions .danger-button {
  min-height: 42px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 950;
}

.entry-dialog .dialog-actions .primary-button {
  min-width: 156px;
}

@media (max-width: 720px) {
  .entry-dialog {
    width: calc(100vw - 14px);
    max-width: calc(100vw - 14px);
    max-height: calc(100dvh - 14px);
    border-radius: 22px;
  }

  .entry-dialog form {
    max-height: calc(100dvh - 14px);
    gap: 8px;
    padding: 10px 10px 70px;
  }

  .entry-dialog .dialog-head {
    top: -10px;
    margin: -10px -10px 0;
    padding: 12px 10px 9px;
  }

  .entry-dialog .dialog-head h2 {
    font-size: 20px;
    line-height: 1.08;
  }

  .entry-dialog .dialog-head p {
    font-size: 11px;
  }

  .entry-dialog label {
    gap: 5px;
    font-size: 11px;
  }

  .entry-dialog input,
  .entry-dialog select,
  .entry-dialog textarea {
    min-height: 36px;
    border-radius: 12px;
    font-size: 12px;
    padding-inline: 9px;
  }

  .entry-dialog textarea[name="text"] {
    min-height: 66px;
    padding: 10px;
    font-size: 14px;
    line-height: 1.38;
  }

  .entry-dialog .form-grid,
  .entry-dialog .deadline-inputs,
  .entry-dialog .reminder-inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .entry-dialog .form-grid > label:first-child {
    grid-column: 1 / -1;
  }

  .entry-dialog .task-only,
  .entry-dialog .deadline-control,
  .entry-dialog .reminder-control,
  .entry-dialog .image-field {
    padding: 8px;
    border-radius: 15px;
  }

  .entry-dialog .switch-row {
    gap: 8px;
  }

  .entry-dialog .switch-row small {
    font-size: 10px;
    line-height: 1.25;
  }

  .entry-dialog .deadline-inputs,
  .entry-dialog .reminder-inputs {
    margin-top: 7px;
  }

  .entry-dialog .image-field-head {
    align-items: stretch;
    flex-direction: column;
  }

  .entry-dialog .image-field-head div {
    width: 100%;
  }

  .entry-dialog .image-field-head .soft-button,
  .entry-dialog .image-field-head .text-button {
    flex: 1;
  }

  .entry-dialog .dialog-actions {
    position: fixed;
    inset-inline: 17px;
    bottom: calc(env(safe-area-inset-bottom) + 10px);
    margin: 0;
    padding: 8px 10px;
    border: 1px solid rgba(17, 19, 21, 0.08);
    border-radius: 16px;
    box-shadow:
      0 18px 38px rgba(17, 19, 21, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.86);
  }

  .entry-dialog .dialog-actions .primary-button,
  .entry-dialog .dialog-actions .danger-button {
    flex: 1;
    min-width: 0;
    min-height: 38px;
    border-radius: 12px;
    font-size: 12px;
  }
}

/* Start hub: a small daily launch surface that makes the app feel alive without adding workflow weight. */
.start-hub {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  grid-template-areas:
    "copy pulse"
    "stats actions";
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% 15%, rgba(243, 35, 53, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 247, 249, 0.82));
  box-shadow:
    0 24px 70px rgba(17, 19, 21, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.start-hub::before {
  content: "";
  position: absolute;
  inset-inline: 18px;
  top: auto;
  bottom: 0;
  width: auto;
  height: 42%;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(17, 19, 21, 0.07), rgba(255, 48, 74, 0.08), rgba(17, 19, 21, 0.07)),
    #111315;
  clip-path: none;
  opacity: 0.42;
  filter: blur(16px);
}

.start-hub::after {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), rgba(17, 19, 21, 0.92));
}

.start-hub-copy {
  grid-area: copy;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.start-hub-copy span {
  color: var(--red);
  font-size: 11px;
  font-weight: 950;
}

.start-hub-copy strong {
  color: #111315;
  font-size: 24px;
  font-weight: 950;
  line-height: 1.05;
}

.start-hub-copy p {
  max-width: 58ch;
  margin: 0;
  color: #7b8188;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-hub-pulse {
  grid-area: pulse;
  position: relative;
  isolation: isolate;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "kicker action"
    "title action"
    "meta action"
    "bar bar";
  align-items: center;
  gap: 3px 10px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
    linear-gradient(145deg, rgba(17, 19, 21, 0.94), rgba(88, 7, 18, 0.76));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 18px 44px rgba(17, 19, 21, 0.18);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.start-hub-pulse::before {
  content: "";
  position: absolute;
  inset: -60% auto auto -8%;
  width: 62%;
  aspect-ratio: 1;
  z-index: -1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24), rgba(255, 48, 74, 0.14) 38%, transparent 68%);
  transform: rotate(-16deg);
}

.start-hub-pulse span {
  grid-area: kicker;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0;
}

.start-hub-pulse strong {
  grid-area: title;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-hub-pulse small {
  grid-area: meta;
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-hub-pulse button {
  grid-area: action;
  min-width: 68px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  color: #111315;
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18);
}

.start-hub-pulse i {
  grid-area: bar;
  height: 4px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.start-hub-pulse b {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff304a, #fff 52%, #ff304a);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.start-hub-stats,
.start-hub-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.start-hub-stats {
  grid-area: stats;
  justify-self: start;
}

.start-hub-actions {
  grid-area: actions;
  justify-self: end;
}

.start-hub-stats button,
.start-hub-actions button {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 260ms ease,
    background 260ms ease,
    box-shadow 260ms ease;
}

.start-hub-stats button {
  color: #111315;
  border-color: rgba(17, 19, 21, 0.08);
  background: rgba(255, 255, 255, 0.74);
}

.start-hub-stats button {
  min-width: 72px;
  display: grid;
  place-items: center;
  gap: 1px;
}

.start-hub-stats span {
  color: var(--red);
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}

.start-hub-actions button {
  min-width: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.start-hub-actions svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.start-hub-actions .start-primary {
  background: linear-gradient(135deg, var(--red), #b80f1d);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 16px 34px rgba(243, 35, 53, 0.24);
}

.start-hub-stats button:hover,
.start-hub-stats button:focus-visible {
  color: #111315;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(243, 35, 53, 0.22);
}

.start-hub-actions button:hover,
.start-hub-actions button:focus-visible {
  transform: translateY(-3px) scale(1.018);
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.17);
  box-shadow: 0 18px 38px rgba(17, 19, 21, 0.16);
}

.start-hub-stats button:active,
.start-hub-actions button:active {
  transform: translateY(0) scale(0.985);
  transition-duration: 160ms;
}

.app-root:not(.screen-inbox) .start-hub {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "copy actions";
  min-height: 68px;
  padding-block: 11px;
  border-radius: 20px;
}

.app-root:not(.screen-inbox) .start-hub-pulse {
  display: none;
}

.app-root:not(.screen-inbox) .start-hub::before {
  height: 34%;
}

.app-root:not(.screen-inbox) .start-hub-copy {
  gap: 2px;
}

.app-root:not(.screen-inbox) .start-hub-copy strong {
  font-size: 19px;
}

.app-root:not(.screen-inbox) .start-hub-copy p {
  max-width: 38ch;
}

.app-root:not(.screen-inbox) .start-hub-stats {
  display: none;
}

.app-root:not(.screen-inbox) .start-hub-actions button {
  min-width: 72px;
  min-height: 38px;
  border-radius: 13px;
}

@media (max-width: 980px) {
  .start-hub {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "pulse"
      "stats"
      "actions";
    align-items: stretch;
  }

  .start-hub::before {
    inset-inline: 12px;
    height: 46%;
  }

  .start-hub-stats,
  .start-hub-actions {
    justify-content: stretch;
  }

  .start-hub-pulse {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .start-hub-stats button,
  .start-hub-actions button {
    flex: 1;
  }
}

@media (max-width: 720px) {
  .app-root:not(.screen-inbox) .start-hub {
    display: none;
  }

  .start-hub {
    min-height: 0;
    gap: 10px;
    padding: 13px;
    border-radius: 20px;
  }

  .start-hub-copy strong {
    font-size: 19px;
  }

  .start-hub-copy p {
    max-width: 100%;
    font-size: 12px;
    white-space: normal;
  }

  .start-hub-pulse {
    padding: 11px;
    border-radius: 17px;
  }

  .start-hub-pulse strong,
  .start-hub-pulse small {
    white-space: normal;
  }

  .start-hub-pulse button {
    min-width: 64px;
    min-height: 36px;
  }

  .start-hub-stats button {
    min-height: 40px;
    min-width: 0;
  }

  .start-hub-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .start-hub-actions button {
    min-width: 0;
    min-height: 40px;
    border-radius: 13px;
    font-size: 11px;
  }
}

/* Contextual mini composer: keep work screens compact while preserving every action. */
.capture-form textarea {
  max-height: none;
  resize: none;
  overflow-y: auto;
}

.app-root:not(.screen-inbox) .capture-panel {
  padding: 12px 14px 13px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 251, 0.94)),
    #fff;
  box-shadow:
    0 14px 34px rgba(17, 19, 21, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.app-root:not(.screen-inbox) .capture-panel::before {
  inset-inline: 14px;
  height: 2px;
}

.app-root:not(.screen-inbox) .capture-title {
  display: none;
}

.app-root:not(.screen-inbox) .capture-title p,
.app-root:not(.screen-inbox) .capture-hint {
  display: none;
}

.app-root:not(.screen-inbox) .capture-form {
  gap: 8px;
}

.app-root:not(.screen-inbox) .capture-form textarea {
  min-height: 42px;
  height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(17, 19, 21, 0.075);
  border-radius: 15px;
  color: #111315;
  background: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition:
    border-color 240ms ease,
    box-shadow 240ms ease,
    background 240ms ease;
}

.app-root:not(.screen-inbox) .capture-form textarea:focus {
  border-color: rgba(243, 35, 53, 0.26);
  background: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 4px rgba(243, 35, 53, 0.055);
}

.app-root:not(.screen-inbox) .capture-controls,
.app-root:not(.screen-inbox) .capture-panel.details-open .capture-controls {
  gap: 6px;
  padding-top: 0;
}

.app-root:not(.screen-inbox) .capture-controls .segmented {
  height: 32px;
  min-height: 32px;
  padding: 3px;
  border-radius: 12px;
}

.app-root:not(.screen-inbox) .capture-controls .segmented button,
.app-root:not(.screen-inbox) .capture-controls select,
.app-root:not(.screen-inbox) .capture-controls input[type="date"],
.app-root:not(.screen-inbox) .capture-controls input[type="time"],
.app-root:not(.screen-inbox) .deadline-toggle,
.app-root:not(.screen-inbox) .reminder-toggle,
.app-root:not(.screen-inbox) .capture-details-toggle,
.app-root:not(.screen-inbox) .capture-controls .soft-button,
.app-root:not(.screen-inbox) .capture-controls .primary-button {
  min-height: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 11px;
  line-height: 1;
}

.app-root:not(.screen-inbox) .capture-controls .segmented button {
  padding-inline: 9px;
}

.app-root:not(.screen-inbox) .capture-controls select,
.app-root:not(.screen-inbox) .capture-details-toggle,
.app-root:not(.screen-inbox) .capture-controls .soft-button {
  max-width: 150px;
}

.app-root:not(.screen-inbox) .capture-details-toggle span,
.app-root:not(.screen-inbox) .image-button {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-root:not(.screen-inbox) .capture-image-row {
  margin-top: 0;
}

@media (max-width: 860px) {
  .app-root:not(.screen-inbox) .capture-controls .segmented,
  .app-root:not(.screen-inbox) .capture-controls select,
  .app-root:not(.screen-inbox) .capture-controls input[type="date"],
  .app-root:not(.screen-inbox) .capture-controls input[type="time"],
  .app-root:not(.screen-inbox) .deadline-toggle,
  .app-root:not(.screen-inbox) .reminder-toggle,
  .app-root:not(.screen-inbox) .capture-details-toggle,
  .app-root:not(.screen-inbox) .capture-controls .soft-button,
  .app-root:not(.screen-inbox) .capture-controls .primary-button {
    max-width: none;
  }
}

@media (max-width: 520px) {
  .app-root:not(.screen-inbox) .capture-panel {
    padding: 9px;
    border-radius: 17px;
  }

  .app-root:not(.screen-inbox) .capture-form textarea {
    min-height: 38px;
    height: 38px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .app-root:not(.screen-inbox) .capture-controls,
  .app-root:not(.screen-inbox) .capture-panel.details-open .capture-controls {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
  }

  .app-root:not(.screen-inbox) .capture-controls .segmented {
    grid-column: 1 / 5;
  }

  .app-root:not(.screen-inbox) .capture-controls .primary-button {
    grid-column: 5 / -1;
    grid-row: 1;
  }
}

@keyframes receipt-in-mobile {
  0% {
    opacity: 0;
    transform: translate(50%, 16px) scale(0.976);
    filter: blur(8px);
  }
  66% {
    opacity: 1;
    transform: translate(50%, -3px) scale(1.012);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translate(50%, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes receipt-out-mobile {
  to {
    opacity: 0;
    transform: translate(50%, 10px) scale(0.985);
    filter: blur(7px);
  }
}

/* Mobile app density v1: the iPhone entry screen should feel native, not zoomed-in. */
@media (max-width: 720px) {
  body {
    background:
      radial-gradient(circle at 20% -8%, rgba(243, 35, 53, 0.12), transparent 32%),
      linear-gradient(180deg, #faf8f8 0%, #eef1f5 100%);
  }

  .workspace {
    width: min(100%, 440px);
    padding: 12px 12px 98px;
    gap: 10px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 2px 0 4px;
  }

  .topbar h1 {
    font-size: clamp(30px, 8.6vw, 36px);
    line-height: 0.98;
    letter-spacing: 0;
  }

  .topbar p:not(.eyebrow) {
    max-width: 22ch;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.35;
  }

  .top-actions {
    gap: 8px;
  }

  .top-actions .icon-button {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 28px rgba(17, 19, 21, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  }

  .start-hub {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    min-height: 0;
    padding: 14px;
    border-radius: 24px;
  }

  .start-hub::before {
    inset: auto 0 0;
    width: 100%;
    height: 64px;
    clip-path: none;
    opacity: 1;
  }

  .start-hub::after {
    inset-inline: 44px;
    height: 4px;
  }

  .start-hub-copy {
    order: 1;
    gap: 3px;
  }

  .start-hub-copy span {
    font-size: 11px;
  }

  .start-hub-copy strong {
    font-size: clamp(24px, 7vw, 30px);
    line-height: 1;
  }

  .start-hub-copy p {
    max-width: 100%;
    color: #737982;
    font-size: 12px;
    line-height: 1.32;
    white-space: normal;
  }

  .start-hub-stats {
    order: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .start-hub-stats button {
    min-width: 0;
    min-height: 42px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
  }

  .start-hub-stats span {
    font-size: 22px;
  }

  .start-hub-actions {
    order: 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    position: relative;
    z-index: 1;
  }

  .start-hub-actions button {
    min-width: 0;
    min-height: 44px;
    border-radius: 17px;
    font-size: 13px;
  }

  .start-hub-actions svg {
    width: 17px;
    height: 17px;
  }

  .capture-panel {
    padding: 13px;
    border-radius: 24px;
  }

  .capture-title {
    margin-bottom: 6px;
  }

  .capture-title h2,
  .section-head h2 {
    font-size: 22px;
    line-height: 1.05;
  }

  .capture-title p,
  .section-head p {
    font-size: 12px;
    line-height: 1.35;
  }

  .capture-form textarea {
    min-height: 66px;
    padding: 10px 4px 12px;
    font-size: 17px;
    line-height: 1.32;
  }

  .capture-controls,
  .capture-panel.details-open .capture-controls {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px;
  }

  .capture-controls .segmented {
    grid-column: 1 / 5;
    min-height: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .capture-controls .primary-button {
    grid-column: 5 / -1;
    grid-row: 1;
    min-height: 40px;
  }

  .capture-controls select,
  .capture-details-toggle,
  .capture-controls .soft-button,
  .capture-controls input[type="date"],
  .capture-controls input[type="time"],
  .deadline-toggle,
  .reminder-toggle {
    min-height: 42px;
    border-radius: 15px;
    font-size: 12px;
  }

  #captureRoom,
  #captureSubroom,
  .capture-controls .capture-details-toggle,
  .capture-controls .image-button {
    grid-column: span 3;
  }

  .capture-hint {
    display: none;
  }

  .screen.active {
    padding: 13px;
    border-radius: 24px;
  }

  .empty-state {
    min-height: 176px;
    border-radius: 24px;
  }

  .bottom-nav {
    padding: 7px;
    border-radius: 28px;
  }

  .bottom-nav button {
    min-height: 54px;
    border-radius: 22px;
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  .workspace {
    padding-inline: 10px;
  }

  .topbar h1 {
    font-size: 30px;
  }

  .topbar p:not(.eyebrow) {
    font-size: 12.5px;
  }

  .top-actions {
    gap: 7px;
  }

  .top-actions .icon-button {
    width: 40px;
    height: 40px;
  }

  .start-hub {
    padding: 13px;
    border-radius: 22px;
  }

  .start-hub-copy strong {
    font-size: 25px;
  }

  .start-hub-copy p {
    font-size: 11.5px;
  }

  .start-hub-stats span {
    font-size: 20px;
  }

  .start-hub-actions button {
    min-height: 42px;
    font-size: 12px;
  }

  .capture-title h2,
  .section-head h2 {
    font-size: 20px;
  }

  .capture-form textarea {
    min-height: 58px;
    font-size: 16px;
  }
}

/* Nova motion pass: slower, tactile transitions without changing layout. */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) {
    animation: nova-view-out 320ms cubic-bezier(0.22, 0.72, 0.18, 1) both;
  }

  ::view-transition-new(root) {
    animation: nova-view-in 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .screen.active {
    animation: nova-panel-arrive 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .app-root.screen-shift .workspace {
    animation: nova-workspace-breathe 980ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .dialog[open],
  .image-dialog[open] {
    animation: nova-dialog-open 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .entry-card,
  .task-view-card,
  .room-card,
  .next-card {
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
}

.primary-button,
.soft-button,
.icon-button,
.text-button,
.tiny-button,
.rail-action,
.room-dot,
.work-action,
.dock-task,
.bottom-nav button,
.segmented button,
.pill-row button,
.status-pills button,
.subroom-picker button,
.start-hub-pulse button,
.start-hub-actions button,
.start-hub-stats button,
.dock-command-actions button {
  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow, background;
  transition:
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 460ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 360ms ease,
    background 420ms ease,
    color 240ms ease,
    filter 360ms ease;
}

.primary-button::before,
.soft-button::before,
.icon-button::before,
.text-button::before,
.tiny-button::before,
.rail-action::before,
.room-dot::before,
.work-action::before,
.dock-task::before,
.bottom-nav button::before,
.segmented button::before,
.pill-row button::before,
.status-pills button::before,
.subroom-picker button::before,
.start-hub-pulse button::before,
.start-hub-actions button::before,
.start-hub-stats button::before,
.dock-command-actions button::before {
  content: "";
  position: absolute;
  left: var(--press-x, 50%);
  top: var(--press-y, 50%);
  width: 12px;
  height: 12px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.62) 0 18%, rgba(255, 255, 255, 0.2) 42%, transparent 72%),
    radial-gradient(circle, rgba(243, 35, 53, 0.32), transparent 70%);
  mix-blend-mode: screen;
}

.primary-button:hover,
.soft-button:hover,
.icon-button:hover,
.text-button:hover,
.tiny-button:hover,
.bottom-nav button:hover,
.segmented button:hover,
.pill-row button:hover,
.status-pills button:hover,
.subroom-picker button:hover,
.start-hub-pulse button:hover,
.start-hub-actions button:hover,
.start-hub-stats button:hover,
.dock-command-actions button:hover {
  transform: translateY(-2px) scale(1.012);
  filter: saturate(1.04);
}

.rail-action:hover,
.room-dot:hover,
.work-action:hover,
.dock-task:hover {
  transform: translateX(-2px) scale(1.01);
  filter: saturate(1.06);
}

button:not(:disabled):active,
button.is-pressing,
.primary-button.is-pressing,
.soft-button.is-pressing,
.icon-button.is-pressing,
.text-button.is-pressing,
.tiny-button.is-pressing,
.rail-action.is-pressing,
.room-dot.is-pressing,
.work-action.is-pressing,
.dock-task.is-pressing,
.bottom-nav button.is-pressing,
.segmented button.is-pressing,
.pill-row button.is-pressing,
.status-pills button.is-pressing,
.subroom-picker button.is-pressing,
.start-hub-pulse button.is-pressing,
.start-hub-actions button.is-pressing,
.start-hub-stats button.is-pressing,
.dock-command-actions button.is-pressing {
  animation: nova-press 980ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

button.is-pressing::before {
  animation: nova-ripple 940ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes nova-view-out {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
  to {
    opacity: 0.2;
    transform: scale(0.992) translateY(8px);
    filter: blur(8px);
  }
}

@keyframes nova-view-in {
  from {
    opacity: 0;
    transform: scale(0.982) translateY(18px);
    filter: blur(14px);
  }
  54% {
    opacity: 1;
    filter: blur(0);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes nova-panel-arrive {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.986);
    filter: blur(10px);
  }
  60% {
    opacity: 1;
    filter: blur(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes nova-workspace-breathe {
  0% {
    transform: scale(0.997);
  }
  45% {
    transform: scale(1.002);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes nova-dialog-open {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
    filter: blur(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes nova-press {
  0% {
    transform: translateY(0) scale(1);
  }
  22% {
    transform: translateY(1px) scale(0.982);
  }
  58% {
    transform: translateY(-1px) scale(1.018);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes nova-ripple {
  0% {
    opacity: 0.46;
    transform: translate(-50%, -50%) scale(0);
  }
  62% {
    opacity: 0.16;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(28);
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root),
  .screen.active,
  .app-root.screen-shift .workspace,
  .dialog[open],
  .image-dialog[open],
  button.is-pressing,
  button.is-pressing::before {
    animation: none !important;
  }
}

/* Mobile app density v2: prioritize writing immediately above decorative explanation. */
@media (max-width: 720px) {
  .topbar h1 {
    font-size: clamp(27px, 7.8vw, 32px);
  }

  .topbar p:not(.eyebrow) {
    max-width: 20ch;
    font-size: 12px;
  }

  .start-hub {
    gap: 7px;
    padding: 12px;
  }

  .start-hub::before {
    height: 54px;
  }

  .start-hub-copy strong {
    font-size: clamp(21px, 6.4vw, 26px);
  }

  .start-hub-copy p {
    display: none;
  }

  .start-hub-stats button {
    min-height: 36px;
    border-radius: 14px;
    font-size: 11px;
  }

  .start-hub-stats span {
    font-size: 18px;
  }

  .start-hub-actions button {
    min-height: 38px;
    border-radius: 15px;
    font-size: 12px;
  }

  .capture-panel {
    padding: 12px;
  }

  .capture-title {
    display: none;
  }

  .capture-form {
    gap: 8px;
  }

  .capture-form textarea {
    min-height: 52px;
    padding: 8px 4px 9px;
    font-size: 16px;
    line-height: 1.28;
  }

  .capture-controls,
  .capture-panel.details-open .capture-controls {
    gap: 6px;
  }

  .capture-controls .segmented {
    min-height: 36px;
    height: 36px;
    border-radius: 13px;
  }

  .capture-controls .primary-button,
  .capture-controls select,
  .capture-details-toggle,
  .capture-controls .soft-button,
  .capture-controls input[type="date"],
  .capture-controls input[type="time"],
  .deadline-toggle,
  .reminder-toggle {
    min-height: 36px;
    height: 36px;
    border-radius: 13px;
    font-size: 11px;
  }

  .capture-controls .primary-button svg,
  .capture-controls .soft-button svg,
  .capture-details-toggle svg {
    width: 15px;
    height: 15px;
  }

  .screen.active {
    padding: 12px;
  }
}

@media (max-width: 430px) {
  .topbar h1 {
    font-size: 28px;
  }

  .start-hub-copy strong {
    font-size: 23px;
  }

  .capture-form textarea {
    min-height: 48px;
    font-size: 15px;
  }
}

/* Mobile task cards: dense, tappable, and less like a giant document card. */
@media (max-width: 720px) {
  .task-list,
  .entry-stream {
    gap: 10px;
  }

  .entry-card {
    padding: 12px;
    border-radius: 24px;
  }

  .entry-line {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .done-button {
    width: 40px;
    height: 40px;
    border-radius: 15px;
  }

  .entry-content p {
    margin: 0;
    font-size: 16px;
    line-height: 1.24;
    text-align: start;
  }

  .entry-meta {
    margin-top: 6px;
    gap: 4px 6px;
  }

  .entry-meta span {
    font-size: 11px;
    line-height: 1.2;
  }

  .entry-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 6px;
    padding-inline-start: 0;
    margin-top: 8px;
  }

  .entry-actions .icon-button,
  .entry-actions .more-menu summary {
    width: 36px;
    height: 36px;
    border-radius: 13px;
  }

  .status-pills {
    min-height: 40px;
    padding: 4px;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .status-pills::-webkit-scrollbar {
    display: none;
  }

  .status-pills button {
    min-height: 32px;
    padding-inline: 10px;
    border-radius: 12px;
    font-size: 11px;
  }

  .task-extras,
  .entry-notes,
  .entry-images {
    margin: 8px 0 0;
  }

  .task-view-card {
    padding: 10px;
    border-radius: 18px;
  }

  .task-view-card.new-entry {
    padding: 10px;
    border-radius: 20px;
  }

  .task-view-card.new-entry::after {
    inset: 6px;
    border-radius: 16px;
  }

  .task-view-card .entry-line {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
  }

  .task-view-card .done-button {
    width: 36px;
    height: 36px;
    border-radius: 13px;
  }

  .task-view-card .entry-content p {
    font-size: 15px;
    line-height: 1.2;
  }

  .task-view-card .entry-actions {
    grid-column: auto;
    align-self: center;
    margin-top: 0;
    gap: 5px;
  }

  .task-view-card .entry-actions .icon-button,
  .task-view-card .entry-actions .more-menu summary {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .task-view-card .task-extras {
    margin-top: 7px;
  }

  .task-view-card .task-extras > .status-pills {
    display: none;
  }
}

/* Nova brand pass: the new PNG already carries the full icon shape, so let it breathe. */
.logo-button {
  width: 58px;
  height: 58px;
  padding: 0;
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.logo-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.26));
}

.logo-button:hover,
.logo-button:focus-visible {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.logo-button:hover img,
.logo-button:focus-visible img {
  filter: drop-shadow(0 18px 28px rgba(243, 35, 53, 0.24)) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.2));
}

/* Goal polish: make mobile feel like a fast native control panel, not a zoomed desktop. */
@media (max-width: 720px) {
  .workspace {
    padding: 9px 10px 88px;
    gap: 8px;
  }

  .topbar {
    min-height: 0;
    gap: 8px;
    padding-block: 0 2px;
  }

  .topbar h1 {
    font-size: clamp(24px, 7vw, 28px);
    line-height: 1;
  }

  .topbar p:not(.eyebrow) {
    margin-top: 2px;
    font-size: 11.5px;
    line-height: 1.28;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions .icon-button {
    width: 38px;
    height: 38px;
    border-radius: 14px;
  }

  .top-actions .icon-button svg {
    width: 19px;
    height: 19px;
  }

  .start-hub,
  .capture-panel,
  .screen.active {
    border-radius: 20px;
  }

  .capture-panel {
    padding: 10px;
  }

  .capture-form {
    gap: 7px;
  }

  .capture-form textarea {
    min-height: 42px;
    padding: 7px 2px 8px;
    font-size: 14.5px;
    line-height: 1.22;
  }

  .capture-controls,
  .capture-panel.details-open .capture-controls {
    gap: 5px;
  }

  .capture-controls .segmented,
  .capture-controls .primary-button,
  .capture-controls select,
  .capture-details-toggle,
  .capture-controls .soft-button,
  .capture-controls input[type="date"],
  .capture-controls input[type="time"],
  .deadline-toggle,
  .reminder-toggle {
    min-height: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 10.5px;
  }

  .section-head h2,
  .capture-title h2 {
    font-size: 19px;
  }

  .section-head p,
  .capture-title p {
    font-size: 11.5px;
  }

  .task-view-card {
    padding: 8px;
    border-radius: 16px;
  }

  .task-view-card .entry-line {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .task-view-card .done-button,
  .task-view-card .entry-actions .icon-button,
  .task-view-card .entry-actions .more-menu summary {
    width: 32px;
    height: 32px;
    border-radius: 11px;
  }

  .task-view-card .entry-content p {
    font-size: 14px;
  }

  .bottom-nav {
    inset-inline: 14px;
    bottom: 10px;
    padding: 6px;
    border-radius: 24px;
  }

  .bottom-nav button {
    min-height: 48px;
    border-radius: 18px;
    font-size: 11px;
  }

  .bottom-nav svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 430px) {
  .topbar h1 {
    font-size: 25px;
  }

  .capture-form textarea {
    min-height: 40px;
    font-size: 14px;
  }
}

@media (max-width: 720px) {
  .action-receipt {
    bottom: calc(78px + env(safe-area-inset-bottom));
    grid-template-columns: 34px minmax(0, 1fr) auto;
    width: min(320px, calc(100vw - 28px));
    min-height: 0;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 15px;
  }

  .receipt-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .receipt-mark svg {
    width: 18px;
    height: 18px;
  }

  .receipt-copy strong {
    font-size: 13px;
  }

  .receipt-copy small {
    font-size: 10.5px;
  }

  [data-panel="today"] .today-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  [data-panel="today"] .metric {
    min-height: 82px;
    padding: 11px 12px;
    border-radius: 17px;
  }

  [data-panel="today"] .metric::after {
    right: 10px;
    left: 10px;
    bottom: 9px;
    height: 20px;
    opacity: 0.52;
  }

  [data-panel="today"] .metric span {
    font-size: 11px;
  }

  [data-panel="today"] .metric strong {
    font-size: 26px;
  }

  [data-panel="today"] .today-layout {
    gap: 10px;
  }

  [data-panel="today"] .mini-panel {
    padding: 12px;
    border-radius: 20px;
  }
}

@media (max-width: 430px) {
  [data-panel="today"] .metric {
    min-height: 76px;
    padding: 10px 11px;
  }

  [data-panel="today"] .metric strong {
    font-size: 24px;
  }
}

/* Goal polish v12: harden the app shell for iPhone-sized screens and make the daily flow calmer. */
@media (max-width: 860px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  body {
    min-height: 100dvh;
  }

  .app-root {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: clip;
  }

  .room-rail,
  .side-dock,
  .app-root::before,
  .app-root::after {
    display: none !important;
  }

  .workspace {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
    overflow-x: clip;
  }

  .topbar,
  .start-hub,
  .capture-panel,
  .screen.active,
  .rooms-layout,
  .room-main,
  .entry-stream,
  .task-list,
  .today-layout,
  .settings-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .topbar > div:first-child {
    min-width: 0;
  }

  .top-actions {
    width: auto;
    min-width: 0;
    justify-content: end;
  }

  .top-actions .search-box {
    display: none;
  }

  .start-hub {
    overflow: hidden;
  }

  .capture-form,
  .capture-controls {
    min-width: 0;
  }

  .capture-controls > * {
    min-width: 0;
  }

  .bottom-nav {
    right: max(10px, env(safe-area-inset-right));
    left: max(10px, env(safe-area-inset-left));
    width: auto;
    max-width: none;
    box-sizing: border-box;
  }
}

@media (max-width: 720px) {
  body {
    background:
      radial-gradient(circle at 9% -12%, rgba(255, 35, 58, 0.16), transparent 35%),
      linear-gradient(180deg, #fff 0%, #f1f3f6 46%, #e9edf2 100%);
  }

  .workspace {
    padding: 10px 10px calc(88px + env(safe-area-inset-bottom));
    gap: 9px;
  }

  .topbar {
    padding: 4px 0 2px;
    gap: 8px;
  }

  .topbar h1 {
    max-width: 100%;
    font-size: clamp(25px, 7.1vw, 30px);
    line-height: 1.02;
    white-space: normal;
  }

  .topbar p:not(.eyebrow) {
    max-width: 24ch;
    font-size: 11.5px;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions .icon-button {
    width: 38px;
    height: 38px;
    border-radius: 14px;
  }

  .start-hub {
    padding: 11px;
    gap: 8px;
    border-radius: 22px;
    background:
      linear-gradient(135deg, rgba(19, 20, 23, 0.96), rgba(75, 12, 20, 0.9) 52%, rgba(244, 25, 48, 0.92)),
      #111315;
    color: #fff;
    box-shadow: 0 18px 42px rgba(17, 19, 21, 0.14);
  }

  .start-hub::before {
    opacity: 0.2;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.74), transparent);
  }

  .start-hub-copy span,
  .start-hub-copy p {
    color: rgba(255, 255, 255, 0.68);
  }

  .start-hub-copy strong {
    color: #fff;
    font-size: clamp(22px, 6.7vw, 27px);
  }

  .start-hub-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .start-hub-stats button,
  .start-hub-actions button {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }

  .start-hub-actions button {
    min-height: 40px;
  }

  .capture-panel {
    padding: 11px;
    border-radius: 22px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86)),
      #fff;
    box-shadow: 0 18px 44px rgba(17, 19, 21, 0.1);
  }

  .capture-form textarea {
    width: 100%;
    min-height: 58px;
    padding: 11px 12px;
    border: 1px solid rgba(17, 19, 21, 0.08);
    border-radius: 18px;
    background: rgba(246, 247, 249, 0.78);
    box-sizing: border-box;
    font-size: 15px;
  }

  .capture-form textarea:focus {
    border-color: rgba(244, 25, 48, 0.32);
    background: #fff;
    box-shadow: 0 14px 34px rgba(244, 25, 48, 0.11);
  }

  .capture-controls,
  .capture-panel.details-open .capture-controls {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
  }

  .capture-controls .segmented {
    grid-column: 1 / 5;
  }

  .capture-controls .primary-button {
    grid-column: 5 / -1;
    grid-row: 1;
  }

  #captureRoom,
  #captureSubroom,
  .capture-details-toggle,
  .capture-controls .image-button {
    grid-column: span 3;
  }

  .capture-controls .segmented,
  .capture-controls .primary-button,
  .capture-controls select,
  .capture-details-toggle,
  .capture-controls .soft-button,
  .capture-controls input[type="date"],
  .capture-controls input[type="time"],
  .deadline-toggle,
  .reminder-toggle {
    width: 100%;
    max-width: 100%;
    min-height: 38px;
    height: 38px;
    border-radius: 14px;
    box-sizing: border-box;
    font-size: 11px;
  }

  .capture-panel.details-open .deadline-toggle,
  .capture-panel.details-open .reminder-toggle,
  .capture-panel.details-open .capture-due.visible,
  .capture-panel.details-open .capture-reminder.visible {
    grid-column: span 3;
  }

  .screen.active {
    padding: 12px;
    border-radius: 22px;
  }

  .bottom-nav {
    bottom: max(9px, env(safe-area-inset-bottom));
    padding: 6px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 42px rgba(17, 19, 21, 0.18);
  }

  .bottom-nav button {
    min-width: 0;
    min-height: 48px;
    border-radius: 18px;
  }
}

@media (max-width: 430px) {
  .workspace {
    padding-inline: 8px;
  }

  .topbar h1 {
    font-size: 25px;
  }

  .topbar p:not(.eyebrow) {
    max-width: 21ch;
  }

  .start-hub,
  .capture-panel,
  .screen.active {
    border-radius: 20px;
  }

  .capture-controls,
  .capture-panel.details-open .capture-controls {
    gap: 5px;
  }

  .capture-controls .segmented,
  .capture-controls .primary-button,
  .capture-controls select,
  .capture-details-toggle,
  .capture-controls .soft-button,
  .capture-controls input[type="date"],
  .capture-controls input[type="time"],
  .deadline-toggle,
  .reminder-toggle {
    min-height: 36px;
    height: 36px;
    font-size: 10.5px;
  }
}

/* Nova product polish: compact sync signal and calmer mobile density */
.top-sync {
  appearance: none;
  display: inline-flex !important;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  margin: 8px 0 0 !important;
  padding: 5px 9px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #111315 !important;
  font-size: 11px !important;
  font-weight: 850;
  line-height: 1;
  font-family: inherit;
  text-align: inherit;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(17, 19, 21, 0.06);
  backdrop-filter: blur(16px) saturate(150%);
}

.top-sync span {
  width: 7px;
  height: 7px;
  margin-inline-end: 7px;
  border-radius: 999px;
  background: #9ca3af;
  box-shadow: 0 0 0 4px rgba(156, 163, 175, 0.12);
}

.top-sync[data-status="online"] span {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.14);
}

.top-sync[data-status="saving"] span,
.top-sync[data-status="checking"] span {
  background: var(--accent);
  animation: sync-dot-breathe 1.4s ease-in-out infinite;
}

.top-sync[data-status="offline"] span {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.top-sync:hover,
.top-sync:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(244, 25, 48, 0.22);
  box-shadow: 0 16px 34px rgba(244, 25, 48, 0.1);
}

@keyframes sync-dot-breathe {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 4px rgba(244, 25, 48, 0.12);
  }
  50% {
    transform: scale(1.25);
    box-shadow: 0 0 0 7px rgba(244, 25, 48, 0.05);
  }
}

@media (max-width: 720px) {
  .workspace {
    padding: 8px 9px calc(78px + env(safe-area-inset-bottom));
    gap: 8px;
  }

  .topbar {
    align-items: start;
    gap: 6px;
    padding: 1px 0 0;
  }

  .topbar h1 {
    font-size: 23px;
    line-height: 1.08;
  }

  .topbar p:not(.eyebrow):not(.top-sync) {
    max-width: 22ch;
    font-size: 10.8px;
    line-height: 1.35;
  }

  .top-sync {
    min-height: 22px;
    margin-top: 4px !important;
    padding: 4px 7px;
    font-size: 10px !important;
  }

  .top-actions {
    gap: 5px;
  }

  .top-actions .icon-button {
    width: 34px;
    height: 34px;
    border-radius: 13px;
  }

  .top-actions svg {
    width: 17px;
    height: 17px;
  }

  .start-hub {
    padding: 10px;
    gap: 7px;
    border-radius: 20px;
  }

  .start-hub-copy span {
    font-size: 10px;
  }

  .start-hub-copy strong {
    font-size: 21px;
    line-height: 1.08;
  }

  .start-hub-copy p {
    max-width: 31ch;
    font-size: 10.8px;
    line-height: 1.35;
  }

  .start-hub-stats {
    gap: 5px;
  }

  .start-hub-stats button {
    min-height: 37px;
    padding: 6px 8px;
    font-size: 10.5px;
  }

  .start-hub-stats span {
    font-size: 17px;
  }

  .start-hub-actions {
    gap: 6px;
  }

  .start-hub-actions button {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 11px;
  }

  .start-hub-actions svg {
    width: 15px;
    height: 15px;
  }

  .capture-panel {
    padding: 10px;
    gap: 8px;
    border-radius: 20px;
  }

  .capture-title {
    margin-bottom: 7px;
  }

  .capture-title h2 {
    font-size: 16px;
  }

  .capture-title p,
  .capture-hint {
    font-size: 10.5px;
    line-height: 1.35;
  }

  .capture-form textarea {
    min-height: 48px;
    padding: 9px 10px;
    border-radius: 15px;
    font-size: 13.5px;
  }

  .capture-controls,
  .capture-panel.details-open .capture-controls {
    gap: 5px;
  }

  .capture-controls .segmented,
  .capture-controls .primary-button,
  .capture-controls select,
  .capture-details-toggle,
  .capture-controls .soft-button,
  .capture-controls input[type="date"],
  .capture-controls input[type="time"],
  .deadline-toggle,
  .reminder-toggle {
    min-height: 34px;
    height: 34px;
    border-radius: 13px;
    font-size: 10px;
  }

  .screen.active {
    padding: 11px;
    border-radius: 20px;
  }

  .section-head h2,
  .empty-state strong {
    font-size: 20px;
  }

  .section-head p,
  .empty-state p,
  .entry-content p {
    font-size: 11.5px;
    line-height: 1.42;
  }

  .entry-card {
    padding: 13px;
    border-radius: 19px;
  }

  .entry-meta {
    gap: 5px;
  }

  .entry-meta span {
    min-height: 22px;
    padding: 4px 7px;
    font-size: 10px;
  }

  .entry-actions {
    gap: 6px;
  }

  .entry-actions .icon-button,
  .entry-actions .more-menu summary {
    width: 38px;
    height: 38px;
    border-radius: 14px;
  }

  .bottom-nav {
    bottom: max(7px, env(safe-area-inset-bottom));
    padding: 5px;
  }

  .bottom-nav button {
    min-height: 44px;
    border-radius: 16px;
    font-size: 10.5px;
  }

  .bottom-nav svg {
    width: 19px;
    height: 19px;
  }
}

@media (max-width: 430px) {
  .topbar h1 {
    font-size: 22px;
  }

  .topbar p:not(.eyebrow):not(.top-sync) {
    max-width: 20ch;
    font-size: 10.5px;
  }

  .start-hub-copy strong {
    font-size: 20px;
  }

  .capture-title h2 {
    font-size: 15px;
  }

  .capture-controls .segmented,
  .capture-controls .primary-button,
  .capture-controls select,
  .capture-details-toggle,
  .capture-controls .soft-button,
  .capture-controls input[type="date"],
  .capture-controls input[type="time"],
  .deadline-toggle,
  .reminder-toggle {
    min-height: 33px;
    height: 33px;
    font-size: 9.8px;
  }
}

.sync-dialog {
  width: min(560px, calc(100vw - 28px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111315;
}

.sync-dialog[open] {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100dvh;
  margin: 0;
  padding: 18px;
  overflow: hidden;
  border: 0;
  background: transparent;
  animation: none;
}

.sync-dialog::backdrop {
  background:
    radial-gradient(circle at 55% 30%, rgba(244, 25, 48, 0.2), transparent 38%),
    rgba(10, 8, 11, 0.38);
  backdrop-filter: blur(14px);
}

.sync-shell {
  position: relative;
  overflow: hidden;
  width: min(560px, 100%);
  max-height: calc(100dvh - 36px);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 244, 246, 0.88)),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 34px 90px rgba(17, 19, 21, 0.22);
  backdrop-filter: blur(26px) saturate(170%);
}

.sync-dialog[open] .sync-shell {
  animation: sync-shell-open 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sync-shell::before {
  content: "";
  position: absolute;
  inset: -30% -22% auto auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(244, 25, 48, 0.28), transparent 68%);
  pointer-events: none;
}

.sync-close {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
}

.sync-hero,
.sync-counts,
.sync-phone-card,
.sync-qr-card,
.sync-actions {
  position: relative;
  z-index: 1;
}

.sync-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding-inline-start: 46px;
}

.sync-orb {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  color: #fff;
  background:
    linear-gradient(145deg, #111315, #3a0910 48%, #f41930),
    #111315;
  box-shadow: 0 18px 42px rgba(244, 25, 48, 0.28);
}

.sync-orb[data-status="offline"] {
  background: linear-gradient(145deg, #111315, #7c2d12);
}

.sync-orb svg {
  width: 25px;
  height: 25px;
}

.sync-hero h2,
.sync-hero p {
  margin: 0;
}

.sync-hero h2 {
  font-size: 30px;
  line-height: 1;
}

.sync-hero p {
  margin-top: 6px;
  color: #6b7280;
  font-weight: 750;
  line-height: 1.45;
}

.sync-meter {
  position: relative;
  z-index: 1;
  height: 7px;
  margin: 18px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 19, 21, 0.08);
}

.sync-meter span {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #111315, #f41930);
  animation: sync-meter-flow 2.4s ease-in-out infinite;
}

@keyframes sync-meter-flow {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.86;
  }
  50% {
    transform: translateX(-18%);
    opacity: 1;
  }
}

@keyframes sync-shell-open {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.96);
    filter: blur(10px);
  }

  60% {
    opacity: 1;
    transform: translateY(-3px) scale(1.01);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.sync-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.sync-counts div {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  text-align: center;
}

.sync-counts strong,
.sync-counts span {
  display: block;
}

.sync-counts strong {
  font-size: 22px;
  line-height: 1;
}

.sync-counts span {
  margin-top: 5px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 850;
}

.sync-phone-card {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(244, 25, 48, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(244, 25, 48, 0.08), rgba(255, 255, 255, 0.74)),
    rgba(255, 255, 255, 0.72);
}

.sync-phone-card span,
.sync-phone-card small {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.sync-phone-card strong {
  direction: ltr;
  overflow-wrap: anywhere;
  color: #111315;
  font-size: 14px;
}

.sync-qr-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
}

.sync-qr-card .phone-qr {
  width: 92px;
  height: 92px;
  padding: 7px;
  border-radius: 17px;
}

.sync-qr-card small {
  color: #6b7280;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.sync-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.sync-actions button {
  min-height: 42px;
}

@media (max-width: 520px) {
  .sync-shell {
    padding: 18px;
    border-radius: 25px;
  }

  .sync-hero {
    grid-template-columns: 1fr;
    padding-inline-start: 40px;
    gap: 10px;
  }

  .sync-orb {
    width: 50px;
    height: 50px;
    border-radius: 18px;
  }

  .sync-hero h2 {
    font-size: 24px;
  }

  .sync-hero p {
    font-size: 12px;
  }

  .sync-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sync-qr-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .sync-qr-card .phone-qr {
    width: 82px;
    height: 82px;
  }

  .sync-actions {
    grid-template-columns: 1fr;
  }
}

/* Keep the note / idea / task selector seated inside its grey track. */
.capture-controls .segmented {
  align-items: stretch;
  overflow: hidden;
}

.capture-controls .segmented button {
  align-self: stretch;
  min-height: 0 !important;
  height: 100% !important;
  margin: 0;
  line-height: 1;
}

.app-root:not(.screen-inbox) .capture-controls .segmented button {
  border-radius: 9px;
}

@media (max-width: 720px) {
  .top-sync {
    min-height: 32px;
    padding: 7px 10px;
  }

  .app-root .capture-controls .segmented,
  .app-root:not(.screen-inbox) .capture-controls .segmented {
    min-height: 42px !important;
    height: 42px !important;
    padding: 4px;
    border-radius: 16px;
  }

  .app-root .capture-controls .segmented button,
  .app-root:not(.screen-inbox) .capture-controls .segmented button {
    min-height: 0 !important;
    height: 100% !important;
    border-radius: 12px;
    font-size: 12px;
  }

  .more-menu[open] div {
    top: auto !important;
    bottom: calc(100% + 8px) !important;
    left: auto !important;
    right: 0 !important;
    width: min(176px, calc(100vw - 32px));
    max-height: min(360px, calc(100vh - 120px));
    overflow-y: auto;
  }

  .more-menu button {
    min-height: 40px;
    padding-inline: 12px;
  }
}

@media (max-width: 720px) {
  .toast {
    top: max(112px, calc(env(safe-area-inset-top) + 88px));
    right: 50%;
    bottom: auto;
    left: auto;
    width: auto;
    max-width: min(330px, calc(100vw - 44px));
    transform: translate(50%, -12px) scale(0.98);
  }

  .toast.show {
    transform: translate(50%, 0) scale(1);
  }
}

/* Nova reliability center: calm product confidence without turning settings into a control room. */
.reliability-panel {
  position: relative;
  order: -10;
  overflow: hidden;
}

.reliability-panel::before {
  content: "";
  position: absolute;
  inset: auto -28px -42px auto;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(244, 25, 48, 0.16), transparent 68%);
  pointer-events: none;
}

.reliability-summary {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.health-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.health-row > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  color: #111315;
  background: rgba(17, 19, 21, 0.08);
}

.health-row.good > span {
  color: #fff;
  background: linear-gradient(135deg, #111315, #f41930);
}

.health-row.warn > span {
  color: #7c2d12;
  background: rgba(251, 146, 60, 0.18);
}

.health-row.bad > span {
  color: #fff;
  background: linear-gradient(135deg, #991b1b, #f41930);
}

.health-row svg {
  width: 17px;
  height: 17px;
}

.health-row strong,
.health-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-row strong {
  color: #111315;
  font-size: 13px;
  font-weight: 950;
}

.health-row small {
  margin-top: 2px;
  color: #737983;
  font-size: 11px;
  font-weight: 800;
}

.health-note {
  margin: 4px 2px 0;
  color: #7b818a;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.45;
}

.reliability-actions {
  position: relative;
  z-index: 1;
  margin-top: 12px;
}

.notification-panel .primary-button {
  width: 100%;
}

.notification-panel {
  order: -9;
}

.panel-attention {
  animation: panelAttention 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes panelAttention {
  0%,
  100% {
    box-shadow: var(--shadow-card);
  }

  35% {
    box-shadow:
      0 0 0 5px rgba(243, 35, 53, 0.12),
      0 28px 62px rgba(243, 35, 53, 0.16);
  }
}

.app-readiness,
.install-status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.install-status-list {
  position: relative;
  z-index: 1;
  margin: 0;
}

.readiness-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 76px;
  padding: 10px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.56)),
    rgba(255, 255, 255, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 26px rgba(17, 19, 21, 0.05);
}

.install-status-list .readiness-item {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.readiness-item > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #111315, var(--red));
}

.readiness-item.warn > span {
  color: #111315;
  background: #fff;
}

.readiness-item.bad > span {
  background: linear-gradient(135deg, #7f1118, #f32335);
}

.readiness-item svg {
  width: 17px;
  height: 17px;
}

.readiness-item small,
.readiness-item strong,
.readiness-item em {
  display: block;
  min-width: 0;
}

.readiness-item small {
  color: #8a9099;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.readiness-item strong {
  margin-top: 1px;
  overflow: hidden;
  color: #111315;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.readiness-item em {
  margin-top: 3px;
  color: #747b84;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.3;
}

.install-status-list .readiness-item small,
.install-status-list .readiness-item em {
  color: rgba(255, 255, 255, 0.62);
}

.install-status-list .readiness-item strong {
  color: #fff;
}

.install-status-list .readiness-item strong {
  overflow: visible;
  line-height: 1.05;
  text-overflow: clip;
  white-space: normal;
}

.data-panel {
  order: -8;
}

.phone-panel {
  order: -7;
}

.app-root.screen-settings .start-hub,
.app-root.screen-settings .capture-panel,
.app-root.screen-settings .screen-tabs {
  display: none;
}

.reminder-center-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 520px) {
  .health-row {
    grid-template-columns: 32px minmax(0, 1fr);
    border-radius: 15px;
  }

  .health-row > span {
    width: 32px;
    height: 32px;
  }

  .health-row small {
    white-space: normal;
  }

  .reminder-center-actions {
    grid-template-columns: 1fr;
  }

  .app-readiness {
    grid-template-columns: 1fr;
  }

  .install-status-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .readiness-item {
    min-height: 68px;
  }

  .install-status-list .readiness-item {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 58px;
    gap: 7px;
    padding: 8px;
    border-radius: 15px;
  }

  .install-status-list .readiness-item > span {
    width: 30px;
    height: 30px;
    border-radius: 11px;
  }

  .install-status-list .readiness-item em {
    display: none;
  }

  .install-status-list .readiness-item small {
    font-size: 9px;
  }

  .install-status-list .readiness-item strong {
    font-size: 11px;
  }
}

/* Room cockpit: a compact live surface for the current writing room. */
.room-cockpit {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  padding: 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 10% 18%, rgba(255, 43, 68, 0.46), transparent 33%),
    radial-gradient(circle at 76% 10%, rgba(255, 255, 255, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(15, 17, 18, 0.96), rgba(5, 12, 10, 0.94) 52%, rgba(54, 9, 15, 0.94));
  box-shadow:
    0 26px 70px rgba(7, 9, 10, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -18px 42px rgba(255, 255, 255, 0.04);
}

.room-cockpit::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 23px;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.16), transparent 31%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px);
  opacity: 0.62;
  mix-blend-mode: screen;
}

.room-cockpit > * {
  position: relative;
  z-index: 1;
}

.room-cockpit-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.room-cockpit-main span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 950;
}

.room-cockpit-main strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-cockpit-main small {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-cockpit-stats {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 7px;
}

.room-cockpit-stats button,
.room-cockpit-action,
.room-cockpit-subroom {
  position: relative;
  overflow: hidden;
  transition:
    transform 520ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 520ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 360ms ease,
    background 420ms ease,
    color 300ms ease;
}

.room-cockpit-stats button::before,
.room-cockpit-action::before,
.room-cockpit-subroom::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  opacity: 0;
  transform: translateX(48%);
  transition: opacity 420ms ease, transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.room-cockpit-stats button {
  min-height: 56px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 950;
}

.room-cockpit-stats button.active {
  color: #111315;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.room-cockpit-stats span {
  color: currentColor;
  font-size: 21px;
  font-weight: 950;
  line-height: 1;
}

.room-cockpit-actions {
  display: flex;
  gap: 7px;
}

.room-cockpit-action,
.room-cockpit-subroom {
  min-height: 56px;
  padding: 0 16px;
  border-radius: 18px;
  font-weight: 950;
}

.room-cockpit-action {
  min-width: 96px;
  color: #fff;
  background: linear-gradient(135deg, #ff304a, #a70f22);
  box-shadow: 0 18px 40px rgba(255, 48, 74, 0.32), var(--inner);
}

.room-cockpit-subroom {
  min-width: 82px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
}

.room-cockpit-stats button:hover,
.room-cockpit-action:hover,
.room-cockpit-subroom:hover {
  transform: translateY(-3px) scale(1.012);
}

.room-cockpit-stats button:hover::before,
.room-cockpit-action:hover::before,
.room-cockpit-subroom:hover::before {
  opacity: 1;
  transform: translateX(-48%);
}

.room-cockpit-action:hover {
  box-shadow: 0 24px 54px rgba(255, 48, 74, 0.4), var(--inner);
}

.room-cockpit-subroom:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
}

.room-cockpit-stats button:active,
.room-cockpit-action:active,
.room-cockpit-subroom:active {
  transform: translateY(-1px) scale(0.982);
}

@keyframes voice-recording-pulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 16px 34px rgba(255, 48, 74, 0.26), var(--inner);
  }
  50% {
    transform: translateY(-1px) scale(1.012);
    box-shadow: 0 20px 44px rgba(255, 48, 74, 0.42), var(--inner);
  }
}

/* Task cockpit: one calm command surface above the task list. */
.task-cockpit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  background:
    radial-gradient(circle at 9% 18%, rgba(255, 48, 74, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 244, 247, 0.82));
  box-shadow:
    0 22px 60px rgba(17, 19, 21, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.task-cockpit-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.task-cockpit-main span {
  color: var(--red);
  font-size: 11px;
  font-weight: 950;
}

.task-cockpit-main strong {
  min-width: 0;
  overflow: hidden;
  color: #111315;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-cockpit-main small {
  min-width: 0;
  overflow: hidden;
  color: #737983;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-cockpit-stats {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 7px;
}

.task-cockpit-stats button,
.task-cockpit-action {
  position: relative;
  overflow: hidden;
  transition:
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 460ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 300ms ease,
    background 360ms ease;
}

.task-cockpit-stats button {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 8px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 18px;
  color: #737983;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
}

.task-cockpit-stats span {
  color: #111315;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}

.task-cockpit-action {
  min-width: 92px;
  min-height: 58px;
  padding: 0 18px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #940d20);
  box-shadow: 0 18px 40px rgba(255, 48, 74, 0.3), var(--inner);
  font-weight: 950;
}

.task-cockpit-stats button:hover,
.task-cockpit-action:hover {
  transform: translateY(-2px) scale(1.012);
}

.task-cockpit-stats button:hover {
  border-color: rgba(255, 48, 74, 0.22);
  background: rgba(255, 255, 255, 0.94);
}

.task-cockpit-action:hover {
  box-shadow: 0 22px 48px rgba(255, 48, 74, 0.36), var(--inner);
}

.task-cockpit-stats button:active,
.task-cockpit-action:active {
  transform: translateY(0) scale(0.985);
}

@media (max-width: 1040px) {
  .room-cockpit {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .room-cockpit-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .room-cockpit-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 920px) {
  .task-cockpit {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .task-cockpit-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .task-cockpit-action {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .capture-voice-row {
    display: grid;
  }

  .entry-voices,
  .voice-preview {
    margin-inline: 0;
  }

  .voice-note {
    max-width: none;
  }

  .room-cockpit {
    gap: 9px;
    padding: 12px;
    border-radius: 21px;
  }

  .room-cockpit-main strong {
    font-size: 18px;
    white-space: normal;
  }

  .room-cockpit-main small {
    white-space: normal;
  }

  .room-cockpit-stats button {
    min-height: 50px;
    border-radius: 15px;
    font-size: 10px;
  }

  .room-cockpit-stats span {
    font-size: 18px;
  }

  .room-cockpit-action,
  .room-cockpit-subroom {
    min-height: 48px;
    border-radius: 15px;
  }

  .task-cockpit {
    gap: 9px;
    padding: 12px;
    border-radius: 21px;
  }

  .task-cockpit-main strong {
    font-size: 18px;
    white-space: normal;
  }

  .task-cockpit-main small {
    white-space: normal;
  }

  .task-cockpit-stats button {
    min-height: 50px;
    border-radius: 15px;
    font-size: 10px;
  }

  .task-cockpit-stats span {
    font-size: 18px;
  }

  .task-cockpit-action {
    min-height: 48px;
    border-radius: 15px;
  }
}

/* Nova v36: standing orders and agent rooms. */
.rail-agent-zone {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.rail-agent-list {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.agent-dot {
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 48, 74, 0.24), transparent 34%),
    rgba(255, 255, 255, 0.07);
}

.screen-tabs {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.screen-tabs::-webkit-scrollbar {
  display: none;
}

.screen-tabs button {
  flex: 0 0 auto;
}

.standing-summary {
  display: grid;
  grid-template-columns: 0.55fr minmax(0, 1.35fr) 0.8fr;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 48, 74, 0.24), transparent 35%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
    rgba(14, 12, 18, 0.72);
}

.standing-summary div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
}

.standing-summary span,
.standing-summary strong {
  display: block;
  min-width: 0;
}

.standing-summary span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 950;
}

.standing-summary strong {
  margin-top: 3px;
  overflow: hidden;
  color: #fff;
  font-size: clamp(18px, 2.8vw, 30px);
  font-weight: 950;
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.standing-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  gap: 14px;
}

.standing-order-form,
.standing-order-list {
  display: grid;
  gap: 10px;
}

.standing-order-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.standing-order-form input,
.standing-order-form select,
.standing-order-form textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
}

.standing-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, max-content);
  align-items: start;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.038)),
    rgba(14, 12, 18, 0.72);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2), var(--inner);
}

.standing-card > div:first-child {
  min-width: 0;
}

.standing-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: var(--red);
}

.standing-card.due {
  border-color: rgba(255, 48, 74, 0.36);
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 48, 74, 0.18), transparent 34%),
    rgba(14, 12, 18, 0.78);
}

.standing-card.inactive {
  opacity: 0.6;
}

.standing-card span,
.standing-card strong,
.standing-card small,
.standing-card p {
  display: block;
  margin: 0;
}

.standing-card span {
  color: var(--red);
  font-size: 11px;
  font-weight: 950;
}

.standing-card strong {
  margin-top: 3px;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.standing-card small,
.standing-card p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.standing-date {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 96px;
}

.standing-date em,
.standing-date b {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 12px;
  font-style: normal;
  font-weight: 950;
}

.standing-date em {
  color: #111315;
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

.standing-date b {
  color: #fff;
  background: rgba(255, 48, 74, 0.18);
  font-size: 13px;
}

.standing-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.standing-actions .soft-button,
.standing-actions .text-button {
  min-height: 34px;
  border-radius: 12px;
  font-size: 12px;
}

.danger-text {
  color: #ff7b87;
}

.agent-files-panel {
  order: -7;
}

.agent-file-list {
  display: grid;
  gap: 8px;
}

.agent-file-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--room-color) 18%, transparent), transparent 34%),
    rgba(255, 255, 255, 0.07);
}

.agent-file-row > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #111315);
}

.agent-file-row strong,
.agent-file-row small {
  display: block;
  min-width: 0;
}

.agent-file-row strong {
  color: #fff;
  font-size: 13px;
  font-weight: 950;
}

.agent-file-row small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-file-row a {
  text-decoration: none;
}

@media (max-width: 920px) {
  .standing-layout,
  .standing-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .bottom-nav {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 560px) {
  .standing-card {
    grid-template-columns: 1fr;
  }

  .standing-date {
    justify-items: start;
    min-width: 0;
  }

  .agent-file-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .agent-file-row a {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* Nova desktop app shell: Windows-first frame, ready for native desktop packaging. */
@media (min-width: 861px) {
  body {
    display: block;
    min-height: 100dvh;
    padding: 0;
    overflow: hidden;
    background:
      radial-gradient(circle at 14% 6%, rgba(243, 35, 53, 0.14), transparent 26%),
      radial-gradient(circle at 86% 14%, rgba(11, 14, 16, 0.12), transparent 32%),
      linear-gradient(180deg, #f3f4f7 0%, #e8ebef 48%, #d9dde3 100%);
  }

  .app-root {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 318px;
    grid-template-rows: 44px minmax(0, 1fr);
    gap: 0;
    width: 100%;
    max-width: 100%;
    min-height: 100dvh;
    height: 100dvh;
    margin: 0;
    padding-top: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 248, 250, 0.98));
    box-shadow: none;
  }

  .app-root::before,
  .app-root::after {
    display: none !important;
  }

  .desktop-titlebar {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    grid-template-columns: minmax(168px, max-content) minmax(0, 1fr) auto;
    align-items: center;
    min-width: 0;
    height: 44px;
    direction: ltr;
    color: #111315;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 241, 245, 0.92));
    border-bottom: 1px solid rgba(17, 19, 21, 0.1);
    user-select: none;
    -webkit-app-region: drag;
    z-index: 5;
  }

  .desktop-titlebar-brand {
    display: inline-grid;
    grid-template-columns: 26px max-content;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding-inline: 13px 18px;
    direction: ltr;
    -webkit-app-region: no-drag;
  }

  .desktop-titlebar-brand img {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    box-shadow: 0 6px 14px rgba(9, 10, 12, 0.15);
  }

  .desktop-titlebar-brand span {
    display: grid;
    gap: 0;
    direction: rtl;
    text-align: start;
  }

  .desktop-titlebar-brand strong {
    color: #111315;
    font-size: 13.5px;
    font-weight: 950;
    line-height: 1;
  }

  .desktop-titlebar-brand small {
    display: none;
  }

  .desktop-titlebar-drag {
    display: grid;
    place-items: center;
    min-width: 0;
    height: 100%;
    pointer-events: none;
  }

  .desktop-titlebar-drag span {
    width: min(420px, 58%);
    height: 4px;
    border-radius: 999px;
    background:
      linear-gradient(90deg, transparent, rgba(17, 19, 21, 0.12), transparent);
  }

  .desktop-window-controls {
    display: grid;
    grid-template-columns: repeat(3, 46px);
    height: 100%;
    direction: ltr;
    -webkit-app-region: no-drag;
  }

  .window-control {
    position: relative;
    display: grid;
    place-items: center;
    width: 46px;
    height: 44px;
    color: #1f2328;
    background: transparent;
    transition: background 0.18s ease, color 0.18s ease, transform 0.22s ease;
  }

  .window-control:hover {
    background: rgba(17, 19, 21, 0.07);
  }

  .window-control.is-pressing {
    transform: scale(0.94);
  }

  .window-control.close:hover {
    color: #fff;
    background: #e81123;
  }

  .window-control span {
    position: relative;
    width: 14px;
    height: 14px;
    display: block;
  }

  .window-control.minimize span::before {
    content: "";
    position: absolute;
    right: 1px;
    left: 1px;
    bottom: 3px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .window-control.maximize span::before {
    content: "";
    position: absolute;
    inset: 2px;
    border: 2px solid currentColor;
    border-radius: 2px;
  }

  .window-control.close span::before,
  .window-control.close span::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 1px;
    width: 13px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .window-control.close span::before {
    transform: rotate(45deg);
  }

  .window-control.close span::after {
    transform: rotate(-45deg);
  }

  .room-rail,
  .workspace,
  .side-dock {
    grid-row: 2;
  }

  .room-rail {
    top: 0;
    height: 100%;
    min-height: 0;
    border-radius: 0;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
  }

  .workspace {
    min-height: 0;
    border-radius: 0;
    border-top: 0;
    border-bottom: 0;
    box-shadow: none;
    overflow: auto;
  }

  .side-dock {
    min-height: 0;
    border-radius: 0;
    border-top: 0;
    border-bottom: 0;
    box-shadow: none;
    overflow: auto;
  }

  .app-root.is-window-maximized {
    width: 100%;
    min-height: 100dvh;
    border-radius: 0;
  }

  .app-root.is-window-minimized {
    width: min(520px, calc(100vw - 24px));
    min-height: 46px;
    height: 46px;
    grid-template-columns: 1fr;
    grid-template-rows: 46px;
    border-radius: 10px;
  }

  .app-root.is-window-minimized .desktop-titlebar {
    grid-column: 1;
  }

  .app-root.is-window-minimized .desktop-titlebar-drag span {
    width: 130px;
  }

  .app-root.is-window-minimized .room-rail,
  .app-root.is-window-minimized .workspace,
  .app-root.is-window-minimized .side-dock {
    display: none !important;
  }
}

@media (max-width: 860px) {
  .desktop-titlebar {
    display: none !important;
  }

  body {
    display: block;
    padding: 0;
    background:
      radial-gradient(circle at 8% 0%, rgba(243, 35, 53, 0.15), transparent 34%),
      linear-gradient(180deg, #fff7f8 0%, #f5f6f8 42%, #eceff3 100%);
  }

  .app-root {
    min-height: 100dvh;
    background: transparent;
  }
}

/* Final composer polish: no browser-default black focus ring in app or PWA shells. */
.capture-form textarea,
.app-root:not(.screen-inbox) .capture-form textarea {
  outline: 0 !important;
  border-color: rgba(17, 19, 21, 0.075);
  background-clip: padding-box;
}

.capture-form textarea:focus,
.capture-form textarea:focus-visible,
.app-root:not(.screen-inbox) .capture-form textarea:focus,
.app-root:not(.screen-inbox) .capture-form textarea:focus-visible {
  outline: 0 !important;
  border-color: rgba(243, 35, 53, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 4px rgba(243, 35, 53, 0.07) !important;
}

@media (min-width: 861px) {
  .app-root:not(.screen-inbox) .capture-panel {
    align-self: start;
    min-height: 158px;
    height: auto;
  }

  .app-root:not(.screen-inbox) .capture-panel:not(.details-open) .capture-form {
    grid-template-rows: 42px auto;
  }

  .app-root:not(.screen-inbox) .capture-panel:not(.details-open) .capture-controls {
    display: grid;
    grid-template-columns:
      minmax(170px, 1.05fr)
      minmax(118px, 0.72fr)
      minmax(118px, 0.72fr)
      minmax(128px, 0.78fr)
      minmax(138px, 0.86fr)
      minmax(88px, 0.5fr);
    align-items: stretch;
    gap: 6px;
    min-height: 34px;
    height: auto;
    grid-auto-rows: 34px;
  }

  .app-root:not(.screen-inbox) .capture-panel:not(.details-open) .capture-controls > * {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
}

/* Final Nova errands overrides */
@media (max-width: 860px) {
  .bottom-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 4px;
  }

  .bottom-nav button {
    min-width: 0;
    padding-inline: 4px;
    font-size: 10px;
  }
}

@media (max-width: 720px) {
  .app-root.screen-settings .workspace {
    padding-bottom: calc(128px + env(safe-area-inset-bottom));
    scroll-padding-bottom: calc(128px + env(safe-area-inset-bottom));
  }

  .cloud-sync-panel .cloud-sync-form {
    padding-bottom: 78px;
  }
}

/* Nova v51: unified motion and text safety */
:root {
  --nova-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nova-ease-press: cubic-bezier(0.2, 1.35, 0.22, 1);
  --nova-hover-shadow: 0 16px 34px rgba(17, 19, 21, 0.1);
  --nova-red-shadow: 0 18px 42px rgba(243, 35, 53, 0.18);
}

button:not(:disabled),
.primary-button,
.soft-button,
.danger-button,
.tiny-button,
.text-button,
.icon-button,
.rail-action,
.room-dot,
.work-action,
.dock-task,
.entry-card,
.life-card,
.standing-card,
.manager-row,
.readiness-item,
.health-row {
  transform-origin: 50% 50%;
  transition:
    transform 360ms var(--nova-ease),
    box-shadow 380ms var(--nova-ease),
    border-color 300ms ease,
    background 340ms ease,
    color 240ms ease,
    filter 320ms ease !important;
}

@media (hover: hover) and (pointer: fine) {
  button:not(:disabled):hover,
  .entry-card:hover,
  .life-card:hover,
  .standing-card:hover,
  .manager-row:hover,
  .readiness-item:hover,
  .health-row:hover {
    transform: translateY(-2px) scale(1.008);
  }

  .primary-button:hover,
  .danger-button:hover,
  .rail-action:hover,
  .room-dot:hover,
  .work-action:hover {
    box-shadow: var(--nova-red-shadow);
  }

  .soft-button:hover,
  .tiny-button:hover,
  .text-button:hover,
  .icon-button:hover,
  .entry-card:hover,
  .life-card:hover,
  .standing-card:hover,
  .readiness-item:hover,
  .health-row:hover {
    box-shadow: var(--nova-hover-shadow);
  }
}

button:not(:disabled):active,
button.is-pressing,
.rail-action.is-pressing,
.room-dot.is-pressing,
.work-action.is-pressing,
.dock-task.is-pressing {
  animation: nova-premium-press 860ms var(--nova-ease-press) both !important;
}

.screen.active {
  animation: nova-screen-enter 560ms var(--nova-ease) both !important;
}

.screen.active > :is(.mini-panel, .main-panel, .rooms-layout, .tasks-layout, .settings-grid, .life-layout, .standing-layout, .today-layout, .entry-stream, .start-hub) {
  animation: nova-panel-enter 620ms var(--nova-ease) both;
}

.dialog[open],
.image-dialog[open],
.confirm-dialog[open] {
  animation: nova-dialog-enter 520ms var(--nova-ease) both !important;
}

.segmented,
.screen-tabs,
.pill-row,
.status-pills,
.subroom-picker {
  align-items: center;
  overflow: visible !important;
}

.segmented button,
.screen-tabs button,
.pill-row button,
.status-pills button,
.subroom-picker button,
.bottom-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 34px;
  line-height: 1.15;
  white-space: nowrap;
}

.capture-controls .segmented button {
  min-height: 36px;
  padding-block: 0;
}

.readiness-item strong,
.readiness-item em,
.health-row strong,
.health-row small,
.entry-card strong,
.entry-card p,
.life-card strong,
.life-card small,
.standing-card strong,
.standing-card small,
.manager-row strong,
.manager-row small,
.dock-task b,
.work-action b {
  overflow-wrap: anywhere;
  text-overflow: clip;
}

.readiness-item strong,
.readiness-item em,
.health-row small,
.standing-card small,
.life-card small,
.manager-row small {
  white-space: normal !important;
}

.readiness-item {
  min-height: 84px;
}

.readiness-item strong {
  line-height: 1.12;
}

.readiness-item em {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@keyframes nova-premium-press {
  0% {
    transform: translateY(0) scale(1);
    filter: brightness(1) saturate(1);
  }
  28% {
    transform: translateY(2px) scale(0.972);
    filter: brightness(0.97) saturate(1.06);
  }
  58% {
    transform: translateY(-2px) scale(1.018);
    filter: brightness(1.04) saturate(1.08);
  }
  82% {
    transform: translateY(0) scale(0.996);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1) saturate(1);
  }
}

@keyframes nova-screen-enter {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.992);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes nova-panel-enter {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.986);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes nova-dialog-enter {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
    filter: blur(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
