:root {
  color-scheme: light;
  --bg: #f4efe6;
  --paper: #fffaf1;
  --paper-soft: rgba(255, 250, 241, 0.82);
  --ink: #251f19;
  --muted: #7b6e61;
  --line: #d8cab8;
  --line-strong: #a98f78;
  --sage: #746b51;
  --coffee: #6f4e37;
  --cream: #eadfcc;
  --blush: #e8b8aa;
  --butter: #f5d98b;
  --mint: #b9c8ad;
  --sky: #b8c7d9;
  --shadow: 0 24px 80px rgba(85, 58, 36, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(111, 78, 55, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 78, 55, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 36px 36px, 36px 36px, auto, auto;
}

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

.app-shell {
  width: min(1360px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px;
}

.brand,
.side-nav,
.welcome-actions,
.add-row,
.card-top,
.goal-meta {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 800;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: linear-gradient(135deg, var(--butter), var(--paper));
  font-size: 13px;
  box-shadow: 3px 3px 0 var(--line);
  image-rendering: pixelated;
}

.side-nav button,
.primary-action,
.secondary-action,
.text-button {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.side-nav button {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  text-align: left;
  border-radius: 999px;
}

.side-nav button.is-selected,
.primary-action {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 4px 4px 0 rgba(111, 78, 55, 0.18);
}

.side-nav button:hover,
.primary-action:hover,
.secondary-action:hover,
.text-button:hover {
  transform: translateY(-1px);
}

.start-screen,
.auth-screen,
.setup-screen {
  min-height: calc(100vh - 44px);
  display: grid;
  place-items: center;
  position: relative;
}

.start-screen.is-hidden,
.auth-screen.is-hidden,
.setup-screen.is-hidden,
.workspace-shell.is-hidden {
  display: none;
}

.start-screen {
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.6fr);
  gap: clamp(30px, 7vw, 100px);
}

.start-copy {
  max-width: 820px;
}

.start-orbit {
  min-height: 520px;
  border-radius: 48px;
  background: #fffaf1;
  box-shadow: var(--shadow);
  position: relative;
}

.start-orbit::before {
  content: "";
  position: absolute;
  inset: 70px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.start-orbit span {
  position: absolute;
  min-width: 120px;
  padding: 14px 18px;
  border-radius: 999px;
  background: #efe1cf;
  color: var(--coffee);
  text-align: center;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
}

.start-orbit span:nth-child(1) {
  left: 12%;
  top: 22%;
}

.start-orbit span:nth-child(2) {
  right: 12%;
  top: 18%;
}

.start-orbit span:nth-child(3) {
  left: 18%;
  bottom: 18%;
}

.start-orbit span:nth-child(4) {
  right: 16%;
  bottom: 24%;
}

.auth-card {
  width: min(780px, 100%);
  border-radius: 42px;
  background: rgba(255, 250, 241, 0.94);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 60px);
  position: relative;
}

.auth-card h1 {
  max-width: 620px;
  font-size: clamp(58px, 7vw, 98px);
  line-height: 0.92;
}

.auth-card .lead {
  max-width: 560px;
}

.setup-card {
  width: min(1080px, 100%);
  min-height: 620px;
  border-radius: 52px;
  background: rgba(255, 250, 241, 0.96);
  box-shadow: var(--shadow);
  padding: clamp(28px, 6vw, 70px);
}

.setup-progress {
  display: flex;
  gap: 10px;
  margin-bottom: 34px;
}

.setup-progress span {
  width: 42px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}

.setup-progress span.is-current {
  background: var(--coffee);
}

.setup-step {
  display: none;
}

.setup-step.is-active {
  display: grid;
  gap: 18px;
  animation: pageIn 420ms ease forwards;
}

.setup-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
}

.setup-actions button:disabled {
  opacity: 0.4;
}

.auth-form {
  display: grid;
  gap: 14px;
  max-width: 520px;
  margin-top: 28px;
}

.workspace-shell {
  min-height: calc(100vh - 44px);
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  gap: 24px;
}

.sidebar {
  min-height: calc(100vh - 44px);
  border-radius: 38px;
  background: rgba(255, 250, 241, 0.72);
  box-shadow: 0 18px 50px rgba(85, 58, 36, 0.08);
  backdrop-filter: blur(18px);
  padding: 18px;
  position: sticky;
  top: 22px;
  align-self: start;
  border: 1px solid rgba(216, 202, 184, 0.84);
}

.sidebar-pixel {
  width: 100%;
  min-height: 72px;
  margin: 18px 0 4px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(rgba(111, 78, 55, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 78, 55, 0.035) 1px, transparent 1px),
    rgba(255, 253, 248, 0.84);
  background-size: 12px 12px;
  display: grid;
  place-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.sidebar-pixel:hover {
  transform: translateY(-1px);
  border-color: var(--coffee);
  box-shadow: 4px 4px 0 rgba(111, 78, 55, 0.12);
}

.sidebar-pixel .pixel-sticker {
  transform: scale(0.72);
}

.side-nav {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.account-badge {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 12px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.signout-button {
  width: 100%;
  margin-top: 18px;
}

.main-panel {
  min-width: 0;
}

.page {
  display: none;
  min-height: calc(100vh - 44px);
  border: 0;
  border-radius: 34px;
  background: rgba(255, 250, 241, 0.72);
  box-shadow: none;
  padding: clamp(22px, 4vw, 54px);
  opacity: 0;
  transform: translateY(12px);
  animation: pageIn 520ms ease forwards;
}

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

.dashboard-grid article,
.dashboard-note {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-soft);
  padding: 20px;
  box-shadow: 5px 5px 0 rgba(232, 184, 170, 0.18);
}

.dashboard-note .secondary-action {
  margin-top: 12px;
}

.dashboard-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dashboard-grid strong {
  font-size: 42px;
}

.dashboard-map {
  min-height: 380px;
  margin-top: 18px;
  border-radius: 24px;
  background: #fffaf1;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(85, 58, 36, 0.08);
}

.dashboard-map::before {
  content: "";
  position: absolute;
  inset: 50px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.map-center,
.map-node {
  position: absolute;
  border: 1px solid var(--line);
  background: #f5eadb;
  box-shadow: 0 14px 38px rgba(85, 58, 36, 0.08);
}

.map-center {
  left: 50%;
  top: 50%;
  width: min(330px, 46%);
  min-height: 120px;
  transform: translate(-50%, -50%);
  border-radius: 44px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
}

.map-center span,
.map-node span {
  display: block;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-center strong,
.map-node strong {
  display: block;
  margin-top: 6px;
}

.map-center small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 750;
}

.map-node {
  width: 210px;
  min-height: 92px;
  border-radius: 28px;
  padding: 16px;
}

.map-node-0 {
  left: 8%;
  top: 18%;
}

.map-node-1 {
  right: 8%;
  top: 18%;
}

.map-node-2 {
  left: 10%;
  bottom: 16%;
}

.map-node-3 {
  right: 10%;
  bottom: 16%;
}

.map-node-4 {
  left: 50%;
  top: 8%;
  transform: translateX(-50%);
}

.page.is-active {
  display: block;
}

@keyframes pageIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-grid {
  min-height: calc(100vh - 220px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.68fr);
  gap: clamp(28px, 6vw, 86px);
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--sage);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(64px, 9vw, 132px);
  line-height: 0.88;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(38px, 5vw, 76px);
  line-height: 0.95;
}

h3 {
  margin-bottom: 10px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
}

.lead,
.page-heading p,
.desk-card p,
.goal-card p,
.opportunity-card p,
.diary-entry p {
  color: #555149;
  line-height: 1.55;
}

.lead {
  max-width: 660px;
  font-size: 20px;
}

.pixel-sticker {
  --px: 8px;
  width: var(--px);
  height: var(--px);
  display: inline-block;
  image-rendering: pixelated;
  filter: drop-shadow(4px 5px 0 rgba(85, 58, 36, 0.12));
}

.pixel-cup {
  background: var(--coffee);
  box-shadow:
    8px 0 var(--coffee), 16px 0 var(--coffee), 24px 0 var(--coffee),
    0 8px var(--paper), 8px 8px var(--paper), 16px 8px var(--paper), 24px 8px var(--paper), 32px 8px var(--coffee),
    0 16px var(--paper), 8px 16px var(--cream), 16px 16px var(--cream), 24px 16px var(--paper), 32px 16px var(--coffee),
    0 24px var(--coffee), 8px 24px var(--coffee), 16px 24px var(--coffee), 24px 24px var(--coffee),
    8px 32px var(--coffee), 16px 32px var(--coffee);
}

.pixel-book {
  background: var(--sky);
  box-shadow:
    8px 0 var(--sky), 16px 0 var(--paper), 24px 0 var(--mint), 32px 0 var(--mint),
    0 8px var(--sky), 8px 8px var(--sky), 16px 8px var(--paper), 24px 8px var(--mint), 32px 8px var(--mint),
    0 16px var(--sky), 8px 16px var(--sky), 16px 16px var(--paper), 24px 16px var(--mint), 32px 16px var(--mint),
    8px 24px var(--line-strong), 16px 24px var(--line-strong), 24px 24px var(--line-strong);
}

.pixel-star,
.pixel-sparkle {
  background: transparent;
  box-shadow:
    16px 0 var(--butter),
    8px 8px var(--butter), 16px 8px var(--butter), 24px 8px var(--butter),
    0 16px var(--butter), 8px 16px var(--butter), 16px 16px #fff6c9, 24px 16px var(--butter), 32px 16px var(--butter),
    8px 24px var(--butter), 16px 24px var(--butter), 24px 24px var(--butter),
    16px 32px var(--butter);
}

.welcome-actions {
  gap: 10px;
  margin-top: 28px;
}

.primary-action,
.secondary-action {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
}

.desk-card {
  min-height: 420px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 48px 48px 22px 48px;
  padding: 24px;
  position: relative;
}

.coffee-cup {
  position: absolute;
  right: 24px;
  top: 24px;
  width: 78px;
  height: 78px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: radial-gradient(circle, var(--coffee) 0 34%, var(--cream) 35% 56%, transparent 57%);
}

.coffee-cup::after {
  content: "";
  position: absolute;
  right: -16px;
  top: 26px;
  width: 18px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-left: 0;
  border-radius: 0 16px 16px 0;
}

.desk-card h2 {
  max-width: 280px;
  margin-top: 138px;
  font-size: 42px;
}

.mini-chain {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.mini-chain span,
.feed-chain span,
.goal-meta span {
  border: 1px solid var(--line);
  background: #faf7ee;
  border-radius: 999px;
  padding: 10px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.page-heading {
  max-width: 780px;
  margin-bottom: 30px;
  padding: 4px 0 18px;
  border: 0;
  background: transparent;
  border-radius: 34px;
  position: relative;
}

.page-heading h2,
.page-heading p,
.page-heading .eyebrow {
  margin-left: clamp(0px, 2vw, 22px);
  margin-right: clamp(0px, 2vw, 22px);
}

.gradient-heading {
  background: transparent;
}

.profile-grid,
.goal-flow,
.opportunity-grid,
.settings-grid {
  display: grid;
  gap: 14px;
}

.profile-grid,
.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 980px;
}

.account-strip {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  max-width: 980px;
  margin-bottom: 18px;
}

.account-strip > div {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff7ea;
  padding: 16px 18px;
}

.account-strip span,
.diary-entry small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-strip strong {
  font-size: 20px;
}

.wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 750;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-field {
  display: grid;
  gap: 12px;
}

.choice-field legend {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

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

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

.goal-checklist section {
  border: 1px solid rgba(216, 202, 184, 0.82);
  border-radius: 26px;
  background: rgba(255, 250, 241, 0.58);
  padding: 14px;
}

.goal-checklist h3 {
  margin-bottom: 10px;
  color: var(--coffee);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.choice-grid.dense {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.choice-grid label {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.78);
  padding: 0 14px;
  color: var(--ink);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.choice-grid.dense label {
  min-height: 38px;
  padding: 0 11px;
  font-size: 12px;
}

.choice-grid label:has(input:checked) {
  border-color: var(--coffee);
  background: #efe1cf;
}

.choice-grid label:hover {
  transform: translateY(-1px);
}

.choice-grid input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--coffee);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 14px;
  line-height: 1.5;
}

input:focus,
textarea:focus,
select:focus,
button:focus-visible {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(99, 114, 95, 0.16);
  outline: none;
}

.add-row {
  gap: 10px;
  margin-bottom: 18px;
}

.add-row input {
  flex: 1;
}

.add-row select {
  max-width: 280px;
}

.todo-list,
.habit-list,
.diary-list,
.schedule-list {
  display: grid;
  gap: 8px;
}

.todo-card,
.habit-card,
.schedule-day,
.schedule-block,
.empty-day,
.goal-card,
.opportunity-card,
.diary-entry,
.suggestion-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-soft);
  padding: 14px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.todo-card:hover,
.habit-card:hover,
.schedule-block:hover,
.opportunity-card:hover,
.diary-entry:hover,
.flow-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(56, 47, 33, 0.08);
  background: var(--paper);
}

.todo-card.is-done {
  opacity: 0.62;
}

.todo-card.is-future {
  background: rgba(255, 250, 241, 0.72);
}

.habit-panel {
  max-width: 980px;
  margin-top: 18px;
}

.todo-card label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.todo-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.habit-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
}

.habit-card.is-done {
  background: #f4eadb;
}

.habit-card label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.todo-card input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--sage);
}

.habit-card input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--sage);
}

