:root {
  --entry-bg: #f6ede2;
  --entry-panel: #fffaf4;
  --entry-panel-soft: #fbf2e8;
  --entry-ink: #1f2629;
  --entry-muted: #655e59;
  --entry-line: rgba(31, 38, 41, 0.12);
  --entry-accent: #bb664c;
  --entry-accent-deep: #8e4734;
  --entry-accent-soft: rgba(187, 102, 76, 0.14);
  --entry-success: #2f8a5d;
  --entry-danger: #9d2f2f;
  --entry-shadow: 0 18px 48px rgba(84, 58, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body.entry-body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--entry-ink);
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  background: var(--entry-bg);
}

.entry-page {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 80px;
}

.entry-page-narrow {
  width: min(680px, calc(100% - 32px));
}

.landing-page {
  display: grid;
  gap: 88px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(390px, 1.05fr);
  min-height: 720px;
  gap: 64px;
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 20px;
  max-width: 40rem;
}

.hero-brand {
  color: var(--entry-accent-deep);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.section-header h2,
.final-cta h2,
.setup-start-copy h1 {
  margin: 0;
  font-family: "Baskerville", "Palatino Linotype", "Book Antiqua", serif;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(50px, 5.8vw, 70px);
}

.hero-outcome,
.hero-subheadline,
.how-card p,
.moments-copy,
.founder-story-copy p,
.final-cta p,
.setup-start-copy p,
.setup-start-note {
  margin: 0;
  color: var(--entry-muted);
  font-size: 19px;
  line-height: 1.65;
}

.hero-intro {
  display: grid;
  gap: 16px;
}

.hero-outcome {
  max-width: 18ch;
  color: var(--entry-ink);
  font-family: "Baskerville", "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.hero-subheadline {
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.entry-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--entry-line);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease,
    box-shadow 180ms ease;
  cursor: pointer;
}

.entry-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(84, 58, 39, 0.12);
}

.entry-button-primary {
  background: var(--entry-accent);
  border-color: var(--entry-accent);
  color: var(--entry-panel);
}

.entry-button-secondary {
  background: transparent;
  color: var(--entry-ink);
}

.entry-button-full {
  width: 100%;
}

.entry-button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 42rem;
}

.trust-chips span {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--entry-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  color: var(--entry-muted);
  font-size: 12px;
  font-weight: 600;
}

.landing-login-hint,
.setup-login-hint {
  margin: 0;
  font-size: 13px;
  color: var(--entry-muted);
}

.setup-back-link {
  margin: 6px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--entry-muted);
}

.landing-login-hint a,
.setup-login-hint a,
.setup-back-link a {
  color: var(--entry-success);
  font-weight: 600;
  text-decoration: none;
}

.landing-login-hint a:hover,
.setup-login-hint a:hover,
.setup-back-link a:hover {
  text-decoration: underline;
}

.landing-returning-chip {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 100;
}

.landing-returning-chip a {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--entry-success);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.landing-returning-chip a:hover {
  opacity: 0.9;
}

.hero-phone-column {
  display: grid;
  justify-items: center;
  gap: 18px;
  align-self: center;
}

.phone-frame {
  width: min(100%, 430px);
  padding: 13px;
  border-radius: 42px;
  background: #21272b;
  box-shadow: 0 26px 70px rgba(31, 38, 41, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.phone-screen {
  display: grid;
  align-content: start;
  min-height: 620px;
  overflow: hidden;
  border-radius: 30px;
  background: #f1ecdf;
}

.phone-game-screen {
  font-family: "Courier New", monospace;
}

.phone-game-header {
  display: grid;
  gap: 10px;
  padding: 22px 18px 18px;
  background: #286b2d;
  color: #fff;
}

.phone-game-greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
}

.phone-game-greeting span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.phone-game-level {
  padding: 8px 10px;
  border: 2px solid #b68300;
  background: #dfa80d;
  color: #171717;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.phone-game-progress {
  position: relative;
  height: 22px;
  overflow: hidden;
  border: 3px solid #16291a;
  background: #1d1c32;
  color: #fff;
}

.phone-game-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  background: #4a8b3d;
}

.phone-game-progress strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

.phone-game-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 16px 14px;
  border: 3px solid #315d35;
}

.phone-game-tabs span {
  padding: 11px 4px;
  border-right: 1px solid #315d35;
  background: #eee9dc;
  color: #1d2030;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.phone-game-tabs span:last-child {
  border-right: 0;
}

