:root {
  --paper: #f3eee2;
  --paper-light: #fbf8f0;
  --paper-deep: #e9e0cf;
  --ink: #263129;
  --ink-soft: #3d493f;
  --muted: #6b6b62;
  --moss: #596859;
  --sage: #87917f;
  --terracotta: #ad5136;
  --terracotta-dark: #873d29;
  --indigo: #445672;
  --gold: #bd9140;
  --love: #d7b363;
  --skill: #4e6382;
  --world: #bc6247;
  --value: #60705e;
  --line: rgba(45, 54, 46, 0.15);
  --shadow: 0 22px 70px rgba(44, 51, 43, 0.1);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 10% 12%, rgba(189,145,64,.08), transparent 28%),
    radial-gradient(circle at 90% 66%, rgba(89,104,89,.07), transparent 30%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  opacity: .18;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}
[hidden] { display: none !important; }
button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
h1, h2, h3, p { margin-top: 0; }
.noscript {
  max-width: 620px;
  margin: 60px auto;
  padding: 24px;
  background: var(--paper-light);
  border: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--moss);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .23em;
  text-transform: uppercase;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: var(--paper);
  transition: opacity .25s ease;
}
.boot-screen img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  animation: breathe 1.8s ease-in-out infinite;
}
.boot-screen p {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .05em;
}

.access-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(440px, .92fr);
}
.access-panel {
  min-width: 0;
  padding: clamp(38px, 5vw, 78px);
}
.access-copy {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(145deg, rgba(246,240,226,.72), rgba(232,222,201,.84)),
    var(--paper-deep);
}
.access-brand, .app-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  border: 0;
  background: transparent;
  padding: 0;
  font: 400 29px/1 var(--serif);
  letter-spacing: -.035em;
}
.access-brand i, .app-brand i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--terracotta);
}
.access-message {
  position: relative;
  z-index: 2;
  max-width: 650px;
  margin: auto 0 0;
  padding-top: 72px;
}
.access-message h1 {
  max-width: 620px;
  margin-bottom: 26px;
  font: 400 clamp(52px, 5.4vw, 82px)/.98 var(--serif);
  letter-spacing: -.05em;
}
.access-message > p:last-child {
  max-width: 570px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}