.todo-card strong,
.todo-card em,
.habit-card strong,
.habit-card em {
  display: block;
}

.todo-card em {
  margin-top: 2px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.habit-card em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.habit-card b {
  color: var(--coffee);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.habit-progress {
  display: flex;
  gap: 4px;
  align-items: center;
}

.habit-progress span {
  width: 10px;
  height: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.78);
}

.habit-progress span.is-done {
  border-color: var(--sage);
  background: var(--sage);
}

.feed-chain {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin: 14px 0;
  align-items: stretch;
}

.feed-chain span {
  display: grid;
  place-items: center;
  position: relative;
  min-height: 42px;
  text-align: center;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.feed-chain span:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -17px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--coffee);
  z-index: 2;
}

.schedule-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  max-width: 980px;
  margin-bottom: 18px;
}

.pomodoro-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(320px, 1fr);
  gap: 18px;
  max-width: 980px;
  margin-bottom: 18px;
}

.pomodoro-timer,
.pomodoro-settings,
.focus-session {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--paper-soft);
  padding: 20px;
}

.pomodoro-timer {
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(111, 78, 55, 0.12), transparent 34%),
    rgba(255, 250, 241, 0.88);
}

.pomodoro-timer span {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pomodoro-timer strong {
  display: block;
  margin: 10px 0 16px;
  font-size: clamp(64px, 9vw, 120px);
  line-height: 0.9;
}

.pomodoro-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.pomodoro-settings button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.study-mode {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #121426;
}

.study-mode.is-hidden {
  display: none;
}

.study-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  filter: saturate(1.08) contrast(1.04);
}

