:root {
  color-scheme: light;
  --bg: #faf7f1;
  --bg-soft: #f3eee6;
  --ink: #171512;
  --muted: #746b60;
  --faint: #b8afa4;
  --card: #ffffff;
  --orange: #ef533d;
  --orange-2: #ff7a1a;
  --green: #79a875;
  --blue: #82aabd;
  --rose: #d99085;
  --yellow: #e2b84d;
  --line: rgba(44, 32, 20, 0.07);
  --shadow: 0 18px 42px rgba(40, 31, 22, 0.075);
  --soft-shadow: 0 10px 24px rgba(40, 31, 22, 0.055);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --nav-h: 82px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0;
  background:
    radial-gradient(circle at 50% -160px, rgba(239,83,61,.055), transparent 360px),
    linear-gradient(180deg, #fbf8f2 0%, #f1e7d8 100%);
}
body.dragging-cluster {
  overflow: hidden;
  overscroll-behavior: none;
  user-select: none;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav svg,
.today svg { stroke-width: 1.8; }

.app-root { min-height: 100vh; }
.shell {
  width: min(1120px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 22px calc(var(--nav-h) + max(20px, env(safe-area-inset-bottom)));
}
.focus-shell { padding-bottom: max(22px, env(safe-area-inset-bottom)); }

.app-header {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.brand-mini {
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--ink);
}

.brand-dot {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--orange);
  font-weight: 950;
  box-shadow: var(--soft-shadow);
}

.brand-mini strong,
.brand-mini small {
  display: block;
  line-height: 1.05;
}

.brand-mini strong {
  font-size: .9rem;
  font-weight: 950;
}

.brand-mini small {
  color: var(--muted);
  font-size: .74rem;
  margin-top: 2px;
}

.sync-mini {
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0 8px 8px;
  font-size: .78rem;
  font-weight: 850;
}

.sync-light {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--faint);
}
.sync-light.online { background: var(--green); }
.sync-light.warn { background: var(--yellow); }

.screen {
  display: grid;
  gap: 16px;
}

.setup-screen {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
}

.setup-card,
.primary-surface,
.today-main-card,
.cluster-overview-card,
.today-pool-card,
.focus-card,
.life-card,
.return-card,
.pool-detail,
.soft-panel,
.momentum-card {
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
}

.setup-card {
  width: min(620px, 100%);
  padding: clamp(24px, 6vw, 42px);
  display: grid;
  gap: 18px;
}

.eyebrow {
  color: var(--orange);
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}

h1, h2, h3, p { margin: 0; }
h1 {
  font-size: clamp(2rem, 9vw, 3.2rem);
  line-height: .96;
  font-weight: 950;
}
h2 {
  font-size: clamp(1.35rem, 6vw, 2.15rem);
  line-height: 1.02;
  font-weight: 930;
}
h3 {
  font-size: 1rem;
  font-weight: 930;
}

.quiet {
  color: var(--muted);
  line-height: 1.45;
}

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

.setup-option {
  min-height: 58px;
  border-radius: 22px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8efe4;
  color: var(--muted);
  font-weight: 900;
}
.setup-option.selected { background: var(--ink); color: white; }
.setup-option input { width: 20px; height: 20px; accent-color: var(--orange); }

.setup-times,
.form-grid,
.cluster-list,
.pool-groups,
.task-clean-list,
.history-list,
.switch-sheet,
.pattern-sheet {
  display: grid;
  gap: 12px;
}

.setup-time-row {
  display: grid;
  grid-template-columns: 1fr 86px 86px 44px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 22px;
  background: #fff6ea;
}
.setup-time-row strong { font-size: .9rem; }

.tiny-check,
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-weight: 850;
}
.tiny-check { grid-column: 1 / -1; font-size: .82rem; }
.check-row input, .tiny-check input { width: 20px; height: 20px; accent-color: var(--orange); }

.input, .select, .textarea {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 18px;
  padding: 12px 14px;
  background: #f7efe6;
  color: var(--ink);
  outline: none;
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.4; }
.color-input { padding: 5px; min-width: 44px; }
.field { display: grid; gap: 7px; }
.field span { color: var(--muted); font-size: .82rem; font-weight: 900; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn {
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: #f6eee4;
  font-weight: 950;
  box-shadow: var(--soft-shadow);
}
.btn.primary { color: white; background: var(--orange); }
.btn.dark { color: white; background: var(--ink); }
.btn.plain { background: transparent; box-shadow: none; color: var(--muted); }
.btn.block { width: 100%; }
.small-btn { min-height: 46px; padding-inline: 18px; }
.button-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.today-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.today-hero h1 { font-size: clamp(2.05rem, 9vw, 3.25rem); letter-spacing: 0; }

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

.today-main-card,
.cluster-overview-card {
  padding: 22px;
}

.today-main-card {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.today-pool-card {
  padding: 22px 21px 20px;
  display: grid;
  gap: 14px;
  background: var(--card);
  position: relative;
  overflow: hidden;
}
.today-pool-card h2 {
  font-size: clamp(1.72rem, 7.6vw, 2.35rem);
  line-height: 1.03;
  max-width: 12ch;
}

.date-line {
  justify-self: start;
  width: 100%;
  color: var(--muted);
  font-weight: 900;
}

.pool-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 900;
}
.pool-kicker span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.today-task-preview {
  display: grid;
  gap: 0;
  margin-top: 2px;
}
.today-task-preview button {
  min-height: 34px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-align: left;
  font-weight: 850;
}
.today-task-preview button:hover { background: white; }
.today-task-preview span {
  width: 17px;
  height: 17px;
  border: 1px solid rgba(17,17,17,.2);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--orange);
}
.today-task-preview .done {
  color: var(--faint);
  text-decoration: line-through;
}
.mini-progress {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: #efe6db;
}
.mini-progress span {
  display: block;
  height: 100%;
  background: var(--orange);
}
.btn.light {
  color: var(--ink);
  background: #fff0de;
  box-shadow: none;
}

.cluster-overview-card {
  display: grid;
  grid-template-columns: 98px 1fr;
  gap: 16px;
  align-items: center;
  background: rgba(255,254,253,.78);
  box-shadow: var(--soft-shadow);
}
.cluster-overview-card .day-ring-wrap {
  width: 98px;
}
.cluster-overview-card .ring-center span { font-size: .72rem; }
.cluster-overview-card .ring-center strong,
.cluster-overview-card .ring-center small { display: none; }
.cluster-mini-copy {
  display: grid;
  gap: 5px;
}
.cluster-mini-copy h2 { font-size: clamp(1.7rem, 7vw, 2.4rem); }