.access-art {
  position: absolute;
  right: -7vw;
  bottom: -14vw;
  width: min(57vw, 790px);
  opacity: .39;
  filter: saturate(.82);
  transform: rotate(-7deg);
}
.access-quote {
  position: relative;
  z-index: 2;
  margin: auto 0 0;
  padding-top: 90px;
  font: 400 18px var(--serif);
}
.access-quote span {
  color: var(--muted);
  font: 400 12px var(--sans);
}
.access-form-panel {
  display: grid;
  place-items: center;
  background: rgba(251,248,240,.88);
}
.form-wrap {
  width: min(430px, 100%);
}
.form-wrap h2 {
  margin-bottom: 16px;
  font: 400 clamp(42px, 4vw, 58px)/1.02 var(--serif);
  letter-spacing: -.04em;
}
.form-intro {
  margin-bottom: 36px;
  color: var(--muted);
  line-height: 1.6;
}
#login-form, #first-password-form, .account-password-form {
  display: grid;
  gap: 11px;
}
#login-form label, #first-password-form label, .account-password-form label {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.label-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 8px;
}
.label-row label { margin: 0 !important; }
.text-button, .quiet-button {
  border: 0;
  background: transparent;
  padding: 4px 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
#login-form > input,
.password-field input,
#first-password-form > input,
.account-password-form > input {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fffdf8;
  padding: 0 16px;
  color: var(--ink);
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 62px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--moss);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}
.primary-button {
  min-height: 60px;
  border: 0;
  border-radius: 5px;
  background: var(--terracotta);
  color: white;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(132,61,42,.18);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.primary-button:hover {
  transform: translateY(-2px);
  background: var(--terracotta-dark);
  box-shadow: 0 18px 42px rgba(132,61,42,.24);
}
.primary-button:disabled {
  opacity: .58;
  cursor: wait;
  transform: none;
}
#login-form .primary-button, #first-password-form .primary-button {
  margin-top: 12px;
}
.form-message {
  min-height: 22px;
  margin: 5px 0 0;
  color: var(--terracotta-dark);
  font-size: 13px;
  line-height: 1.5;
}
.form-message.success { color: var(--moss); }
.beta-note {
  margin-top: 36px;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.beta-note strong {
  color: var(--moss);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.beta-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.single-panel {
  grid-template-columns: 1fr;
  place-items: center;
  padding: 28px;
}
.password-change-card {
  width: min(600px, 100%);
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid var(--line);
  background: rgba(251,248,240,.92);
  box-shadow: var(--shadow);
}
.password-change-card .access-brand { margin-bottom: 70px; }
.password-change-card h1 {
  margin-bottom: 20px;
  font: 400 clamp(44px, 5vw, 66px)/1 var(--serif);
  letter-spacing: -.045em;
}
.password-change-card > p:not(.eyebrow) {
  margin-bottom: 32px;
  color: var(--muted);
  line-height: 1.65;
}
.password-rules {
  list-style: none;
  padding: 4px 0 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.password-rules li {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(89,104,89,.08);
  color: var(--muted);
  font-size: 11px;
}
.password-rules li::before { content: "○ "; }
.password-rules li.valid {
  background: rgba(89,104,89,.15);
  color: var(--moss);
}
.password-rules li.valid::before { content: "✓ "; }
.password-change-card > .quiet-button {
  width: 100%;
  margin-top: 22px;
}
.centered-card { text-align: center; }
.small-art { width: 110px; margin-bottom: 25px; }
.centered-card .primary-button { margin: 0 auto; }
.compact-button { width: auto; min-width: 210px; justify-content: center; }

.app-shell {
  min-height: 100vh;
  padding: 74px 0 0 270px;
}
.app-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 110;
  height: 74px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(247,242,232,.91);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
}
.app-brand { cursor: pointer; }
.header-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}
.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5f865f;
}
.header-status.syncing .sync-dot {
  background: var(--gold);
  animation: pulse 1s ease-in-out infinite;
}
.header-status.error .sync-dot,
.header-status.offline .sync-dot { background: var(--terracotta); }
.profile-button {
  width: 38px;
  height: 38px;
  margin-left: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
  cursor: pointer;
  font: 400 17px var(--serif);
}
.mobile-menu-button { display: none; }
.app-sidebar {
  position: fixed;
  top: 74px;
  bottom: 0;
  left: 0;
  z-index: 100;
  width: 270px;
  padding: 28px 20px 18px;
  border-right: 1px solid var(--line);
  background: rgba(245,239,227,.94);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.app-sidebar nav { display: grid; gap: 3px; }
.app-sidebar nav button {
  min-height: 43px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 25px 1fr 10px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  transition: background .18s ease, color .18s ease;
}
.app-sidebar nav button:hover,
.app-sidebar nav button.active {
  background: rgba(89,104,89,.1);
  color: var(--ink);
}
.app-sidebar nav button.locked {
  opacity: .46;
}
.app-sidebar nav button b {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
}
.app-sidebar nav button b.done { background: var(--moss); }
.nav-icon { font-size: 18px; text-align: center; }
.nav-index {
  color: var(--gold);
  font: 400 13px var(--serif);
}
.nav-label {
  margin: 23px 12px 8px;
  color: var(--sage);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.sidebar-progress {
  margin-top: auto;
  padding: 20px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sidebar-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
.sidebar-progress strong { color: var(--terracotta); }
.progress-track {
  height: 4px;
  margin: 12px 0 10px;
  border-radius: 99px;
  background: rgba(39,49,41,.1);
  overflow: hidden;
}
.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--terracotta);
  transition: width .35s ease;
}
.sidebar-progress small {
  color: var(--moss);
  font: 400 13px var(--serif);
}
.sidebar-account {
  min-height: 62px;
  margin-top: 10px;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}
.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--indigo);
  color: white;
  display: grid;
  place-items: center;
  font: 400 15px var(--serif);
}
.sidebar-account > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar-account strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}
.sidebar-account small { color: var(--muted); font-size: 10px; }