.study-mode::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 0 44%, rgba(9, 10, 22, 0.5) 100%),
    linear-gradient(rgba(7, 8, 18, 0.22), rgba(7, 8, 18, 0.36));
  z-index: 1;
}

.study-panel {
  width: min(560px, calc(100vw - 36px));
  min-height: 330px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 246, 224, 0.34);
  border-radius: 6px;
  background: rgba(16, 15, 24, 0.42);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  color: #fff8e8;
  padding: 34px;
  text-align: center;
  backdrop-filter: blur(5px);
  transition: width 220ms ease, min-height 220ms ease, padding 220ms ease, background 220ms ease, transform 220ms ease;
}

.study-panel .eyebrow,
.study-panel span {
  color: #ffe4b3;
}

.study-panel strong {
  display: block;
  font-size: clamp(68px, 11vw, 112px);
  line-height: 0.9;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.24);
}

.study-mode.is-minimized .study-panel {
  width: min(320px, calc(100vw - 36px));
  min-height: 0;
  gap: 8px;
  padding: 22px 20px 18px;
}

.study-mode.is-minimized .study-panel strong {
  font-size: clamp(48px, 12vw, 72px);
}

.study-mode.is-minimized .focus-task-link,
.study-mode.is-minimized .focus-quick-settings,
.study-mode.is-minimized .focus-log-action {
  display: none;
}

.study-mode.is-minimized .pomodoro-controls {
  gap: 6px;
}

.study-mode.is-minimized .pomodoro-controls button {
  min-height: 34px;
  padding: 0 10px;
}

.focus-task-link {
  width: min(420px, 100%);
  display: grid;
  gap: 7px;
  color: #ffe4b3;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

.focus-task-link select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 246, 224, 0.3);
  border-radius: 6px;
  background: rgba(255, 250, 241, 0.8);
  color: #241827;
  padding: 0 14px;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.focus-quick-settings {
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.focus-quick-settings label {
  display: grid;
  gap: 6px;
  color: #ffe4b3;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

.focus-quick-settings input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 246, 224, 0.3);
  border-radius: 6px;
  background: rgba(255, 250, 241, 0.8);
  color: #241827;
  padding: 0 10px;
  font: inherit;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
}

.focus-quick-settings input[type="range"] {
  padding: 0;
}

.focus-backgrounds {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.focus-background-dock {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 2;
  width: min(760px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(255, 246, 224, 0.22);
  border-radius: 8px;
  background: rgba(18, 16, 28, 0.28);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.16);
  padding: 8px 10px;
  transform: translateX(-50%);
  backdrop-filter: blur(4px);
}

.focus-background-dock > span {
  flex: 0 0 auto;
  color: #ffe4b3;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.focus-background-dock .focus-backgrounds {
  flex: 1;
  justify-content: flex-start;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}

.focus-background-dock .focus-backgrounds::-webkit-scrollbar {
  display: none;
}

.focus-bg-choice {
  flex: 0 0 auto;
  min-height: 30px;
  border: 1px solid rgba(255, 246, 224, 0.3);
  border-radius: 6px;
  background: rgba(255, 250, 241, 0.1);
  color: #fff8e8;
  padding: 0 13px;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.focus-bg-choice.is-selected {
  background: rgba(255, 245, 220, 0.92);
  color: #241827;
}

.focus-log-action {
  min-height: 38px;
  border: 1px solid rgba(255, 246, 224, 0.3);
  border-radius: 6px;
  background: rgba(255, 250, 241, 0.8);
  color: #241827;
  padding: 0 14px;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 850;
}

.focus-log-action:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.study-close {
  position: absolute;
  right: 14px;
  top: 14px;
  min-height: 34px;
  border: 1px solid rgba(255, 236, 199, 0.42);
  border-radius: 6px;
  background: rgba(255, 250, 241, 0.1);
  color: #fff8e8;
  padding: 0 12px;
  cursor: pointer;
}

.study-size-toggle {
  position: absolute;
  left: 14px;
  top: 14px;
  min-height: 34px;
  border: 1px solid rgba(255, 236, 199, 0.42);
  border-radius: 6px;
  background: rgba(255, 250, 241, 0.1);
  color: #fff8e8;
  padding: 0 12px;
  cursor: pointer;
}

.wide-field {
  grid-column: 1 / -1;
}

.focus-session {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.focus-session time {
  color: var(--coffee);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 850;
}

.focus-session p {
  margin: 4px 0 0;
  color: var(--muted);
}

.schedule-form .primary-action {
  align-self: end;
}

.schedule-day {
  max-width: 980px;
}

.schedule-day .card-top p {
  margin: 0;
  color: var(--muted);
}

.schedule-block {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.schedule-block time {
  color: var(--coffee);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 850;
}

.schedule-block span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.schedule-block strong {
  display: block;
}

.schedule-block p,
.empty-day {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.schedule-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.empty-day {
  border-style: dashed;
}

.opportunity-grid {
  grid-template-columns: 1fr;
  gap: 8px;
  max-width: 980px;
}

.opportunity-card {
  min-height: 52px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1.1fr) minmax(160px, 0.7fr) auto;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 10px 12px;
}

.opportunity-card span {
  color: var(--sage);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.opportunity-card strong {
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.opportunity-card em {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.opportunity-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pathway-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 250, 241, 0.78);
  padding: 14px;
  margin-bottom: 14px;
}

.pathway-panel p {
  margin: 4px 0 0;
  color: var(--muted);
}

.pathway-search-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.6fr) auto;
  gap: 10px;
  margin: 12px 0;
}

.pathway-results {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.7fr);
  gap: 10px;
}

.pathway-route-stack {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.pathway-route,
.pathway-links {
  border: 1px solid rgba(216, 202, 184, 0.9);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.78);
  padding: 12px;
}

.pathway-route > span,
.pathway-links > span {
  display: block;
  margin-bottom: 10px;
  color: var(--sage);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pathway-route ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

.pathway-route li {
  margin: 7px 0;
}

.pathway-route li p {
  line-height: 1.45;
}

.pathway-links {
  display: grid;
  align-content: start;
  gap: 9px;
}

.pathway-links a {
  color: var(--coffee);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.pathway-links a:hover {
  text-decoration: underline;
}

.goal-flow {
  display: grid;
  gap: 30px;
}

.graph-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 241, 0.78);
  padding: 18px;
}

.compact-graph-toolbar {
  grid-template-columns: 1fr;
}

.graph-toolbar > label,
.graph-toolbar > button {
  align-self: end;
}

.graph-toolbar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.graph-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.graph-filter-bar label {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.86);
  padding: 0 11px;
  color: var(--muted);
  cursor: pointer;
}

.graph-filter-bar label:has(input:checked) {
  border-color: var(--coffee);
  background: #efe1cf;
  color: var(--ink);
}

.graph-filter-bar input {
  width: 14px;
  min-height: 14px;
  accent-color: var(--coffee);
}

.graph-edge-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(220px, 1.1fr) auto;
  gap: 12px;
  align-items: end;
}