.protected-strip {
  min-height: 68px;
  border-radius: 24px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 12px;
  align-items: center;
  background: rgba(255,255,255,.78);
  box-shadow: var(--soft-shadow);
}
.protected-strip > span {
  width: 10px;
  height: 42px;
  border-radius: 999px;
}
.protected-strip strong,
.protected-strip small {
  display: block;
}
.protected-strip small {
  color: var(--muted);
  font-weight: 850;
  margin-top: 2px;
}

.day-ring-wrap {
  position: relative;
  width: min(100%, 270px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.day-ring {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ring-arc {
  pointer-events: stroke;
  cursor: pointer;
  filter: none;
}

.time-needle {
  stroke: var(--ink);
  stroke-width: 3.5;
  stroke-linecap: round;
}

.ring-center {
  position: absolute;
  inset: 34%;
  border-radius: 999px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}
.ring-center span { font-size: 1.65rem; line-height: 1; font-weight: 950; }
.ring-center strong { font-size: .84rem; margin-top: 5px; max-width: 126px; overflow-wrap: anywhere; }
.ring-center small { color: var(--muted); font-weight: 850; }

.focus-card,
.life-card,
.return-card,
.pool-detail,
.soft-panel,
.momentum-card {
  padding: 22px;
}

.focus-card,
.life-card {
  display: grid;
  gap: 14px;
  background:
    linear-gradient(145deg, rgba(17,17,17,.05), rgba(255,255,255,.74)),
    var(--card);
}
.focus-card {
  background:
    linear-gradient(180deg, rgba(244,123,32,.12), transparent 50%),
    var(--card);
}
.task-spotlight {
  font-size: 1.2rem;
  line-height: 1.2;
  font-weight: 850;
}

.today-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 2px 4px;
}

.text-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 950;
  min-height: 42px;
  padding: 0 8px;
}

.faith-anchor {
  justify-self: center;
  padding: 12px 18px;
  border-radius: 999px;
  color: #5f4b10;
  background: rgba(226,184,77,.22);
  box-shadow: 0 8px 18px rgba(93,68,12,.055);
  font-weight: 900;
}

.page-title-row,
.app-title-row,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.page-title-row h1,
.app-title-row h1 {
  font-size: clamp(2rem, 9vw, 2.75rem);
  line-height: 1;
}
.app-title-row {
  margin-top: 6px;
  align-items: center;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}
.week-strip button,
.filter-row button {
  border: 0;
  border-radius: 15px;
  background: rgba(255,255,255,.82);
  min-height: 56px;
  color: var(--muted);
  font-weight: 900;
  box-shadow: var(--soft-shadow);
}
.week-strip button {
  display: grid;
  gap: 2px;
  place-items: center;
}
.week-strip span {
  font-size: .68rem;
  text-transform: uppercase;
}
.week-strip strong { color: var(--ink); }
.week-strip button.active,
.filter-row button.active {
  background: var(--orange);
  color: white;
}
.week-strip button.active strong { color: white; }
.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.filter-row button {
  min-height: 40px;
  padding: 0 18px;
  flex: 0 0 auto;
}

.pools-layout,
.plan-layout {
  display: grid;
  gap: 16px;
}

.pool-group {
  display: grid;
  gap: 9px;
  padding: 6px 0 12px;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  font-weight: 950;
  padding: 0 2px;
}
.group-title div {
  display: flex;
  align-items: center;
  gap: 7px;
}
.group-title small,
.group-title em {
  color: var(--muted);
  font-style: normal;
}
.group-title span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.pool-summary,
.cluster-pill {
  width: 100%;
  border: 0;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 10px 24px rgba(48,35,20,.055);
  min-height: 68px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
.pool-summary.selected {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 0 0 1.5px rgba(239,83,61,.34), var(--soft-shadow);
}
.pool-summary span,
.cluster-pill span {
  display: grid;
  gap: 3px;
}
.pool-summary small,
.cluster-pill small {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 850;
}

.pool-summary span {
  min-width: 0;
}

.pool-summary span small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.18;
}
.pool-summary.selected small { color: rgba(255,255,255,.68); }
.pool-summary em {
  font-style: normal;
  color: var(--orange);
  font-weight: 950;
  display: grid;
  justify-items: end;
  gap: 2px;
}
.pool-summary em small {
  color: var(--muted);
  font-size: .72rem;
}
.muted-summary { color: var(--muted); justify-content: center; }

.pool-detail {
  display: grid;
  gap: 16px;
  box-shadow: var(--shadow);
  border-radius: 28px;
}

.task-clean {
  min-height: 54px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.task-clean:last-child { border-bottom: 0; }
.task-clean label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 850;
}
.task-clean input { width: 23px; height: 23px; accent-color: var(--orange); }
.task-clean label span { overflow-wrap: anywhere; }
.task-clean.done label span { color: var(--faint); text-decoration: line-through; }
.task-clean div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.task-clean small {
  color: var(--muted);
  font-weight: 850;
}

.icon-plain {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-width: 36px;
  min-height: 36px;
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: 950;
}

.day-board {
  position: relative;
  min-height: 1080px;
  border-radius: 28px;
  background:
    repeating-linear-gradient(to bottom, rgba(17,17,17,.04) 0 1px, transparent 1px 63px),
    linear-gradient(180deg, rgba(255,255,255,.84), rgba(255,250,243,.58));
  box-shadow: inset 0 0 0 1px rgba(44,32,20,.04);
  overflow: hidden;
  touch-action: pan-y;
  padding-left: 54px;
}

.hour-label {
  position: absolute;
  left: 14px;
  color: var(--faint);
  font-size: .72rem;
  font-weight: 900;
  transform: translateY(-50%);
}

.gap-slot {
  position: absolute;
  left: 64px;
  right: 14px;
  border-radius: 22px;
  border: 0;
  color: transparent;
  display: grid;
  place-items: center;
  font-size: .72rem;
  font-weight: 900;
  pointer-events: none;
}

.cluster-block {
  position: absolute;
  left: 64px;
  right: 14px;
  border-radius: 18px;
  padding: 16px 18px 12px;
  color: var(--ink);
  background:
    linear-gradient(90deg, var(--cluster-color) 0 7px, color-mix(in srgb, var(--cluster-color) 13%, white) 7px 100%);
  box-shadow: 0 14px 28px rgba(64,45,24,.075);
  border: 1px solid rgba(255,255,255,.72);
  overflow: hidden;
  user-select: none;
  touch-action: none;
}
.cluster-block.compact {
  padding: 13px 16px 10px;
}
.cluster-block.compact strong {
  font-size: .94rem;
}
.cluster-block.compact small {
  font-size: .82rem;
}
.cluster-block strong,
.cluster-block small { display: block; }
.cluster-block small { opacity: .82; font-weight: 850; }
.cluster-block.has-conflict {
  box-shadow: 0 0 0 3px rgba(157,52,39,.22), 0 12px 22px rgba(64,45,24,.1);
}
.resize {
  position: absolute;
  left: 34px;
  right: 34px;
  height: 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cluster-color) 38%, white);
}
.resize.top { top: 7px; }
.resize.bottom { bottom: 7px; }

