:root {
  color-scheme: dark;
  --bg: #070913;
  --surface: #10131f;
  --surface-2: #171b2a;
  --surface-3: #20263a;
  --text: #f7f8ff;
  --muted: #aeb6cc;
  --quiet: #77819c;
  --line: rgba(211, 220, 255, .15);
  --accent: #9d7bff;
  --accent-2: #dd77ff;
  --success: #59d8a3;
  --warning: #f3ba53;
  --danger: #ff7b92;
  --shadow: 0 20px 55px rgba(0, 0, 0, .28);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #f0f2fa;
  --surface-3: #e6eaf5;
  --text: #171a29;
  --muted: #566079;
  --quiet: #69748f;
  --line: rgba(34, 42, 69, .16);
  --accent: #5b45cc;
  --accent-2: #aa38cf;
  --success: #087d50;
  --warning: #9d6500;
  --danger: #bf2548;
  --shadow: 0 18px 46px rgba(45, 52, 83, .13);
}

:root[data-theme="pulse"] {
  --bg: #110718;
  --surface: #1d0f2a;
  --surface-2: #2a1237;
  --surface-3: #371747;
  --text: #fff7ff;
  --muted: #d0b7db;
  --quiet: #a47fb1;
  --line: rgba(255, 200, 255, .19);
  --accent: #ff72d6;
  --accent-2: #9b7bff;
}

:root[data-theme="gold"] {
  color-scheme: dark;
  --bg: #0d0a04;
  --surface: #181207;
  --surface-2: #241b0a;
  --surface-3: #33270e;
  --text: #fff7dc;
  --muted: #dbc998;
  --quiet: #aa9870;
  --line: rgba(248, 211, 117, .22);
  --accent: #e8ba46;
  --accent-2: #ffe29a;
  --success: #72d6a0;
  --warning: #ffd36a;
  --danger: #ff8e92;
  --shadow: 0 22px 58px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }

html { background: var(--bg); scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 88% -12%, rgba(137, 90, 255, .18), transparent 34rem),
    var(--bg);
  color: var(--text);
  font: 400 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

:root[data-theme="gold"] body {
  background:
    radial-gradient(circle at 86% -12%, rgba(233, 185, 71, .26), transparent 32rem),
    radial-gradient(circle at 4% 20%, rgba(135, 91, 17, .16), transparent 24rem),
    var(--bg);
}

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

button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
  min-height: 44px;
}

button:disabled { cursor: not-allowed; opacity: .56; }

a { color: var(--accent); }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, white);
  outline-offset: 3px;
}

input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
  position: relative;
  z-index: 1;
  pointer-events: auto;
  touch-action: manipulation;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

input:disabled {
  background: var(--surface-2);
  color: var(--quiet);
}

label {
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 650;
}

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

h1, h2, h3 {
  color: var(--text);
  line-height: 1.13;
  letter-spacing: -.025em;
}

h1 { font-size: clamp(30px, 6vw, 48px); margin-bottom: 10px; }
h2 { font-size: clamp(21px, 3.6vw, 28px); margin-bottom: 8px; }
h3 { font-size: 16px; margin: 0; }
p { color: var(--muted); }

.splash {
  align-items: center;
  background: #070913;
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 100;
  animation: splashOut 2.2s ease forwards;
}

.splash img {
  display: block;
  width: min(180px, 54vw);
  height: auto;
  object-fit: contain;
  animation: logoReveal 1.4s cubic-bezier(.2,.8,.2,1) both;
}