.graph-edge-controls label {
  min-width: 0;
}

.graph-edge-controls select,
.graph-edge-controls input {
  min-width: 0;
}

.graph-toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.graph-toolbar-actions button,
.graph-toolbar-top > button {
  white-space: nowrap;
}

.graph-toolbar h3,
.graph-toolbar p {
  margin-bottom: 0;
}

.graph-toolbar p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.graph-canvas {
  min-height: 680px;
  border: 1px solid rgba(216, 202, 184, 0.9);
  border-radius: 38px;
  background:
    linear-gradient(rgba(111, 78, 55, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 78, 55, 0.035) 1px, transparent 1px),
    rgba(255, 250, 241, 0.72);
  background-size: 28px 28px;
  position: relative;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 22px 60px rgba(85, 58, 36, 0.08);
}

.dream-progress-panel {
  display: grid;
  gap: 10px;
  max-width: 980px;
  margin: 0 0 14px;
  border: 1px solid rgba(165, 131, 104, 0.34);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.78);
  padding: 16px;
}

.dream-progress-panel > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.dream-progress-panel span,
.dream-progress-panel p {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.dream-progress-panel strong {
  font-size: 28px;
}

.dream-progress-panel p {
  margin: 0;
}

.dream-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(96, 125, 152, 0.14);
}

.dream-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--sage));
}

.page.is-graph-fullscreen {
  position: fixed;
  inset: 12px;
  z-index: 60;
  display: block;
  overflow: auto;
  background: rgba(255, 253, 247, 0.96);
  padding: 24px;
}

.page.is-graph-fullscreen .page-heading,
.page.is-graph-fullscreen #goalForm,
.page.is-graph-fullscreen .suggestion-panel {
  display: none;
}

.page.is-graph-fullscreen .graph-canvas {
  min-height: calc(100vh - 210px);
}

.custom-edge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.custom-edge-list article {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.84);
  padding: 8px 10px 8px 14px;
}

.custom-edge-list span,
.custom-edge-list strong {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
}

.custom-edge-list span {
  color: var(--muted);
}

.graph-lines {
  position: absolute;
  inset: 0;
  width: 1120px;
  height: 1040px;
  pointer-events: none;
}

.graph-lines path {
  fill: none;
  stroke: rgba(111, 78, 55, 0.2);
  stroke-width: 1.2;
}

.graph-lines .custom-edge path {
  stroke: rgba(37, 31, 25, 0.56);
  stroke-width: 1.8;
}

.graph-lines marker path {
  fill: rgba(111, 78, 55, 0.34);
}

.graph-lines text {
  display: none;
  fill: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 800;
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 5px;
  text-anchor: middle;
  text-transform: uppercase;
}

.graph-lines .custom-edge text {
  display: none;
}

.graph-node {
  width: 170px;
  min-height: 76px;
  display: grid;
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(184, 173, 157, 0.9);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 12px 30px rgba(56, 47, 33, 0.075);
  padding: 12px 14px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  overflow-wrap: anywhere;
  transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.graph-node:hover {
  border-color: var(--coffee);
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(56, 47, 33, 0.11);
}

.graph-node.is-selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 5px rgba(111, 78, 55, 0.12), 0 18px 42px rgba(56, 47, 33, 0.12);
}

.graph-node.is-done {
  border-color: rgba(102, 112, 90, 0.5);
  background: rgba(237, 243, 245, 0.92);
}

.graph-node.is-done span {
  color: var(--sage);
}

.graph-node.is-dragging {
  cursor: grabbing;
  transform: scale(1.02);
  z-index: 5;
}