.phone-game-tabs .is-active {
  background: #286b2d;
  color: #fff;
}

.phone-missions {
  margin: 0 16px 22px;
  padding: 19px 20px 8px;
  border: 3px solid #315d35;
  background: #f4efe3;
}

.phone-missions-title {
  padding-bottom: 10px;
  border-bottom: 2px solid #286b2d;
  color: #286b2d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.phone-mission {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 12px;
  gap: 10px;
  align-items: start;
  padding: 15px 0 13px;
  border-bottom: 2px dashed #d49c13;
}

.phone-mission:last-child {
  border-bottom: 0;
}

.phone-mission-emoji {
  padding-top: 1px;
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: 25px;
}

.phone-mission strong {
  color: #202233;
  font-size: 13px;
}

.phone-mission p {
  margin: 5px 0;
  color: #222;
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.35;
}

.phone-mission small {
  color: #d69200;
  font-size: 11px;
  font-weight: 900;
}

.phone-mission-arrow {
  align-self: center;
  color: #286b2d;
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: 21px;
  font-weight: 900;
}

.demo-link {
  color: #286b2d;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.content-section {
  display: grid;
  gap: 24px;
}

.section-header h2 {
  font-size: clamp(34px, 5vw, 52px);
}

.how-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.how-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--entry-line);
  border-radius: 24px;
  background: var(--entry-panel);
  box-shadow: var(--entry-shadow);
}

.how-number {
  color: var(--entry-accent);
  font-family: "Baskerville", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 56px;
  line-height: 0.9;
}

.how-card h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

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

.moment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 18px 20px;
  border: 1px solid var(--entry-line);
  border-radius: 24px;
  background: var(--entry-panel);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  box-shadow: var(--entry-shadow);
}

