
:root {
  --bg: #eff3f8;
  --bg-secondary: #f7f9fc;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --surface-muted: #f4f7fb;
  --line: rgba(35, 53, 83, 0.12);
  --text: #152033;
  --text-soft: #4f5f79;
  --text-muted: #7f8da6;
  --blue: #2f6fec;
  --blue-dark: #2358bf;
  --blue-soft: rgba(47, 111, 236, 0.12);
  --green: #27b36a;
  --orange: #f28c28;
  --purple: #7b5cff;
  --break: #f8b84d;
  --meeting: #5b8dff;
  --danger: #ef6d6d;
  --shadow: 0 16px 44px rgba(38, 61, 99, 0.14);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --content-max: 1160px;
  --nav-width: min(100%, 780px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: radial-gradient(circle at top, #f8fbff 0%, var(--bg) 50%, #ebf0f7 100%);
}

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

img,
canvas {
  max-width: 100%;
  display: block;
}

.app-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1000px 1000px at 10% 0%, rgba(91, 141, 255, 0.16), transparent 60%),
    radial-gradient(900px 900px at 100% 10%, rgba(123, 92, 255, 0.1), transparent 55%),
    linear-gradient(180deg, #f7f9fd 0%, #eef2f8 100%);
}

.glass-orb {
  position: fixed;
  filter: blur(24px);
  opacity: 0.35;
  z-index: -1;
  border-radius: 999px;
}

.glass-orb.one {
  width: 220px;
  height: 220px;
  background: rgba(47, 111, 236, 0.35);
  top: 7%;
  left: -80px;
}

.glass-orb.two {
  width: 260px;
  height: 260px;
  background: rgba(123, 92, 255, 0.26);
  bottom: 10%;
  right: -100px;
}

.shell {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: calc(16px + var(--safe-top)) 14px calc(110px + var(--safe-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  margin: 0 -14px 14px;
  padding: 12px 14px 14px;
  backdrop-filter: saturate(140%) blur(14px);
  background: linear-gradient(180deg, rgba(247, 250, 255, 0.92), rgba(247, 250, 255, 0.74));
  border-bottom: 1px solid rgba(26, 41, 69, 0.06);
}

.topbar-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  width: 46px;
  height: 46px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  background: linear-gradient(180deg, #4b86ff 0%, #2f6fec 100%);
  box-shadow: 0 10px 24px rgba(47, 111, 236, 0.35);
  flex-shrink: 0;
}

.topbar-copy {
  min-width: 0;
  flex: 1;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--text-muted);
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

.page-title {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  line-height: 1.05;
}

.page-subtitle {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.96rem;
}

.icon-button,
.ghost-button,
.primary-button,
.secondary-button,
.tab-button,
.quick-action,
.segment-adjust,
.small-chip,
.status-badge,
.project-chip {
  border: none;
  border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.icon-button:active,
.ghost-button:active,
.primary-button:active,
.secondary-button:active,
.tab-button:active,
.quick-action:active,
.segment-adjust:active,
.project-chip:active,
.small-chip:active,
.nav-link:active {
  transform: scale(0.98);
}

.icon-button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 20px rgba(33, 53, 86, 0.12);
  border: 1px solid rgba(52, 75, 113, 0.1);
  font-size: 1.1rem;
  flex-shrink: 0;
}

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

.page-grid {
  display: grid;
  gap: 16px;
}

.content-stack,
.aside-stack {
  display: grid;
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(45, 68, 105, 0.09);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: clip;
  backdrop-filter: blur(10px);
}

.card-header,
.card-body,
.card-footer {
  padding: 18px;
}

.card-header {
  padding-bottom: 0;
}

.card-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
}

.card-subtitle {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 255, 0.86));
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 140px;
  background:
    radial-gradient(circle at 10% 10%, rgba(91, 141, 255, 0.18), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(123, 92, 255, 0.1), transparent 35%);
  pointer-events: none;
}