.cluster-pill {
  min-height: 62px;
}
.cluster-pill > span:first-child {
  width: 12px;
  height: 42px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.conflict-banner {
  padding: 13px 16px;
  border-radius: 18px;
  color: white;
  background: #9d3427;
  font-weight: 850;
}

.now-line {
  position: absolute;
  left: 54px;
  right: 10px;
  z-index: 3;
  height: 0;
  border-top: 2px solid rgba(244,123,32,.72);
  pointer-events: none;
}
.now-line span {
  position: absolute;
  left: -46px;
  top: -10px;
  color: var(--orange);
  font-size: .68rem;
  font-weight: 950;
}

.focus-screen {
  min-height: calc(100vh - 44px);
  display: grid;
  align-content: start;
  gap: 16px;
  padding-top: max(8px, env(safe-area-inset-top));
  width: min(620px, 100%);
  margin: 0 auto;
}
.focus-top {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}
.focus-back { color: var(--ink); }
.timer-surface {
  min-height: auto;
  border-radius: 0;
  padding: 20px 16px 28px;
  background: transparent;
  color: var(--ink);
  display: grid;
  gap: 17px;
  align-content: center;
  box-shadow: none;
}
.timer-surface.ended { box-shadow: 0 0 0 8px rgba(244,123,32,.14), 0 32px 78px rgba(17,17,17,.22); }
.timer {
  font-size: clamp(4.55rem, 23vw, 7.8rem);
  line-height: .86;
  font-weight: 950;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.focus-task {
  text-align: center;
  font-size: clamp(1.18rem, 5vw, 1.62rem);
  line-height: 1.18;
  font-weight: 850;
}
.focus-progress {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: #efe6db;
}
.focus-progress span {
  display: block;
  height: 100%;
  background: var(--orange);
}
.preset-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.preset-row button,
.reason-row button,
.pattern-grid button {
  border: 0;
  border-radius: 999px;
  min-height: 44px;
  padding: 8px 10px;
  background: #f5eadc;
  color: var(--ink);
  font-weight: 900;
}

.focus-context-card {
  min-height: 68px;
  border-radius: 18px;
  padding: 13px 14px;
  background: white;
  box-shadow: 0 12px 26px rgba(48,35,20,.06);
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 12px;
  align-items: center;
}
.focus-context-card > span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}
.focus-context-card small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 850;
}
.focus-context-card button {
  border: 0;
  border-radius: 16px;
  min-height: 40px;
  padding: 0 14px;
  background: #fff0de;
  color: #9b4116;
  font-weight: 950;
}
.focus-pause {
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 999px;
  place-self: center;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f1664d, #e84b34);
  color: white;
  box-shadow: 0 18px 34px rgba(244,123,32,.24);
}
.focus-pause span { font-size: .72rem; font-weight: 900; }
.up-next {
  display: grid;
  gap: 8px;
}
.up-next > div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 900;
}
.up-next button {
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: white;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  box-shadow: 0 8px 18px rgba(64,45,24,.055);
}
.up-next button.active {
  border-color: rgba(239,83,61,.55);
  box-shadow: 0 0 0 3px rgba(239,83,61,.08), 0 8px 18px rgba(64,45,24,.055);
}
.up-next button span {
  color: var(--orange);
  font-size: .67rem;
  font-weight: 950;
}
.up-next small {
  color: var(--muted);
  font-weight: 850;
}

.task-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.icon-pill {
  border: 0;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--card);
  box-shadow: var(--soft-shadow);
  color: var(--muted);
}
.momentum-card {
  padding: 24px;
  display: grid;
  gap: 18px;
}
.more-options {
  border-radius: 18px;
  padding: 12px 14px;
  background: #fbf5ee;
}
.more-options summary {
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}
.more-options > *:not(summary) {
  margin-top: 12px;
}

.weekday-picker {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.weekday-picker label {
  min-height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #f8f1e9;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
}

.weekday-picker label.selected {
  color: white;
  background: var(--orange);
  box-shadow: 0 10px 20px rgba(239,83,61,.15);
}

.weekday-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.energy-check {
  display: grid;
  gap: 10px;
}

.energy-check > span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 900;
}

.energy-check > p {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.35;
}

.energy-check > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.energy-check button {
  min-height: 78px;
  border: 0;
  border-radius: 18px;
  padding: 10px 8px;
  display: grid;
  gap: 4px;
  align-content: center;
  background: #f8f1e9;
  color: var(--muted);
  text-align: center;
}

.energy-check button strong {
  color: var(--ink);
  font-size: .92rem;
}

.energy-check button small {
  line-height: 1.12;
  font-size: .68rem;
}

.energy-check button.active {
  background: var(--ink);
  color: white;
}