.graph-node span {
  display: block;
  margin: 0 0 6px;
  color: var(--sage);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.graph-node strong {
  display: -webkit-box;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.05;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.graph-node p {
  display: -webkit-box;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.graph-node-ideal {
  width: 300px;
  min-height: 120px;
  background: #efe1cf;
  border-radius: 32px;
}

.graph-node-goal {
  width: 210px;
  min-height: 104px;
  background: #fff7ea;
  border-radius: 24px;
}

.graph-node-task {
  width: 170px;
  min-height: 76px;
  border-radius: 18px;
}

.graph-node-opportunity {
  width: 178px;
  min-height: 76px;
  border-style: dashed;
  background: rgba(250, 247, 238, 0.96);
}

.graph-node-schedule {
  width: 170px;
  min-height: 76px;
  background: #f4eadb;
  border-radius: 12px 22px 12px 22px;
}

.graph-node-focus {
  width: 158px;
  min-height: 70px;
  background: #efe1cf;
  border-radius: 999px;
}

.graph-node::after {
  display: none;
}

.graph-node-ideal::after {
  width: 18px;
  height: 18px;
  background: var(--ink);
}

.graph-node-goal::after {
  width: 16px;
  height: 16px;
}

.graph-node-task::after,
.graph-node-schedule::after,
.graph-node-focus::after,
.graph-node-opportunity::after {
  width: 9px;
  height: 9px;
}

.settings-callout {
  max-width: 980px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper-soft);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.settings-callout h3,
.settings-callout p {
  margin: 0;
}

.settings-callout p {
  margin-top: 4px;
  color: var(--muted);
}

.graph-detail-panel {
  position: sticky;
  left: calc(100% - 310px);
  top: 18px;
  width: 286px;
  margin: 18px 18px 0 auto;
  z-index: 3;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 250, 241, 0.92);
  box-shadow: 0 18px 50px rgba(56, 47, 33, 0.08);
  padding: 18px;
}

.graph-detail-panel > span {
  display: block;
  margin-bottom: 10px;
  color: var(--sage);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.graph-detail-panel p {
  color: var(--muted);
  line-height: 1.45;
}

.graph-note {
  border-left: 3px solid rgba(96, 125, 152, 0.42);
  padding-left: 10px;
}

.graph-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.graph-detail-actions .secondary-action {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.graph-detail-stats {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 7px;
  align-items: baseline;
  color: var(--muted);
}

.graph-detail-stats b {
  color: var(--ink);
}

.suggestion-panel {
  margin: 0 0 28px;
}

.suggestion-panel p {
  margin: 4px 0 0;
  color: var(--muted);
}

.suggestion-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.suggestion-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 14px;
  background: #fffaf1;
  cursor: pointer;
}

.suggestion-option.is-selected {
  border-color: var(--coffee);
  background: #f2e4d2;
}

.suggestion-option input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--coffee);
}

.suggestion-option strong,
.suggestion-option em {
  display: block;
}

.suggestion-option em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.flow-node {
  border: 1px solid rgba(184, 173, 157, 0.72);
  background: rgba(255, 253, 248, 0.76);
  box-shadow: 0 18px 54px rgba(56, 47, 33, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.ambition-node {
  width: min(780px, 100%);
  margin: 0 auto;
  padding: 24px 28px;
  border-radius: 60px 60px 28px 60px;
  text-align: center;
  background: #f5eadb;
  position: relative;
}

.ambition-node::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -30px;
  width: 1px;
  height: 30px;
  background: var(--line-strong);
}

.ambition-node span,
.leaf-node span {
  display: block;
  margin-bottom: 8px;
  color: var(--sage);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ambition-node p,
.leaf-node p {
  margin-bottom: 0;
  color: #555149;
  line-height: 1.45;
}

.goal-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
  position: relative;
}

.category-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  margin-top: -8px;
}

.category-row::before,
.category-row::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  background: var(--line-strong);
}

.category-row::before {
  top: -22px;
  height: 22px;
}

.category-row::after {
  bottom: -22px;
  height: 22px;
}

.category-node {
  min-width: 132px;
  padding: 12px 14px;
  border-radius: 999px;
  text-align: center;
  background: #efe1cf;
}

.category-node span {
  display: block;
  margin-bottom: 3px;
  color: var(--coffee);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 850;
}

.category-node p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.goal-columns::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 16%;
  right: 16%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.goal-column {
  display: grid;
  gap: 16px;
  position: relative;
}

.goal-column::before {
  content: "";
  width: 1px;
  height: 24px;
  background: var(--line-strong);
  justify-self: center;
}

.goal-node {
  min-height: 190px;
  padding: 20px;
  border-radius: 34px 34px 20px 34px;
  background: #fff7ea;
}

.flow-branch {
  display: grid;
  gap: 12px;
  margin-left: 18px;
  padding-left: 18px;
  border-left: 1px solid rgba(184, 173, 157, 0.7);
}

.leaf-node {
  padding: 14px 16px;
  border-radius: 24px 24px 24px 10px;
}

.leaf-node.empty {
  opacity: 0.72;
  border-style: dashed;
}

.card-top {
  justify-content: space-between;
  gap: 12px;
}

.goal-meta {
  gap: 8px;
  margin: 14px 0;
}

.goal-card ul {
  margin: 0;
  padding-left: 20px;
  color: #555149;
}

.goal-card li {
  margin: 8px 0;
}

.text-button {
  min-height: 32px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
}

.diary-form {
  display: grid;
  gap: 12px;
  max-width: 860px;
  margin-bottom: 18px;
}

.diary-entry time {
  display: block;
  margin-bottom: 8px;
  color: var(--sage);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 800;
}

/* Visual polish pass */
:root {
  --bg: #f3eee5;
  --paper: #fffdf7;
  --paper-soft: rgba(255, 253, 247, 0.82);
  --ink: #201b16;
  --muted: #756b61;
  --line: #dfd2c0;
  --line-strong: #a58368;
  --sage: #66705a;
  --coffee: #5d4332;
  --blue: #607d98;
  --blue-soft: #d9e4eb;
  --shadow: 0 24px 70px rgba(56, 41, 28, 0.09);
}

body {
  background:
    linear-gradient(rgba(93, 67, 50, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 67, 50, 0.028) 1px, transparent 1px),
    linear-gradient(180deg, rgba(217, 228, 235, 0.5), transparent 260px),
    var(--bg);
  background-size: 40px 40px, 40px 40px, auto, auto;
}

.app-shell {
  padding: clamp(14px, 2.2vw, 28px);
}

.start-copy,
.page-heading,
.welcome-copy {
  position: relative;
}

h1,
h2 {
  text-wrap: balance;
}

.lead,
.page-heading p {
  color: #5f5850;
}

.brand {
  width: 100%;
  min-height: 48px;
  justify-content: flex-start;
  border-radius: 18px;
  padding: 0 8px;
}

.brand-mark {
  border: 0;
  border-radius: 12px;
  background: #201b16;
  color: #fffdf7;
  box-shadow: none;
}

.sidebar {
  border-color: rgba(223, 210, 192, 0.72);
  border-radius: 28px;
  background: rgba(255, 253, 247, 0.78);
  box-shadow: 0 20px 60px rgba(56, 41, 28, 0.075);
}

.sidebar-pixel {
  min-height: 62px;
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.62);
}

.account-badge {
  border-color: rgba(223, 210, 192, 0.74);
  background: rgba(255, 253, 247, 0.54);
}

.side-nav {
  gap: 6px;
}

.side-nav button {
  min-height: 40px;
  border-color: transparent;
  background: transparent;
  color: #62594f;
  border-radius: 14px;
}

.side-nav button:hover {
  background: rgba(255, 253, 247, 0.68);
}

.side-nav button.is-selected {
  border-color: rgba(96, 125, 152, 0.28);
  background: #201b16;
  color: #fffdf7;
  box-shadow: 0 12px 26px rgba(32, 27, 22, 0.16);
}