.hero-card .card-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.project-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(248, 250, 255, 0.96);
  border: 1px solid rgba(40, 62, 98, 0.08);
  color: var(--text);
  font-weight: 600;
  max-width: 100%;
}

.project-dot,
.segment-dot,
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.timer-block {
  display: grid;
  gap: 8px;
}

.timer-label {
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.98rem;
}

.timer-value {
  margin: 0;
  font-size: clamp(2.8rem, 14vw, 4.4rem);
  line-height: 0.92;
  font-weight: 800;
  letter-spacing: -0.05em;
}

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

.metric {
  padding: 14px;
  border-radius: 20px;
  background: var(--surface-muted);
  border: 1px solid rgba(43, 67, 106, 0.08);
}

.metric-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.metric-value.strong {
  color: var(--blue);
}

.goal-card {
  padding: 14px 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(47, 111, 236, 0.08), rgba(47, 111, 236, 0.02));
  border: 1px solid rgba(47, 111, 236, 0.13);
}

.goal-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.goal-title {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text-soft);
}

.goal-value {
  font-size: 1rem;
  color: var(--blue);
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(47, 111, 236, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4b86ff 0%, #2f6fec 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22);
  transition: width 0.35s ease;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 52px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.98rem;
}

.primary-button {
  color: white;
  background: linear-gradient(180deg, #4b86ff 0%, #2f6fec 100%);
  box-shadow: 0 14px 28px rgba(47, 111, 236, 0.32);
}

.secondary-button {
  color: var(--blue);
  background: rgba(47, 111, 236, 0.1);
  border: 1px solid rgba(47, 111, 236, 0.18);
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(48, 72, 113, 0.12);
}

.primary-button.full,
.secondary-button.full,
.ghost-button.full {
  width: 100%;
}

.small-chip,
.project-chip,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(52, 75, 113, 0.1);
  color: var(--text);
  font-weight: 600;
  gap: 8px;
}

.project-chip {
  background: rgba(255, 255, 255, 0.92);
}

.project-chip.active {
  color: var(--blue);
  border-color: rgba(47, 111, 236, 0.3);
  background: rgba(47, 111, 236, 0.12);
  box-shadow: 0 10px 24px rgba(47, 111, 236, 0.12);
}

.status-badge.success {
  color: var(--green);
  background: rgba(39, 179, 106, 0.12);
  border-color: rgba(39, 179, 106, 0.2);
}

.status-badge.warning {
  color: var(--orange);
  background: rgba(242, 140, 40, 0.12);
  border-color: rgba(242, 140, 40, 0.2);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline-list,
.suggestion-list,
.confirm-list,
.project-list,
.week-bars,
.breakdown-list,
.preference-list {
  display: grid;
  gap: 12px;
}

.timeline-item,
.suggestion-item,
.confirm-item,
.project-row,
.preference-row,
.breakdown-item,
.week-bar {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(48, 72, 113, 0.09);
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(30, 46, 76, 0.08);
}

.timeline-item {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.timeline-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
}

.timeline-time {
  min-width: 78px;
  padding: 10px 12px;
  border-radius: 18px;
  background: var(--surface-muted);
  text-align: center;
  line-height: 1.1;
}

.timeline-time strong {
  display: block;
  font-size: 0.96rem;
}

.timeline-time span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.timeline-copy {
  display: grid;
  gap: 6px;
}

.timeline-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.timeline-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.timeline-subtitle {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.45;
  font-size: 0.94rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.segment-adjust {
  min-height: 38px;
  padding: 0 14px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface-muted);
  border: 1px solid rgba(49, 74, 116, 0.09);
}

.segment-adjust.primary {
  color: var(--blue);
  background: rgba(47, 111, 236, 0.12);
  border-color: rgba(47, 111, 236, 0.18);
}

.timeline-inline {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 2px;
}

.subtle {
  color: var(--text-muted);
}

.suggestion-item,
.confirm-item,
.project-row,
.preference-row,
.breakdown-item,
.week-bar {
  padding: 16px;
}

.suggestion-head,
.breakdown-head,
.project-top,
.preference-head,
.confirm-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.suggestion-title,
.breakdown-title,
.project-name,
.preference-title,
.confirm-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.suggestion-text,
.breakdown-meta,
.project-meta,
.preference-meta,
.confirm-text {
  margin: 6px 0 0;
  color: var(--text-soft);
  line-height: 1.45;
  font-size: 0.94rem;
}

.inline-metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.inline-metric {
  min-height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-muted);
  border: 1px solid rgba(49, 74, 116, 0.08);
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 600;
}

.side-summary {
  display: grid;
  gap: 16px;
}

.side-summary .card-body {
  display: grid;
  gap: 14px;
}

.key-stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(49, 74, 116, 0.08);
}