.energy-check button.active strong {
  color: white;
}
.momentum-card > div:first-child strong {
  display: block;
  font-size: clamp(2.4rem, 12vw, 4rem);
  line-height: .9;
  font-weight: 950;
}
.momentum-card > div:first-child span {
  color: var(--muted);
  font-weight: 850;
}
.week-bars {
  height: 150px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
}
.week-bars article {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 7px;
  align-items: end;
  justify-items: center;
}
.week-bars span {
  width: 100%;
  border-radius: 14px 14px 7px 7px;
  background: linear-gradient(180deg, #ef533d, var(--orange));
}
.week-bars small {
  color: var(--muted);
  font-weight: 900;
}
.wins-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.wins-grid article {
  min-height: 112px;
  border-radius: 22px;
  padding: 14px;
  display: grid;
  gap: 6px;
  background: #faf1e6;
  color: var(--muted);
}
.wins-grid article.active {
  background: white;
  color: var(--ink);
  box-shadow: var(--soft-shadow);
}
.wins-grid svg {
  color: var(--orange);
}
.wins-grid small {
  color: var(--muted);
  line-height: 1.25;
}

.return-card {
  display: grid;
  gap: 14px;
  background:
    linear-gradient(160deg, rgba(244,123,32,.12), rgba(255,255,255,.4)),
    var(--card);
}
.return-card h1 { font-size: clamp(2.6rem, 13vw, 5.4rem); }

.history-list article,
.reflow-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.history-list article:last-child,
.reflow-row:last-child { border-bottom: 0; }
.history-list span,
.reflow-row span { color: var(--muted); }

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: end center;
  padding: 12px;
  background: rgba(17,17,17,.34);
  backdrop-filter: blur(14px);
}
.sheet {
  width: min(620px, 100%);
  max-height: min(86vh, 780px);
  overflow-y: auto;
  border-radius: 30px 30px 26px 26px;
  padding: 10px 20px 22px;
  background: var(--card);
  box-shadow: 0 30px 78px rgba(17,17,17,.22);
}
.sheet-handle {
  width: 46px;
  height: 5px;
  border-radius: 999px;
  background: #ded3c6;
  margin: 0 auto 16px;
}

.switch-sheet h3,
.pattern-sheet h3 {
  margin-top: 6px;
}
.switch-option {
  border: 0;
  border-radius: 22px;
  min-height: 62px;
  padding: 14px 16px;
  background: #f8efe4;
  display: grid;
  gap: 3px;
  text-align: left;
}
.switch-option small { color: var(--muted); font-weight: 850; }
.reason-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.reason-row button.selected,
.pattern-grid button.selected {
  background: var(--ink);
  color: white;
}
.pattern-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pattern-sheet {
  gap: 14px;
}

.pattern-sheet h3 {
  font-size: .94rem;
}

.pattern-grid button {
  min-height: 48px;
  border-radius: 17px;
  padding: 8px 10px;
  line-height: 1.12;
  background: #f8f1e9;
}

.more-patterns {
  padding: 10px;
  background: #fbf7f1;
}

.more-patterns .pattern-grid {
  margin-top: 10px;
}