.demo-opening { align-items: center; background: radial-gradient(circle at 50% 40%, #152854 0%, #090c1d 44%, #05060e 100%); display: grid; inset: 0; min-height: 100dvh; overflow: hidden; padding: 28px; place-items: center; position: relative; text-align: center; }
.opening-content { align-items: center; animation: openingRise .8s cubic-bezier(.2,.8,.2,1) both; display: grid; justify-items: center; max-width: 390px; position: relative; width: 100%; z-index: 1; }.opening-mark { animation: openingPulse 2.4s ease-in-out infinite; filter: drop-shadow(0 0 27px rgba(30,205,255,.42)) drop-shadow(0 0 48px rgba(226,29,255,.28)); height: auto; max-width: min(300px, 76vw); }.opening-wordmark { color: #f7f9ff; font-size: clamp(34px, 10vw, 48px); font-weight: 950; letter-spacing: -.075em; line-height: 1; margin: 24px 0 10px; }.opening-wordmark span { background: linear-gradient(90deg, #43dcff, #d953ff); -webkit-background-clip: text; background-clip: text; color: transparent; }.opening-line { color: #aebbd6; font-size: 16px; margin: 0 0 30px; }.opening-enter { align-items: center; background: linear-gradient(100deg, #14caf1, #9551ff 55%, #eb39d6); border: 0; border-radius: 999px; box-shadow: 0 13px 39px rgba(33,129,255,.31); color: #050714; cursor: pointer; display: flex; font: inherit; font-size: 16px; font-weight: 950; gap: 22px; justify-content: center; min-height: 57px; padding: 0 25px; transition: transform .18s ease, filter .18s ease; width: 100%; }.opening-enter:hover { filter: brightness(1.08); transform: translateY(-2px); }.opening-enter span { font-size: 24px; line-height: 1; }.opening-access { background: transparent; border: 0; color: #aebbd6; cursor: pointer; font: inherit; font-size: 13px; margin: 16px 0 25px; padding: 8px; }.opening-content small { color: #77829c; font-size: 11px; }.opening-glow { border-radius: 50%; filter: blur(15px); opacity: .7; pointer-events: none; position: absolute; }.opening-glow-one { background: #124dff; height: 380px; left: -210px; top: -120px; width: 380px; }.opening-glow-two { background: #d315cb; bottom: -170px; height: 340px; right: -180px; width: 340px; }@keyframes openingRise { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }@keyframes openingPulse { 50% { transform: translateY(-4px) scale(1.025); } }

.splash.hide { opacity: 0; pointer-events: none; transition: opacity .32s ease; }

@keyframes logoReveal {
  from { opacity: 0; transform: scale(.92) translateY(7px); filter: blur(7px); }
  to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

@keyframes splashOut {
  0%, 62% { opacity: 1; }
  100% { opacity: 1; }
}

.app-shell, .landing { min-height: 100vh; }

.app-header {
  align-items: center;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 72px;
  padding: 10px max(18px, calc((100vw - 1180px) / 2));
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand, .brand-text, .brand-link {
  align-items: center;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  font-size: 18px;
  font-weight: 900;
  gap: 7px;
  letter-spacing: -.045em;
  min-height: 44px;
  padding: 0;
}

.brand img {
  height: 40px;
  object-fit: contain;
  width: 45px;
}

.brand > span > span, .brand-text > span {
  color: #d9ccff;
  font-weight: 760;
  letter-spacing: -.065em;
}

:root[data-theme="light"] .brand > span > span,
:root[data-theme="light"] .brand-text > span { color: #4b3ab3; }

:root[data-theme="gold"] .brand > span > span,
:root[data-theme="gold"] .brand-text > span { color: #f2c957; }

.desktop-nav {
  align-items: center;
  display: flex;
  gap: 3px;
}

.desktop-nav button, .mobile-drawer nav button {
  background: transparent;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 700;
  padding: 0 13px;
}

.desktop-nav button:hover, .desktop-nav button.active, .mobile-drawer nav button.active {
  background: var(--surface-2);
  color: var(--text);
}

.header-actions { align-items: center; display: flex; gap: 8px; }

.profile-chip, .icon-button, .menu-button {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
}

.profile-chip {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 0;
  color: #fff;
  font-weight: 900;
}

.menu-button { display: none; flex-direction: column; gap: 4px; }
.menu-button span { background: currentColor; border-radius: 1px; display: block; height: 2px; width: 18px; }

.mobile-drawer {
  background: var(--surface);
  border-left: 1px solid var(--line);
  bottom: 0;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  max-width: min(88vw, 360px);
  padding: 17px;
  position: fixed;
  right: 0;
  top: 0;
  transform: translateX(105%);
  transition: transform .22s ease, visibility .22s ease;
  visibility: hidden;
  width: 84vw;
  z-index: 60;
  pointer-events: none;
}

.mobile-drawer.open {
  pointer-events: auto;
  transform: translateX(0);
  visibility: visible;
}

.drawer-head { align-items: center; display: flex; justify-content: space-between; margin-bottom: 22px; }
.mobile-drawer nav { display: grid; gap: 6px; }
.mobile-drawer nav button { justify-content: flex-start; padding: 0 14px; text-align: left; }
.drawer-logout { background: transparent; color: var(--danger); font-weight: 750; margin-top: auto; text-align: left; }

#main-content {
  margin: 0 auto;
  max-width: 1180px;
  min-height: calc(100vh - 172px);
  padding: 38px 24px 56px;
}

.page-heading {
  align-items: flex-start;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-heading > div > p:not(.eyebrow) { font-size: 16px; margin-bottom: 0; max-width: 660px; }

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .11em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.save-area {
  align-items: flex-end;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 13px;
  gap: 2px;
  text-align: right;
}

.save-area [data-save-status].saved { color: var(--success); }
.save-area [data-save-status].offline { color: var(--warning); }

.button {
  align-items: center;
  border-radius: 12px;
  display: inline-flex;
  font-size: 15px;
  font-weight: 800;
  justify-content: center;
  line-height: 1.1;
  min-height: 44px;
  padding: 10px 15px;
  text-decoration: none;
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 23%, transparent);
  color: white;
}

.button.primary:hover { filter: brightness(1.09); }

.button.secondary {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
}

.button.danger { background: color-mix(in srgb, var(--danger) 17%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 44%, transparent); color: var(--danger); }

.text-button {
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  min-height: 32px;
  padding: 4px 0;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 3px;
}

.danger-text { color: var(--danger); }

.score-hero {
  align-items: stretch;
  background:
    radial-gradient(circle at 15% 20%, rgba(159, 120, 255, .3), transparent 34rem),
    linear-gradient(130deg, var(--surface-2), var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(240px, 1.3fr) minmax(140px, .72fr) minmax(170px, .75fr);
  margin-bottom: 17px;
  overflow: hidden;
  padding: 25px;
}

.score-main .eyebrow { margin-bottom: 3px; }
.score-number { color: var(--text); font-size: clamp(58px, 8vw, 88px); font-weight: 900; letter-spacing: -.08em; line-height: .96; }
.score-number span { color: var(--muted); font-size: 19px; font-weight: 700; letter-spacing: -.03em; margin-left: 5px; }
.score-pace { font-size: 14px; margin: 12px 0 4px; max-width: 410px; }
.score-explain { background: rgba(0, 0, 0, .14); border-left: 3px solid var(--accent); border-radius: 4px; font-size: 13px; margin: 8px 0 0; padding: 8px 10px; }

.score-groups {
  align-items: center;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-left: 21px;
}

.score-groups div { display: flex; flex-direction: column; }
.score-groups span { color: var(--muted); font-size: 13px; font-weight: 650; }
.score-groups strong { color: var(--text); font-size: 28px; letter-spacing: -.055em; line-height: 1.05; }

.score-action {
  align-items: flex-start;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 21px;
}
.score-action p { font-size: 14px; margin-bottom: 13px; }
.score-action p b { color: var(--text); }

.streak-card {
  align-items: center;
  background:
    radial-gradient(circle at 7% 50%, rgba(255, 215, 109, .25), transparent 18rem),
    linear-gradient(125deg, color-mix(in srgb, #d89e23 18%, var(--surface-2)), var(--surface));
  border: 1px solid color-mix(in srgb, #f4c85c 52%, var(--line));
  border-radius: 18px;
  display: grid;
  gap: 17px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin: 0 0 17px;
  overflow: hidden;
  padding: 18px 21px;
}
.streak-trophy {
  align-items: center;
  background: radial-gradient(circle at 40% 30%, rgba(255, 244, 183, .2), transparent 45%), linear-gradient(145deg, #172041, #0a0e20);
  border: 1px solid rgba(255, 226, 123, .58);
  border-radius: 17px;
  box-shadow: 0 10px 28px rgba(212, 151, 27, .24), inset 0 1px 0 rgba(255, 255, 255, .12);
  display: flex;
  height: 62px;
  justify-content: center;
  padding: 6px;
  width: 62px;
}
.cr-trophy-mark { display: block; height: 100%; object-fit: contain; width: 100%; }
.trophy-hero-mark { filter: drop-shadow(0 5px 8px rgba(240, 174, 47, .37)); }
.streak-copy .eyebrow { color: #d99c24; margin-bottom: 2px; }
.streak-copy h2 { font-size: 21px; margin: 0; }
.streak-copy p:not(.eyebrow) { color: var(--muted); font-size: 13px; margin: 3px 0 0; }
.streak-record { border-left: 1px solid color-mix(in srgb, #efbd4f 38%, var(--line)); display: grid; gap: 1px; padding-left: 18px; text-align: right; }
.streak-record > span { color: #d99c24; font-size: 10px; font-weight: 900; letter-spacing: .09em; }
.streak-record strong { color: var(--text); font-size: 27px; letter-spacing: -.06em; line-height: 1; }
.streak-record strong small { color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: 0; }
.streak-record p { color: var(--muted); font-size: 11px; margin: 2px 0 0; }

.horizon-line {
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  margin: 0 0 23px;
  padding: 0 0 15px;
}
.horizon-line b { color: var(--text); }

.checkin-panel {
  border-bottom: 1px solid var(--line);
  padding-bottom: 29px;
}

.checkin-panel-head, .section-title, .group-heading {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.checkin-panel-head h2, .group-heading h2, .section-title h2 { margin-bottom: 0; }

.week-strip {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 23px 0;
  padding-bottom: 16px;
}

.week-days { display: grid; gap: 5px; grid-template-columns: repeat(7, minmax(41px, 1fr)); max-width: 550px; width: 100%; }
.week-day {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--muted);
  display: grid;
  gap: 1px;
  min-height: 55px;
  padding: 5px 4px;
  place-items: center;
}
.week-day span { font-size: 12px; font-weight: 700; }
.week-day b { color: var(--text); font-size: 16px; }
.week-day.done b::after { background: var(--success); border-radius: 50%; content: ""; display: inline-block; height: 5px; margin: 0 0 1px 4px; width: 5px; }
.week-day.selected { background: var(--surface-2); border-color: var(--accent); color: var(--text); }
.week-day.future { color: var(--quiet); opacity: .48; }

.date-jump { max-width: 175px; min-width: 140px; }
.date-jump span { font-size: 12px; }
.date-jump input { min-height: 42px; padding: 7px 9px; }

.checkin-group {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}
.checkin-group:first-of-type { border-top: 1px solid var(--line); }
.group-heading .eyebrow { margin-bottom: 3px; }
.group-heading .icon-button { font-size: 25px; font-weight: 400; }
.collapsed-copy { font-size: 14px; margin: 12px 0 0; }

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

.checkin-field {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
}

.field-label { align-items: start; display: flex; gap: 10px; justify-content: space-between; }
.field-label label { color: var(--text); font-size: 15px; }
.field-label span { color: var(--accent); font-size: 12px; font-weight: 800; white-space: nowrap; }

.entry-control { align-items: center; display: flex; gap: 7px; margin: 10px 0 5px; }
.entry-control input { min-width: 0; }
.entry-control > span { color: var(--muted); font-size: 14px; min-width: 64px; }
.binary-button {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  min-height: 44px;
  padding: 8px 10px;
}
.binary-button.active { background: color-mix(in srgb, var(--success) 16%, var(--surface)); border-color: color-mix(in srgb, var(--success) 58%, var(--line)); color: var(--success); }
.checkin-field > p { color: var(--muted); font-size: 13px; margin: 0; }

.checkin-notes { display: grid; gap: 11px; margin: 24px auto 0; max-width: 680px; }
.checkin-notes > p { font-size: 13px; margin: 0; }

.achievement {
  background: color-mix(in srgb, var(--success) 12%, var(--surface));
  border-left: 3px solid var(--success);
  color: var(--text);
  font-size: 14px;
  margin: 22px 0 0;
  padding: 12px 14px;
}

.inline-score, .plan-count {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  white-space: nowrap;
}
.inline-score b, .plan-count { color: var(--text); }

.focus-panel {
  align-items: end;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 23px;
  justify-content: space-between;
  margin: 0 0 30px;
  padding: 22px;
}
.focus-panel h2 { margin-bottom: 5px; }
.focus-panel p:not(.eyebrow) { font-size: 14px; margin: 0; max-width: 570px; }
.focus-panel label { min-width: 240px; }

.section-block { border-bottom: 1px solid var(--line); margin: 32px 0 0; padding: 0 0 32px; }
.section-title { margin-bottom: 14px; }
.section-note { font-size: 14px; margin: -5px 0 17px; }

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

.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 15px;
}

.metric-card.neutral { border-color: color-mix(in srgb, var(--line) 70%, transparent); }
.metric-card.complete { border-color: color-mix(in srgb, var(--success) 55%, var(--line)); }
.metric-top { align-items: flex-start; display: flex; gap: 8px; justify-content: space-between; }
.metric-area { color: var(--quiet); display: block; font-size: 12px; font-weight: 750; margin-bottom: 3px; }
.metric-top h3 { font-size: 16px; }
.metric-top > strong { color: var(--accent); font-size: 22px; letter-spacing: -.055em; }
.metric-focus { color: var(--accent); display: block; font-size: 12px; font-weight: 750; margin-top: 5px; }
.progress-track { background: var(--surface-3); border-radius: 99px; height: 8px; margin: 15px 0 10px; overflow: hidden; }
.progress-track i, .mini-progress i { background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: inherit; display: block; height: 100%; }
.metric-card.complete .progress-track i { background: var(--success); }
.metric-card p { font-size: 13px; margin: 0; }
.metric-card .text-button { margin-top: 7px; }
.metric-card.compact { padding: 13px; }
.metric-card.compact .progress-track { margin: 12px 0 8px; }

.horizon-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.horizon-card { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px; }
.horizon-card > span { color: var(--accent); font-size: 12px; font-weight: 800; }
.horizon-card > b { font-size: 15px; line-height: 1.2; min-height: 36px; }
.horizon-card > strong { font-size: 25px; letter-spacing: -.06em; }
.horizon-card .progress-track { margin: 0; }
.horizon-card label { font-size: 12px; grid-template-columns: 1fr auto; }
.horizon-card label input { grid-column: 1 / 2; min-height: 38px; padding: 7px; }
.horizon-card label span { align-self: end; grid-column: 2; grid-row: 2; padding-bottom: 9px; }
.horizon-card small { color: var(--muted); font-size: 12px; }
.empty-horizon { background: transparent; }
.empty-horizon b { color: var(--muted); }

.new-goal { align-items: end; border-top: 1px solid var(--line); display: grid; gap: 16px; grid-template-columns: 1fr 1.5fr; margin-top: 22px; padding-top: 22px; }
.new-goal h3 { margin: 0 0 6px; }
.new-goal p { font-size: 13px; margin: 0; }
.new-goal-fields { align-items: end; display: grid; gap: 8px; grid-template-columns: 1.6fr 1fr .8fr .75fr auto; }
.new-goal-fields label { font-size: 12px; }
.new-goal-fields input, .new-goal-fields select { min-height: 42px; }
.goal-composer { background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line)); border-radius: 22px; display: grid; gap: 16px; margin-top: 20px; padding: clamp(18px, 4vw, 26px); }
.goal-composer-head h2 { margin: 3px 0 6px; }
.goal-composer-head p:not(.eyebrow) { color: var(--muted); font-size: 14px; margin: 0; max-width: 620px; }
.goal-template-grid { display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.goal-template { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; color: var(--text); cursor: pointer; display: grid; font: inherit; gap: 3px; min-height: 68px; padding: 11px; text-align: left; }
.goal-template:hover, .goal-template:focus-visible { border-color: var(--accent-2); outline: none; transform: translateY(-1px); }
.goal-template b { font-size: 14px; }
.goal-template span { color: var(--muted); font-size: 12px; }
.goal-composer-fields { align-items: end; display: grid; gap: 10px; grid-template-columns: 1.7fr repeat(3, minmax(100px, 1fr)); }
.goal-composer-fields label { color: var(--muted); display: grid; font-size: 12px; gap: 6px; }
.goal-composer-fields input, .goal-composer-fields select { min-height: 44px; }
.goal-composer-fields .goal-title-field { grid-column: span 2; }
.goal-link-option { align-items: flex-start; background: color-mix(in srgb, var(--surface-2) 82%, transparent); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; display: flex; gap: 10px; padding: 12px; }
.goal-link-option input { accent-color: var(--accent-2); flex: 0 0 auto; height: 18px; margin-top: 2px; width: 18px; }
.goal-link-option span { display: grid; gap: 2px; }
.goal-link-option b { font-size: 14px; }
.goal-link-option small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.goal-composer-actions { align-items: center; display: flex; gap: 14px; justify-content: space-between; }
.goal-composer-actions p { color: var(--muted); font-size: 12px; margin: 0; }
.journey-pace { color: var(--muted); font-size: 13px; margin: 13px 0 0; }
.journey-detail { display: grid; gap: 13px; }
.journey-detail > p { display: grid; gap: 3px; margin: 0; }
.journey-detail > p span, .journey-linked span { color: var(--muted); font-size: 13px; }
.journey-current { align-items: end; display: grid; gap: 7px; grid-template-columns: minmax(0, 1fr) auto; }
.journey-current span { color: var(--muted); font-size: 13px; grid-column: 1 / -1; }
.journey-current input { min-height: 42px; }
.journey-current small { color: var(--muted); padding-bottom: 12px; }
.journey-linked { background: var(--surface-2); border-radius: 12px; display: grid; gap: 3px; margin: 0; padding: 11px; }
.journey-edit-fields { align-items: end; display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.journey-edit-fields label { color: var(--muted); display: grid; font-size: 12px; gap: 6px; }
.journey-edit-fields input, .journey-edit-fields select { min-height: 42px; }
.journey-edit-fields .journey-edit-title { grid-column: span 2; }
.journey-edit-help { color: var(--muted); font-size: 12px; line-height: 1.4; }
.journey-edit-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.route-actions { display: flex; justify-content: flex-end; margin: 14px 0 0; }
.objectives-editor { background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line)); border-radius: 18px; display: grid; gap: 16px; margin-top: 14px; padding: clamp(16px, 3vw, 24px); }
.objectives-editor-head { align-items: flex-start; display: flex; gap: 14px; justify-content: space-between; }
.objectives-editor-head h2 { margin: 3px 0 5px; }
.objectives-editor-head p:not(.eyebrow) { color: var(--muted); font-size: 13px; margin: 0; }
.objectives-editor-list { display: grid; gap: 12px; }
.objectives-editor-section { border-top: 1px solid var(--line); display: grid; gap: 12px; padding-top: 18px; }
.objectives-editor-section h3 { font-size: 18px; margin: 0; }
.objectives-editor-section > p { color: var(--muted); font-size: 13px; margin: -6px 0 0; }
.objective-editor-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 13px; padding: 15px; }
.objective-editor-card h3 { margin: 0; }
.weekly-objective-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.archive-list { color: var(--muted); font-size: 14px; margin-top: 19px; }
.archive-list summary { color: var(--text); cursor: pointer; font-weight: 750; min-height: 44px; padding-top: 10px; }
.archive-list p { font-size: 14px; margin-bottom: 7px; }
.archive-list b { color: var(--text); }

.review-panel { background: var(--surface-2); border-radius: 16px; display: grid; gap: 24px; grid-template-columns: .75fr 1.25fr; margin: 32px 0 0; padding: 23px; }
.review-panel > div > p:not(.eyebrow) { font-size: 14px; margin-bottom: 0; }
.review-fields { display: grid; gap: 9px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.review-fields label { font-size: 12px; }
.review-fields textarea { min-height: 115px; }
.review-panel > p { font-size: 13px; grid-column: 2; margin: -12px 0 0; }

.report-summary { border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 30px; padding-bottom: 23px; }
.report-summary div { border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; padding: 0 18px; }
.report-summary div:first-child { border-left: 0; padding-left: 0; }
.report-summary span { color: var(--muted); font-size: 13px; font-weight: 650; }
.report-summary strong { color: var(--text); font-size: 30px; letter-spacing: -.06em; }
.pro-smart-card, .pro-report-overview, .pro-report-gate { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, var(--surface)), color-mix(in srgb, #8c55ff 12%, var(--surface))); border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line)); border-radius: 18px; margin: 0 0 20px; padding: 20px; }.pro-report-heading { align-items: start; display: flex; gap: 16px; justify-content: space-between; }.pro-report-overview h2, .pro-smart-card h2 { font-size: 23px; }.pro-delta { border: 1px solid var(--line); border-radius: 999px; font-size: 13px; padding: 7px 10px; white-space: nowrap; }.pro-delta small { display:block; font-size:10px; margin-top:2px; }.pro-analysis-grid { display:grid; gap:10px; grid-template-columns:repeat(4,minmax(0,1fr)); margin-top:16px; }.pro-analysis-grid article { background:var(--surface-2); border:1px solid var(--line); border-radius:13px; display:grid; gap:5px; padding:13px; }.pro-analysis-grid span,.pro-analysis-grid small { color:var(--muted); font-size:12px; }.pro-analysis-grid strong { font-size:23px; }.pro-trend-line { display:block; height:28px; width:100%; }.pro-trend-line polyline { fill:none; stroke:var(--accent-2); stroke-linecap:round; stroke-width:7; vector-effect:non-scaling-stroke; }.circle-distance { background:color-mix(in srgb,var(--accent) 10%,var(--surface-2)); border-radius:10px; font-size:13px; margin:0; padding:10px 12px; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; min-width: 580px; width: 100%; }
th, td { border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 12px; text-align: left; }
th { color: var(--text); font-weight: 760; }
th small { color: var(--muted); display: block; font-size: 12px; font-weight: 500; margin-top: 2px; }

.history-review { border-top: 1px solid var(--line); padding: 15px 0; }
.history-review h3 { font-size: 16px; margin-bottom: 8px; }
.history-review p { font-size: 14px; margin: 4px 0; }
.history-review b { color: var(--text); }
.empty-copy { color: var(--muted); font-size: 14px; }
.admin-plan-control { align-items: center; display: flex; gap: 7px; min-width: 176px; }
.admin-plan-control select { min-height: 39px; padding: 6px 8px; }
.admin-plan-control .button { min-height: 39px; padding: 0 10px; }
.admin-owner { color: var(--accent); font-size: 13px; font-weight: 800; white-space: nowrap; }

.plan-pro-card { background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 13%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); }
.pro-gate, .circle-empty, .loading-surface, .invite-notice, .friend-invite-create, .circle-create {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 16px;
  padding: 22px;
}
.pro-gate { background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); max-width: 710px; }
.pro-gate p, .circle-empty p, .loading-surface p, .invite-notice p, .friend-invite-create p, .circle-create p { font-size: 14px; }
.invite-notice { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); max-width: 760px; }
.invite-notice.warning { background: color-mix(in srgb, var(--warning) 10%, var(--surface)); border-color: color-mix(in srgb, var(--warning) 38%, var(--line)); }
.invite-notice h2 { font-size: 23px; }
.invite-meta, .invite-complete { color: var(--muted); font-size: 14px; }
.invite-meta b { color: var(--text); }
.circle-create { display: grid; gap: 20px; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr); }
.circle-create h2, .friend-invite-create h2 { font-size: 23px; }
.circle-create form { display: grid; gap: 13px; }
.circle-form-grid { display: grid; gap: 11px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.circle-form-grid .wide { grid-column: 1 / -1; }
.circle-form-grid textarea { min-height: 93px; }
.form-note { font-size: 13px !important; margin: -2px 0 0; }
.circles-list { display: grid; gap: 16px; }
.circle-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 18px; padding: 22px; }
.circle-card-head { align-items: start; display: flex; gap: 18px; justify-content: space-between; }
.circle-card-head h2 { font-size: 25px; }
.circle-card-head p:not(.eyebrow) { font-size: 15px; margin-bottom: 0; max-width: 660px; }
.circle-members { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; color: var(--text); flex: 0 0 auto; font-size: 13px; font-weight: 800; padding: 7px 10px; white-space: nowrap; }
.circle-summary { border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.circle-summary > div { display: grid; gap: 4px; padding: 13px 0; }
.circle-summary > div + div { border-left: 1px solid var(--line); padding-left: 17px; }
.circle-summary span, .friend-score span { color: var(--quiet); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.circle-summary b { color: var(--text); font-size: 14px; }
.circle-ranking { display: grid; gap: 9px; }
.circle-ranking-head { align-items: baseline; display: flex; gap: 12px; justify-content: space-between; }
.circle-ranking h3 { font-size: 17px; }
.circle-ranking-head span { color: var(--muted); font-size: 12px; }
.circle-ranking ol { display: grid; gap: 7px; list-style: none; margin: 0; padding: 0; }
.circle-ranking li { align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; display: grid; gap: 9px; grid-template-columns: 32px minmax(0, 1fr) auto; min-height: 52px; padding: 9px 11px; }
.circle-rank { color: var(--accent); font-size: 14px; font-weight: 900; }
.circle-member { align-items: center; color: var(--text); display: flex; font-size: 14px; font-weight: 750; gap: 7px; min-width: 0; }
.circle-member-copy { display: grid; gap: 2px; min-width: 0; }
.circle-name { display: block; font-size: 15px; line-height: 1.18; overflow-wrap: anywhere; }
.circle-member-meta { align-items: center; display: flex; flex-wrap: wrap; gap: 4px; min-height: 14px; }
.circle-trophy { align-items: center; background: linear-gradient(145deg, rgba(255, 234, 150, .18), rgba(109, 57, 4, .14)); border: 1px solid rgba(239, 188, 70, .46); border-radius: 8px; display: inline-flex; flex: 0 0 auto; height: 24px; justify-content: center; padding: 2px; width: 24px; }
.trophy-rank-mark { filter: drop-shadow(0 3px 5px rgba(224, 164, 42, .42)); }
.leader-streak, .friend-streak { align-items: center; color: #e5ae36; display: inline-flex; font-size: 11px; font-weight: 850; gap: 4px; white-space: nowrap; }
.trophy-inline-mark { filter: drop-shadow(0 2px 3px rgba(224, 164, 42, .3)); height: 14px; width: 14px; }
.leader-streak.private, .friend-streak.private { color: var(--quiet); font-weight: 650; }
.circle-ranking li b { color: var(--text); font-size: 16px; }
.circle-ranking li b small, .friend-score small { color: var(--muted); font-size: 12px; font-weight: 700; }
.circle-ranking .circle-empty-row { color: var(--muted); display: block; font-size: 13px; padding: 13px; }
.share-invite { align-items: end; display: grid; gap: 9px; grid-template-columns: minmax(0, 1fr) auto; }
.share-invite input { color: var(--muted); font-size: 13px; }
.qr-block { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 15px; padding-top: 16px; }
.qr-block img { background: #fff; border-radius: 10px; height: 96px; image-rendering: auto; padding: 5px; width: 96px; }
.qr-block p { font-size: 13px; margin: 0; }
.friend-invite-create { align-items: center; display: flex; gap: 20px; justify-content: space-between; }
.friend-invite-create p { margin-bottom: 0; }
.friends-list { display: grid; gap: 10px; }
.friend-card { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 15px; grid-template-columns: minmax(180px, 1fr) auto auto; padding: 15px 17px; }
.friend-card > div:first-child { align-items: center; display: flex; gap: 11px; min-width: 0; }
.friend-avatar { align-items: center; background: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line)); border-radius: 50%; color: var(--accent-2); display: inline-flex; flex: 0 0 auto; font-size: 16px; font-weight: 900; height: 42px; justify-content: center; overflow: hidden; width: 42px; }
.friend-avatar img { display: block; height: 100%; object-fit: cover; width: 100%; }
.history-progress { background: var(--surface-2); border-radius: 99px; height: 6px; margin-top: 6px; overflow: hidden; width: 110px; }.history-progress i { background: linear-gradient(90deg, var(--accent), var(--accent-2)); display: block; height: 100%; }
.weekly-history { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin-top: 20px; padding: 18px; }.weekly-history h2 { margin: 0; }.weekly-history > div > p:not(.eyebrow) { font-size: 13px; margin: 7px 0 0; }.weekly-history ol { display: grid; gap: 8px; list-style: none; margin: 16px 0 0; padding: 0; }.weekly-history li > button { align-items: center; background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; color: var(--text); display: grid; gap: 10px; grid-template-columns: minmax(104px, 1fr) 44px minmax(78px, 1.2fr); min-height: 58px; padding: 9px 11px; text-align: left; width: 100%; }.weekly-history li > button:hover, .weekly-history li.selected > button { background: color-mix(in srgb, var(--accent) 11%, var(--surface-2)); border-color: color-mix(in srgb, var(--accent) 48%, var(--line)); }.weekly-history li > button span { display: grid; gap: 1px; min-width: 0; }.weekly-history li > button span b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.weekly-history li > button span small { color: var(--muted); font-size: 11px; }.weekly-history li > button > strong { color: var(--accent-2); font-size: 17px; letter-spacing: -.05em; text-align: right; }.weekly-history li .history-progress { margin: 0; width: 100%; }.weekly-history li .history-progress em { background: linear-gradient(90deg, var(--accent), var(--accent-2)); display: block; height: 100%; }.history-more, .report-history-more { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 14px; }.history-more summary, .report-history-more summary { color: var(--accent-2); cursor: pointer; font-size: 13px; font-weight: 850; }.history-more[open] summary, .report-history-more[open] summary { margin-bottom: 13px; }
.friend-card h3 { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-card p { font-size: 12px; margin: 2px 0 0; }
.friend-score { border-left: 1px solid var(--line); display: grid; gap: 2px; padding-left: 16px; }
.friend-score b { color: var(--text); font-size: 20px; letter-spacing: -.04em; }
.friend-streak { margin-top: 2px; }

.training-layout { display: grid; gap: 24px; }
.training-layout.with-history { grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); }
.workout-form { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 17px; padding: 22px; }
.workout-form h2 { margin-bottom: 4px; }
.workout-form p:not(.eyebrow) { font-size: 14px; margin: 0; }
.workout-top { display: grid; gap: 10px; grid-template-columns: minmax(145px, .45fr) minmax(0, 1fr); }
.exercise-list { display: grid; gap: 10px; }
.exercise-row { border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 8px; grid-template-columns: minmax(160px, 1.5fr) repeat(3, minmax(76px, .6fr)); margin: 0; padding: 10px; }
.exercise-row legend { color: var(--accent); font-size: 12px; font-weight: 800; padding: 0 5px; }
.exercise-row label { font-size: 12px; }
.exercise-row input { min-height: 41px; padding: 7px 9px; }
.exercise-row small { color: var(--muted); font-size: 12px; grid-column: 1 / -1; }
.training-empty { margin: 0; padding: 9px 2px; }
.workout-history { border-left: 1px solid var(--line); padding-left: 22px; }
.workout-history h2 { font-size: 20px; }
.workout-history article { border-bottom: 1px solid var(--line); padding: 12px 0; }
.workout-history article > div { display: grid; gap: 3px; }
.workout-history b { color: var(--text); }
.workout-history span, .workout-history li { color: var(--muted); font-size: 13px; }
.workout-history ul { margin: 10px 0; padding-left: 18px; }
.personal-records { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 23px; }
.personal-records > div { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
.personal-records article { background: var(--surface-2); border-radius: 12px; display: grid; gap: 3px; padding: 13px; }
.personal-records span { color: var(--muted); font-size: 13px; }

.profile-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-section { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 19px; }
.profile-section h2 { font-size: 21px; }
.profile-section > p:not(.eyebrow) { font-size: 14px; }
.streak-history-card { background: linear-gradient(145deg, color-mix(in srgb, #d89e23 12%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, #f0bd45 42%, var(--line)); }
.profile-streak-record { align-items: center; display: flex; gap: 11px; margin: 14px 0 10px; }
.profile-trophy-emblem { align-items: center; background: radial-gradient(circle at 35% 25%, rgba(255, 246, 191, .22), transparent 48%), #10172e; border: 1px solid rgba(240, 189, 69, .58); border-radius: 13px; box-shadow: 0 7px 16px rgba(220, 153, 29, .18); display: flex; flex: 0 0 auto; height: 49px; justify-content: center; padding: 5px; width: 49px; }
.trophy-profile-mark { filter: drop-shadow(0 4px 6px rgba(220, 153, 29, .36)); }
.profile-streak-record div { display: grid; gap: 0; }
.profile-streak-record strong { color: var(--text); font-size: 27px; letter-spacing: -.05em; line-height: 1; }
.profile-streak-record p { color: #d99c24; font-size: 12px; font-weight: 800; margin: 4px 0 0; }
.account-fields { display: grid; gap: 9px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.account-fields .wide { grid-column: 1 / -1; }
.profile-section > label { margin-top: 12px; }
.status-note { background: color-mix(in srgb, var(--warning) 12%, var(--surface-2)); border-left: 3px solid var(--warning); font-size: 13px; margin: 16px 0 0; padding: 9px 10px; }
.status-note.ready { background: color-mix(in srgb, var(--success) 12%, var(--surface-2)); border-left-color: var(--success); }
.email-type-list { border-top: 1px solid var(--line); display: grid; gap: 8px; margin-top: 18px; padding-top: 16px; }
.email-type-title { color: var(--text); font-size: 14px; font-weight: 800; margin: 0 0 2px; }
.email-type { align-items: start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; cursor: pointer; display: grid; gap: 10px; grid-template-columns: 20px minmax(0, 1fr); padding: 11px; }
.email-type input { accent-color: var(--accent); height: 20px; margin: 1px 0 0; min-height: 20px; padding: 0; width: 20px; }
.email-type span { display: grid; gap: 2px; }
.email-type b { color: var(--text); font-size: 13px; line-height: 1.3; }
.email-type small { color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.38; }
.file-label { cursor: pointer; margin-top: 11px; }
.file-label input { border: 0; border-radius: 0; padding: 6px 0 0; }

.faq { border-bottom: 1px solid var(--line); display: grid; gap: 12px; grid-template-columns: .8fr 1.2fr; margin-top: 34px; padding-bottom: 32px; }
.faq > div { padding-right: 20px; }
.faq h2 { margin-bottom: 7px; }
.faq p { font-size: 14px; }
.faq details { border-top: 1px solid var(--line); padding: 13px 0; }
.faq summary { color: var(--text); cursor: pointer; font-size: 15px; font-weight: 750; min-height: 30px; }
.faq details p { margin: 9px 0 0; }
.support-grid { display: grid; gap: 14px; grid-template-columns: .72fr 1.28fr; }
.support-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 14px; padding: 22px; }
.support-card h2 { margin: 0; }
.support-card p { margin: 0; }
.support-card small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.support-form { display: grid; gap: 13px; }
.support-form textarea { min-height: 132px; resize: vertical; }
.support-form p { color: var(--muted); font-size: 13px; line-height: 1.45; }

.danger-zone { align-items: center; background: color-mix(in srgb, var(--danger) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 32%, var(--line)); border-radius: 14px; display: flex; gap: 20px; justify-content: space-between; margin-top: 32px; padding: 19px; }
.danger-zone h2 { font-size: 20px; }
.danger-zone p:not(.eyebrow) { font-size: 14px; margin: 0; }

.legal-page { display: grid; gap: 0; max-width: 790px; }
.legal-page article { border-top: 1px solid var(--line); padding: 20px 0; }
.legal-page h2 { font-size: 20px; }
.legal-page p { font-size: 15px; margin: 0; }

.site-footer {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 22px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 26px 24px 38px;
}
.site-footer p { font-size: 13px; margin: 5px 0 0; }
.site-footer nav { align-items: center; display: flex; flex-wrap: wrap; gap: 13px; }
.site-footer nav a { font-size: 14px; font-weight: 750; }

.demo-banner {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  padding: 9px 18px;
  text-align: center;
}

.demo-entry {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 18px;
  margin-top: 28px;
  padding: 22px;
}
.demo-entry h2 { font-size: 24px; margin-bottom: 8px; }
.demo-entry p:not(.eyebrow) { font-size: 15px; max-width: 720px; }

.toast {
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  bottom: 18px;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 14px;
  left: 50%;
  max-width: min(440px, calc(100vw - 36px));
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 16px);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 90;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { border-color: color-mix(in srgb, var(--success) 55%, var(--line)); }
.toast.warning { border-color: color-mix(in srgb, var(--warning) 55%, var(--line)); }

.empty-state { background: var(--surface); border: 1px dashed var(--line); border-radius: 18px; padding: 30px; text-align: center; }
.primary-empty { box-shadow: var(--shadow); margin-top: 18px; }
.empty-state p { margin: 9px auto 17px; max-width: 480px; }

.landing { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.landing-header { align-items: center; display: flex; justify-content: space-between; min-height: 74px; }
.landing-header nav { align-items: center; display: flex; gap: 10px; }
.landing main { padding: 38px 0 55px; }
.landing-hero { align-items: center; display: grid; gap: 38px; grid-template-columns: minmax(0, 1.05fr) minmax(310px, .95fr); padding: 22px 0 55px; }
.landing-hero h1 { font-size: clamp(43px, 7vw, 72px); max-width: 720px; }
.landing-hero > div > p:not(.eyebrow) { font-size: 18px; max-width: 600px; }
.landing-product { display: grid; gap: 12px; }
.landing-product article { background: linear-gradient(135deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: 19px; box-shadow: var(--shadow); padding: 23px; }
.landing-product p { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.landing-product strong { color: var(--text); display: block; font-size: 64px; letter-spacing: -.08em; line-height: .95; margin: 12px 0; }
.landing-product strong span { color: var(--muted); font-size: 17px; }
.landing-product b { font-size: 19px; }
.landing-product small { color: var(--muted); display: block; font-size: 14px; margin-top: 8px; }
.mini-progress { background: var(--surface-3); border-radius: 99px; height: 10px; margin-top: 16px; overflow: hidden; }
.landing-showcase, .pricing { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.landing-showcase article, .pricing article { border-top: 1px solid var(--line); padding: 18px 0; }
.landing-showcase h2, .pricing h2 { font-size: 21px; }
.landing-showcase p:not(.eyebrow), .pricing p:not(.eyebrow) { font-size: 14px; }
.pricing { border-top: 1px solid var(--line); grid-template-columns: repeat(2, 1fr); margin-top: 23px; }
.pricing article:last-child { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); padding: 18px; }
.auth-wrap { margin: 30px auto 0; max-width: 500px; }
.landing-invite { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line)); border-radius: 14px; margin-bottom: 12px; padding: 14px 16px; }
.landing-invite p { font-size: 14px; margin-bottom: 0; }
.auth-form { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); display: grid; gap: 12px; padding: 23px; }
.auth-form h2 { margin-bottom: 4px; }
.auth-form p { font-size: 14px; margin: 0; }
.auth-page { min-height: 100dvh; padding: 0 max(24px, calc((100vw - 1160px) / 2)); }
.auth-page-header { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 78px; }
.auth-page-main { align-items: center; display: grid; gap: clamp(30px, 8vw, 112px); grid-template-columns: minmax(0, .95fr) minmax(390px, .82fr); margin: 0 auto; max-width: 1080px; min-height: calc(100dvh - 78px); padding: clamp(42px, 8vw, 94px) 0; }
.auth-intro { max-width: 490px; }
.auth-intro h2 { font-size: clamp(38px, 5.4vw, 64px); letter-spacing: -.07em; line-height: .98; margin: 10px 0 18px; }
.auth-intro > p:not(.eyebrow) { color: var(--muted); font-size: 18px; line-height: 1.55; margin: 0; max-width: 38ch; }
.auth-panel { width: 100%; }
.auth-card { background: linear-gradient(145deg, color-mix(in srgb, var(--surface-2) 74%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); padding: clamp(23px, 4vw, 34px); }
.auth-card h1 { font-size: clamp(28px, 3.3vw, 39px); letter-spacing: -.055em; }
.auth-lede { color: var(--muted); line-height: 1.5; margin-bottom: 7px !important; }
.auth-card label > small { color: var(--quiet); font-size: 12px; font-weight: 550; line-height: 1.35; }
.verification-status { border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line)); border-radius: 13px; color: var(--muted); display: grid; gap: 4px; font-size: 13px; line-height: 1.45; padding: 12px 13px; }
.verification-status b { color: var(--text); }
.verification-status.pending { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.verification-status.success { background: color-mix(in srgb, var(--success) 10%, var(--surface)); border-color: color-mix(in srgb, var(--success) 40%, var(--line)); color: var(--text); font-weight: 700; }
.verification-resend { align-items: end; border-top: 1px solid var(--line); display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) auto; margin-top: 14px; padding: 18px 3px 0; }
.verification-resend .text-button { color: var(--accent-2); font-weight: 800; padding: 0 4px; }
.public-landing { max-width: 1220px; }
.public-landing-header { border-bottom: 1px solid var(--line); min-height: 80px; }
.public-landing-header nav { gap: 14px; }
.public-landing-hero { align-items: center; display: grid; gap: clamp(32px, 7vw, 86px); grid-template-columns: minmax(0, 1.05fr) minmax(300px, .82fr); padding: clamp(48px, 8vw, 92px) 0 clamp(58px, 9vw, 104px); }
.public-landing-copy h1 { font-size: clamp(48px, 6.5vw, 82px); letter-spacing: -.07em; line-height: .98; margin: 12px 0 20px; max-width: 10ch; }
.public-landing-copy > p:not(.eyebrow) { color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.55; margin: 0; max-width: 35ch; }
.public-landing-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 30px; }
.public-plans-link { color: var(--accent); font-weight: 750; min-height: 44px; padding: 0 5px; }
.public-landing-note { color: var(--quiet); font-size: 13px !important; margin-top: 15px !important; }
.public-today-preview { background: linear-gradient(145deg, color-mix(in srgb, var(--surface-3) 84%, #0a0c19), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 24px; box-shadow: 0 28px 70px rgba(0, 0, 0, .3); display: grid; gap: 13px; overflow: hidden; padding: clamp(20px, 3vw, 28px); position: relative; }
.public-today-preview::after { background: radial-gradient(circle, color-mix(in srgb, var(--accent) 35%, transparent), transparent 68%); content: ""; height: 240px; pointer-events: none; position: absolute; right: -112px; top: -126px; width: 240px; }
.public-today-preview > * { position: relative; z-index: 1; }
.public-preview-head { align-items: flex-start; display: flex; justify-content: space-between; }
.public-preview-head p { color: var(--accent); font-size: 12px; font-weight: 850; letter-spacing: .12em; margin: 0 0 4px; }
.public-preview-head b { font-size: 17px; }
.public-preview-head strong { color: var(--accent); font-size: 31px; letter-spacing: -.07em; line-height: 1; }
.public-preview-progress { background: var(--surface-3); border-radius: 999px; height: 9px; overflow: hidden; }
.public-preview-progress i { background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: inherit; display: block; height: 100%; }
.public-preview-caption { color: var(--muted); font-size: 13px; margin: -3px 0 3px; }
.public-preview-task { align-items: center; background: color-mix(in srgb, var(--surface) 72%, transparent); border: 1px solid var(--line); border-radius: 13px; display: grid; gap: 10px; grid-template-columns: 27px 1fr auto; min-height: 58px; padding: 10px 12px; }
.public-preview-task i { border: 1.5px solid var(--quiet); border-radius: 50%; display: inline-grid; font-size: 14px; font-style: normal; height: 23px; place-items: center; width: 23px; }
.public-preview-task.done i { background: color-mix(in srgb, var(--success) 18%, transparent); border-color: var(--success); color: var(--success); }
.public-preview-task span { font-size: 15px; font-weight: 750; }
.public-preview-task small { color: var(--muted); font-size: 12px; }
.public-preview-streak { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 10px; margin-top: 3px; padding-top: 15px; }
.public-preview-streak > span { align-items: center; background: linear-gradient(145deg, #e8ba46, #8d6215); border-radius: 10px 10px 13px 13px; color: #201407; display: inline-flex; font-size: 13px; font-weight: 900; height: 37px; justify-content: center; letter-spacing: -.08em; width: 37px; }
.public-preview-streak b, .public-preview-streak small { display: block; }
.public-preview-streak b { font-size: 14px; }
.public-preview-streak small { color: var(--muted); font-size: 12px; }
.public-landing-method { border-top: 1px solid var(--line); display: grid; gap: 28px; grid-template-columns: repeat(3, 1fr); padding: 48px 0; }
.public-landing-method article { border-left: 1px solid var(--line); padding-left: 22px; }
.public-landing-method article:first-child { border-left: 0; padding-left: 0; }
.public-landing-method h2 { font-size: 23px; letter-spacing: -.04em; margin: 9px 0; }
.public-landing-method p:not(.eyebrow) { color: var(--muted); font-size: 15px; margin: 0; max-width: 28ch; }
.public-landing-cta { align-items: center; background: linear-gradient(115deg, color-mix(in srgb, var(--accent) 17%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 33%, var(--line)); border-radius: 20px; display: flex; gap: 28px; justify-content: space-between; margin: 12px 0 0; padding: clamp(24px, 5vw, 48px); }
.public-landing-cta h2 { font-size: clamp(27px, 4vw, 43px); letter-spacing: -.06em; line-height: 1.05; margin: 8px 0 0; max-width: 14ch; }
.challenge-landing { max-width: 1220px; }
.challenge-hero { align-items: center; display: grid; gap: clamp(30px, 7vw, 86px); grid-template-columns: minmax(0, 1.05fr) minmax(300px, .78fr); padding: clamp(50px, 8vw, 96px) 0 clamp(48px, 7vw, 84px); }
.challenge-copy h1 { font-size: clamp(48px, 6.4vw, 80px); letter-spacing: -.07em; line-height: .96; margin: 12px 0 21px; max-width: 10ch; }
.challenge-copy > p:not(.eyebrow) { color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.52; margin: 0; max-width: 34ch; }
.challenge-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.challenge-note { color: var(--quiet); font-size: 13px !important; margin-top: 14px !important; }
.challenge-orbit { background: radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--accent) 19%, transparent), transparent 37%), linear-gradient(145deg, color-mix(in srgb, var(--surface-3) 86%, #080b1b), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 33%, var(--line)); border-radius: 24px; display: grid; gap: 21px; overflow: hidden; padding: 28px; position: relative; }
.challenge-orbit::before { background-image: linear-gradient(rgba(110, 224, 255, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(110, 224, 255, .055) 1px, transparent 1px); background-size: 24px 24px; content: ""; inset: 0; pointer-events: none; position: absolute; }
.challenge-orbit-core { align-items: center; background: radial-gradient(circle, rgba(232, 84, 247, .36), rgba(73, 169, 255, .18) 47%, rgba(10, 14, 33, .95) 72%); border: 1px solid rgba(107, 217, 255, .5); border-radius: 50%; box-shadow: 0 0 0 11px rgba(116, 80, 255, .07), 0 0 34px rgba(82, 188, 255, .25); display: flex; flex-direction: column; height: 156px; justify-content: center; margin: 4px auto 2px; position: relative; width: 156px; }
.challenge-orbit-core b { color: #f7fbff; font-size: 62px; letter-spacing: -.08em; line-height: .82; }
.challenge-orbit-core span { color: #9edfff; font-size: 11px; font-weight: 900; letter-spacing: .16em; margin-top: 8px; }
.challenge-orbit ol { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; position: relative; }
.challenge-orbit li { align-items: center; background: rgba(12, 18, 42, .66); border: 1px solid rgba(137, 159, 232, .2); border-radius: 12px; display: grid; gap: 1px 9px; grid-template-columns: 28px minmax(0, 1fr); padding: 9px; }
.challenge-orbit li span { align-items: center; background: rgba(113, 77, 255, .14); border: 1px solid rgba(112, 214, 255, .35); border-radius: 50%; color: var(--accent-2); display: inline-flex; font-size: 12px; font-weight: 900; grid-row: 1 / span 2; height: 28px; justify-content: center; width: 28px; }
.challenge-orbit li.done span { background: linear-gradient(145deg, var(--accent), var(--accent-2)); border-color: transparent; color: #081022; }
.challenge-orbit li b { font-size: 14px; }
.challenge-orbit li small { color: var(--muted); font-size: 12px; }
.challenge-rules { border-top: 1px solid var(--line); display: grid; gap: 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 48px 0; }
.challenge-rules article { border-left: 1px solid var(--line); padding-left: 22px; }
.challenge-rules article:first-child { border-left: 0; padding-left: 0; }
.challenge-rules article > span { color: var(--accent); font-size: 13px; font-weight: 900; letter-spacing: .1em; }
.challenge-rules h2 { font-size: 23px; letter-spacing: -.045em; margin: 10px 0 9px; }
.challenge-rules p { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0; max-width: 29ch; }
.challenge-finish { align-items: center; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 19%, var(--surface)), color-mix(in srgb, var(--accent-2) 10%, var(--surface))); border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line)); border-radius: 20px; display: flex; gap: 30px; justify-content: space-between; margin: 8px 0 0; padding: clamp(25px, 5vw, 48px); }
.challenge-finish h2 { font-size: clamp(27px, 4vw, 43px); letter-spacing: -.065em; line-height: 1.04; margin: 8px 0 13px; max-width: 18ch; }
.challenge-finish p:not(.eyebrow) { color: var(--muted); margin: 0; max-width: 48ch; }
.public-auth-section { margin: 48px auto 0; max-width: 500px; scroll-margin-top: 24px; }
.public-plans-page { padding: clamp(46px, 8vw, 92px) 0 58px; }
.public-plans-intro { margin-bottom: 38px; max-width: 630px; }
.public-plans-intro h1 { font-size: clamp(43px, 6vw, 72px); letter-spacing: -.07em; line-height: .98; margin: 10px 0 18px; }
.public-plans-intro > p:not(.eyebrow) { color: var(--muted); font-size: 18px; margin: 0; max-width: 42ch; }
.public-plans-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.public-plans-grid article { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; display: flex; flex-direction: column; gap: 13px; min-height: 360px; padding: clamp(22px, 4vw, 34px); }
.public-plans-grid h2 { font-size: 28px; letter-spacing: -.05em; line-height: 1.05; margin: 0; }
.public-plans-grid p:not(.eyebrow) { color: var(--muted); font-size: 16px; margin: 0; }
.public-plans-grid ul { color: var(--text); display: grid; gap: 9px; margin: 6px 0 auto; padding-left: 20px; }
.public-plans-grid li::marker { color: var(--accent); }
.public-plan-pro { background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 15%, var(--surface)), var(--surface)) !important; border-color: color-mix(in srgb, var(--accent) 38%, var(--line)) !important; }
.public-plans-grid h2 small { color: var(--muted); font-size: .52em; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; }
.public-plans-note { color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.public-plan-status { color: var(--muted); font-size: 13px; line-height: 1.4; }
.subscription-live-status { background: linear-gradient(125deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: 20px; margin: 0 0 16px; max-width: 760px; padding: clamp(22px, 4vw, 32px); }
.subscription-live-status h2 { font-size: clamp(25px, 4vw, 38px); letter-spacing: -.06em; line-height: 1.06; margin: 8px 0 10px; }
.subscription-live-status p:not(.eyebrow), .subscription-live-note p { color: var(--muted); line-height: 1.55; margin: 0; max-width: 65ch; }
.subscription-gift-status, .subscription-gift-panel { background: linear-gradient(125deg, color-mix(in srgb, #d89e23 15%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, #f0bd45 36%, var(--line)); }
.subscription-gift-panel { border-radius: 20px; margin: 0 0 16px; max-width: 760px; padding: clamp(22px, 4vw, 32px); }
.subscription-gift-panel h2 { font-size: clamp(24px, 4vw, 34px); letter-spacing: -.055em; line-height: 1.08; margin: 8px 0 10px; }
.subscription-gift-panel p:not(.eyebrow) { color: var(--muted); line-height: 1.55; margin: 0; max-width: 62ch; }
.subscription-gift-action { color: #f0bd45; display: block; font-size: 14px; font-weight: 750; line-height: 1.45; margin-top: auto; }
.subscription-live-plans { margin-top: 18px; }
.subscription-current-plan { color: var(--accent); font-size: 14px; }
.subscription-live-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; }
.subscription-live-price { align-items: baseline; display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 !important; }
.subscription-live-price b { font-size: 25px; letter-spacing: -.05em; }
.subscription-live-price span { color: var(--muted); font-size: 13px; }
.subscription-live-note { border-top: 1px solid var(--line); margin-top: 24px; padding: 22px 0 0; }
.auth-error { color: #ff9fa7 !important; font-weight: 700; }
.auth-error:empty { display: none; }
.two-fields { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.consent { align-items: start; display: flex; font-size: 13px; font-weight: 500; gap: 8px; }
.consent input { flex: 0 0 auto; height: 18px; margin-top: 2px; min-height: 18px; width: 18px; }
.consent .text-button { display: inline; font-size: 13px; min-height: 0; }
.legal-shell { max-width: 900px; }
.legal-shell .page-heading { margin-top: 35px; }
.brand-link { cursor: pointer; }

@media (max-width: 900px) {
  .metric-grid, .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .new-goal { grid-template-columns: 1fr; }
  .new-goal-fields { grid-template-columns: 1.6fr 1fr .9fr .9fr auto; }
  .goal-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .goal-composer-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .goal-composer-fields .goal-title-field { grid-column: 1 / -1; }
  .review-panel { grid-template-columns: 1fr; }
  .review-panel > p { grid-column: auto; margin: -12px 0 0; }
  .training-layout.with-history { grid-template-columns: 1fr; }
  .workout-history { border-left: 0; border-top: 1px solid var(--line); padding: 22px 0 0; }
  .horizon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .circle-create { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .app-header { min-height: 64px; padding: 8px 16px; }
  .desktop-nav { display: none; }
  .menu-button { display: inline-flex; }
  .profile-chip { display: none; }
  #main-content { padding: 28px 16px 42px; }
  .page-heading { gap: 14px; margin-bottom: 21px; }
  .page-heading > div > p:not(.eyebrow) { font-size: 15px; }
  .save-area { align-items: flex-start; text-align: left; }
  .score-hero { grid-template-columns: 1fr 1fr; padding: 20px; }
  .score-main { grid-column: 1 / -1; }
  .score-groups, .score-action { border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 0; }
  .score-groups { display: grid; grid-template-columns: 1fr 1fr; }
  .score-action { align-items: flex-start; }
  .streak-card { grid-template-columns: auto minmax(0, 1fr); padding: 17px; }
  .streak-record { border-left: 0; border-top: 1px solid color-mix(in srgb, #efbd4f 38%, var(--line)); grid-column: 1 / -1; padding: 12px 0 0; text-align: left; }
  .week-strip { align-items: stretch; flex-direction: column; }
  .date-jump { max-width: none; }
  .date-jump input { max-width: 190px; }
  .checkin-fields { grid-template-columns: 1fr; }
  .focus-panel { align-items: stretch; flex-direction: column; }
  .focus-panel label { min-width: 0; }
  .new-goal-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .new-goal-fields label:first-child { grid-column: 1 / -1; }
  .new-goal-fields .button { grid-column: 1 / -1; }
  .review-fields { grid-template-columns: 1fr; }
  .report-summary { gap: 9px; }
  .report-summary div { padding: 0 10px; }
  .report-summary strong { font-size: 23px; }
  .exercise-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .exercise-row label:first-of-type { grid-column: 1 / -1; }
  .personal-records > div { grid-template-columns: 1fr; }
  .profile-grid, .faq, .support-grid { grid-template-columns: 1fr; }
  .circle-card-head, .friend-invite-create { align-items: stretch; flex-direction: column; }
  .circle-card-head .circle-members { align-self: flex-start; }
  .friend-invite-create .button { align-self: flex-start; }
  .friend-card { grid-template-columns: minmax(0, 1fr) auto; }
  .friend-card .danger-text { grid-column: 1 / -1; justify-self: start; }
  .faq > div { padding-right: 0; }
  .danger-zone { align-items: stretch; flex-direction: column; }
  .site-footer { align-items: flex-start; flex-direction: column; padding: 24px 16px 33px; }
  .landing { padding: 0 16px; }
  .landing-hero { grid-template-columns: 1fr; padding-top: 19px; }
  .landing-hero h1 { font-size: clamp(39px, 11vw, 59px); }
  .landing-showcase { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: 1fr; }
  .public-landing-hero { grid-template-columns: 1fr; padding-top: 48px; }
  .public-today-preview { max-width: 520px; width: 100%; }
  .public-landing-method { grid-template-columns: 1fr; }
  .public-landing-method article, .public-landing-method article:first-child { border-left: 0; border-top: 1px solid var(--line); padding: 21px 0 0; }
  .public-landing-method article:first-child { border-top: 0; padding-top: 0; }
  .public-landing-cta { align-items: flex-start; flex-direction: column; }
  .challenge-hero { grid-template-columns: 1fr; padding-top: 48px; }
  .challenge-orbit { max-width: 520px; width: 100%; }
  .challenge-rules { grid-template-columns: 1fr; }
  .challenge-rules article, .challenge-rules article:first-child { border-left: 0; border-top: 1px solid var(--line); padding: 21px 0 0; }
  .challenge-rules article:first-child { border-top: 0; padding-top: 0; }
  .challenge-finish { align-items: flex-start; flex-direction: column; }
  .public-plans-grid { grid-template-columns: 1fr; }
  .auth-page { padding: 0 16px; }
  .auth-page-main { grid-template-columns: 1fr; min-height: auto; padding: 40px 0 54px; }
  .auth-intro { max-width: 620px; }
  .auth-intro h2 { font-size: clamp(34px, 10vw, 52px); }
}

@media (max-width: 440px) {
  .page-heading { align-items: flex-start; flex-direction: column; }
  .score-hero { grid-template-columns: 1fr; }
  .score-main, .score-groups, .score-action { grid-column: auto; }
  .score-groups { grid-template-columns: repeat(2, 1fr); }
  .streak-trophy { height: 54px; padding: 5px; width: 54px; }
  .streak-copy h2 { font-size: 19px; }
  .checkin-panel-head, .section-title { align-items: stretch; flex-direction: column; }
  .section-title .button { align-self: flex-start; }
  .week-days { gap: 3px; }
  .week-day { min-height: 49px; }
  .week-day span { font-size: 12px; }
  .week-day b { font-size: 15px; }
  .entry-control { align-items: stretch; flex-wrap: wrap; }
  .entry-control input { flex: 1 1 110px; }
  .entry-control > span { align-self: center; min-width: 0; }
  .binary-button { flex: 1 1 100%; }
  .metric-grid, .report-metrics { grid-template-columns: 1fr; }
  .circle-form-grid { grid-template-columns: 1fr; }
  .circle-form-grid .wide { grid-column: auto; }
  .circle-summary { grid-template-columns: 1fr; }
  .circle-summary > div + div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .circle-ranking-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .share-invite { align-items: stretch; grid-template-columns: 1fr; }
  .qr-block { align-items: flex-start; flex-direction: column; }
  .friend-card { grid-template-columns: 1fr; }
  .friend-score { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 11px; }
  .horizon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .horizon-card { padding: 12px; }
  .account-fields, .two-fields { grid-template-columns: 1fr; }
  .verification-resend { align-items: stretch; grid-template-columns: 1fr; }
  .verification-resend .text-button { justify-content: flex-start; }
  .exercise-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exercise-row label:first-of-type { grid-column: 1 / -1; }
}

/* First access must remain usable even on the narrowest iPhone widths. The
   contextual/legal link stays available in the footer; keeping the account
   actions here prevents the header from creating horizontal scroll. */
@media (max-width: 420px) {
  .public-landing-header,
  .auth-page-header { gap: 8px; min-height: 68px; }
  .public-landing-header > .brand-text,
  .auth-page-header > .brand-text { flex: 1 1 0; font-size: 15px; min-width: 0; white-space: nowrap; }
  .public-landing-header nav { flex: 0 0 auto; gap: 6px; }
  .public-landing-header nav > .text-button:first-child { display: none; }
  .public-landing-header nav .button,
  .public-landing-header nav .text-button,
  .auth-page-header .text-button { font-size: 13px; }
  .public-landing-header nav .button { padding-inline: 10px; }
  .auth-page-header .text-button { white-space: nowrap; }
}

@media (max-width: 430px) {
  .circle-ranking li { align-items: start; grid-template-columns: 28px minmax(0, 1fr) 54px; gap: 7px; padding: 9px; }
  .circle-ranking li > b { font-size: 15px; line-height: 1.05; padding-top: 2px; text-align: right; }
  .circle-ranking li > b small { display: block; font-size: 10px; line-height: 1.2; margin-top: 3px; }
  .circle-rank { padding-top: 3px; }
  .circle-name { font-size: 14px; }
  .circle-member { align-items: flex-start; }
  .circle-member-meta .leader-streak { font-size: 11px; }
}

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

/* Private subscription demo */
.demo-private-chip { align-items: center; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 999px; color: var(--accent-2); display: inline-flex; font-size: 12px; font-weight: 850; letter-spacing: .09em; min-height: 34px; padding: 0 12px; }
.subscription-demo { display: grid; gap: 18px; }
.subscription-demo-intro { align-items: end; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), color-mix(in srgb, #e8ba46 12%, var(--surface))); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 20px; display: grid; gap: 20px; grid-template-columns: minmax(0, 1.5fr) minmax(240px, .75fr); overflow: hidden; padding: clamp(22px, 4vw, 34px); position: relative; }
.subscription-demo-intro::after { background: radial-gradient(circle, rgba(232, 186, 70, .3), transparent 69%); content: ""; height: 290px; pointer-events: none; position: absolute; right: -118px; top: -168px; width: 290px; }
.subscription-demo-intro > * { position: relative; z-index: 1; }
.subscription-demo-intro h2 { font-size: clamp(31px, 5vw, 48px); max-width: 650px; }
.subscription-demo-intro p:not(.eyebrow) { font-size: 17px; margin-bottom: 0; max-width: 650px; }
.subscription-demo-trust { display: grid; gap: 10px; }
.subscription-demo-trust span { background: color-mix(in srgb, var(--surface) 74%, transparent); border: 1px solid var(--line); border-radius: 11px; color: var(--text); font-size: 14px; font-weight: 750; padding: 10px 12px; }
.demo-pricing-grid { align-items: stretch; display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.demo-plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; color: var(--text); display: flex; flex-direction: column; gap: 11px; justify-content: flex-start; min-height: 100%; padding: 20px; position: relative; text-align: left; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease; }
.demo-plan-card:hover { border-color: color-mix(in srgb, var(--accent) 58%, var(--line)); box-shadow: 0 14px 35px color-mix(in srgb, var(--bg) 52%, transparent); transform: translateY(-2px); }
.demo-plan-card.selected { border-color: var(--accent-2); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-2) 30%, transparent), 0 18px 44px color-mix(in srgb, var(--bg) 60%, transparent); }
.demo-plan-card.recommended { background: linear-gradient(150deg, color-mix(in srgb, #e8ba46 18%, var(--surface)), var(--surface) 62%); border-color: color-mix(in srgb, #e8ba46 64%, var(--line)); }
.demo-plan-card.founder { background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 17%, var(--surface)), var(--surface) 62%); }
.demo-plan-badge { align-self: flex-start; background: #e8ba46; border-radius: 999px; color: #171005; font-size: 11px; font-weight: 950; letter-spacing: .08em; padding: 5px 8px; }
.demo-plan-eyebrow { color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.demo-plan-card.recommended .demo-plan-eyebrow { color: #f3ca66; }
.demo-plan-card > strong { font-size: 22px; letter-spacing: -.045em; line-height: 1.1; }
.demo-plan-price { color: var(--text); display: flex; flex-wrap: wrap; font-size: 32px; font-weight: 950; gap: 5px; letter-spacing: -.07em; line-height: 1; }
.demo-plan-price small { align-self: end; color: var(--muted); font-size: 13px; font-weight: 750; letter-spacing: 0; margin-bottom: 4px; }
.demo-plan-description { color: var(--muted); font-size: 14px; min-height: 44px; }
.demo-plan-features { border-top: 1px solid var(--line); display: grid; gap: 8px; margin-top: auto; padding-top: 14px; }
.demo-plan-features span { color: var(--muted); font-size: 13px; line-height: 1.32; }
.demo-plan-select { color: var(--accent-2); font-size: 13px; font-weight: 850; margin-top: 4px; }
.demo-plan-summary { align-items: center; background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 44%, var(--line)); border-radius: 18px; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) auto auto; padding: 20px; }
.demo-plan-summary h2 { margin-bottom: 4px; }
.demo-plan-summary p:not(.eyebrow) { margin-bottom: 0; }
.demo-plan-summary-price { min-width: 118px; }
.demo-plan-summary-price strong { color: var(--accent-2); display: block; font-size: 31px; letter-spacing: -.07em; line-height: 1; }
.demo-plan-summary-price span { color: var(--muted); font-size: 13px; font-weight: 700; }
.pro-value-demo { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 11%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line)); border-radius: 20px; display: grid; gap: 24px; margin-top: 18px; padding: clamp(23px, 4vw, 32px); }
.pro-value-intro { align-items: end; display: grid; gap: 18px; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); }
.pro-value-intro h2 { font-size: clamp(26px, 4.3vw, 39px); margin-bottom: 0; max-width: 590px; }
.pro-value-intro p:not(.eyebrow) { font-size: 16px; margin-bottom: 0; }
.pro-value-grid { display: grid; gap: 11px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pro-value-grid article { background: color-mix(in srgb, var(--surface-2) 82%, transparent); border: 1px solid var(--line); border-radius: 15px; min-height: 190px; padding: 17px; }
.pro-value-grid article > span { color: var(--accent-2); display: block; font-size: 12px; font-weight: 900; letter-spacing: .12em; margin-bottom: 18px; }
.pro-value-grid h3 { font-size: 18px; margin-bottom: 7px; }
.pro-value-grid p { font-size: 13px; line-height: 1.45; margin-bottom: 0; }
.annual-365-demo { align-items: center; background: linear-gradient(135deg, color-mix(in srgb, #e8ba46 17%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, #e8ba46 56%, var(--line)); border-radius: 20px; display: grid; gap: 26px; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); margin-top: 18px; overflow: hidden; padding: clamp(23px, 4vw, 32px); position: relative; }
.annual-365-demo::before { background: radial-gradient(circle, rgba(232, 186, 70, .3), transparent 70%); content: ""; height: 280px; left: -148px; pointer-events: none; position: absolute; top: -174px; width: 280px; }
.annual-365-demo > * { position: relative; z-index: 1; }
.annual-365-demo h2 { font-size: clamp(30px, 4.5vw, 44px); margin-bottom: 7px; }
.annual-365-demo p:not(.eyebrow) { font-size: 16px; margin-bottom: 0; max-width: 495px; }
.annual-365-timeline { display: grid; gap: 9px; }
.annual-365-timeline article { align-items: center; background: color-mix(in srgb, var(--surface-2) 88%, transparent); border: 1px solid var(--line); border-radius: 13px; display: grid; gap: 4px 12px; grid-template-columns: 120px minmax(0, 1fr); padding: 13px 15px; }
.annual-365-timeline span { color: #f3ca66; font-size: 11px; font-weight: 900; letter-spacing: .1em; }
.annual-365-timeline b { font-size: 15px; }
.annual-365-timeline small { color: var(--muted); font-size: 13px; grid-column: 2; }
.referral-demo { align-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line)); border-radius: 20px; display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr) minmax(230px, .55fr); margin-top: 18px; padding: clamp(22px, 4vw, 30px); }
.referral-demo h2 { font-size: clamp(25px, 4vw, 34px); max-width: 600px; }
.referral-demo p:not(.eyebrow) { max-width: 600px; }
.referral-demo-progress { background: color-mix(in srgb, var(--surface-2) 84%, transparent); border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 8px; padding: 18px; }
.referral-demo-progress > span { color: var(--quiet); font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.referral-demo-progress strong { color: var(--text); font-size: 38px; letter-spacing: -.08em; line-height: 1; }
.referral-demo-progress strong small { color: var(--muted); font-size: 18px; letter-spacing: -.04em; }
.referral-demo-progress > div { background: var(--surface-3); border-radius: 99px; height: 9px; overflow: hidden; }
.referral-demo-progress > div i { background: linear-gradient(90deg, var(--accent), var(--accent-2)); display: block; height: 100%; width: 0; }
.referral-demo-progress p { color: var(--accent-2); font-size: 13px; font-weight: 800; margin-bottom: 0; }
.demo-payment-backdrop { align-items: center; background: rgba(3, 4, 11, .72); display: flex; inset: 0; justify-content: center; padding: 18px; position: fixed; z-index: 90; }
.demo-payment-dialog { background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line)); border-radius: 22px; box-shadow: 0 28px 80px rgba(0, 0, 0, .5); max-width: 510px; padding: 30px; position: relative; width: 100%; }
.demo-modal-close { align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 50%; color: var(--text); display: inline-flex; font-size: 25px; height: 38px; justify-content: center; min-height: 38px; padding: 0; position: absolute; right: 16px; top: 16px; width: 38px; }
.demo-payment-dialog h2 { font-size: 31px; margin-bottom: 6px; }
.demo-payment-price { color: var(--accent-2); font-size: 38px; font-weight: 950; letter-spacing: -.08em; line-height: 1; }
.demo-payment-price span { color: var(--muted); font-size: 14px; font-weight: 700; letter-spacing: 0; margin-left: 6px; }
.demo-payment-note { background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--accent) 31%, var(--line)); border-radius: 13px; display: grid; gap: 4px; margin: 20px 0; padding: 13px; }
.demo-payment-note b { color: var(--text); font-size: 14px; }
.demo-payment-note span { color: var(--muted); font-size: 13px; }
.demo-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.demo-entry-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 980px) { .demo-pricing-grid, .pro-value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .annual-365-demo { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .subscription-demo-intro, .referral-demo, .demo-plan-summary, .pro-value-intro { grid-template-columns: 1fr; } .demo-plan-summary-price { min-width: 0; } .demo-plan-summary .button { width: 100%; } }
@media (max-width: 520px) { .demo-pricing-grid { grid-template-columns: 1fr; } .subscription-demo-intro, .referral-demo, .demo-payment-dialog { padding: 20px; } .demo-modal-actions .button { flex: 1 1 140px; } }

/* Simple CRPROGRESS demo experience */
.today-simple-hero, .account-simple, .journey-card, .admin-panel, .today-task-list, .update-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; }
.today-simple-hero { align-items: center; display: grid; gap: 18px; grid-template-columns: auto minmax(0, 1fr) auto; padding: clamp(20px, 4vw, 30px); }
.completion-orbit { align-content: center; aspect-ratio: 1; background: conic-gradient(var(--accent-2) var(--completion), var(--surface-3) 0); border-radius: 50%; display: grid; min-width: 116px; padding: 9px; place-items: center; position: relative; }
.completion-orbit::before { background: var(--surface); border-radius: 50%; content: ""; inset: 9px; position: absolute; }
.completion-orbit strong, .completion-orbit span { position: relative; z-index: 1; }.completion-orbit strong { font-size: 26px; letter-spacing: -.07em; }.completion-orbit span { color: var(--muted); font-size: 11px; font-weight: 800; }
.today-simple-hero h2 { margin: 3px 0 6px; }.today-simple-hero p { margin: 0; }.today-streak-mini { align-items: center; border-left: 1px solid var(--line); display: flex; gap: 12px; padding-left: 18px; }.today-streak-mini b, .today-streak-mini span { display: block; }.today-streak-mini span { color: var(--muted); font-size: 12px; }.today-streak-mini .today-streak-trophy { align-items: center; background: radial-gradient(circle at 40% 28%, rgba(255, 244, 183, .25), transparent 45%), linear-gradient(145deg, #172041, #0a0e20); border: 1px solid rgba(255, 226, 123, .62); border-radius: 17px; box-shadow: 0 8px 18px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .12); display: flex; flex: 0 0 64px; height: 64px; justify-content: center; overflow: hidden; padding: 7px; width: 64px; }.today-streak-mini .trophy-today-mark { display: block; filter: drop-shadow(0 5px 8px rgba(240, 174, 47, .46)); height: 100%; width: 100%; }
.today-task-list { display: grid; gap: 9px; margin-top: 18px; padding: 18px; }.simple-section-title { align-items: center; display: flex; justify-content: space-between; margin-bottom: 3px; }.simple-section-title h2 { margin: 2px 0; }.today-task { align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 15px; color: var(--text); cursor: pointer; display: grid; font: inherit; gap: 11px; grid-template-columns: 30px minmax(0, 1fr) auto; min-height: 62px; padding: 12px; text-align: left; }.today-task.done { background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); border-color: color-mix(in srgb, var(--accent-2) 55%, var(--line)); }.today-task small { color: var(--muted); font-size: 12px; }.today-check { align-items: center; border: 2px solid var(--muted); border-radius: 50%; display: inline-flex; font-weight: 950; height: 24px; justify-content: center; width: 24px; }.today-task.done .today-check { background: var(--accent-2); border-color: var(--accent-2); color: #070b12; }.today-details, .route-manage { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin-top: 18px; padding: 0 18px; }.today-details summary, .route-manage summary { cursor: pointer; font-weight: 850; padding: 18px 0; }.today-details .checkin-panel { border: 0; padding: 0 0 18px; }
.period-switch, .admin-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }.period-switch { margin: 18px 0; }.period-switch button, .admin-tabs button { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; padding: 9px 14px; white-space: nowrap; }.period-switch button.active, .admin-tabs button.active { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); border-color: var(--accent-2); color: var(--text); }.journey-list { display: grid; gap: 12px; }.journey-card { padding: 19px; }.journey-card-head { align-items: start; display: flex; justify-content: space-between; gap: 15px; }.journey-card-head h2 { font-size: 19px; margin: 0 0 3px; }.journey-card-head p { color: var(--muted); font-size: 13px; margin: 0; }.journey-card-head strong { color: var(--accent-2); font-size: 29px; letter-spacing: -.07em; }.journey-line { align-items: center; color: var(--muted); display: flex; font-size: 11px; font-weight: 800; justify-content: space-between; margin-top: 11px; position: relative; }.journey-line i { background: var(--accent-2); border: 3px solid var(--surface); border-radius: 50%; height: 14px; position: absolute; top: -9px; width: 14px; }.journey-line b { color: var(--text); }.journey-card details { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }.journey-card summary { cursor: pointer; font-size: 13px; font-weight: 800; }
.account-simple { display: grid; gap: 22px; padding: clamp(21px, 4vw, 31px); }.account-identity { align-items: center; display: flex; gap: 15px; }.account-identity h2 { margin: 0 0 3px; }.account-identity p { color: var(--muted); margin: 0; }.account-avatar { align-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-radius: 50%; color: #07101b; display: flex; font-size: 22px; font-weight: 950; height: 62px; justify-content: center; overflow: hidden; width: 62px; }.account-avatar img { height: 100%; object-fit: cover; width: 100%; }.account-quick { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }.account-quick article { background: var(--surface-2); border-radius: 14px; display: grid; gap: 5px; padding: 15px; }.account-quick span { color: var(--muted); font-size: 12px; }.account-quick b { font-size: 17px; }.account-quick b span { color: inherit; font: inherit; }.account-quick article.account-streak-stat { align-items: center; gap: 10px; grid-template-columns: 64px minmax(0, 1fr); min-height: 88px; padding: 12px; }.account-quick .account-streak-trophy { align-items: center; background: radial-gradient(circle at 40% 28%, rgba(255, 244, 183, .25), transparent 45%), linear-gradient(145deg, #172041, #0a0e20); border: 1px solid rgba(255, 226, 123, .62); border-radius: 17px; box-shadow: 0 8px 18px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .12); display: flex; height: 64px; justify-content: center; overflow: hidden; padding: 7px; width: 64px; }.account-quick .account-streak-copy { display: grid; gap: 5px; min-width: 0; }.account-quick .account-streak-copy > span { color: var(--muted); font-size: 12px; }.account-quick .trophy-account-mark { display: block; filter: drop-shadow(0 5px 8px rgba(240, 174, 47, .46)); height: 100%; width: 100%; }.account-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.account-sheet-backdrop { background: rgba(3,4,11,.6); inset: 0; position: fixed; z-index: 80; }.account-settings-sheet { background: var(--surface); border-left: 1px solid var(--line); box-shadow: -20px 0 60px rgba(0,0,0,.28); display: grid; gap: 18px; height: 100%; overflow-y: auto; padding: 20px; position: absolute; right: 0; top: 0; transition: transform .18s ease; width: min(440px, 92vw); }.sheet-drag-handle { background: var(--line); border-radius: 99px; height: 4px; justify-self: center; width: 42px; }.sheet-head { align-items: start; display: flex; justify-content: space-between; }.sheet-head h2 { margin: 2px 0; }.account-settings-sheet section { border-top: 1px solid var(--line); display: grid; gap: 10px; padding-top: 15px; }.account-settings-sheet h3 { font-size: 15px; margin: 0; }.account-settings-sheet label { color: var(--muted); display: grid; font-size: 13px; gap: 6px; }
.ticket-list, .update-list { display: grid; gap: 10px; }.ticket-card { border: 1px solid var(--line); border-radius: 13px; display: grid; gap: 9px; padding: 13px; }.ticket-card h3 { font-size: 15px; margin: 8px 0 4px; }.ticket-card p { font-size: 13px; margin: 0; }.ticket-card small { color: var(--muted); }.ticket-status { border-radius: 99px; display: inline-block; font-size: 11px; font-weight: 850; padding: 4px 8px; }.ticket-status.aperto { background: color-mix(in srgb, var(--accent) 17%, var(--surface)); color: var(--accent-2); }.ticket-status.risposto { background: color-mix(in srgb, #e8ba46 16%, var(--surface)); color: #f3ca66; }.ticket-reply { background: var(--surface-2); border-radius: 10px; margin-top: 11px; padding: 10px; }.ticket-reply b { font-size: 12px; }.update-card { padding: 18px; }.update-card > span, .update-card small { color: var(--muted); font-size: 12px; }.update-card h3 { margin: 7px 0; }.update-card p { margin: 0 0 8px; }
.demo-admin-note { background: color-mix(in srgb, #e8ba46 14%, var(--surface)); border: 1px solid color-mix(in srgb, #e8ba46 48%, var(--line)); border-radius: 12px; color: var(--muted); font-size: 13px; font-weight: 800; margin: 0 0 14px; padding: 11px 13px; }.admin-tabs { border-bottom: 1px solid var(--line); padding-bottom: 13px; }.admin-kpis { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; }.admin-kpis article { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 5px; padding: 16px; }.admin-kpis span, .admin-kpis small { color: var(--muted); font-size: 12px; }.admin-kpis b { font-size: 29px; letter-spacing: -.07em; }.admin-panel { display: grid; gap: 14px; margin-top: 18px; padding: 20px; }.admin-panel h2 { margin: 0; }.status-grid { align-items: center; background: var(--surface-2); border-radius: 12px; display: flex; flex-wrap: wrap; gap: 12px; padding: 13px; }.status-good { color: var(--accent-2); }
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-user-detail { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-user-detail > div { background: var(--surface-2); border-radius: 12px; display: grid; gap: 3px; padding: 12px; }
.admin-user-detail span { color: var(--muted); font-size: 12px; }
.admin-goal-list { display: grid; gap: 6px; margin: 0; padding-left: 20px; }
.admin-settings { display: grid; gap: 14px; }
.admin-settings > label { color: var(--muted); display: grid; font-size: 13px; gap: 6px; }
.admin-maintenance-card { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface-2)), var(--surface-2)); border: 1px solid color-mix(in srgb, var(--accent-2) 38%, var(--line)); border-radius: 16px; display: grid; gap: 13px; padding: 16px; }
.admin-maintenance-card h3 { margin: 2px 0 5px; }
.admin-maintenance-card p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 0; }
.admin-maintenance-card > label:not(.admin-maintenance-toggle) { color: var(--muted); display: grid; font-size: 13px; gap: 6px; }
.admin-maintenance-toggle { align-items: center; background: color-mix(in srgb, var(--surface) 74%, transparent); border: 1px solid var(--line); border-radius: 12px; color: var(--text); cursor: pointer; display: flex; font-size: 14px; font-weight: 800; gap: 10px; padding: 12px; }
.admin-maintenance-toggle input { accent-color: var(--accent-2); block-size: 19px; inline-size: 19px; margin: 0; }
@media (max-width: 720px) { .today-simple-hero { align-items: start; grid-template-columns: auto 1fr; }.today-streak-mini { border-left: 0; border-top: 1px solid var(--line); grid-column: 1 / -1; padding: 13px 0 0; }.today-streak-mini .today-streak-trophy { flex-basis: 58px; height: 58px; width: 58px; }.account-quick, .admin-kpis { grid-template-columns: 1fr 1fr; }.account-actions .button { flex: 1 1 150px; }.mobile-drawer { transition: transform .18s ease; }.goal-composer-fields, .journey-edit-fields { grid-template-columns: 1fr; }.goal-composer-fields .goal-title-field, .journey-edit-fields .journey-edit-title { grid-column: auto; }.goal-composer-actions { align-items: stretch; flex-direction: column; }.goal-composer-actions .button, .journey-edit-actions .button { width: 100%; } }

/* Account stays compact on iPhone: long addresses must not widen the page. */
@media (max-width: 720px) {
  .account-simple, .account-identity, .account-identity > div { min-width: 0; }
  .account-identity p { overflow-wrap: anywhere; }
  .account-actions { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .account-actions .button { flex: none; font-size: 14px; min-width: 0; min-height: 52px; padding-inline: 10px; width: 100%; }
  .account-actions .account-action-subscription, .account-actions .account-action-admin { grid-column: 1 / -1; }
}

/* Quick goals: simple decisions in a familiar bottom sheet. */
.route-heading-actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; }
.goal-quick-launch { align-items: end; background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent-2) 38%, var(--line)); border-radius: 20px; display: grid; gap: 15px; grid-template-columns: minmax(0, .86fr) minmax(300px, 1.14fr); margin: 17px 0; overflow: hidden; padding: clamp(17px, 3vw, 23px); position: relative; }
.goal-quick-launch::after { background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 34%, transparent), transparent 68%); content: ""; height: 190px; pointer-events: none; position: absolute; right: -80px; top: -105px; width: 190px; }
.goal-quick-launch > * { position: relative; z-index: 1; }
.goal-quick-launch h2 { margin: 3px 0 5px; }
.goal-quick-launch p:not(.eyebrow) { color: var(--muted); font-size: 14px; margin: 0; }
.goal-quick-input { align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; display: flex; gap: 8px; min-height: 58px; padding: 6px; }
.goal-quick-input:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 16%, transparent); }
.goal-quick-input input { background: transparent; border: 0; box-shadow: none; flex: 1; min-width: 0; }
.goal-quick-input input:focus { box-shadow: none; }
.goal-quick-input .button { flex: 0 0 auto; }
.goal-creation-notice { align-items: center; background: color-mix(in srgb, var(--accent) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent-2) 48%, var(--line)); border-radius: 15px; display: flex; gap: 15px; justify-content: space-between; margin: 14px 0; padding: 13px 14px; animation: cr-goal-notice .32s cubic-bezier(.2,.8,.2,1) both; }
.goal-creation-notice > div { align-items: center; display: flex; gap: 9px; }
.goal-creation-notice b, .goal-creation-notice span { display: block; }
.goal-creation-notice span { color: var(--muted); font-size: 13px; margin-top: 2px; }
.objective-editor-card { align-items: center; display: flex; gap: 15px; justify-content: space-between; }
.objective-editor-card h3 { margin: 2px 0 4px; }
.objective-editor-card p:not(.eyebrow) { color: var(--muted); font-size: 13px; margin: 0; }
.objective-link { color: var(--accent-2); display: block; font-size: 12px; margin-top: 5px; }
.objective-card-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.objective-is-paused { opacity: .76; }
.weekly-journey-summary { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; display: grid; gap: 13px; margin-top: 18px; padding: 18px; }
.weekly-journey-summary-head { align-items: center; display: flex; gap: 14px; justify-content: space-between; }
.weekly-journey-summary-head h2 { margin: 3px 0 0; }
.weekly-journey-summary-list { display: grid; gap: 8px; }
.weekly-journey-summary article { align-items: center; background: var(--surface-2); border-radius: 12px; display: grid; gap: 9px 12px; grid-template-columns: minmax(0, 1fr) auto; padding: 11px; }
.weekly-journey-summary article > div { display: grid; gap: 3px; min-width: 0; }
.weekly-journey-summary article b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weekly-journey-summary article span, .weekly-journey-summary > p { color: var(--muted); font-size: 12px; margin: 0; }
.weekly-journey-summary article strong { color: var(--accent-2); font-size: 14px; }
.weekly-journey-summary article i { background: color-mix(in srgb, var(--line) 80%, transparent); border-radius: 99px; grid-column: 1 / -1; height: 5px; overflow: hidden; }
.weekly-journey-summary article i em { background: linear-gradient(90deg, var(--accent), var(--accent-2)); display: block; height: 100%; }
.weekly-journey-summary-head > div > p:last-child { color: var(--muted); font-size: 13px; margin: 7px 0 0; max-width: 42ch; }
.weekly-total-field { align-items: center; color: var(--muted); display: grid; font-size: 12px; gap: 7px; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) 92px auto; }
.weekly-total-field input { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; color: var(--text); font: inherit; min-width: 0; padding: 9px 10px; text-align: right; width: 100%; }
.weekly-total-field input:focus { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 28%, transparent); outline-offset: 1px; }
.weekly-total-field span { font-size: 12px; min-width: 42px; }
.goal-sheet-backdrop { animation: cr-backdrop .2s ease both; background: rgba(2, 4, 12, .68); inset: 0; position: fixed; z-index: 110; }
.goal-sheet { animation: cr-goal-sheet-in .3s cubic-bezier(.2,.85,.22,1) both; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface) 30%); border: 1px solid color-mix(in srgb, var(--accent-2) 30%, var(--line)); border-bottom: 0; border-radius: 28px 28px 0 0; bottom: 0; box-shadow: 0 -24px 70px rgba(0,0,0,.38); left: 50%; max-height: min(85dvh, 790px); overflow: auto; overscroll-behavior: contain; padding: 10px clamp(16px, 4vw, 28px) max(20px, env(safe-area-inset-bottom)); position: fixed; transform: translateX(-50%); transition: transform .18s cubic-bezier(.2,.8,.2,1); width: min(680px, 100%); z-index: 111; }
.goal-sheet-handle { background: color-mix(in srgb, var(--muted) 48%, transparent); border-radius: 999px; height: 5px; margin: 0 auto 14px; touch-action: none; width: 48px; }
.goal-sheet-head { align-items: flex-start; display: flex; gap: 15px; justify-content: space-between; padding-bottom: 16px; touch-action: pan-y; }
.goal-sheet-head h2 { margin: 3px 0 5px; }
.goal-sheet-head p:not(.eyebrow) { color: var(--muted); font-size: 14px; margin: 0; }
.goal-sheet-body { display: grid; gap: 17px; padding-bottom: 4px; }
.goal-sheet-title-field { color: var(--text); display: grid; font-size: 14px; font-weight: 850; gap: 7px; }
.goal-sheet-title-field input { font-size: 17px; min-height: 54px; }
.goal-suggestions { display: flex; gap: 8px; margin-top: -6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.goal-suggestions::-webkit-scrollbar { display: none; }
.goal-suggestions button { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); cursor: pointer; flex: 0 0 auto; font: 750 12px/1.15 inherit; min-height: 36px; padding: 8px 11px; }
.goal-suggestions button:hover, .goal-suggestions button:focus-visible { border-color: var(--accent-2); color: var(--text); outline: none; }
.goal-choice-group { border: 0; display: grid; gap: 9px; margin: 0; padding: 0; }
.goal-choice-group legend { font-size: 14px; font-weight: 850; padding: 0; }
.goal-choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.goal-choice { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); cursor: pointer; font: 750 13px/1.15 inherit; min-height: 44px; padding: 9px 11px; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.goal-choice:hover, .goal-choice:focus-visible { border-color: var(--accent-2); color: var(--text); outline: none; transform: translateY(-1px); }
.goal-choice.selected { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 38%, var(--surface-2)), color-mix(in srgb, var(--accent-2) 21%, var(--surface-2))); border-color: var(--accent-2); color: var(--text); }
.goal-inline-field { align-items: end; display: grid; gap: 7px; grid-template-columns: minmax(90px, 150px) auto; max-width: 300px; }
.goal-inline-field input { min-height: 43px; }
.goal-inline-field span { color: var(--muted); font-size: 13px; padding: 0 0 12px; }
.goal-advanced-toggle { align-items: center; background: transparent; border: 0; border-top: 1px solid var(--line); color: var(--accent-2); cursor: pointer; display: flex; font: 850 14px/1.2 inherit; justify-content: space-between; min-height: 48px; padding: 11px 0 0; text-align: left; width: 100%; }
.goal-advanced-toggle span { font-size: 19px; }
.goal-advanced-fields { border-bottom: 1px solid var(--line); display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 18px; }
.goal-advanced-fields label { color: var(--muted); display: grid; font-size: 12px; gap: 6px; }
.goal-advanced-fields .goal-note-field { grid-column: 1 / -1; }
.goal-advanced-fields input, .goal-advanced-fields select { min-height: 43px; }
.goal-sheet-summary { align-items: baseline; display: flex; gap: 8px; justify-content: space-between; }
.goal-sheet-summary span { color: var(--muted); font-size: 13px; }
.goal-sheet-summary b { color: var(--text); font-size: 13px; text-align: right; }
.goal-sheet-submit { min-height: 54px; }
@keyframes cr-goal-sheet-in { from { opacity: 0; transform: translate(-50%, 44px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes cr-goal-notice { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 720px) { .route-heading-actions { justify-content: stretch; width: 100%; }.route-heading-actions .button { flex: 1 1 155px; }.goal-quick-launch { grid-template-columns: 1fr; }.goal-quick-input .button { min-height: 46px; padding-inline: 15px; }.objective-editor-card { align-items: stretch; flex-direction: column; }.objective-card-actions { justify-content: flex-start; }.goal-sheet { border-radius: 24px 24px 0 0; max-height: 88dvh; }.goal-sheet-head { padding-bottom: 13px; }.goal-choice { flex: 1 1 calc(50% - 5px); }.goal-advanced-fields { grid-template-columns: 1fr; }.goal-advanced-fields .goal-note-field { grid-column: auto; }.goal-creation-notice { align-items: flex-start; flex-direction: column; }.goal-creation-notice > div:last-child { justify-content: space-between; width: 100%; } }
@media (prefers-reduced-motion: reduce) { .goal-sheet, .goal-sheet-backdrop, .goal-creation-notice { animation: none !important; }.goal-choice { transition: none; } }
@media (max-width: 420px) { .completion-orbit { min-width: 96px; }.today-simple-hero h2 { font-size: 20px; }.account-quick { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .admin-user-detail { grid-template-columns: 1fr; } .admin-row-actions { align-items: flex-start; flex-direction: column; } }

/* Motion layer: every transition mirrors an actual change in progress. */
:root.theme-transition body,
:root.theme-transition .app-shell,
:root.theme-transition .today-simple-hero,
:root.theme-transition .today-task-list,
:root.theme-transition .journey-card,
:root.theme-transition .account-simple,
:root.theme-transition .section-block,
:root.theme-transition .circle-card,
:root.theme-transition .friend-card,
:root.theme-transition .subscription-live-status,
:root.theme-transition .subscription-gift-panel {
  transition: background-color .32s ease, color .32s ease, border-color .32s ease, box-shadow .32s ease;
}

.splash {
  animation: none;
  background:
    radial-gradient(circle at 50% 43%, rgba(88, 135, 255, .14), transparent 16rem),
    #070913;
}

.splash::before {
  background: linear-gradient(100deg, transparent 35%, rgba(126, 229, 255, .8), transparent 65%);
  content: "";
  height: 2px;
  left: 50%;
  opacity: 0;
  position: absolute;
  top: calc(50% + min(112px, 31vw));
  transform: translateX(-50%) scaleX(.4);
  width: min(190px, 48vw);
  animation: cr-splash-line .86s cubic-bezier(.2,.8,.2,1) .32s both;
}

.splash img {
  animation: cr-splash-mark 1.14s cubic-bezier(.16,.84,.23,1) both;
  filter: drop-shadow(0 0 16px rgba(67, 220, 255, .34)) drop-shadow(0 0 34px rgba(208, 81, 255, .2));
}

@keyframes cr-splash-mark {
  0% { filter: blur(10px) drop-shadow(0 0 0 rgba(67, 220, 255, 0)); opacity: 0; transform: scale(.82) translateY(10px); }
  56% { opacity: 1; transform: scale(1.035) translateY(0); }
  100% { filter: blur(0) drop-shadow(0 0 16px rgba(67, 220, 255, .34)) drop-shadow(0 0 34px rgba(208, 81, 255, .2)); opacity: 1; transform: scale(1); }
}

@keyframes cr-splash-line {
  from { opacity: 0; transform: translateX(-50%) scaleX(.4); }
  to { opacity: .84; transform: translateX(-50%) scaleX(1); }
}

#root.motion-prepare .motion-reveal { opacity: 0; transform: translateY(12px); }
#root.motion-enter .motion-reveal { animation: cr-reveal .48s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--motion-order, 0) * 58ms); }
#root.motion-enter [data-motion-progress] { animation: cr-progress-fill .58s cubic-bezier(.2,.8,.2,1) both; animation-delay: 85ms; }
#root.motion-enter [data-motion-marker] { animation: cr-marker-travel .62s cubic-bezier(.2,.8,.2,1) both; animation-delay: 130ms; }

@keyframes cr-reveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cr-progress-fill {
  from { width: 0; }
  to { width: var(--motion-progress); }
}

@keyframes cr-marker-travel {
  from { left: 0; opacity: .2; transform: scale(.72); }
  to { left: var(--motion-marker); opacity: 1; transform: scale(1); }
}

.today-simple-hero { position: relative; }
.motion-score-pulse {
  background: color-mix(in srgb, var(--accent-2) 17%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent-2) 58%, var(--line));
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  left: 18px;
  padding: 6px 9px;
  pointer-events: none;
  position: absolute;
  top: 14px;
  z-index: 3;
  animation: cr-score-pulse .92s cubic-bezier(.16,.84,.23,1) both;
}

@keyframes cr-score-pulse {
  0% { opacity: 0; transform: translateY(10px) scale(.86); }
  28% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-18px) scale(1); }
}

.today-task.motion-goal-complete,
.checkin-field.motion-goal-complete {
  animation: cr-goal-complete .66s cubic-bezier(.16,.84,.23,1) both;
}
.today-task.motion-goal-complete .today-check { animation: cr-check-pop .44s cubic-bezier(.16,.84,.23,1) both; }
.today-task.motion-goal-reverse,
.checkin-field.motion-goal-reverse { animation: cr-goal-reverse .4s ease both; }

@keyframes cr-goal-complete {
  0% { transform: scale(.97); }
  45% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent-2) 13%, transparent); transform: scale(1.012); }
  100% { box-shadow: none; transform: scale(1); }
}

@keyframes cr-check-pop {
  0% { transform: scale(.66); }
  68% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@keyframes cr-goal-reverse {
  0%, 100% { transform: translateX(0); }
  32% { transform: translateX(-4px); }
  68% { transform: translateX(3px); }
}

.today-streak-mini.motion-streak-gain,
.streak-card.motion-streak-gain { animation: cr-streak-gain .78s cubic-bezier(.16,.84,.23,1) both; }
.today-streak-mini.motion-new-record,
.streak-card.motion-new-record { animation: cr-record-gain .9s cubic-bezier(.16,.84,.23,1) both; }
.motion-streak-gain .cr-trophy-mark,
.motion-new-record .cr-trophy-mark { animation: cr-trophy-lift .68s cubic-bezier(.16,.84,.23,1) both; }

/* The CR trophy is a live reward: it arrives with the page, then keeps a
   restrained glow and float so the streak feels present even before a new
   check-in happens. */
.today-streak-mini .today-streak-trophy,
.account-quick .account-streak-trophy { isolation: isolate; position: relative; }
.today-streak-mini .today-streak-trophy::before,
.account-quick .account-streak-trophy::before { border: 1px solid rgba(255, 224, 118, .68); border-radius: inherit; content: ""; inset: -4px; opacity: 0; pointer-events: none; position: absolute; transform: scale(.84); z-index: 0; animation: cr-trophy-aura 3.8s ease-out infinite; }
.today-streak-mini .today-streak-trophy::after,
.account-quick .account-streak-trophy::after { background: linear-gradient(112deg, transparent 35%, rgba(255, 244, 194, .42) 50%, transparent 65%); content: ""; inset: -52%; opacity: 0; pointer-events: none; position: absolute; transform: translateX(-72%) rotate(24deg); z-index: 2; animation: cr-trophy-sheen 3.8s ease-in-out infinite; }
.today-streak-mini .trophy-today-mark,
.account-quick .trophy-account-mark { animation: cr-trophy-idle 2.9s cubic-bezier(.42, 0, .3, 1) infinite; position: relative; transform-origin: 50% 76%; z-index: 1; }
#root.motion-enter .today-streak-mini .today-streak-trophy,
#root.motion-enter .account-quick .account-streak-trophy { animation: cr-trophy-arrive .72s cubic-bezier(.16,.84,.23,1) both; }

@keyframes cr-trophy-arrive {
  0% { filter: brightness(.72); opacity: 0; transform: translateY(16px) scale(.72) rotate(-8deg); }
  62% { filter: brightness(1.16); opacity: 1; transform: translateY(-3px) scale(1.08) rotate(2deg); }
  100% { filter: brightness(1); opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes cr-trophy-idle {
  0%, 100% { filter: drop-shadow(0 5px 8px rgba(240, 174, 47, .46)); transform: translateY(0) rotate(0) scale(1); }
  50% { filter: drop-shadow(0 9px 13px rgba(255, 198, 61, .66)); transform: translateY(-4px) rotate(-1.25deg) scale(1.055); }
}

@keyframes cr-trophy-aura {
  0%, 46% { opacity: 0; transform: scale(.84); }
  60% { opacity: .7; transform: scale(1.06); }
  100% { opacity: 0; transform: scale(1.23); }
}

@keyframes cr-trophy-sheen {
  0%, 40% { opacity: 0; transform: translateX(-72%) rotate(24deg); }
  56% { opacity: .85; }
  72%, 100% { opacity: 0; transform: translateX(72%) rotate(24deg); }
}

@keyframes cr-streak-gain {
  0%, 100% { box-shadow: none; transform: translateY(0); }
  44% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--warning) 14%, transparent); transform: translateY(-2px); }
}

@keyframes cr-record-gain {
  0% { box-shadow: 0 0 0 0 rgba(232, 186, 70, 0); transform: scale(1); }
  52% { box-shadow: 0 0 0 8px rgba(232, 186, 70, .16), 0 0 28px rgba(232, 186, 70, .18); transform: scale(1.015); }
  100% { box-shadow: none; transform: scale(1); }
}

@keyframes cr-trophy-lift {
  0% { transform: translateY(0) scale(1); }
  48% { transform: translateY(-6px) scale(1.12); }
  100% { transform: translateY(0) scale(1); }
}

.circle-ranking li.motion-rank-settle { transition: transform .48s cubic-bezier(.2,.8,.2,1) !important; }
.friend-card.motion-friend-arrival { animation: cr-reveal .46s cubic-bezier(.2,.8,.2,1) both; }

.weekly-verdict {
  align-items: end;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent-2) 38%, var(--line));
  border-radius: 19px;
  display: grid;
  gap: 8px 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0 0 24px;
  overflow: hidden;
  padding: clamp(18px, 3vw, 24px);
  position: relative;
}
.weekly-verdict::after {
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 68%);
  content: "";
  height: 180px;
  pointer-events: none;
  position: absolute;
  right: -84px;
  top: -102px;
  width: 180px;
}
.weekly-verdict > * { position: relative; z-index: 1; }
.weekly-verdict .eyebrow, .weekly-verdict h2 { grid-column: 1 / -1; margin-bottom: 0; }
.weekly-verdict p:not(.eyebrow) { margin-bottom: 0; max-width: 660px; }
.weekly-verdict > div { align-items: end; display: grid; gap: 2px; justify-items: end; }
.weekly-verdict > div span { color: var(--muted); font-size: 12px; font-weight: 750; }
.weekly-verdict > div b { color: var(--accent-2); font-size: clamp(30px, 6vw, 44px); letter-spacing: -.08em; line-height: .9; }

.account-sheet-backdrop { animation: cr-backdrop .18s ease both; }
.account-settings-sheet { animation: cr-sheet-from-right .26s cubic-bezier(.2,.8,.2,1) both; }
@keyframes cr-backdrop { from { opacity: 0; } to { opacity: 1; } }
@keyframes cr-sheet-from-right { from { transform: translateX(26px); } to { transform: translateX(0); } }

.auth-form.has-auth-error { animation: cr-auth-shake .38s ease both; }
.auth-form [aria-invalid="true"] { border-color: color-mix(in srgb, var(--danger) 72%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 13%, transparent); }
.auth-form.auth-success { animation: cr-auth-success .36s cubic-bezier(.2,.8,.2,1) both; }
.auth-error:not(:empty) { animation: cr-auth-error .3s ease both; }
@keyframes cr-auth-shake { 0%,100% { transform: translateX(0); } 35% { transform: translateX(-5px); } 68% { transform: translateX(4px); } }
@keyframes cr-auth-success { from { opacity: .72; transform: scale(.985); } to { opacity: 1; transform: scale(1); } }
@keyframes cr-auth-error { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.gold-reflection { isolation: isolate; overflow: hidden; position: relative; }
.gold-reflection::after {
  background: linear-gradient(112deg, transparent 35%, rgba(255, 236, 171, .13) 50%, transparent 65%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  transform: translateX(-135%);
  z-index: 2;
  animation: cr-gold-reflection 8.5s ease-in-out 1.2s infinite;
}
@keyframes cr-gold-reflection { 0%, 68% { transform: translateX(-135%); } 86%, 100% { transform: translateX(135%); } }

@media (max-width: 620px) {
  .weekly-verdict { align-items: start; grid-template-columns: 1fr; }
  .weekly-verdict > div { justify-items: start; }
  .motion-score-pulse { left: 13px; top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .splash::before,
  .gold-reflection::after,
  #root.motion-enter .motion-reveal,
  #root.motion-enter [data-motion-progress],
  #root.motion-enter [data-motion-marker],
  .motion-score-pulse,
  .today-task.motion-goal-complete,
  .checkin-field.motion-goal-complete,
  .today-task.motion-goal-reverse,
  .checkin-field.motion-goal-reverse,
  .today-streak-mini.motion-streak-gain,
  .streak-card.motion-streak-gain,
  .today-streak-mini.motion-new-record,
  .streak-card.motion-new-record,
  .motion-streak-gain .cr-trophy-mark,
  .motion-new-record .cr-trophy-mark,
  .today-streak-mini .today-streak-trophy,
  .account-quick .account-streak-trophy,
  .today-streak-mini .today-streak-trophy::before,
  .account-quick .account-streak-trophy::before,
  .today-streak-mini .today-streak-trophy::after,
  .account-quick .account-streak-trophy::after,
  .today-streak-mini .trophy-today-mark,
  .account-quick .trophy-account-mark,
  .account-sheet-backdrop,
  .account-settings-sheet,
  .auth-form.has-auth-error,
  .auth-form.auth-success,
  .auth-error:not(:empty) { animation: none !important; }
  #root.motion-prepare .motion-reveal { opacity: 1; transform: none; }
}
.journey-card { position: relative; }
.journey-card.motion-goal-complete { animation: cr-goal-complete .66s cubic-bezier(.16,.84,.23,1) both; }
.pro-report-overview { background: radial-gradient(circle at 80% 0%, rgba(39,216,255,.12), transparent 31%), linear-gradient(145deg, #10162b, #0b1020); border-color: rgba(94,112,255,.38); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 12px 32px rgba(0,0,0,.22); padding: 16px; }.pro-report-heading { align-items: center; }.pro-report-overview h2 { font-size: 22px; margin: 2px 0 0; }.pro-delta { background: rgba(39,216,255,.08); border-color: rgba(39,216,255,.34); color: #dcecff; text-align: right; }.pro-delta.up { color: #4ee4ff; }.pro-delta.down { color: #ff91df; }.pro-delta small { color: #aab7d4; }.futuristic-chart { background: linear-gradient(180deg, rgba(10,16,35,.72), rgba(16,12,47,.66)); border: 1px solid rgba(117,94,255,.28); border-radius: 13px; margin-top: 14px; overflow: hidden; padding: 7px 7px 1px; position: relative; }.futuristic-chart::before { background-image: linear-gradient(rgba(66,219,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(66,219,255,.04) 1px, transparent 1px); background-size: 24px 24px; content: ""; inset: 0; pointer-events: none; position: absolute; }.futuristic-chart svg { display: block; position: relative; width: 100%; }.chart-grid line { stroke: rgba(151,174,255,.15); stroke-dasharray: 2 3; }.chart-grid text,.chart-labels text { fill: #8390b5; font-size: 10px; font-weight: 700; }.chart-area { fill: url(#cr-area); }.chart-line { fill: none; filter: drop-shadow(0 0 5px rgba(67,214,255,.78)); stroke: url(#cr-line); stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }.chart-dots circle { fill: #e854f7; stroke: #a4f0ff; stroke-width: 1.5; }.pro-analysis-grid { display: none; }.pro-chart-summary { display: grid; gap: 0; grid-template-columns: .8fr .8fr 1.7fr; margin-top: 12px; }.pro-chart-summary > div { display: grid; gap: 3px; min-width: 0; padding: 0 10px; }.pro-chart-summary > div:first-child { padding-left: 0; }.pro-chart-summary > div + div { border-left: 1px solid rgba(151,174,255,.2); }.pro-chart-summary span { color: #92a0c8; font-size: 11px; font-weight: 700; }.pro-chart-summary b { color: #eff5ff; font-size: 14px; line-height: 1.35; }.pro-chart-summary > div:last-child b { font-size: 12px; font-weight: 600; }.pro-share { margin-top: 12px; }
@media (max-width: 620px) { .pro-chart-summary { grid-template-columns: 1fr 1fr; }.pro-chart-summary > div:last-child { border-left: 0; border-top: 1px solid rgba(151,174,255,.2); grid-column: 1 / -1; margin-top: 10px; padding: 10px 0 0; }.pro-report-overview { border-radius: 15px; }.futuristic-chart { margin-left: -2px; margin-right: -2px; } }
.profile-brand-logo { height: 46px; margin-left: auto; object-fit: contain; opacity: .92; width: 46px; }.public-badges { display: inline-flex; gap: 4px; margin-top: 4px; }.public-badge { align-items: center; background: rgba(115, 85, 255, .14); border: 1px solid rgba(116, 217, 255, .3); border-radius: 6px; color: var(--accent-2); display: inline-flex; font-size: 10px; font-style: normal; font-weight: 900; height: 18px; justify-content: center; min-width: 18px; padding: 0 3px; }.circle-member .public-badge { flex: 0 0 auto; }.badge-hint { color: var(--muted); font-size: 12px; margin: 0; padding: 0 12px 10px; }.badge-tile { color: var(--text); cursor: pointer; text-align: left; }.badge-tile small { color: var(--muted); display: block; font-size: 10px; margin-left: auto; }.badge-tile.earned small { color: var(--accent-2); }
.badge-inline { margin-top: 14px; }.badge-shelf { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; }.badge-shelf summary { align-items: center; cursor: pointer; display: flex; justify-content: space-between; list-style: none; padding: 13px 15px; }.badge-shelf summary::-webkit-details-marker { display: none; }.badge-shelf summary .eyebrow { margin: 0 0 2px; }.badge-shelf summary b { font-size: 14px; }.badge-shelf summary small { color: var(--accent-2); font-size: 12px; font-weight: 800; }.badge-grid { border-top: 1px solid var(--line); display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px; }.badge-tile { align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; display: flex; gap: 7px; min-height: 43px; padding: 7px; }.badge-tile i { align-items: center; background: rgba(103, 226, 255, .12); border: 1px solid rgba(103, 226, 255, .28); border-radius: 8px; color: var(--accent-2); display: inline-flex; font-size: 14px; font-style: normal; font-weight: 900; height: 27px; justify-content: center; width: 27px; }.badge-tile b { font-size: 11px; line-height: 1.2; }.badge-tile.locked { filter: grayscale(1); opacity: .34; }.badge-tile.earned { box-shadow: inset 0 0 0 1px rgba(180, 97, 255, .1); }

/* Badge e report Pro: asset approvati, informazioni reali, densità mobile. */
.pro-score-line { align-items: baseline; display: flex; gap: 8px; margin-top: 15px; }
.pro-score-line strong { color: #f4f7ff; font-size: 37px; letter-spacing: -.07em; line-height: 1; }
.pro-score-line strong small { color: #9ba8c9; font-size: 17px; letter-spacing: -.04em; }
.pro-score-line span { color: #9ba8c9; font-size: 12px; font-weight: 700; }
.pro-chart-controls { display: flex; gap: 6px; margin-top: 14px; }
.pro-chart-controls button { background: rgba(135,125,255,.08); border: 1px solid rgba(136,139,255,.26); border-radius: 999px; color: #aab8da; font: inherit; font-size: 11px; font-weight: 800; padding: 7px 9px; }
.pro-chart-controls button.active { background: linear-gradient(90deg, rgba(228,73,248,.26), rgba(39,216,255,.2)); border-color: rgba(77,224,255,.7); color: #f5f8ff; }
.chart-grid .chart-grid-vertical { stroke: rgba(58,209,255,.10); stroke-dasharray: 0; }
.pro-smart-card { background: linear-gradient(140deg, #11182b, #0d1120); border-color: rgba(94,112,255,.32); }
.pro-smart-summary { align-items: center; display: flex; gap: 10px; margin: 10px 0; }
.pro-smart-summary b { color: #f3f6ff; font-size: 26px; letter-spacing: -.06em; }
.pro-smart-summary b small { color: #9ba8c9; font-size: 14px; }
.pro-smart-summary span { color: #aab7d4; font-size: 12px; font-weight: 800; }
.pro-smart-summary .up { color: #4ee4ff; }.pro-smart-summary .down { color: #ff91df; }
.public-badges { align-items: center; display: inline-flex; gap: 3px; margin-top: 4px; }
.public-badge { height: 22px; object-fit: contain; width: 19px; }
.badge-grid { gap: 9px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.badge-tile { color: var(--text); display: grid; gap: 7px; grid-template-columns: 72px minmax(0,1fr); min-height: 86px; padding: 8px; text-align: left; }
.badge-tile img { height: 69px; object-fit: contain; width: 72px; }
.badge-tile span { display: grid; gap: 4px; min-width: 0; }
.badge-tile small { color: var(--muted); display: block; font-size: 10px; margin: 0; }
.badge-tile.earned { box-shadow: inset 0 0 0 1px rgba(71,214,255,.2), 0 0 16px rgba(136,74,255,.10); }
.badge-tile.earned small { color: var(--accent-2); }
.badge-tile.locked { filter: none; opacity: 1; }
.badge-tile.locked img { filter: grayscale(1) saturate(.22) brightness(.62); opacity: .62; }
.badge-tile.locked { border-color: rgba(134,147,181,.24); }
.badge-preview { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 5px 10px; grid-template-columns: 1fr auto; margin-bottom: 16px; padding: 12px 14px 9px; }
.badge-preview .eyebrow { margin: 0 0 2px; }.badge-preview b { font-size: 13px; }
.badge-preview > div:last-child { display: flex; gap: 8px; grid-column: 1 / -1; }
.badge-preview img { height: 50px; object-fit: contain; width: 45px; }
.badge-detail-backdrop { align-items: end; background: rgba(3,5,12,.7); display: flex; inset: 0; justify-content: center; padding: 16px; position: fixed; z-index: 30; }
.badge-detail-sheet { background: linear-gradient(145deg,#11182d,#0a0d18); border: 1px solid rgba(93,186,255,.38); border-radius: 18px; box-shadow: 0 18px 58px rgba(0,0,0,.55); max-width: 500px; padding: 18px; position: relative; width: 100%; }
.badge-detail-sheet > .icon-button { position: absolute; right: 12px; top: 12px; }
.badge-detail-sheet > img { display: block; height: 112px; margin: -6px auto 6px; object-fit: contain; width: 118px; }
.badge-detail-sheet h2 { font-size: 23px; margin: 2px 0 8px; }
.badge-detail-sheet > div { border-top: 1px solid rgba(151,174,255,.18); display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; }
.badge-detail-sheet > div span { color: #9ba8c9; font-size: 12px; }
.badge-detail-sheet > div b { font-size: 13px; text-align: right; }
@media (max-width: 620px) { .pro-chart-controls button { font-size: 10px; padding: 7px 8px; } }

/* Gli elementi Pro ereditano sempre il tema attivo. Gli stemmi restano gli asset ufficiali. */
.pro-report-overview {
  background: radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--accent-2) 17%, transparent), transparent 31%), linear-gradient(145deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface));
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}
.pro-smart-card { background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); }
.pro-delta { background: color-mix(in srgb, var(--accent-2) 12%, var(--surface)); border-color: color-mix(in srgb, var(--accent-2) 44%, var(--line)); color: var(--text); }
.pro-delta.up,.pro-smart-summary .up { color: var(--success); }.pro-delta.down,.pro-smart-summary .down { color: var(--danger); }.pro-delta small { color: var(--muted); }
.pro-score-line strong,.pro-smart-summary b { color: var(--text); }.pro-score-line strong small,.pro-smart-summary b small { color: var(--muted); }.pro-score-line span,.pro-smart-summary span { color: var(--muted); }
.pro-chart-controls button { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 34%, var(--line)); color: var(--muted); }
.pro-chart-controls button.active { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 26%, var(--surface)), color-mix(in srgb, var(--accent-2) 20%, var(--surface))); border-color: var(--accent-2); color: var(--text); }
.futuristic-chart { background: linear-gradient(180deg, color-mix(in srgb, var(--surface-3) 72%, var(--bg)), color-mix(in srgb, var(--accent) 8%, var(--surface))); border-color: color-mix(in srgb, var(--accent) 32%, var(--line)); }
.futuristic-chart::before { background-image: linear-gradient(color-mix(in srgb, var(--accent-2) 9%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--accent-2) 9%, transparent) 1px, transparent 1px); }
.chart-grid line { stroke: color-mix(in srgb, var(--accent-2) 21%, var(--line)); }.chart-grid .chart-grid-vertical { stroke: color-mix(in srgb, var(--accent) 16%, transparent); }.chart-grid text,.chart-labels text { fill: var(--quiet); }
.chart-line { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent-2) 74%, transparent)); }.chart-dots circle { fill: var(--accent-2); stroke: var(--text); }
.pro-chart-summary > div + div { border-left-color: var(--line); }.pro-chart-summary span { color: var(--muted); }.pro-chart-summary b { color: var(--text); }
.badge-detail-sheet { background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); }.badge-detail-sheet > div { border-top-color: var(--line); }.badge-detail-sheet > div span { color: var(--muted); }