.page {
  border: 1px solid rgba(255, 253, 247, 0.72);
  border-radius: 30px;
  background: rgba(255, 253, 247, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.page-heading {
  margin-bottom: 24px;
  padding-bottom: 10px;
}

.page-heading h2 {
  letter-spacing: 0;
}

.eyebrow {
  color: var(--blue);
}

.dashboard-grid article,
.dashboard-note,
.todo-card,
.habit-card,
.schedule-day,
.schedule-block,
.empty-day,
.goal-card,
.opportunity-card,
.diary-entry,
.suggestion-panel,
.pathway-panel,
.pathway-route,
.pathway-links,
.settings-callout,
.account-strip > div,
.pomodoro-timer,
.pomodoro-settings,
.focus-session {
  border-color: rgba(223, 210, 192, 0.78);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.78);
  box-shadow: 0 14px 42px rgba(56, 41, 28, 0.055);
}

.dashboard-grid article,
.dashboard-note {
  box-shadow: 0 14px 38px rgba(56, 41, 28, 0.06);
}

.dashboard-grid strong {
  color: #2a241e;
}

.dashboard-map,
.graph-canvas {
  border-color: rgba(223, 210, 192, 0.8);
  background:
    linear-gradient(rgba(96, 125, 152, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 125, 152, 0.045) 1px, transparent 1px),
    rgba(255, 253, 247, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 18px 54px rgba(56, 41, 28, 0.065);
}

.map-center,
.map-node,
.graph-node,
.flow-node {
  border-color: rgba(165, 131, 104, 0.48);
  background: rgba(255, 253, 247, 0.88);
}

.map-center,
.graph-node-ideal,
.ambition-node {
  background: #edf3f5;
}

.graph-node-goal,
.goal-node {
  background: #fff9ef;
}

.graph-node-schedule,
.habit-card.is-done,
.todo-card.is-future {
  background: #f4f0e7;
}

.primary-action,
.secondary-action,
.text-button {
  border-radius: 12px;
}

.primary-action {
  border-color: #201b16;
  background: #201b16;
  color: #fffdf7;
  box-shadow: 0 12px 26px rgba(32, 27, 22, 0.14);
}

.secondary-action {
  border-color: rgba(165, 131, 104, 0.55);
  background: rgba(255, 253, 247, 0.66);
}

.text-button {
  border-color: rgba(165, 131, 104, 0.38);
  background: rgba(255, 253, 247, 0.3);
}

input,
textarea,
select {
  border-color: rgba(165, 131, 104, 0.38);
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.9);
}

input:focus,
textarea:focus,
select:focus,
button:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(96, 125, 152, 0.16);
}

.add-row {
  align-items: center;
}

.add-row input[type="date"] {
  flex: 0 0 154px;
}

.todo-card,
.schedule-block,
.opportunity-card {
  min-height: 64px;
}

.todo-card strong,
.schedule-block strong,
.opportunity-card strong {
  line-height: 1.18;
}

.habit-progress span {
  border-color: rgba(96, 125, 152, 0.24);
}

.habit-progress span.is-done {
  border-color: var(--blue);
  background: var(--blue);
}

.pomodoro-timer {
  background:
    radial-gradient(circle at 50% 42%, rgba(96, 125, 152, 0.13), transparent 34%),
    rgba(255, 253, 247, 0.84);
}

.study-panel {
  background: rgba(18, 18, 24, 0.34);
  border-color: rgba(255, 253, 247, 0.28);
}

.focus-background-dock {
  border-color: rgba(255, 253, 247, 0.22);
}

.suggestion-option,
.graph-filter-bar label,
.custom-edge-list article,
.category-node,
.mini-chain span,
.feed-chain span,
.goal-meta span {
  border-color: rgba(165, 131, 104, 0.42);
  background: rgba(255, 253, 247, 0.72);
}

.suggestion-option.is-selected,
.choice-grid label:has(input:checked),
.graph-filter-bar label:has(input:checked) {
  border-color: rgba(96, 125, 152, 0.55);
  background: #edf3f5;
}

/* Focus page interaction polish */
button,
.choice-grid label,
.suggestion-option,
.graph-filter-bar label,
.focus-bg-choice {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:not(:disabled),
.choice-grid label,
.suggestion-option,
.graph-filter-bar label,
.focus-bg-choice {
  position: relative;
  overflow: hidden;
}

button:not(:disabled)::after,
.choice-grid label::after,
.suggestion-option::after,
.graph-filter-bar label::after,
.focus-bg-choice::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.34), transparent 78%);
  opacity: 0;
  transform: translateX(-120%);
  transition: opacity 240ms ease, transform 420ms var(--ease-out);
}

button:not(:disabled):hover::after,
.choice-grid label:hover::after,
.suggestion-option:hover::after,
.graph-filter-bar label:hover::after,
.focus-bg-choice:hover::after {
  opacity: 1;
  transform: translateX(120%);
}

button:not(:disabled):active,
.choice-grid label:active,
.suggestion-option:active,
.graph-filter-bar label:active,
.focus-bg-choice:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 8px 18px rgba(32, 27, 22, 0.12);
}

[data-page-panel="pomodoro"].is-active {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.84), rgba(237, 243, 245, 0.58) 42%, rgba(255, 249, 239, 0.72)),
    linear-gradient(90deg, rgba(96, 125, 152, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(93, 67, 50, 0.055) 1px, transparent 1px),
    rgba(255, 253, 247, 0.52);
  background-size: auto, 34px 34px, 34px 34px, auto;
}

[data-page-panel="pomodoro"] .page-heading {
  max-width: 860px;
}

.pomodoro-grid {
  align-items: stretch;
}

.pomodoro-timer,
.pomodoro-settings {
  backdrop-filter: blur(16px);
}

.pomodoro-timer {
  min-height: clamp(330px, 48vw, 470px);
  position: relative;
  overflow: hidden;
  border-color: rgba(96, 125, 152, 0.24);
  background:
    linear-gradient(155deg, rgba(237, 243, 245, 0.92), rgba(255, 253, 247, 0.78) 48%, rgba(255, 249, 239, 0.92)),
    linear-gradient(90deg, rgba(96, 125, 152, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(93, 67, 50, 0.055) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 24px 70px rgba(56, 41, 28, 0.09);
}

.pomodoro-timer::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(96, 125, 152, 0.18);
  border-radius: 28px 28px 16px 28px;
  background:
    linear-gradient(120deg, transparent, rgba(255, 253, 247, 0.44), transparent),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(96, 125, 152, 0.045) 18px 19px);
  opacity: 0.72;
}

.pomodoro-timer::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 23%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(93, 67, 50, 0.24), rgba(96, 125, 152, 0.26), transparent);
}

.pomodoro-timer > * {
  position: relative;
  z-index: 1;
}

.pomodoro-timer strong {
  color: #1e1b18;
  text-shadow: 0 14px 34px rgba(96, 125, 152, 0.11);
}

.pomodoro-timer.is-running strong {
  animation: timerPulse 2.4s ease-in-out infinite;
}

.pomodoro-settings {
  border-color: rgba(165, 131, 104, 0.44);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.9), rgba(255, 249, 239, 0.72)),
    rgba(255, 253, 247, 0.78);
}

.pomodoro-settings input[type="range"],
.focus-quick-settings input[type="range"] {
  accent-color: var(--blue);
}

.study-mode::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 246, 224, 0.09) 1px, transparent 1px),
    linear-gradient(rgba(255, 246, 224, 0.07) 1px, transparent 1px);
  background-size: 42px 42px;
  mix-blend-mode: soft-light;
}