.pattern-sheet .button-pair {
  grid-template-columns: 1fr 1fr;
}
.return-instruction {
  border-radius: 22px;
  padding: 16px;
  background: #fff3df;
  display: grid;
  gap: 8px;
}
.return-instruction span {
  color: var(--orange);
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.empty-state {
  padding: 18px;
  border-radius: 22px;
  color: var(--muted);
  background: #f8efe4;
  text-align: center;
  line-height: 1.4;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 40;
  width: min(560px, calc(100% - 24px));
  min-height: 68px;
  border-radius: 25px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 7px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 16px 36px rgba(40,31,22,.13);
  backdrop-filter: blur(18px);
}
.bottom-nav button {
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 2px;
  font-size: .68rem;
  font-weight: 950;
}
.bottom-nav button span { font-size: 1.05rem; }
.bottom-nav button span {
  display: grid;
  place-items: center;
}
.bottom-nav button.active {
  color: var(--orange);
  background: transparent;
}
.bottom-nav [data-screen="plan"] {
  color: white;
  background: var(--orange);
  border-radius: 18px;
  transform: translateY(-8px);
  box-shadow: 0 12px 22px rgba(239,83,61,.25);
}
.bottom-nav [data-screen="plan"].active {
  color: white;
  background: var(--orange);
}

.toast-region {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 20px);
  transform: translateX(-50%);
  z-index: 80;
  width: min(520px, calc(100% - 28px));
  display: grid;
  gap: 8px;
}
.toast {
  padding: 13px 15px;
  border-radius: 18px;
  color: white;
  background: var(--ink);
  box-shadow: var(--shadow);
  font-weight: 850;
}
.toast.success { background: #35633e; }
.toast.error { background: #9d3427; }

@media (min-width: 900px) {
  .today-grid {
    grid-template-columns: minmax(0, 1fr) 430px;
    align-items: stretch;
  }
  .current-stack { align-content: stretch; }
  .current-panel,
  .focus-card,
  .life-card { min-height: 0; }
  .pools-layout {
    grid-template-columns: 390px minmax(0, 1fr);
    align-items: start;
  }
  .plan-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }
  .day-board { min-height: 1080px; }
  .sheet-backdrop { place-items: center; }
  .setup-card { padding: 46px; }
}

@media (max-width: 430px) {
  .shell { padding-inline: 20px; }
  .sync-mini span:last-child { display: none; }
  .setup-options,
  .reason-row,
  .two-col { grid-template-columns: 1fr; }
  .today-pool-card .button-pair,
  .focus-screen .button-pair { grid-template-columns: 1fr; }
  .pattern-sheet .button-pair { grid-template-columns: 1fr 1fr; }
  .setup-time-row {
    grid-template-columns: 1fr 1fr 44px;
  }
  .setup-time-row strong { grid-column: 1 / -1; }
  .day-board { padding-left: 48px; }
  .cluster-block,
  .gap-slot { left: 56px; right: 10px; }
  .preset-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .preset-row button { min-width: 0; padding-inline: 4px; }
}

/* Reference-aligned app shell */
body {
  background:
    radial-gradient(circle at 50% 18%, rgba(239,83,61,.025), transparent 300px),
    linear-gradient(180deg, #fbf8f2 0%, #f8f3eb 58%, #f5ecdf 100%);
}

.shell {
  padding: max(30px, env(safe-area-inset-top)) 21px calc(var(--nav-h) + max(22px, env(safe-area-inset-bottom)));
}

.screen {
  gap: 18px;
}

.today-app-head,
.screen-top-row,
.profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.today-app-head h1,
.screen-top-row h1,
.profile-head h1 {
  font-size: clamp(1.76rem, 7vw, 2.2rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.today-app-head p,
.screen-top-row p,
.profile-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 720;
}

.round-quiet,
.arrow-link {
  border: 0;
  display: grid;
  place-items: center;
  color: #b24b36;
  background: #fff2ed;
  box-shadow: 0 10px 22px rgba(239,83,61,.08);
}

.round-quiet {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.today-stack {
  display: grid;
  gap: 17px;
}

.today-pool-card {
  border-radius: 29px;
  padding: 25px 22px 21px;
  background: #fff;
  box-shadow: 0 24px 48px rgba(54,42,27,.068);
}

.today-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pool-kicker {
  width: fit-content;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff0ec;
  color: #9b4b38;
  font-size: .76rem;
}

.arrow-link {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.today-pool-card h2 {
  max-width: none;
  font-size: clamp(1.55rem, 6.5vw, 2.05rem);
  line-height: 1.06;
}

.today-pool-card > .quiet {
  margin-top: -6px;
  font-size: .9rem;
}

.today-task-preview {
  gap: 2px;
}

.today-task-preview button {
  min-height: 30px;
  padding: 3px 0;
  border-radius: 10px;
  grid-template-columns: 18px 1fr;
  font-size: .9rem;
  font-weight: 720;
}

.today-task-preview span {
  width: 14px;
  height: 14px;
}

.pool-card-footer {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 13px;
  align-items: end;
  margin-top: 10px;
}

.pool-card-footer p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.mini-progress {
  height: 5px;
  max-width: 190px;
}

.start-orb {
  width: 70px;
  height: 70px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(180deg, #f2684e, #e64c34);
  box-shadow: 0 18px 30px rgba(239,83,61,.24);
  font-weight: 950;
}

.start-orb svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transform: translateX(2px);
}

.section-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}

.section-mini-head strong {
  font-size: .96rem;
}

.section-mini-head button {
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  font-weight: 850;
}

.cluster-overview-card {
  grid-template-columns: 94px 1fr;
  gap: 15px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(54,42,27,.065);
}

.cluster-overview-card .day-ring-wrap {
  width: 86px;
}

.cluster-overview-card .ring-center {
  inset: 26%;
}

.cluster-overview-card .ring-center span {
  font-size: 1.05rem;
  line-height: 1;
}

.cluster-overview-card .ring-center small {
  display: block;
  color: var(--muted);
  font-size: .58rem;
  font-weight: 800;
}

.status-chip {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  color: #a8523e;
  background: #fff0ec;
  font-size: .62rem;
  font-weight: 950;
  text-transform: uppercase;
}

.cluster-mini-copy h2 {
  font-size: 1.38rem;
  margin-top: 3px;
}

.cluster-mini-copy p {
  color: var(--muted);
  font-size: .88rem;
}

.cluster-mini-copy strong {
  color: var(--ink);
  font-size: 1.52rem;
  line-height: 1.05;
}

.cluster-overview-card.is-gap .cluster-mini-copy strong {
  color: var(--muted);
  font-size: .95rem;
  font-weight: 780;
}

.cluster-overview-card.is-gap .cluster-mini-copy p:last-child {
  margin-top: -3px;
}

.today-secondary {
  justify-content: flex-start;
  gap: 16px;
  padding-inline: 0;
}

.text-link {
  min-height: 34px;
  padding: 0;
  color: var(--muted);
  font-size: .92rem;
}

.faith-anchor {
  padding: 9px 18px;
  font-size: .9rem;
}

/* Pools, close to the reference phone UI */
.screen-top-row .top-actions {
  display: flex;
  gap: 8px;
}

.icon-pill {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: #fff;
}

.week-strip {
  gap: 6px;
}

.week-strip button {
  min-height: 55px;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(54,42,27,.055);
}

.week-strip span {
  font-size: .62rem;
}

.week-strip strong {
  font-size: .9rem;
}

.filter-row {
  gap: 8px;
}

.filter-row button {
  min-height: 38px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(54,42,27,.045);
}

.pool-group {
  position: relative;
  gap: 8px;
  padding: 4px 0 18px 18px;
}

.pool-group::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 36px;
  bottom: 10px;
  width: 2px;
  border-radius: 999px;
  background: rgba(44,32,20,.08);
}

.group-title {
  font-size: .86rem;
  text-transform: none;
  color: var(--ink);
}

.group-title strong {
  font-size: 1rem;
}

.group-title small {
  font-size: .83rem;
  text-transform: none;
}

.pool-summary {
  min-height: 74px;
  border-radius: 17px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(54,42,27,.06);
}

.pool-summary i {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--pool-color);
  background: color-mix(in srgb, var(--pool-color) 12%, white);
  font-style: normal;
}

.pool-summary i svg {
  width: 18px;
  height: 18px;
}

.pool-summary.selected {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(239,83,61,.28), 0 12px 28px rgba(54,42,27,.06);
}

.pool-summary.selected small {
  color: var(--muted);
}

.muted-summary {
  grid-template-columns: 1fr;
  min-height: 56px;
  border: 1px dashed rgba(44,32,20,.13);
  box-shadow: none;
}

.pool-detail {
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(54,42,27,.07);
}

.pool-detail-screen {
  gap: 16px;
}

.pool-detail-native-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: start;
}

.pool-detail-native-head h1 {
  font-size: clamp(1.85rem, 8vw, 2.3rem);
  line-height: .98;
}

.pool-detail-native-head p {
  margin-bottom: 3px;
  color: var(--orange);
  font-size: .76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.pool-detail .section-head h2 {
  font-size: 1.75rem;
}

.pool-detail-screen .pool-detail > .section-head {
  display: none;
}

.task-clean {
  min-height: 58px;
}

.task-clean label {
  font-size: .98rem;
}

/* Plan timeline */
.plan-native-head {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: start;
  gap: 12px;
}

.plan-native-head h1 {
  font-size: 1.9rem;
}

.plan-summary {
  white-space: nowrap;
}

.done-btn {
  border: 0;
  border-radius: 15px;
  min-height: 44px;
  padding: 0 17px;
  color: white;
  background: var(--orange);
  box-shadow: 0 12px 22px rgba(239,83,61,.18);
  font-weight: 950;
}

.day-board {
  border-radius: 26px;
  background:
    repeating-linear-gradient(to bottom, rgba(17,17,17,.055) 0 1px, transparent 1px 89px),
    #fff;
  box-shadow: 0 18px 42px rgba(54,42,27,.06);
}

.day-board .hour-label:first-child {
  top: 14px !important;
  transform: none;
}

.cluster-block {
  border-radius: 16px;
  background:
    linear-gradient(90deg, var(--cluster-color) 0 6px, color-mix(in srgb, var(--cluster-color) 12%, white) 6px 100%);
  border: 0;
  box-shadow: 0 16px 30px rgba(54,42,27,.065);
  color: color-mix(in srgb, var(--cluster-color) 72%, #191713);
}

.cluster-block strong {
  font-size: 1rem;
}

.cluster-block small {
  font-size: .82rem;
  font-weight: 760;
}

.resize {
  left: 44%;
  right: auto;
  width: 42px;
  height: 8px;
  background: rgba(255,255,255,.85);
  box-shadow: 0 3px 8px rgba(54,42,27,.1);
}

.resize.top {
  display: none;
}

.soft-panel {
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(54,42,27,.06);
}

/* Plan pass: reference-matched time-cluster editor */
.plan-screen {
  width: min(760px, 100%);
  margin: 0 auto;
}

.plan-native-head {
  grid-template-columns: 44px 1fr auto;
  align-items: start;
  margin: 0 0 18px;
  padding: 0;
}

.plan-native-head .icon-pill {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(39, 31, 24, .055);
}

.plan-native-head h1 {
  margin: -4px 0 0;
  font-size: 2rem;
  line-height: .98;
  letter-spacing: 0;
  font-weight: 950;
}

.plan-native-head p {
  margin: 3px 0 0;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.15;
}

.plan-summary {
  color: var(--muted);
  white-space: nowrap;
}

.done-btn {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 16px;
  background: #ef4f3e;
  box-shadow: 0 12px 28px rgba(239,79,62,.2);
  font-size: 1rem;
}

.plan-layout {
  display: block;
}

.empty-plan {
  border-radius: 26px;
  background: #fff;
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.empty-plan h2 {
  margin: 0 0 5px;
  font-size: 1.45rem;
}

.empty-plan p {
  margin: 0 0 18px;
  color: var(--muted);
}

.day-board {
  min-height: 1080px;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 56px;
  border-radius: 26px;
  background:
    repeating-linear-gradient(to bottom, transparent 0 89px, rgba(23,21,18,.055) 89px 90px),
    #fff;
  border: 0;
  box-shadow: 0 18px 42px rgba(40,31,22,.055);
  overflow: visible;
  touch-action: pan-y;
}

.day-board .hour-label {
  left: 14px;
  color: #b8ad9f;
  font-size: .76rem;
  font-weight: 800;
}

.day-board .hour-label:first-child {
  top: 16px !important;
}

.gap-slot {
  display: none;
}

.now-line {
  position: absolute;
  left: 55px;
  right: 12px;
  height: 2px;
  background: #ef4f3e;
  z-index: 5;
  pointer-events: none;
}

.now-line::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4f3e;
}

.now-line span {
  position: absolute;
  left: -49px;
  top: -11px;
  padding: 0;
  color: #ef4f3e;
  background: transparent;
  font-size: .72rem;
  font-weight: 900;
  white-space: nowrap;
}

.cluster-block {
  left: 56px;
  right: 14px;
  padding: 18px 18px 12px 19px;
  border-radius: 15px;
  color: color-mix(in srgb, var(--cluster-color) 78%, #171512);
  background:
    linear-gradient(90deg, var(--cluster-color) 0 5px, transparent 5px 100%),
    color-mix(in srgb, var(--cluster-color) 12%, #fff 88%);
  border: 0;
  box-shadow: 0 12px 26px rgba(56, 43, 28, .035);
  cursor: grab;
  overflow: visible;
}

.cluster-block.selected {
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--cluster-color) 32%, transparent), 0 14px 30px rgba(56,43,28,.055);
}

.cluster-block:active {
  cursor: grabbing;
}

.cluster-block strong {
  font-size: 1rem;
  line-height: 1.05;
  font-weight: 950;
}

.cluster-block small {
  margin-top: 2px;
  font-size: .82rem;
  line-height: 1.1;
  font-weight: 760;
  color: color-mix(in srgb, var(--cluster-color) 72%, #5f554a);
}

.cluster-block.compact {
  padding: 12px 16px 9px 17px;
}

.resize {
  left: 50%;
  right: auto;
  width: 42px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 4px 10px rgba(44,32,20,.1);
  touch-action: none;
}

.resize.top {
  display: none;
}

.resize.bottom {
  bottom: 8px;
}

.drag-time-bubble,
.drag-conflict {
  position: absolute;
  z-index: 20;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(44,32,20,.12);
  pointer-events: none;
}

.drag-time-bubble {
  right: 14px;
  top: 12px;
  display: none;
  padding: 7px 10px;
  color: #fff;
  background: #171512;
}

.drag-time-bubble.visible {
  display: inline-flex;
}

.drag-conflict {
  left: 64px;
  right: 22px;
  padding: 9px 12px;
  color: #8f2b1f;
  background: #fff0ea;
  border: 1px solid rgba(239,79,62,.22);
}

.cluster-block.has-conflict {
  box-shadow: 0 0 0 2px rgba(239,79,62,.28), 0 14px 30px rgba(56,43,28,.07);
}

.cluster-context-menu {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 28px rgba(44,32,20,.12);
  z-index: 18;
}

.cluster-context-menu button {
  border: 0;
  border-radius: 999px;
  min-height: 30px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 900;
}

.cluster-context-menu button:first-child {
  color: #ef4f3e;
}

.cluster-composer {
  gap: 14px;
}

.name-with-icon {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 10px;
  align-items: center;
}

.composer-icon-preview {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: #fff4ef;
  color: #ef4f3e;
}

.composer-icon-preview svg {
  width: 22px;
  height: 22px;
}

.time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.segmented-picker,
.icon-picker,
.color-swatches {
  display: grid;
  gap: 8px;
}

.segmented-picker {
  grid-template-columns: 1fr 1fr;
}

.icon-picker {
  grid-template-columns: repeat(4, 1fr);
}

.color-swatches {
  grid-template-columns: repeat(8, 1fr);
}

.segmented-picker label,
.icon-picker label,
.color-swatches label {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 48px;
  border-radius: 16px;
  background: #f7efe7;
  color: var(--muted);
  font-weight: 900;
}

.segmented-picker label.selected,
.icon-picker label.selected {
  background: #171512;
  color: #fff;
}

.icon-picker label span {
  display: grid;
  place-items: center;
}

.color-swatches label {
  min-height: 42px;
  background: transparent;
}

.color-swatches label span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--swatch);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.8);
}

.color-swatches label.selected span {
  box-shadow: 0 0 0 3px #171512, inset 0 0 0 2px rgba(255,255,255,.9);
}

.segmented-picker input,
.icon-picker input,
.color-swatches input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cluster-composer .textarea {
  min-height: 86px;
}

.sheet {
  max-height: min(86vh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Part 2 execution loop */
.today-screen {
  gap: 18px;
}

.today-app-head h1 {
  font-size: 1.78rem;
  line-height: 1.04;
}

.today-app-head p {
  font-size: .95rem;
  font-weight: 760;
}

.today-pool-card {
  min-height: 398px;
  padding: 28px 22px 20px;
  display: grid;
  align-content: start;
  gap: 11px;
}

.pool-kicker {
  min-height: 30px;
  padding: 7px 12px;
  font-size: .78rem;
  font-weight: 880;
}

.today-pool-card h2 {
  margin-top: 6px;
  font-size: 1.62rem;
  line-height: 1.06;
  letter-spacing: 0;
}

.today-task-preview {
  margin-top: 4px;
  gap: 1px;
}

.today-task-preview button {
  min-height: 31px;
  padding: 3px 0;
  font-size: .91rem;
  line-height: 1.12;
}

.pool-card-footer {
  margin-top: 22px;
  grid-template-columns: 1fr 78px;
  align-items: end;
}

.pool-card-footer .mini-progress {
  width: 190px;
  max-width: 100%;
}

.start-orb {
  width: 72px;
  height: 72px;
}

.cluster-overview-card {
  min-height: 134px;
  grid-template-columns: 92px minmax(0, 1fr);
}

.cluster-overview-card .ring-arc {
  stroke-width: 14px;
}

.cluster-mini-copy h2 {
  font-size: 1.45rem;
}

.cluster-mini-copy strong {
  font-size: 1.68rem;
}

.pool-accordion {
  display: grid;
  gap: 9px;
}

.pool-accordion.expanded .pool-summary {
  border-color: rgba(239,79,62,.38);
  box-shadow: 0 12px 28px rgba(239,79,62,.08);
}

.pool-detail.inline-detail {
  margin: 0 0 8px;
  padding: 18px 18px 19px;
  border-radius: 22px;
  box-shadow: 0 14px 30px rgba(54,42,27,.06);
}

.pool-detail.inline-detail .section-head h2 {
  font-size: 1.45rem;
  line-height: 1;
  max-width: 220px;
}

.pool-detail.inline-detail .section-head p {
  color: var(--muted);
  font-weight: 760;
}

.inline-actions {
  display: grid;
  grid-template-columns: 1fr 118px;
  gap: 10px;
  margin-top: 8px;
}

.inline-actions .btn {
  min-height: 54px;
}

.task-clean {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  min-height: 66px;
  gap: 10px;
  align-items: center;
}

.task-clean label {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.task-clean label span {
  line-height: 1.14;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-clean div {
  display: grid;
  grid-template-columns: 34px 24px 24px;
  justify-content: end;
  align-items: center;
  gap: 6px;
}

.task-clean small {
  min-width: 34px;
  text-align: right;
}

.task-clean .icon-plain {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  display: grid;
  place-items: center;
}

.estimate-picker {
  display: grid;
  gap: 10px;
}

.estimate-picker > span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 900;
}

.estimate-picker > div {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.estimate-picker button {
  min-height: 44px;
  border: 0;
  border-radius: 15px;
  background: #f7efe7;
  color: var(--ink);
  font-weight: 920;
}

.estimate-picker button.selected {
  color: #fff;
  background: #ef4f3e;
  box-shadow: 0 10px 22px rgba(239,79,62,.18);
}

.estimate-picker p {
  color: var(--muted);
  font-weight: 800;
}

.custom-estimate {
  display: none;
}

.danger-link {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: #b24134;
  font-weight: 900;
  text-align: left;
}

.compact-picker .switch-option {
  min-height: 62px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(54,42,27,.055);
}

.cluster-choice {
  grid-template-columns: 14px 1fr;
  align-items: center;
  text-align: left;
}

.cluster-choice i {
  grid-row: 1 / span 2;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ded6cb;
}

.cluster-choice strong,
.cluster-choice small {
  min-width: 0;
}

.cluster-choice small {
  grid-column: 2;
  white-space: normal;
}

.timer {
  font-size: clamp(4.4rem, 19vw, 5.1rem);
}

.focus-context-card {
  grid-template-columns: 10px minmax(0, 1fr) auto;
  padding: 12px 12px 12px 14px;
}

.focus-context-card strong {
  white-space: normal;
  line-height: 1.1;
  overflow: visible;
  text-overflow: clip;
}

.focus-context-card button {
  max-width: 112px;
  padding-inline: 10px;
  font-size: .78rem;
}

.focus-pause {
  width: 76px;
  height: 76px;
  background: #ef4f3e;
}

.up-next button {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  height: 60px;
  min-height: 60px;
  overflow: hidden;
}

.up-next button strong {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.14;
}

.up-next .task-meta {
  min-width: 42px;
  justify-items: end;
}

.wins-grid article {
  height: 104px;
  overflow: hidden;
}

.wins-grid article strong {
  max-width: 82px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.05;
}

.today-task-preview button {
  height: 40px;
  min-height: 40px;
  overflow: hidden;
}

.today-task-preview button {
  align-items: center;
}

.today-task-preview button {
  line-height: 1.12;
}

@media (min-width: 900px) {
  .plan-screen {
    padding-top: 18px;
  }

  .plan-native-head {
    width: min(760px, 100%);
    margin-inline: auto;
  }
}

/* Focus mode */
.focus-screen {
  width: min(430px, 100%);
  min-height: calc(100vh - 32px);
  padding-top: max(4px, env(safe-area-inset-top));
  gap: 24px;
}

.focus-top {
  grid-template-columns: 40px 1fr 40px;
  color: var(--ink);
}

.focus-top p {
  font-size: 1rem;
  font-weight: 950;
}

.timer-surface {
  padding: 0 0 22px;
  gap: 18px;
}

.focus-context-card {
  margin-top: 4px;
  min-height: 66px;
  border-radius: 18px;
  box-shadow: 0 13px 28px rgba(54,42,27,.075);
  grid-template-columns: 10px minmax(0, 1fr) auto;
}

.focus-context-card div {
  min-width: 0;
}

.focus-context-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-context-card button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 10px;
  font-size: .82rem;
  white-space: nowrap;
}

.focus-context-card button svg {
  width: 14px;
  height: 14px;
}

.timer {
  margin-top: 34px;
  font-size: clamp(4.35rem, 18vw, 5.45rem);
  letter-spacing: 0;
}

.focus-task {
  max-width: 300px;
  justify-self: center;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 780;
}

.focus-progress {
  width: 180px;
  justify-self: center;
  height: 5px;
}

.preset-row {
  display: none;
}

.focus-control-row {
  display: grid;
  grid-template-columns: 1fr 76px 1fr;
  align-items: center;
  justify-items: center;
  margin: 4px 0 28px;
}

.focus-pause {
  width: 76px;
  height: 76px;
  margin: 0;
}

.sound-toggle {
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fff;
  box-shadow: 0 12px 26px rgba(54,42,27,.07);
}

.sound-toggle.active {
  color: var(--orange);
  background: #fff2ed;
}

.up-next > div {
  color: var(--ink);
  font-size: .94rem;
}

.up-next > div small {
  color: var(--muted);
  font-weight: 760;
}

.up-next button {
  grid-template-columns: 28px 1fr auto;
  min-height: 54px;
  border-radius: 15px;
  padding: 10px 12px;
  background: #fff;
}

.up-next button.active {
  border-color: rgba(239,83,61,.7);
  box-shadow: 0 0 0 1px rgba(239,83,61,.18), 0 10px 22px rgba(54,42,27,.06);
}

.up-next button strong {
  font-size: .94rem;
  line-height: 1.12;
  font-weight: 820;
  overflow-wrap: anywhere;
}

.up-next button.done strong {
  color: var(--faint);
  text-decoration: line-through;
}

.task-status {
  width: 18px;
  height: 18px;
  border: 2px solid #d7d2ca;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.up-next button.done .task-status {
  border-color: var(--orange);
  color: white;
  background: var(--orange);
}

.up-next button.active .task-status {
  border-color: var(--orange);
}

.up-next button em {
  border-radius: 7px;
  padding: 5px 8px;
  color: white;
  background: var(--orange);
  font-size: .65rem;
  font-style: normal;
  font-weight: 950;
}

.focus-screen .button-pair,
.focus-screen > .text-link {
  display: none;
}

/* Profile momentum */
.profile-head {
  align-items: center;
}

.profile-avatar {
  border: 0;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #f1ebe1;
  color: var(--muted);
  font-weight: 950;
}

.momentum-card {
  padding: 20px 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(54,42,27,.07);
}

.streak-card {
  border-radius: 24px;
  padding: 20px 18px 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(54,42,27,.07);
}

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

.streak-top strong {
  display: block;
  font-size: clamp(2.4rem, 11vw, 3.5rem);
  line-height: .9;
  font-weight: 950;
}

.streak-top span {
  color: var(--muted);
  font-weight: 760;
}

.streak-top i {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--orange);
  background: #fff0ec;
  font-style: normal;
}

.week-dots {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.week-dots article {
  display: grid;
  gap: 7px;
  justify-items: center;
  color: var(--faint);
  font-size: .72rem;
  font-weight: 850;
}

.week-dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #e8e1d7;
}

.week-dots article.active span {
  background: var(--orange);
}

.chart-head h2 {
  font-size: 1rem;
}

.momentum-card > .chart-head strong {
  display: block;
  color: var(--orange);
  font-size: .9rem;
  line-height: 1.1;
  font-weight: 950;
}

.momentum-card .week-total {
  color: var(--orange) !important;
  font-size: .92rem !important;
  line-height: 1.1 !important;
  font-weight: 950 !important;
}

.week-bars {
  height: 128px;
}

.week-bars span {
  background: linear-gradient(180deg, #ef533d, #e64c34);
}

.insight-card {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  border-radius: 18px;
  padding: 13px 15px;
  color: #7c3b31;
  background: #fff0ec;
  font-size: .84rem;
  font-weight: 760;
  line-height: 1.25;
}

.insight-card svg {
  color: var(--orange);
}

.badges-panel h2 {
  font-size: 1rem;
}

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

.wins-grid article {
  min-height: 96px;
  border-radius: 18px;
  place-items: center;
  text-align: center;
  background: #fff;
  box-shadow: 0 10px 24px rgba(54,42,27,.055);
  color: var(--ink);
}

.wins-grid article svg {
  padding: 8px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--win-color);
  background: color-mix(in srgb, var(--win-color) 13%, white);
}

.wins-grid article:not(.active) {
  opacity: .58;
}

.wins-grid small {
  display: none;
}

/* Navigation like the mock phone */
.bottom-nav {
  width: min(430px, calc(100% - 24px));
  min-height: 70px;
  border-radius: 26px;
  padding: 7px;
  box-shadow: 0 18px 38px rgba(54,42,27,.16);
}

.bottom-nav button {
  border-radius: 19px;
  font-size: .66rem;
  color: #a7a19a;
}

.bottom-nav button.active {
  color: var(--orange);
}

.bottom-nav [data-screen="plan"] {
  width: 58px;
  height: 58px;
  justify-self: center;
  align-self: center;
  border-radius: 18px;
  transform: translateY(-10px);
}

.bottom-nav [data-screen="plan"]:not(.active) {
  color: white;
}

@media (min-width: 900px) {
  .today-stack {
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
    align-items: start;
  }

  .today-pool-card {
    min-height: 430px;
  }

  .focus-screen {
    width: min(430px, 100%);
  }
}

@media (max-width: 430px) {
  .shell {
    padding-inline: 20px;
    padding-top: max(26px, env(safe-area-inset-top));
  }

  .today-app-head h1,
  .screen-top-row h1,
  .profile-head h1 {
    font-size: 1.72rem;
  }

  .pool-card-footer {
    grid-template-columns: 1fr 74px;
  }

  .start-orb {
    width: 70px;
    height: 70px;
  }

  .wins-grid {
    gap: 8px;
  }

  .wins-grid article {
    padding: 10px 6px;
  }
}

@media (max-width: 899px) {
  .plan-layout .soft-panel {
    display: none;
  }
}

.focus-context-card strong {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.focus-context-card button {
  max-width: 106px;
  padding-inline: 9px;
  font-size: .76rem;
}