.key-stat:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.key-stat:first-child {
  padding-top: 0;
}

.key-stat-label {
  color: var(--text-soft);
}

.key-stat-value {
  font-weight: 800;
  font-size: 1.04rem;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-header h2,
.section-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.section-header p {
  margin: 5px 0 0;
  color: var(--text-soft);
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-chip {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(52, 75, 113, 0.1);
  font-weight: 700;
  color: var(--text-soft);
  cursor: pointer;
}

.filter-chip.active {
  color: var(--blue);
  background: rgba(47, 111, 236, 0.12);
  border-color: rgba(47, 111, 236, 0.2);
}

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

.summary-tile {
  padding: 14px;
  border-radius: 20px;
  background: var(--surface-muted);
  border: 1px solid rgba(49, 74, 116, 0.09);
}

.summary-tile strong {
  display: block;
  font-size: 1.2rem;
  margin-top: 6px;
}

.check-toggle {
  appearance: none;
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: rgba(127, 141, 166, 0.36);
  position: relative;
  transition: background 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.check-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: white;
  box-shadow: 0 6px 14px rgba(34, 53, 86, 0.18);
  transition: transform 0.22s ease;
}

.check-toggle:checked {
  background: rgba(47, 111, 236, 0.36);
}

.check-toggle:checked::after {
  transform: translateX(20px);
}

.confirm-item {
  display: grid;
  gap: 12px;
}

.confirm-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.check-circle {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: white;
}

.confirm-value {
  font-weight: 800;
  font-size: 1.06rem;
}

.inline-note {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(47, 111, 236, 0.06);
  border: 1px solid rgba(47, 111, 236, 0.14);
  color: var(--text-soft);
  line-height: 1.55;
}

.tab-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tab-button {
  min-height: 44px;
  padding: 0 16px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(52, 75, 113, 0.1);
  color: var(--text-soft);
  font-weight: 700;
}

.tab-button.active {
  color: var(--blue);
  background: rgba(47, 111, 236, 0.12);
  border-color: rgba(47, 111, 236, 0.2);
}

.metrics-grid-wide {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card {
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(247,250,255,0.82));
  border: 1px solid rgba(52, 75, 113, 0.09);
  box-shadow: 0 12px 26px rgba(30, 46, 76, 0.08);
}

.stat-card .stat-label {
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-card .stat-caption {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.week-bar {
  display: grid;
  gap: 10px;
}

.week-bar-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.week-bar-name {
  font-weight: 700;
}

.week-bar-value {
  color: var(--text-soft);
  font-weight: 700;
}

.stacked-bar {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: rgba(127, 141, 166, 0.12);
}

.stacked-bar span {
  height: 100%;
}

.breakdown-item {
  display: grid;
  gap: 10px;
}

.breakdown-meta {
  margin: 0;
}

.breakdown-progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(127, 141, 166, 0.12);
  overflow: hidden;
}

.breakdown-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.chart-wrap {
  padding: 18px;
  display: grid;
  gap: 18px;
}

.canvas-card {
  display: grid;
  place-items: center;
  min-height: 280px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(248, 250, 255, 0.92), rgba(244, 247, 252, 0.82));
  border: 1px solid rgba(49, 74, 116, 0.08);
}

.legend {
  display: grid;
  gap: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
}

.legend-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preference-row {
  display: grid;
  gap: 14px;
}

.preference-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.info-chip {
  min-height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid rgba(49, 74, 116, 0.08);
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 600;
}

.kpi-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.kpi-pill {
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(49, 74, 116, 0.08);
  font-weight: 700;
  color: var(--text-soft);
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state {
  padding: 22px;
  border-radius: 24px;
  text-align: center;
  background: rgba(255,255,255,0.86);
  border: 1px dashed rgba(49, 74, 116, 0.16);
  color: var(--text-soft);
}

.bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--safe-bottom));
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 28px;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 18px 38px rgba(30, 46, 76, 0.18);
  border: 1px solid rgba(49, 74, 116, 0.08);
  backdrop-filter: blur(16px);
}