.study-mode::after {
  background:
    linear-gradient(180deg, rgba(8, 10, 20, 0.34), rgba(8, 10, 20, 0.18) 42%, rgba(8, 10, 20, 0.56)),
    linear-gradient(110deg, rgba(96, 125, 152, 0.18), transparent 42%, rgba(93, 67, 50, 0.28));
}

.study-mode.is-running .study-bg {
  animation: focusBreath 14s ease-in-out infinite;
}

.study-panel {
  border-radius: 22px 22px 12px 22px;
  background:
    linear-gradient(155deg, rgba(18, 18, 24, 0.58), rgba(18, 18, 24, 0.28)),
    rgba(18, 18, 24, 0.34);
  backdrop-filter: blur(12px) saturate(1.05);
}

.study-close,
.study-size-toggle,
.focus-log-action {
  transition: transform 220ms var(--ease-out), background 220ms ease, box-shadow 220ms ease;
}

.study-close:hover,
.study-size-toggle:hover,
.focus-log-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

@keyframes timerPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.015);
  }
}

@keyframes focusBreath {
  0%,
  100% {
    transform: scale(1);
    filter: saturate(1.08) contrast(1.04);
  }
  50% {
    transform: scale(1.035);
    filter: saturate(1.16) contrast(1.07);
  }
}

/* Flow and motion layer */
:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes slowDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -7px, 0);
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 250, 241, 0.92), rgba(255, 250, 241, 0.18) 34%, rgba(184, 199, 217, 0.1) 64%, rgba(255, 250, 241, 0.74)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 42%, rgba(111, 78, 55, 0.035));
  opacity: 0.72;
}

.app-shell {
  position: relative;
  z-index: 1;
}

.page.is-active {
  animation: floatIn 620ms var(--ease-out) both;
}

.start-copy,
.auth-card,
.setup-card,
.welcome-grid,
.dashboard-grid,
.dashboard-note,
.dashboard-map,
.goal-flow,
.suggestion-panel,
.pathway-panel,
.diary-form {
  animation: floatIn 700ms var(--ease-out) both;
}

.start-orbit,
.desk-card,
.dashboard-map,
.graph-detail-panel {
  animation: slowDrift 9s ease-in-out infinite;
}

.start-orbit,
.auth-card,
.setup-card,
.desk-card,
.dashboard-map,
.graph-canvas {
  border-radius: 42px 42px 24px 42px;
}

.page {
  border-radius: 38px 38px 24px 38px;
}

.dashboard-grid article,
.dashboard-note,
.todo-card,
.habit-card,
.schedule-day,
.schedule-block,
.empty-day,
.goal-card,
.opportunity-card,
.diary-entry,
.suggestion-panel,
.pathway-panel,
.pathway-route,
.pathway-links,
.settings-callout,
.account-strip > div,
.pomodoro-timer,
.pomodoro-settings,
.focus-session {
  transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out), border-color 260ms ease, background 260ms ease;
}

.dashboard-grid article:hover,
.dashboard-note:hover,
.todo-card:hover,
.habit-card:hover,
.schedule-block:hover,
.opportunity-card:hover,
.diary-entry:hover,
.suggestion-panel:hover,
.pathway-route:hover,
.pathway-links:hover,
.focus-session:hover {
  border-color: rgba(96, 125, 152, 0.44);
  transform: translateY(-4px);
  box-shadow: 0 22px 58px rgba(56, 41, 28, 0.095);
}

.primary-action,
.secondary-action,
.text-button,
.side-nav button,
.focus-bg-choice,
.suggestion-option,
.choice-grid label,
.graph-filter-bar label {
  transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out), background 240ms ease, border-color 240ms ease, color 240ms ease;
}

.primary-action:hover,
.secondary-action:hover,
.text-button:hover,
.side-nav button:hover,
.focus-bg-choice:hover,
.suggestion-option:hover,
.choice-grid label:hover,
.graph-filter-bar label:hover {
  transform: translateY(-2px);
}

.side-nav button.is-selected {
  transform: translateX(4px);
}

.map-center,
.map-node,
.graph-node,
.flow-node,
.suggestion-option {
  border-radius: 26px 26px 14px 26px;
}

.map-center,
.graph-node-ideal,
.ambition-node {
  border-radius: 44px 44px 22px 44px;
}

.graph-node-goal,
.goal-node {
  border-radius: 32px 32px 18px 32px;
}

.graph-node-task,
.graph-node-schedule,
.graph-node-opportunity {
  border-radius: 24px 24px 12px 24px;
}

.graph-node-focus {
  border-radius: 999px;
}

.graph-lines path {
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.graph-lines .custom-edge path {
  stroke-width: 2;
}

.graph-node {
  transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out), border-color 240ms ease, background 240ms ease;
}

.graph-node:hover {
  transform: translateY(-5px) rotate(-0.4deg);
}

.graph-node.is-dragging {
  transform: scale(1.035) rotate(0.4deg);
}

.ambition-node::after,
.category-row::before,
.category-row::after,
.goal-column::before {
  background: linear-gradient(180deg, rgba(96, 125, 152, 0.18), rgba(93, 67, 50, 0.45), rgba(96, 125, 152, 0.12));
}

.goal-columns::before {
  background: linear-gradient(90deg, transparent, rgba(96, 125, 152, 0.42), rgba(93, 67, 50, 0.38), transparent);
}

.flow-branch {
  border-left-color: rgba(96, 125, 152, 0.28);
}

.study-panel {
  animation: floatIn 520ms var(--ease-out) both;
}

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