.app-content {
  min-height: calc(100vh - 74px);
  padding: clamp(28px, 4.5vw, 64px);
}
.view {
  width: min(1120px, 100%);
  margin: 0 auto;
  animation: viewIn .3s ease;
}
.view-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 42px;
}
.view-header h1 {
  margin-bottom: 0;
  font: 400 clamp(43px, 5vw, 66px)/1 var(--serif);
  letter-spacing: -.045em;
}
.view-header p:last-child {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}
.xp-chip {
  flex: 0 0 auto;
  padding: 11px 15px;
  border: 1px solid rgba(189,145,64,.35);
  border-radius: 99px;
  background: rgba(251,248,240,.7);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.welcome-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 22px;
  margin-bottom: 26px;
}
.welcome-card, .level-card, .phase-card, .insight-card, .achievement-card,
.account-section, .map-card, .plan-card, .phase-form-card {
  border: 1px solid var(--line);
  background: rgba(251,248,240,.75);
}
.welcome-card {
  position: relative;
  min-height: 300px;
  padding: clamp(28px, 4vw, 48px);
  overflow: hidden;
}
.welcome-card > *:not(img) { position: relative; z-index: 2; }
.welcome-card h2 {
  max-width: 600px;
  margin-bottom: 17px;
  font: 400 clamp(36px, 4vw, 54px)/1.02 var(--serif);
  letter-spacing: -.04em;
}
.welcome-card p:not(.eyebrow) {
  max-width: 550px;
  margin-bottom: 30px;
  color: var(--muted);
  line-height: 1.6;
}
.welcome-card img {
  position: absolute;
  right: -100px;
  bottom: -130px;
  width: 430px;
  opacity: .18;
}
.inline-button, .secondary-button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper-light);
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  cursor: pointer;
  font-size: 13px;
}
.inline-button.primary-small {
  border-color: var(--terracotta);
  background: var(--terracotta);
  color: white;
}
.level-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
}
.level-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.level-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: grid;
  place-items: center;
  color: var(--terracotta);
  font: 400 25px var(--serif);
}
.level-card h3 {
  margin: auto 0 7px;
  font: 400 29px var(--serif);
}
.level-card p { color: var(--muted); font-size: 13px; }
.xp-bar {
  height: 7px;
  border-radius: 99px;
  background: rgba(39,49,41,.1);
  overflow: hidden;
}
.xp-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--terracotta));
  border-radius: inherit;
}
.xp-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}
.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 45px 0 20px;
}
.section-title-row h2 {
  margin: 0;
  font: 400 34px var(--serif);
}
.section-title-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.phase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.phase-card {
  position: relative;
  min-height: 245px;
  border-top: 4px solid var(--phase-color);
  padding: 22px;
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease;
}
.phase-card:hover:not(.locked) {
  transform: translateY(-4px);
  box-shadow: 0 16px 38px rgba(44,51,43,.09);
}
.phase-card.locked {
  opacity: .48;
  cursor: not-allowed;
}
.phase-card .card-top {
  display: flex;
  justify-content: space-between;
  color: var(--gold);
  font: 400 22px var(--serif);
}
.phase-card .card-status {
  color: var(--muted);
  font: 600 9px var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.phase-card .card-body { margin-top: auto; }
.phase-card .card-body p {
  margin-bottom: 8px;
  color: var(--phase-color);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.phase-card h3 {
  margin-bottom: 11px;
  font: 400 26px/1.05 var(--serif);
}
.phase-card small { color: var(--muted); line-height: 1.45; }
.phase-mini-progress {
  height: 3px;
  margin-top: 20px;
  background: rgba(39,49,41,.09);
}
.phase-mini-progress span {
  display: block;
  height: 100%;
  background: var(--phase-color);
}
.insight-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 26px;
}
.insight-card { padding: 25px; }
.insight-card strong {
  display: block;
  margin-bottom: 8px;
  font: 400 22px var(--serif);
}
.insight-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.phase-view {
  --phase-color: var(--terracotta);
}
.phase-hero {
  position: relative;
  min-height: 250px;
  margin-bottom: 22px;
  padding: clamp(28px, 5vw, 58px);
  border-top: 5px solid var(--phase-color);
  background: rgba(251,248,240,.75);
  overflow: hidden;
}
.phase-hero::after {
  content: attr(data-number);
  position: absolute;
  right: 34px;
  bottom: -38px;
  color: color-mix(in srgb, var(--phase-color) 12%, transparent);
  font: 400 170px var(--serif);
}
.phase-hero > * { position: relative; z-index: 2; }
.phase-hero h1 {
  max-width: 730px;
  margin-bottom: 14px;
  font: 400 clamp(45px, 5.5vw, 70px)/.98 var(--serif);
  letter-spacing: -.045em;
}
.phase-hero p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}
.phase-form-card { padding: clamp(24px, 4vw, 44px); }
.question-block {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.question-block:first-child { padding-top: 0; }
.question-block label {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  margin-bottom: 10px;
  font: 400 clamp(21px, 2.5vw, 28px)/1.3 var(--serif);
}
.question-block label span { color: var(--phase-color); }
.question-block p {
  margin: 0 0 15px 54px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.question-block textarea {
  width: calc(100% - 54px);
  min-height: 120px;
  margin-left: 54px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fffdf8;
  padding: 16px;
  color: var(--ink);
  line-height: 1.6;
}
.question-block textarea.invalid { border-color: var(--terracotta); }
.phase-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 30px;
}
.save-caption { color: var(--muted); font-size: 11px; }
.phase-footer-actions .primary-button { min-width: 220px; }

.map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.map-card {
  min-height: 245px;
  padding: 25px;
  border-top: 4px solid var(--phase-color);
}
.map-card > div {
  display: flex;
  justify-content: space-between;
  color: var(--gold);
  font: 400 20px var(--serif);
}
.map-card button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 500 11px var(--sans);
  text-decoration: underline;
}
.map-card h3 { margin: 42px 0 13px; font: 400 25px var(--serif); }
.map-card p {
  margin: 0;
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  line-height: 1.55;
  font-size: 13px;
}
.ai-purpose-card {
  grid-column: 1 / -1;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid rgba(173,81,54,.2);
  background:
    radial-gradient(circle at 92% 0%, rgba(189,145,64,.14), transparent 34%),
    rgba(251,248,240,.94);
  box-shadow: 0 18px 50px rgba(44,51,43,.07);
}
.ai-purpose-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}
.ai-purpose-heading > div { max-width: 680px; }
.ai-purpose-heading h2 {
  margin-bottom: 12px;
  font: 400 clamp(30px, 3.3vw, 43px)/1.08 var(--serif);
  letter-spacing: -.025em;
}
.ai-purpose-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.ai-generate-button {
  flex: 0 0 auto;
  min-width: 270px;
  min-height: 56px;
}
.ai-generate-button:disabled { cursor: not-allowed; }
.button-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.ai-theme-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ai-theme-row span {
  margin-right: 3px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.ai-theme-row b {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(89,104,89,.1);
  color: var(--moss);
  font-size: 11px;
  font-weight: 600;
}
.ai-suggestions-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.ai-suggestion-card {
  min-height: 300px;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--terracotta);
  background: rgba(255,255,255,.58);
  display: flex;
  flex-direction: column;
}
.ai-suggestion-card:nth-child(2) { border-top-color: var(--indigo); }
.ai-suggestion-card:nth-child(3) { border-top-color: var(--gold); }
.ai-suggestion-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}
.ai-suggestion-top span {
  color: var(--gold);
  font: 400 22px var(--serif);
}
.ai-suggestion-top strong {
  font-size: 11px;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.ai-suggestion-card > p {
  margin: 24px 0;
  color: var(--ink-soft);
  font: 400 18px/1.52 var(--serif);
}
.ai-use-suggestion {
  width: 100%;
  margin-top: auto;
  background: transparent;
}
.ai-use-suggestion:hover {
  border-color: var(--terracotta);
  color: var(--terracotta-dark);
}
.ai-edit-reminder {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 3px solid var(--gold);
  background: rgba(189,145,64,.08);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.ai-edit-reminder strong { color: var(--ink); }
.ai-purpose-meta {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 11px;
}
.purpose-card {
  grid-column: 1 / -1;
  padding: clamp(28px, 4vw, 44px);
  background: var(--ink);
  color: var(--paper-light);
}
.purpose-card .eyebrow { color: #dcc485; }
.purpose-card h2 { font: 400 clamp(33px, 4vw, 48px)/1.05 var(--serif); }
.purpose-card p { color: rgba(255,255,255,.62); line-height: 1.6; }
.purpose-card textarea {
  width: 100%;
  min-height: 150px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.25);
  background: transparent;
  resize: vertical;
  padding: 16px 0;
  color: white;
  font: 400 clamp(22px, 3vw, 31px)/1.45 var(--serif);
}
.purpose-card textarea::placeholder { color: rgba(255,255,255,.28); }
.purpose-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
}
.purpose-card-footer small { color: rgba(255,255,255,.5); }

.plan-layout {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 24px;
}
.plan-guide {
  padding: 34px;
  background: var(--ink);
  color: var(--paper-light);
}
.plan-guide h2 { font: 400 34px/1.05 var(--serif); }
.plan-guide p { color: rgba(255,255,255,.62); line-height: 1.62; }
.plan-guide blockquote {
  margin: 40px 0 0;
  padding: 17px 0 17px 20px;
  border-left: 2px solid var(--terracotta);
  color: #e1c88e;
  font: italic 400 20px/1.45 var(--serif);
}
.plan-card { padding: 30px; }
.plan-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.plan-summary h2 { margin: 0; font: 400 28px var(--serif); }
.plan-circle {
  width: 62px;
  height: 62px;
  border: 3px solid #d5bd82;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--terracotta);
  font-size: 12px;
  font-weight: 700;
}
.plan-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.plan-item input[type=checkbox] {
  appearance: none;
  width: 23px;
  height: 23px;
  margin: 3px 0 0;
  border: 1px solid var(--sage);
  border-radius: 50%;
  cursor: pointer;
}
.plan-item input[type=checkbox]:checked {
  background: var(--moss);
  box-shadow: inset 0 0 0 5px var(--paper-light);
}
.plan-item textarea {
  width: 100%;
  min-height: 62px;
  border: 0;
  background: transparent;
  resize: vertical;
  padding: 2px 4px;
  color: var(--ink);
  line-height: 1.5;
}
.plan-item.done textarea {
  color: var(--muted);
  text-decoration: line-through;
}
.plan-save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-top: 22px;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.achievement-card {
  min-height: 220px;
  padding: 26px;
  display: flex;
  flex-direction: column;
}
.achievement-card.locked { opacity: .48; filter: grayscale(.8); }
.badge-mark {
  width: 50px;
  height: 50px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold);
  font: 400 23px var(--serif);
}
.achievement-card.unlocked .badge-mark {
  background: var(--gold);
  color: white;
}
.achievement-card h3 { margin: auto 0 8px; font: 400 24px var(--serif); }
.achievement-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.account-section { padding: 30px; }
.account-section.wide { grid-column: 1 / -1; }
.account-section h2 { font: 400 28px var(--serif); }
.detail-list { display: grid; gap: 15px; }
.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.detail-row span { color: var(--muted); font-size: 12px; }
.detail-row strong {
  max-width: 65%;
  overflow-wrap: anywhere;
  text-align: right;
  font-size: 13px;
}
.status-active { color: var(--moss); }
.account-password-form { max-width: 500px; }
.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.danger-zone p { margin: 0; color: var(--muted); font-size: 13px; }