.nav-link {
  min-height: 62px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-link::before {
  font-size: 1.18rem;
  line-height: 1;
}

.nav-link[data-nav="dashboard"]::before { content: "⌂"; }
.nav-link[data-nav="timeline"]::before { content: "◷"; }
.nav-link[data-nav="confirm"]::before { content: "✓"; }
.nav-link[data-nav="reports"]::before { content: "◔"; }
.nav-link[data-nav="settings"]::before { content: "⚙"; }

.nav-link.active {
  color: var(--blue);
  background: rgba(47, 111, 236, 0.12);
}

.note-card {
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(123, 92, 255, 0.1), rgba(123, 92, 255, 0.05));
  border: 1px solid rgba(123, 92, 255, 0.16);
}

.note-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.note-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(94px + var(--safe-bottom));
  transform: translate(-50%, 24px);
  min-width: min(92vw, 380px);
  max-width: min(92vw, 420px);
  padding: 14px 18px;
  background: rgba(21, 32, 51, 0.92);
  color: white;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(12, 17, 28, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.24s ease, opacity 0.24s ease;
  z-index: 80;
  text-align: center;
  font-weight: 700;
}

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

.divider {
  height: 1px;
  background: rgba(49, 74, 116, 0.08);
  margin: 4px 0;
}

.hide-desktop {
  display: inline-flex;
}

.desktop-only {
  display: none;
}

@media (min-width: 520px) {
  .shell {
    padding-inline: 18px;
  }

  .topbar {
    margin-inline: -18px;
    padding-inline: 18px;
  }
}

@media (min-width: 768px) {
  .shell {
    padding: calc(24px + var(--safe-top)) 24px calc(120px + var(--safe-bottom));
  }

  .topbar {
    margin: 0 -24px 18px;
    padding: 14px 24px 16px;
  }

  .page-grid.dashboard-grid,
  .page-grid.timeline-grid,
  .page-grid.confirm-grid,
  .page-grid.reports-grid,
  .page-grid.settings-grid {
    grid-template-columns: minmax(0, 1.25fr) 330px;
    align-items: start;
  }

  .metrics-grid-wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .timeline-item {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .timeline-item > * {
    min-width: 0;
  }

  .timeline-main {
    align-items: center;
  }

  .timeline-controls {
    justify-content: flex-end;
  }

  .bottom-nav {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(calc(100% - 32px), 760px);
  }

  .toast {
    bottom: calc(112px + var(--safe-bottom));
  }

  .desktop-only {
    display: inline-flex;
  }

  .hide-desktop {
    display: none;
  }
}

@media (min-width: 980px) {
  .page-grid.dashboard-grid {
    grid-template-columns: minmax(0, 1.3fr) 360px;
  }

  .page-grid.timeline-grid,
  .page-grid.confirm-grid,
  .page-grid.reports-grid,
  .page-grid.settings-grid {
    grid-template-columns: minmax(0, 1.36fr) 360px;
  }

  .content-stack {
    gap: 18px;
  }

  .aside-stack {
    position: sticky;
    top: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}
