:root {
  color-scheme: light;
  --ink: #18181b;
  --muted: #68656f;
  --line: #e5e1dc;
  --paper: #fffdf9;
  --soft: #f5f1ea;
  --accent: #0f766e;
  --accent-2: #c2410c;
  --dark: #141820;
  --violet: #6d5dd3;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #fbfaf7 0%, #f4f2ee 100%);
  color: var(--ink);
}

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

.app-shell {
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 16px 14px 32px;
}

.topbar {
  display: grid;
  gap: 14px;
  padding: 12px 2px 18px;
}

.topbar h1,
.intro h2,
.chart-card h2,
.loading-card h2,
.modal h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: 26px;
  line-height: 1.08;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
}

.segmented button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
}

.segmented .active {
  color: white;
  background: var(--ink);
}

.intro,
.form-card,
.chart-card,
.status-strip,
.loading-card,
.metrics,
.palm-sheet,
.palm-report,
.modal {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(24, 24, 27, 0.06);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 172px;
  padding: 18px;
  border-radius: 8px;
  overflow: hidden;
}

.intro-life {
  background: linear-gradient(135deg, #fffdf9, #edf7f5);
}

.intro-palm {
  background: linear-gradient(135deg, #fffdf9, #f2f0eb);
}

.intro-face {
  background: linear-gradient(135deg, #fffdf9, #eaf3ef);
}

.intro h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.12;
}

.intro p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.mini-visual {
  width: 100%;
  min-width: 0;
  max-height: 112px;
  overflow: hidden;
  opacity: 0.95;
}

.mini-visual .life-chart {
  width: 100%;
  height: 112px;
  transform: none;
}

.palm-mini .hand-svg {
  color: var(--ink);
  width: 132px;
}

.face-mini {
  display: grid;
  place-items: center;
}

.face-frame,
.face-placeholder-mark {
  position: relative;
  width: 88px;
  height: 104px;
  border: 2px solid #54736a;
  border-radius: 44px 44px 34px 34px;
}

.face-frame::before,
.face-placeholder-mark::before {
  content: "";
  position: absolute;
  width: 34px;
  height: 42px;
  left: 25px;
  top: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.face-frame::after,
.face-placeholder-mark::after {
  content: "";
  position: absolute;
  width: 58px;
  height: 28px;
  left: 13px;
  bottom: 10px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
}

.face-frame span,
.face-frame i,
.face-frame b {
  position: absolute;
  background: #dba15f;
}

.face-frame span { width: 118px; height: 1px; left: -16px; top: 51px; }
.face-frame i { width: 1px; height: 132px; left: 42px; top: -14px; }
.face-frame b { width: 8px; height: 8px; border-radius: 50%; left: 38px; top: 47px; }

.form-card {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 8px;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  font-size: 13px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: white;
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 48px;
}

textarea {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

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

.upload-field small,
.fineprint {
  color: var(--muted);
  font-size: 12px;
}

.hand-choice {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.hand-choice legend {
  margin-bottom: 7px;
  padding: 0;
  font-size: 13px;
  font-weight: 750;
}

.hand-choice small {
  color: var(--muted);
  font-size: 12px;
}

.hand-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 48px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hand-options label {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  cursor: pointer;
}

.hand-options input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
}

.hand-options span {
  width: 100%;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
}

.hand-options input:checked + span {
  color: #fff;
  background: var(--ink);
}

.hand-options input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

.upload-field {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.upload-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.upload-heading > div {
  display: grid;
  gap: 4px;
}

.upload-heading strong {
  font-size: 14px;
}

.upload-heading > div span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.privacy-mark {
  flex: 0 0 auto;
  max-width: 112px;
  padding: 5px 7px;
  border: 1px solid #b9ddd6;
  border-radius: 5px;
  color: var(--accent);
  background: #eff9f7;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.3;
  text-align: center;
}

.upload-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.upload-action {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
}

.upload-action.primary-upload {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
}

.upload-preview {
  min-height: 152px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f5f1;
}

.upload-preview.empty {
  display: grid;
  place-items: center;
}

.upload-placeholder {
  display: grid;
  place-items: center;
  gap: 3px;
  color: #77716a;
}

.upload-placeholder .hand-svg {
  width: 82px;
  height: 96px;
  opacity: 0.62;
}

.upload-placeholder span {
  font-size: 12px;
  font-weight: 700;
}

.upload-preview.ready {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  background: #fff;
}

.upload-preview.ready img {
  width: 116px;
  height: 152px;
  display: block;
  object-fit: contain;
  background: #f5f2ed;
  filter: none;
}

.upload-preview.ready > div {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 12px;
}

.upload-preview.ready strong,
.upload-preview.ready span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-preview.ready strong {
  font-size: 13px;
}

.upload-preview.ready span {
  color: var(--muted);
  font-size: 11px;
}

.upload-preview.ready button {
  width: fit-content;
  padding: 0;
  border: 0;
  color: #b42318;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

.photo-checklist {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 20px;
  color: #4f4b47;
  font-size: 12px;
  line-height: 1.4;
}

.consent-row {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.consent-row input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.consent-row span {
  font-weight: 500;
}

.consent-row a,
.legal-footer a {
  color: var(--accent);
  text-underline-offset: 2px;
}

.native-file {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.file-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 8px;
  background: #151515;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
}

.file-name {
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-modal {
  max-width: 430px;
}

.share-preview {
  display: grid;
  gap: 14px;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.share-preview.palm {
  background: #fbfaf7;
}

.share-preview span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.share-preview.palm span {
  color: #151515;
}

.share-preview strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.15;
}

.share-preview p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.share-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-tags span {
  padding: 7px 10px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.share-preview small,
.share-notice {
  color: var(--muted);
  line-height: 1.45;
}

.share-actions {
  display: grid;
  gap: 8px;
}

.share-notice {
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 8px;
  background: #edf7f3;
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
}

.primary,
.ghost,
.icon-button {
  min-height: 48px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  color: white;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  font-weight: 800;
}

a.primary,
a.ghost {
  text-decoration: none;
}

.primary.dark {
  background: var(--ink);
}

.primary.block,
.ghost.block {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}

.ghost {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  padding: 0 14px;
}

.landing-links {
  display: grid;
  gap: 10px;
}

.icon-button {
  width: 46px;
  background: var(--soft);
}

.status-strip {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 8px;
}

.status-strip div {
  display: grid;
  gap: 3px;
}

.status-strip span {
  color: var(--muted);
  font-size: 13px;
}

.success {
  border-color: rgba(15, 118, 110, 0.35);
}

.chart-card {
  position: relative;
  padding: 14px;
  border-radius: 8px;
  overflow: hidden;
}

.chart-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.chart-head h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.legend {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.legend span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.legend .up {
  background: #12b981;
}

.legend .down {
  background: #ef4444;
}

.life-chart {
  width: 100%;
  color: #a8a29e;
  overflow: visible;
}

.life-chart-shell {
  margin: 10px -14px 4px;
}

.life-chart-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  margin: 0 14px;
  padding: 8px 0 6px;
  border: 1px solid #e8e9e8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  scroll-snap-type: x proximity;
}

.life-chart.revealed {
  width: 1520px;
  max-width: none;
  background: #fff;
}

.chart-instruction,
.trend-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.trend-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.grid line {
  stroke: #edf0ee;
  stroke-width: 0.75;
}

.grid text {
  fill: #8b928e;
  font-size: 9px;
}

.bar {
  transform-origin: bottom;
  animation: growBar 850ms ease both;
}

.curve-candle {
  cursor: pointer;
  touch-action: manipulation;
  stroke: rgba(15, 23, 42, 0.12);
  stroke-width: 0.45px;
}

.curve-hit {
  fill: transparent;
  cursor: crosshair;
  pointer-events: all;
  touch-action: pan-x;
}

.curve-hit.is-active {
  fill: rgba(15, 23, 42, 0.08);
}

.curve-candle.is-active {
  stroke: #0f172a;
  stroke-width: 1.3px;
  filter: drop-shadow(0 0 5px rgba(15, 23, 42, 0.24));
}

.curve-candle:focus,
.curve-candle:hover,
.curve-hit:focus,
.curve-hit:hover {
  outline: none;
  filter: drop-shadow(0 0 5px rgba(15, 23, 42, 0.35));
}

.curve-live-detail {
  display: grid;
  gap: 8px;
  margin: 8px 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.96);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.curve-live-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.curve-live-head span,
.curve-live-detail small {
  color: var(--muted);
  font-size: 12px;
}

.curve-live-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.curve-live-metrics span {
  display: grid;
  gap: 1px;
  padding: 7px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 10px;
  min-width: 0;
}

.curve-live-metrics strong {
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.curve-live-detail p {
  color: #44403c;
  font-size: 13px;
  line-height: 1.5;
}

.cycle-separator {
  stroke: #d9dfdc;
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.cycle-label,
.current-age-label {
  fill: #6974a5;
  font-size: 9px;
  font-weight: 600;
}

.peak-star {
  fill: #bd3f5c;
  font-size: 12px;
  font-weight: 700;
}

.current-age-line {
  stroke: #d97706;
  stroke-width: 1.2;
  stroke-dasharray: 3 4;
}

.previewing {
  filter: blur(0.4px);
}

.locked-card {
  min-height: 330px;
}

.lock-layer {
  position: absolute;
  inset: auto 14px 14px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.88);
  box-shadow: 0 18px 45px rgba(24, 24, 27, 0.14);
  text-align: center;
  backdrop-filter: blur(10px);
}

.lock-layer h3,
.lock-layer p {
  margin: 0;
}

.lock-layer p {
  color: var(--muted);
  line-height: 1.45;
}

.lock-badge {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
}

.pillar-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border-radius: 8px;
  background: #151923;
  color: white;
}

.pillar-preview div {
  display: grid;
  min-height: 72px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.pillar-preview span {
  color: #d6a454;
  font-size: 11px;
}

.pillar-preview strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.pillar-preview.revealed {
  background: #151923;
}

.locked-grid,
.report-grid {
  display: grid;
  gap: 10px;
}

.unlock-includes,
.milestone-list {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.unlock-includes h2,
.milestone-list h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.unlock-includes div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.unlock-includes span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 13px;
}

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

.milestone-list article {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.milestone-list article > strong {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 999px;
  background: #151923;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.milestone-list h3,
.milestone-list p {
  margin: 0;
}

.milestone-list p {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.55;
}

.skeleton-card,
.report-card,
.palm-section,
.palm-info,
.palm-diagram {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.skeleton-card {
  display: grid;
  gap: 11px;
  min-height: 132px;
  padding: 14px;
}

.skeleton-card h3,
.report-card h3,
.palm-section h3,
.palm-info h3,
.palm-diagram h3 {
  margin: 0;
  font-size: 17px;
}

.skeleton-card p,
.skeleton-card div {
  margin: 0;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ece7df, #f8f6f1, #ece7df);
  background-size: 220% 100%;
  animation: shimmer 1.4s infinite;
}

.skeleton-card p:nth-of-type(2) {
  width: 76%;
}

.skeleton-card div {
  width: 60%;
}

.report-card {
  padding: 15px;
}

.report-card p,
.report-summary,
.palm-section p,
.palm-info p,
.palm-diagram p {
  color: #3f3f46;
  line-height: 1.65;
}

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

.score {
  height: 8px;
  border-radius: 999px;
  background: #eeeae4;
  overflow: hidden;
}

.score span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #14b8a6, #84cc16);
}

.palm-sheet,
.palm-report {
  position: relative;
  padding: 18px 12px;
  border-radius: 18px;
  background: #fffefa;
  color: #1f1f21;
  overflow: hidden;
}

.palm-title {
  padding: 4px 8px 18px;
  border-bottom: 1px solid var(--line);
}

.palm-title p {
  margin: 0 0 16px;
  color: #4b4b4f;
  font-size: 12px;
  letter-spacing: 0.18em;
}

.palm-title h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.palm-title span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.palm-layout {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.palm-photo {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  margin: 0 8px 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.palm-photo img {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
  filter: blur(2px);
}

.palm-photo div {
  display: grid;
  gap: 4px;
}

.palm-photo span {
  color: var(--muted);
  font-size: 12px;
}

.revealed-photo {
  grid-column: 1 / -1;
}

.revealed-photo img {
  filter: none;
}

.palm-layout > div {
  display: grid;
  gap: 10px;
}

.palm-diagram,
.palm-info,
.palm-section {
  padding: 14px;
}

.hand-svg {
  display: block;
  width: min(100%, 260px);
  margin: 6px auto 12px;
}

.hand-svg text {
  font-size: 12px;
  font-family: Georgia, "Times New Roman", serif;
}

.blurred {
  filter: blur(2.2px);
  user-select: none;
}

.scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 118, 110, 0.1) 48%, transparent 54%);
  transform: translateY(-100%);
  animation: scan 2s ease-in-out infinite;
  pointer-events: none;
}

.palm-lock {
  inset: 28% 18px auto;
}

.palm-info,
.palm-section {
  margin-top: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chips span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}

.palm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}

.palm-footer p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.ai-disclaimer {
  grid-column: 1 / -1;
  margin: 10px 4px 0;
  color: #85817b;
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.loading-card {
  display: grid;
  min-height: 320px;
  align-content: center;
  gap: 16px;
  padding: 22px;
  border-radius: 8px;
}

.loading-card.simple-loading {
  place-items: center;
  text-align: center;
}

.generation-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.generation-head h2 {
  font-size: 22px;
}

.generation-head p:not(.eyebrow) {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.generation-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #ece8e1;
}

.generation-progress span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--accent);
  transition: width 350ms ease;
}

.generation-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.generation-steps li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: #8a857e;
  font-size: 13px;
}

.generation-steps i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #d8d2ca;
  border-radius: 50%;
  font-style: normal;
  font-size: 11px;
}

.generation-steps li.done,
.generation-steps li.active {
  color: var(--ink);
  font-weight: 700;
}

.generation-steps li.done i {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.generation-steps li.active i {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.generation-note {
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.order-reference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.order-reference code {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.order-reference button {
  flex: 0 0 auto;
  padding: 5px 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-weight: 750;
}

.spinner {
  width: 46px;
  height: 46px;
  border: 4px solid #e6e0d7;
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 850ms linear infinite;
}

.metrics {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
}

.metrics h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

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

.metrics span {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
}

.metrics strong {
  color: var(--ink);
  font-size: 18px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(20, 24, 32, 0.42);
}

.modal {
  width: min(100%, 440px);
  padding: 18px;
  border-radius: 14px;
}

.modal p,
.modal li {
  color: var(--muted);
  line-height: 1.55;
}

.curve-modal h2 {
  font-size: 24px;
}

.curve-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.curve-facts span {
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 9px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
}

.curve-facts strong {
  color: var(--ink);
  font-size: 18px;
}

.advice-line {
  padding: 10px;
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.08);
}

.legal-footer {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 18px 4px 4px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.legal-footer p {
  margin: 0;
}

.modal code {
  display: block;
  margin: 10px 0;
  padding: 9px;
  border-radius: 6px;
  background: var(--soft);
  overflow-wrap: anywhere;
}

@keyframes growBar {
  from {
    transform: scaleY(0);
    opacity: 0;
  }
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

@keyframes scan {
  50% {
    transform: translateY(100%);
  }
  100% {
    transform: translateY(100%);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 760px) {
  .app-shell {
    width: min(100%, 960px);
  }

  .topbar {
    grid-template-columns: 1fr 320px;
    align-items: center;
  }

  .intro {
    grid-template-columns: 1fr 280px;
  }

  .mini-visual {
    max-height: none;
  }

  .mini-visual .life-chart {
    width: 280px;
    height: auto;
  }

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

  .palm-layout {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .palm-report {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .palm-title,
  .palm-diagram,
  .palm-footer {
    grid-column: 1 / -1;
  }
}