@media (max-width: 980px) {
  .start-screen {
    grid-template-columns: 1fr;
  }

  .start-orbit {
    min-height: 360px;
  }

  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    position: static;
  }

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

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

  .dashboard-map {
    min-height: 620px;
  }

  .map-center,
  .map-node {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    width: auto;
    margin: 14px;
  }

  .dashboard-map::before {
    display: none;
  }

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

  .welcome-grid,
  .profile-grid,
  .settings-grid,
  .schedule-form,
  .pomodoro-grid,
  .pomodoro-settings,
  .account-strip,
  .goal-checklist,
  .suggestion-list,
  .goal-columns,
  .opportunity-grid,
  .pathway-search-row,
  .pathway-results {
    grid-template-columns: 1fr;
  }

  .graph-toolbar {
    grid-template-columns: 1fr;
  }

  .compact-graph-toolbar {
    grid-template-columns: 1fr;
  }

  .graph-toolbar-top,
  .graph-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .graph-filter-bar {
    justify-content: flex-start;
  }

  .add-row select {
    max-width: none;
  }

  .feed-chain {
    grid-template-columns: 1fr;
  }

  .schedule-block {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .focus-session {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .opportunity-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .focus-background-dock {
    bottom: 14px;
    border-radius: 24px;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .focus-background-dock .focus-backgrounds {
    justify-content: flex-start;
  }

  .feed-chain span:not(:last-child)::after {
    content: "↓";
    right: 10px;
    top: auto;
    bottom: -15px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 12px;
  }

  .page {
    padding: 18px;
  }

  .side-nav,
  .dashboard-grid,
  .choice-grid,
  .choice-grid.compact,
  .choice-grid.dense {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(54px, 18vw, 76px);
  }

  h2 {
    font-size: clamp(36px, 13vw, 52px);
  }
}

/* Stability pass: keep the polish, remove jitter-prone continuous motion. */
button:not(:disabled)::after,
.choice-grid label::after,
.suggestion-option::after,
.graph-filter-bar label::after,
.focus-bg-choice::after {
  display: none;
}

.start-orbit,
.desk-card,
.dashboard-map,
.graph-detail-panel,
.study-mode.is-running .study-bg {
  animation: none;
}

.page.is-active,
.start-copy,
.auth-card,
.setup-card,
.welcome-grid,
.dashboard-grid,
.dashboard-note,
.dashboard-map,
.goal-flow,
.suggestion-panel,
.pathway-panel,
.diary-form,
.study-panel {
  animation-name: pageIn;
  animation-duration: 280ms;
  animation-timing-function: ease;
}

.dashboard-grid article:hover,
.dashboard-note:hover,
.todo-card:hover,
.habit-card:hover,
.schedule-block:hover,
.opportunity-card:hover,
.diary-entry:hover,
.suggestion-panel:hover,
.pathway-route:hover,
.pathway-links:hover,
.focus-session:hover,
.graph-node:hover {
  transform: translateY(-2px);
}

@media (max-width: 980px) {
  .side-nav button.is-selected {
    transform: none;
  }
}

/* Minimal photo-based focus mode */
.study-mode {
  background: #141414;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.study-bg {
  image-rendering: auto;
  filter: none;
  object-fit: cover;
  transform: none;
}

.study-mode::before {
  display: none;
}

.study-mode::after {
  background: rgba(0, 0, 0, 0.28);
}

.study-panel {
  width: min(700px, calc(100vw - 40px));
  min-height: auto;
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  justify-items: stretch;
  gap: 18px;
  border: 1px solid rgba(255, 250, 240, 0.3);
  border-radius: 28px;
  background: rgba(10, 10, 10, 0.12);
  box-shadow: none;
  color: #fffaf0;
  padding: clamp(28px, 5vw, 54px);
  text-align: center;
  backdrop-filter: blur(2px);
}

.study-panel .eyebrow {
  margin: 0;
  color: rgba(255, 250, 240, 0.78);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.study-panel span {
  color: rgba(255, 250, 240, 0.86);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.study-panel strong {
  margin: 2px 0 4px;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: clamp(82px, 15vw, 160px);
  line-height: 0.86;
  letter-spacing: 0;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.38);
}

.study-close,
.study-size-toggle {
  position: fixed;
  top: 22px;
  z-index: 4;
  width: fit-content !important;
  min-width: 0;
  max-width: calc(50vw - 28px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(255, 250, 240, 0.28);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.24);
  color: rgba(255, 250, 240, 0.9);
  padding: 0 16px;
  backdrop-filter: blur(10px);
}

.study-close {
  top: auto !important;
  right: auto !important;
  bottom: 22px;
  left: 22px !important;
}

.study-size-toggle {
  right: auto !important;
  left: 22px;
}

.focus-task-link,
.focus-quick-settings {
  width: min(520px, 100%);
  justify-self: center;
}

.focus-task-link {
  gap: 8px;
  color: rgba(255, 250, 240, 0.82);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.focus-task-link select,
.focus-quick-settings input,
.focus-log-action {
  border: 1px solid rgba(255, 250, 240, 0.18);
  border-radius: 12px;
  background: rgba(255, 250, 240, 0.9);
  color: #1f1b18;
  box-shadow: none;
}

.focus-quick-settings {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.focus-quick-settings label {
  gap: 7px;
  color: rgba(255, 250, 240, 0.82);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.study-panel .pomodoro-controls {
  gap: 10px;
}

.study-panel .primary-action,
.study-panel .secondary-action,
.focus-log-action {
  min-height: 44px;
  border-radius: 14px;
  padding: 0 18px;
  font-size: 15px;
}

.study-panel .primary-action {
  border-color: rgba(31, 27, 24, 0.92);
  background: rgba(31, 27, 24, 0.94);
}

.study-panel .secondary-action {
  border-color: rgba(255, 250, 240, 0.24);
  background: rgba(255, 250, 240, 0.88);
  color: #1f1b18;
}

.focus-log-action {
  justify-self: center;
  background: rgba(255, 250, 240, 0.72);
  color: rgba(31, 27, 24, 0.78);
}

.focus-background-dock {
  bottom: 18px;
  width: auto;
  max-width: calc(100vw - 32px);
  border: 0;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.24);
  box-shadow: none;
  padding: 8px;
  backdrop-filter: blur(12px);
}

.focus-background-dock > span {
  display: none;
}

.focus-background-dock .focus-backgrounds {
  flex: 0 1 auto;
  gap: 6px;
}

.focus-bg-choice {
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 250, 240, 0.82);
  padding: 0 12px;
  font-size: 12px;
}

.focus-bg-choice.is-selected {
  background: rgba(255, 250, 240, 0.9);
  color: #1f1b18;
}

.study-mode.is-minimized .study-panel {
  width: min(380px, calc(100vw - 40px));
  border-color: transparent;
  background: transparent;
  padding: 28px;
  backdrop-filter: none;
}

.study-mode.is-minimized .study-panel strong {
  font-size: clamp(52px, 14vw, 76px);
}

@media (max-width: 640px) {
  .study-panel {
    width: min(100%, calc(100vw - 24px));
    gap: 14px;
    padding: 24px 12px;
  }

  .study-panel strong {
    font-size: clamp(72px, 24vw, 110px);
  }

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

  .study-close,
  .study-size-toggle {
    top: 12px;
    min-height: 34px;
    padding: 0 12px;
  }

  .study-close {
    right: auto !important;
    bottom: 12px;
    left: 12px !important;
  }

  .study-size-toggle {
    left: 12px;
  }
}

/* Keep Focus Mode exit pinned to the viewport bottom-left. */
#studyModeClose {
  position: fixed !important;
  inset: auto auto 22px 22px !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: calc(100vw - 44px) !important;
  justify-self: auto !important;
  align-self: auto !important;
  transform: none !important;
}

#studyModeSizeToggle {
  position: fixed !important;
  inset: auto 22px 22px auto !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: calc(100vw - 44px) !important;
  justify-self: auto !important;
  align-self: auto !important;
  transform: none !important;
}

@media (max-width: 640px) {
  #studyModeClose {
    inset: auto auto 12px 12px !important;
    max-width: calc(100vw - 24px) !important;
  }

  #studyModeSizeToggle {
    inset: auto 12px 12px auto !important;
    max-width: calc(100vw - 24px) !important;
  }
}