.moment-card small {
  flex: 0 0 auto;
  color: var(--entry-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.moments-copy {
  max-width: 52rem;
}

.section-label,
.founder-kicker {
  color: var(--entry-accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.moments-header-copy {
  display: grid;
  gap: 12px;
}

.founder-story {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 40px;
  align-items: center;
  padding: 36px;
  border-radius: 24px;
  background: var(--entry-accent-deep);
  color: #fffaf4;
  box-shadow: 0 24px 64px rgba(84, 58, 39, 0.2);
}

.founder-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 24px;
  object-fit: cover;
  object-position: center 32%;
}

.founder-story-copy {
  display: grid;
  gap: 17px;
}

.founder-story-copy h2 {
  max-width: 14ch;
  margin: 0;
  font-family: "Baskerville", "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.founder-story-copy p {
  color: rgba(255, 250, 244, 0.84);
}

.founder-story-copy .founder-kicker {
  color: #f3c7b7;
  font-size: 12px;
}

.founder-story-copy .founder-attribution {
  color: #fffaf4;
  font-size: 15px;
  font-weight: 800;
}

.final-cta,
.setup-start-shell {
  padding: 32px;
  border: 1px solid var(--entry-line);
  border-radius: 24px;
  background: var(--entry-panel);
  box-shadow: var(--entry-shadow);
}

.final-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.final-cta h2 {
  margin: 0 auto;
  max-width: 14ch;
  font-size: clamp(36px, 5vw, 58px);
  text-align: center;
}

.final-cta p {
  text-align: center;
}

.setup-start-shell {
  padding: 32px;
}

.section-eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 16px;
  color: var(--entry-accent-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.setup-start-copy {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.setup-start-form {
  display: grid;
  gap: 16px;
}

.entry-field {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.entry-input {
  width: 100%;
  min-height: 56px;
  padding: 0 14px;
  border: 1px solid rgba(31, 38, 41, 0.1);
  border-radius: 16px;
  background: #fff;
  font: inherit;
  color: var(--entry-ink);
}

.entry-input:focus {
  outline: 2px solid rgba(187, 102, 76, 0.18);
  border-color: rgba(187, 102, 76, 0.44);
}

.entry-input-error {
  border-color: rgba(157, 47, 47, 0.34);
}

.entry-message {
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
}

.entry-message-error {
  background: rgba(157, 47, 47, 0.08);
  color: var(--entry-danger);
  border: 1px solid rgba(157, 47, 47, 0.16);
}

.entry-message-success {
  background: rgba(47, 138, 93, 0.1);
  color: var(--entry-success);
  border: 1px solid rgba(47, 138, 93, 0.16);
}

.entry-field-error {
  color: var(--entry-danger);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 940px) {
  .entry-page,
  .entry-page-narrow {
    width: min(calc(100% - 24px), 1200px);
    padding-top: 24px;
    padding-bottom: 64px;
  }

  .hero-section,
  .how-cards,
  .moment-cards,
  .founder-story {
    grid-template-columns: 1fr;
  }

  .landing-page {
    gap: 48px;
  }

  .hero-section {
    min-height: 0;
    gap: 28px;
  }

  .hero-copy h1 {
    font-size: clamp(40px, 12vw, 58px);
  }

  .hero-subheadline,
  .how-card p,
  .moments-copy,
  .founder-story-copy p,
  .final-cta p,
  .setup-start-copy p,
  .setup-start-note {
    font-size: 17px;
  }

  .hero-copy {
    gap: 18px;
    text-align: center;
    justify-items: center;
  }

  .hero-intro {
    justify-items: center;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .entry-button {
    min-height: 52px;
    padding: 0 16px;
    text-align: center;
  }

  .trust-chips {
    gap: 10px;
  }

  .trust-chips span {
    font-size: 13px;
    padding: 9px 12px;
  }

  .hero-phone-column {
    justify-items: center;
  }

  .phone-frame {
    width: min(100%, 400px);
  }

  .section-header h2,
  .final-cta h2,
  .setup-start-copy h1 {
    font-size: clamp(32px, 9vw, 42px);
  }

  .how-card h3 {
    font-size: 22px;
  }

  .how-number {
    font-size: 48px;
  }

  .main-quote {
    font-size: 28px;
  }

  .moment-card {
    font-size: 17px;
    padding: 16px 14px;
  }

  .final-cta,
  .setup-start-shell,
  .how-card {
    padding: 24px;
  }

  .founder-story {
    gap: 24px;
    padding: 28px;
  }

  .founder-photo {
    height: 280px;
    aspect-ratio: auto;
  }
}

@media (max-width: 640px) {
  .entry-page,
  .entry-page-narrow {
    width: min(calc(100% - 32px), 1200px);
    padding-top: 18px;
    padding-bottom: 52px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero-actions .entry-button {
    width: 100%;
    text-align: center;
  }

  .moment-cards {
    grid-template-columns: 1fr;
  }

  .trust-chips {
    width: 100%;
    justify-content: center;
  }

  .trust-chips span {
    flex: 0 1 calc(50% - 5px);
    width: auto;
    justify-content: center;
    text-align: center;
  }

  .content-section {
    gap: 18px;
  }

  .phone-screen {
    min-height: 560px;
  }

  .phone-game-header {
    padding: 18px 14px 15px;
  }

  .phone-game-tabs {
    margin: 14px 12px 12px;
  }

  .phone-game-tabs span {
    font-size: 9px;
  }

  .phone-missions {
    margin: 0 12px 18px;
    padding: 16px 14px 6px;
  }

  .phone-mission {
    grid-template-columns: 28px minmax(0, 1fr) 10px;
    gap: 8px;
  }

  .phone-mission-emoji {
    font-size: 22px;
  }

  .hero-phone-column {
    width: 100%;
    padding: 2rem 1rem;
    background: var(--entry-panel);
    border-radius: 24px;
  }

  .hero-phone-column .phone-frame {
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
  }

  .founder-story {
    padding: 20px 1.25rem;
    border-radius: 24px;
  }

  .founder-photo {
    height: 240px;
    aspect-ratio: auto;
    border-radius: 20px;
  }

  .founder-story-copy h2 {
    font-size: clamp(32px, 7.5vw, 49px);
  }

  .how-card,
  .final-cta {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .final-cta .entry-button {
    align-self: stretch;
  }
}

.entry-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.entry-brand,
.entry-topbar-link {
  color: var(--entry-accent-deep);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.setup-wizard-page {
  width: min(920px, calc(100% - 32px));
}

.setup-wizard,
.wizard-step,
.moments-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  min-width: 0;
}

.wizard-step,
.setup-complete-shell {
  padding: 34px;
  border: 1px solid var(--entry-line);
  border-radius: 28px;
  background: var(--entry-panel);
  box-shadow: var(--entry-shadow);
}

.wizard-enhanced .wizard-step:not(.is-active) {
    display: none;
}

.moments-header {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 30px;
  align-items: end;
}

.moments-header h1,
.setup-complete-shell h1 {
  margin: 0;
  font-family: "Baskerville", "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(40px, 6vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.moments-header p,
.thresholds-section > div > p,
.quick-actions-section > div > p,
.setup-complete-shell > p {
  margin: 0;
  color: var(--entry-muted);
  font-size: 17px;
  line-height: 1.6;
}

.first-mission {
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 2px solid rgba(187, 102, 76, 0.28);
  border-radius: 24px;
  background: linear-gradient(135deg, #fffaf4 0%, #fbefe4 100%);
}

.first-mission-label {
  color: var(--entry-accent-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.first-mission-label span {
  padding: 0 7px;
}

.mission-fields {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 14px;
}

.mission-description {
  grid-column: 1 / -1;
}

.entry-field textarea {
  min-height: 100px;
  padding: 14px;
  resize: vertical;
}

.mission-note {
  margin: 0;
  color: var(--entry-muted);
  font-size: 14px;
}

.moments-list-section,
.quick-actions-section,
.thresholds-section {
  display: grid;
  gap: 16px;
}

.moments-list-section h2,
.thresholds-section h2 {
  margin: 0;
  font-family: "Baskerville", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 32px;
}

.moments-list {
  overflow: hidden;
  border: 1px solid var(--entry-line);
  border-radius: 22px;
  background: #fff;
}

.moment-row + .moment-row {
  border-top: 1px solid var(--entry-line);
}

.moment-row-error {
  box-shadow: inset 3px 0 var(--entry-danger);
}

.moment-summary {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 80px 88px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 12px 18px;
  border: 0;
  background: #fff;
  color: var(--entry-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.moment-summary:hover,
.moment-row.is-open .moment-summary {
  background: var(--entry-panel-soft);
}

.moment-emoji {
  font-size: 24px;
}

.moment-name {
  font-weight: 800;
}

.moment-xp,
.moment-edit-label {
  color: var(--entry-muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.moment-editor {
  padding: 4px 18px 20px 74px;
  background: var(--entry-panel-soft);
}

.quick-actions-section {
  padding: 22px;
  border-radius: 22px;
  background: rgba(31, 38, 41, 0.035);
}

.quick-actions-list {
  display: grid;
  gap: 10px;
}

.quick-action {
  display: grid;
  grid-template-columns: 36px 120px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--entry-line);
  border-radius: 16px;
  background: var(--entry-panel);
}

.quick-action p {
  margin: 0;
  color: var(--entry-muted);
  font-size: 14px;
}

.quick-action-emoji {
  font-size: 22px;
}

.locked-label {
  color: var(--entry-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.threshold-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--entry-line);
  border-radius: 20px;
  background: #fff;
}

.threshold-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.threshold-table th,
.threshold-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--entry-line);
}

.threshold-table th {
  color: var(--entry-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.threshold-table tr:last-child td {
  border-bottom: 0;
}

.threshold-input {
  width: 110px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--entry-line);
  border-radius: 12px;
  font: inherit;
}

.threshold-static {
  display: inline-flex;
  min-width: 110px;
  min-height: 42px;
  align-items: center;
  padding: 0 10px;
  color: var(--entry-muted);
}

.threshold-error {
  display: block;
  max-width: 220px;
  margin-top: 5px;
}

.wizard-actions {
  display: flex;
  gap: 12px;
}

.wizard-actions .entry-button-full {
  flex: 1;
}

.setup-complete-shell {
  display: grid;
  gap: 24px;
}

.setup-complete-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.setup-complete-meta div {
  padding: 16px;
  border-radius: 16px;
  background: var(--entry-panel-soft);
}

.setup-complete-meta dt {
  color: var(--entry-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.setup-complete-meta dd {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 800;
}

.setup-complete-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.setup-complete-link {
  padding-top: 18px;
  border-top: 1px solid var(--entry-line);
  word-break: break-all;
}

.setup-complete-link a {
  color: var(--entry-accent-deep);
  font-weight: 800;
}

@media (max-width: 720px) {
  .setup-wizard-page {
    width: min(calc(100% - 32px), 920px);
  }

  .wizard-step,
  .setup-complete-shell {
    padding: 22px;
  }

  .moments-header h1,
  .setup-complete-shell h1 {
    font-size: clamp(28px, 7vw, 48px);
  }

  .moments-header,
  .mission-fields,
  .setup-complete-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .mission-description {
    grid-column: auto;
  }

  .emoji-field {
    max-width: 120px;
  }

  .moment-summary {
    grid-template-columns: 36px minmax(0, 1fr) 62px;
    padding: 12px;
  }

  .moment-edit-label {
    grid-column: 2 / -1;
    text-align: left;
  }

  .moment-editor {
    padding: 4px 12px 18px;
  }

  .quick-action {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .quick-action p,
  .locked-label {
    grid-column: 2;
  }

  .wizard-actions,
  .setup-complete-actions {
    display: grid;
  }
}

/* === Task card selection UI (step 2 redesign) === */

.task-selection-progress {
  display: grid;
  gap: 8px;
}

.task-progress-bar-track {
  height: 6px;
  border-radius: 20px;
  background: var(--entry-line);
  overflow: hidden;
}

.task-progress-bar-fill {
  height: 100%;
  border-radius: 20px;
  background: #c1651a;
  transition: width 220ms ease;
}

.task-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.task-progress-count {
  font-size: 13px;
  font-weight: 500;
}

.task-progress-hint {
  font-size: 12px;
}

.task-progress-hint-low  { color: #c1651a; }
.task-progress-hint-good { color: var(--entry-success); }
.task-progress-hint-over { color: var(--entry-muted); }

.add-task-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px dashed var(--entry-line);
  border-radius: 12px;
  background: #fff;
  color: var(--entry-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.add-task-button:hover {
  border-color: #c1651a;
  background: #fdf6f2;
}

.add-task-plus {
  font-size: 18px;
  line-height: 1;
  color: #c1651a;
  font-weight: 400;
}

.custom-task-form {
  padding: 18px;
  border: 1px solid var(--entry-line);
  border-radius: 16px;
  background: var(--entry-panel-soft);
}

.custom-task-form-fields {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 12px;
  margin: 14px 0;
}

.custom-task-form-fields .mission-description {
  grid-column: 1 / -1;
}

.custom-task-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.task-section-header {
  margin: 16px 0 8px;
}

.task-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--entry-muted);
}

.task-section-divider {
  border: none;
  border-top: 1px solid var(--entry-line);
  margin: 4px 0 0;
}

/* Task card */

.task-card {
  border: 0.5px solid var(--entry-line);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 7px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.task-card.is-selected {
  border: 2px solid #c1651a;
  background: #fdf6f2;
}

.task-card-opening {
  cursor: default;
  border: 2px solid #c1651a !important;
  background: #fdf6f2 !important;
}

.task-card-error {
  box-shadow: inset 3px 0 var(--entry-danger);
}

.task-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
}

.task-card-check {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--entry-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: transparent;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.task-card-check-filled {
  background: #c1651a;
  border-color: #c1651a;
  color: #fff;
}

.task-card-emoji {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
}

.task-card-body {
  flex: 1 1 0;
  min-width: 0;
}

.task-card-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-card-desc {
  font-size: 12px;
  color: var(--entry-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.task-card-xp {
  flex: 0 0 auto;
  font-size: 12px;
  color: #c1651a;
  font-weight: 600;
  white-space: nowrap;
}

.task-card-badge {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: #c1651a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.task-card-badge-custom {
  color: var(--entry-muted);
}

.task-card-edit-link {
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 2px 4px;
  font: inherit;
  font-size: 11px;
  color: var(--entry-muted);
  cursor: pointer;
  white-space: nowrap;
}

.task-card-edit-link:hover {
  color: var(--entry-ink);
}

.task-card-remove-btn {
  margin-top: 10px;
  background: none;
  border: none;
  padding: 4px 0;
  font: inherit;
  font-size: 12px;
  color: var(--entry-danger);
  cursor: pointer;
}

.task-card-editor {
  padding: 4px 12px 16px 42px;
  background: var(--entry-panel-soft);
  border-top: 1px solid var(--entry-line);
}

.task-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex: 0 0 auto;
  padding: 4px 4px 4px 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* --- Add-task modal --- */
.task-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.task-modal-backdrop[hidden] {
  display: none;
}

.task-modal {
  background: var(--entry-surface, #fff);
  border-radius: 14px;
  width: 100%;
  max-width: 420px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  position: relative;
}

.task-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--entry-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
}

.task-modal-close:hover {
  color: var(--entry-ink);
}

.task-modal-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.task-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.task-modal-actions .entry-button {
  flex: 1;
}

@media (max-width: 720px) {
  .custom-task-form-fields {
    grid-template-columns: 1fr;
  }

  .task-card-row {
    flex-wrap: nowrap;
  }

  .task-card-body {
    min-width: 0;
  }

  .task-card-actions {
    max-width: 100px;
  }

  .task-card-badge {
    white-space: normal;
    text-align: right;
  }

  .task-card-editor {
    padding-left: 12px;
  }

  .task-modal {
    max-width: 100%;
  }
}