.empty-state {
  padding: 55px 30px;
  border: 1px solid var(--line);
  background: rgba(251,248,240,.7);
  text-align: center;
}
.empty-state img { width: 120px; opacity: .65; }
.empty-state h2 { font: 400 34px var(--serif); }
.empty-state p { max-width: 550px; margin: 0 auto 24px; color: var(--muted); line-height: 1.6; }

.bottom-nav { display: none; }
.mobile-scrim { display: none; }
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 300;
  max-width: min(390px, calc(100vw - 32px));
  padding: 13px 17px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--ink);
  color: white;
  box-shadow: 0 14px 40px rgba(39,49,41,.24);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  font-size: 12px;
  line-height: 1.45;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--terracotta-dark); }

/* Ciclo gamificado de 30 dias */
.cycle-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 140px 140px;
  align-items: center;
  gap: 24px;
  margin-bottom: 18px;
  padding: 32px;
  border: 1px solid rgba(255,255,255,.08);
  background: var(--ink);
  color: #fff;
}
.cycle-hero h2 { margin: 5px 0 10px; font: 400 38px/1.05 var(--serif); }
.cycle-hero p:not(.eyebrow) { max-width: 670px; color: rgba(255,255,255,.68); line-height: 1.62; }
.cycle-hero .primary-button { margin-top: 12px; }
.cycle-ring {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: conic-gradient(var(--ochre) var(--cycle), rgba(255,255,255,.13) 0);
  display: grid;
  place-content: center;
  position: relative;
  text-align: center;
}
.cycle-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--ink); }
.cycle-ring strong, .cycle-ring span { position: relative; z-index: 1; }
.cycle-ring strong { font: 400 31px var(--serif); }
.cycle-ring span { color: rgba(255,255,255,.55); font-size: 10px; }
.cycle-stat { padding-left: 20px; border-left: 1px solid rgba(255,255,255,.14); }
.cycle-stat strong { display: block; font: 400 38px var(--serif); color: var(--ochre); }
.cycle-stat span { color: rgba(255,255,255,.55); font-size: 11px; line-height: 1.4; }
.preparation-card {
  margin-bottom: 42px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  background: rgba(251,248,240,.64);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.preparation-card h3 { margin: 4px 0; font: 400 23px var(--serif); }
.preparation-card p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; }
.preparation-card > span { color: var(--moss); font-weight: 700; }
.weeks-list { display: grid; gap: 42px; }
.week-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  margin-bottom: 14px;
}
.week-heading .eyebrow { grid-column: 1; }
.week-heading h2 { margin: 5px 0 0; font: 400 30px var(--serif); }
.week-heading > span { grid-column: 2; grid-row: 1 / 3; color: var(--muted); }
.day-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.day-card {
  min-height: 154px;
  padding: 17px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(251,248,240,.48);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.day-card:hover:not(:disabled) { background: #fff; transform: translateY(-2px); }
.day-card.current { box-shadow: inset 0 3px 0 var(--terracotta); background: rgba(194,91,54,.06); }
.day-card.complete { box-shadow: inset 0 3px 0 var(--moss); }
.day-card.locked { opacity: .42; cursor: not-allowed; }
.day-number { font: 400 25px var(--serif); color: var(--ochre); }
.day-axis { margin: 9px 0 12px; color: var(--muted); font-size: 8px; letter-spacing: .14em; text-transform: uppercase; }
.day-card strong { font: 400 15px/1.25 var(--serif); }
.daily-topbar, .daily-pagination { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.daily-topbar { margin-bottom: 18px; }
.daily-hero {
  min-height: 300px;
  padding: 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  background: linear-gradient(125deg, rgba(34,52,42,.98), rgba(45,66,54,.88));
  color: #fff;
}
.daily-hero.week-2 { background: linear-gradient(125deg, #263449, #3f526b); }
.daily-hero.week-3 { background: linear-gradient(125deg, #773b2d, #a4573e); }
.daily-hero.week-4 { background: linear-gradient(125deg, #3e5546, #617561); }
.daily-hero.week-5 { background: linear-gradient(125deg, #5d4828, #9b7636); }
.daily-hero h1 { max-width: 800px; margin: 7px 0 20px; font: 400 clamp(44px, 6vw, 76px)/.95 var(--serif); }
.daily-hero blockquote { max-width: 720px; margin: 0; color: rgba(255,255,255,.72); font: italic 20px/1.45 var(--serif); }
.daily-status { align-self: flex-start; min-width: 88px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.3); border-radius: 99px; text-align: center; font-size: 10px; }
.daily-status.complete { border-color: var(--ochre); color: #f2cf85; }
.daily-content-grid { display: grid; grid-template-columns: .8fr 1.2fr; border: 1px solid var(--line); border-top: 0; }
.daily-guidance-card, .daily-practice-card { padding: 40px; }
.daily-guidance-card { border-right: 1px solid var(--line); background: rgba(251,248,240,.52); }
.daily-guidance-card h2, .daily-practice-card h2 { margin: 8px 0 18px; font: 400 31px/1.15 var(--serif); }
.daily-guidance-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.75; }
.daily-principle { margin-top: 38px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; }
.daily-principle span { color: var(--terracotta); font-size: 9px; letter-spacing: .2em; }
.daily-principle strong { font: 400 18px var(--serif); }
.daily-task-check { margin: 24px 0 32px; padding: 16px; border: 1px solid var(--line); display: flex; align-items: center; gap: 12px; cursor: pointer; }
.daily-task-check.done { border-color: rgba(68,95,75,.45); background: rgba(68,95,75,.08); color: var(--moss); }
.daily-task-check input { width: 20px; height: 20px; accent-color: var(--moss); }
.daily-reflection-label { display: grid; gap: 7px; margin-bottom: 10px; }
.daily-reflection-label span { color: var(--terracotta); font-size: 9px; letter-spacing: .15em; text-transform: uppercase; }
.daily-reflection-label strong { font: 400 19px/1.35 var(--serif); }
.daily-practice-card textarea { width: 100%; resize: vertical; border: 1px solid var(--line); background: rgba(255,255,255,.55); padding: 16px; color: var(--ink); line-height: 1.6; }
.daily-practice-card > small { display: block; margin: 7px 0 20px; color: var(--muted); }
.daily-practice-card .primary-button { width: 100%; }
.daily-pagination { padding: 24px 0; color: var(--muted); font-size: 11px; }
.daily-pagination button { border: 0; background: transparent; color: var(--ink); cursor: pointer; }

@keyframes breathe { 50% { transform: scale(.94); opacity: .72; } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.72); } }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes spin { to { transform: rotate(360deg); } }

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

@media (max-width: 1120px) {
  .phase-grid { grid-template-columns: 1fr 1fr; }
  .welcome-grid { grid-template-columns: 1fr; }
  .level-card { min-height: 230px; }
  .achievement-grid { grid-template-columns: 1fr 1fr; }
  .ai-suggestions-grid { grid-template-columns: 1fr; }
  .ai-suggestion-card { min-height: 0; }
  .cycle-hero { grid-template-columns: 1fr 132px; }
  .cycle-stat { grid-row: 2; }
  .day-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .access-screen { grid-template-columns: 1fr; }
  .access-copy { display: none; }
  .access-form-panel { min-height: 100vh; }
  .app-shell { padding-left: 0; padding-bottom: 72px; }
  .app-header { padding: 0 18px; }
  .app-brand { font-size: 24px; }
  .mobile-menu-button {
    width: 38px;
    height: 38px;
    margin-right: 11px;
    border: 0;
    background: transparent;
    display: grid;
    align-content: center;
    gap: 5px;
    cursor: pointer;
  }
  .mobile-menu-button span {
    width: 21px;
    height: 1px;
    background: var(--ink);
  }
  .app-sidebar {
    transform: translateX(-102%);
    transition: transform .25s ease;
  }
  .app-sidebar.open { transform: translateX(0); }
  .mobile-scrim {
    position: fixed;
    inset: 74px 0 0;
    z-index: 90;
    background: rgba(24,30,25,.4);
  }
  .mobile-scrim.open { display: block; }
  .bottom-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 105;
    height: calc(66px + env(safe-area-inset-bottom));
    padding: 7px 12px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(251,248,240,.96);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    backdrop-filter: blur(14px);
  }
  .bottom-nav button {
    border: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--muted);
  }
  .bottom-nav button.active { color: var(--terracotta); }
  .bottom-nav button span { font-size: 19px; }
  .bottom-nav button small { font-size: 9px; }
  .toast { bottom: 84px; }
  .plan-layout { grid-template-columns: 1fr; }
  .ai-purpose-heading { flex-direction: column; }
  .ai-generate-button { width: 100%; }
  .daily-content-grid { grid-template-columns: 1fr; }
  .daily-guidance-card { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 680px) {
  .access-panel { padding: 28px 22px; }
  .form-wrap h2 { font-size: 44px; }
  .single-panel { padding: 16px; }
  .password-change-card { padding: 30px 22px; }
  .password-change-card .access-brand { margin-bottom: 46px; }
  .app-content { padding: 30px 17px; }
  .header-status { display: none; }
  .profile-button { margin-left: auto; }
  .view-header {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 28px;
  }
  .view-header h1 { font-size: 44px; }
  .phase-grid, .insight-row, .map-grid, .achievement-grid, .account-grid {
    grid-template-columns: 1fr;
  }
  .phase-card { min-height: 210px; }
  .purpose-card, .ai-purpose-card, .account-section.wide { grid-column: auto; }
  .section-title-row { align-items: flex-start; flex-direction: column; }
  .phase-hero { padding: 32px 22px; }
  .phase-hero h1 { font-size: 43px; }
  .phase-hero::after { font-size: 120px; right: 8px; }
  .phase-form-card { padding: 24px 18px; }
  .question-block label { grid-template-columns: 28px 1fr; font-size: 21px; }
  .question-block p { margin-left: 40px; }
  .question-block textarea { width: calc(100% - 40px); margin-left: 40px; }
  .phase-footer-actions, .purpose-card-footer, .plan-save-row, .danger-zone {
    align-items: stretch;
    flex-direction: column;
  }
  .phase-footer-actions .primary-button,
  .purpose-card-footer .primary-button,
  .plan-save-row .primary-button { width: 100%; }
  .ai-purpose-card { padding: 24px 18px; }
  .ai-purpose-meta { flex-direction: column; gap: 6px; }
  .welcome-card { min-height: 330px; }
  .welcome-card img { right: -150px; }
  .plan-card { padding: 23px 18px; }
  .detail-row { flex-direction: column; gap: 6px; }
  .detail-row strong { max-width: 100%; text-align: left; }
  .cycle-hero { grid-template-columns: 1fr 1fr; padding: 24px 20px; }
  .cycle-hero > div:first-child { grid-column: 1 / 3; }
  .cycle-ring { width: 112px; height: 112px; }
  .cycle-stat { padding-left: 12px; }
  .day-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day-card { min-height: 138px; }
  .preparation-card { align-items: flex-start; }
  .daily-hero { min-height: 330px; padding: 30px 22px; align-items: flex-start; flex-direction: column-reverse; justify-content: flex-end; }
  .daily-hero h1 { font-size: 48px; }
  .daily-hero blockquote { font-size: 17px; }
  .daily-guidance-card, .daily-practice-card { padding: 27px 20px; }
  .daily-topbar .quiet-button { padding-inline: 10px; }
  .daily-pagination span { max-width: 55%; text-align: right; }
}
