:root {
  --bg: #f5f4f0;
  --bg-elevated: rgba(255, 255, 255, 0.72);
  --bg-soft: rgba(255, 255, 255, 0.54);
  --line: rgba(24, 32, 52, 0.08);
  --line-strong: rgba(24, 32, 52, 0.14);
  --text: #111827;
  --text-soft: rgba(17, 24, 39, 0.72);
  --text-faint: rgba(17, 24, 39, 0.48);
  --shadow: 0 20px 60px rgba(71, 85, 105, 0.12);
  --shadow-soft: 0 10px 30px rgba(77, 88, 114, 0.08);
  --accent-a: #6d7cff;
  --accent-b: #8b5cf6;
  --accent-c: #7dd3fc;
  --accent-dark: #1f2a44;
  --success: #0f766e;
  --font-head: "SF Pro Rounded", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    sans-serif;
  --font-body: "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    sans-serif;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --max-width: 460px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(125, 211, 252, 0.32), transparent 40%),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.18), transparent 36%),
    linear-gradient(180deg, #faf9f6 0%, #f5f4f0 55%, #efede7 100%);
  color: var(--text);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  width: 100%;
}

.page-glow,
.page-grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
}

.page-glow-a {
  background:
    radial-gradient(circle at 18% 16%, rgba(125, 211, 252, 0.4), transparent 26%),
    radial-gradient(circle at 84% 10%, rgba(109, 124, 255, 0.18), transparent 22%);
  opacity: 0.9;
}

.page-glow-b {
  background:
    radial-gradient(circle at 84% 72%, rgba(139, 92, 246, 0.14), transparent 22%),
    radial-gradient(circle at 10% 82%, rgba(255, 255, 255, 0.58), transparent 26%);
}

.page-grain {
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 22px 22px;
  mix-blend-mode: soft-light;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: max(18px, env(safe-area-inset-top)) 16px calc(124px + env(safe-area-inset-bottom));
}

.topbar {
  max-width: var(--max-width);
  margin: 0 auto 18px;
  display: flex;
  justify-content: center;
}

.topbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: var(--shadow-soft);
  color: var(--accent-dark);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(18px);
}

.app-main {
  max-width: var(--max-width);
  margin: 0 auto;
}

.screen {
  display: none;
}

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

.hero-card,
.section-card,
.report-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.58));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.hero-card {
  padding: 28px 22px 22px;
}

.hero-card::before,
.section-card::before,
.report-card::before,
.unlock-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.64), transparent 34%),
    radial-gradient(circle at top right, rgba(109, 124, 255, 0.14), transparent 26%);
  pointer-events: none;
}

.eyebrow,
.section-eyebrow,
.report-badge,
.mini-label {
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.eyebrow,
.section-eyebrow,
.report-badge {
  font-size: 12px;
  color: var(--text-faint);
}

.hero-card h1,
.section-card h2,
.result-header h2,
.report-card h3 {
  margin: 10px 0 0;
  font-family: var(--font-head);
  line-height: 1.1;
}

.hero-card h1 {
  font-size: clamp(32px, 8vw, 42px);
}

.hero-copy,
.notice-card p,
.preview-meta p,
.module-card p,
.unlock-copy p,
.follow-helper {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.hero-copy {
  margin-top: 16px;
  font-size: 15px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-badges span,
.chip,
.report-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
}

.hero-badges span,
.chip-plain {
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--line);
  color: var(--text-soft);
}

.hero-actions,
.stacked-actions,
.result-actions {
  display: grid;
  gap: 12px;
}

.hero-actions {
  margin-top: 24px;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 20px;
  font-weight: 600;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.button:active {
  transform: translateY(1px) scale(0.997);
}

.button-primary {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(125, 211, 252, 0.16), rgba(255, 255, 255, 0) 32%),
    linear-gradient(135deg, var(--accent-a), var(--accent-b));
  box-shadow: 0 16px 28px rgba(108, 112, 255, 0.28);
}

.button-secondary {
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(24, 32, 52, 0.08);
  box-shadow: var(--shadow-soft);
}

.button-ghost {
  background: rgba(255, 255, 255, 0.38);
}

.button-tall {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 16px 18px;
  text-align: left;
}

.button-tall small {
  opacity: 0.84;
  font-size: 12px;
  font-weight: 500;
}

.notice-card {
  margin-top: 16px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.notice-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.notice-card p + p {
  margin-top: 8px;
}

.section-card {
  padding: 22px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.preview-frame {
  margin-top: 18px;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(234, 239, 247, 0.82));
  border: 1px solid rgba(24, 32, 52, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  aspect-ratio: 1 / 1.08;
}

.preview-frame img,
.identity-photo img {
  height: 100%;
  object-fit: cover;
}

.preview-meta {
  margin-top: 18px;
}

.privacy-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-faint);
}

.stacked-actions {
  margin-top: 20px;
}

.loading-card {
  padding: 28px 22px;
}

.loading-orb-wrap {
  position: relative;
  width: 136px;
  height: 136px;
  margin: 0 auto 26px;
  display: grid;
  place-items: center;
}

.loading-orb,
.loading-ring {
  position: absolute;
  border-radius: 50%;
}

.loading-orb {
  inset: 18px;
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.94), transparent 42%),
    linear-gradient(135deg, rgba(125, 211, 252, 0.84), rgba(109, 124, 255, 0.76), rgba(139, 92, 246, 0.82));
  filter: blur(0.4px);
  animation: pulse 2200ms ease-in-out infinite;
  box-shadow:
    0 12px 40px rgba(109, 124, 255, 0.38),
    inset 0 -18px 26px rgba(64, 58, 109, 0.24);
}

.loading-ring {
  inset: 0;
  border: 1px solid rgba(24, 32, 52, 0.08);
  animation: spin 9s linear infinite;
}

.loading-header {
  align-items: center;
}

.chip-gradient {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  box-shadow: 0 10px 20px rgba(109, 124, 255, 0.2);
}

.loading-bar {
  margin-top: 20px;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(24, 32, 52, 0.06);
  overflow: hidden;
}

.loading-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-c), var(--accent-a), var(--accent-b));
  transition: width 320ms ease;
}

.loading-steps {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 12px;
}

.loading-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(24, 32, 52, 0.06);
  background: rgba(255, 255, 255, 0.54);
  color: var(--text-faint);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    background 220ms ease,
    color 220ms ease;
}

.loading-steps li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(24, 32, 52, 0.16);
  flex-shrink: 0;
}

.loading-steps li.is-active {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(109, 124, 255, 0.18);
  color: var(--accent-dark);
}

.loading-steps li.is-active::before {
  background: linear-gradient(135deg, var(--accent-c), var(--accent-b));
  box-shadow: 0 0 0 6px rgba(109, 124, 255, 0.08);
}

.loading-steps li.is-complete {
  color: var(--success);
}

.loading-steps li.is-complete::before {
  background: var(--success);
}

.result-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.chip-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(24, 32, 52, 0.08);
  color: var(--accent-dark);
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}

.report-capture {
  border-radius: var(--radius-xl);
}

.report-card {
  padding: 22px;
}

.report-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.report-card h3 {
  font-size: clamp(28px, 7vw, 38px);
}

.report-code {
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(24, 32, 52, 0.08);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
}

.result-summary {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.8;
  color: rgba(17, 24, 39, 0.86);
}

.identity-grid {
  margin-top: 20px;
  display: grid;
  gap: 14px;
}

.identity-photo,
.outline-panel,
.who-card,
.module-card,
.premium-card,
.unlock-card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(24, 32, 52, 0.06);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.identity-photo {
  aspect-ratio: 1 / 1.1;
}

.identity-side {
  display: grid;
  gap: 14px;
}

.outline-panel,
.who-card {
  padding: 16px;
}

.mini-label {
  font-size: 11px;
  color: var(--text-faint);
}

.line-art-container {
  margin-top: 12px;
  height: 188px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 246, 243, 0.94));
  border: 1px solid rgba(24, 32, 52, 0.06);
}

.line-art-container svg {
  width: 100%;
  max-width: 180px;
  height: auto;
}

.who-card p {
  margin: 10px 0 0;
  color: var(--accent-dark);
  line-height: 1.6;
  font-weight: 600;
}

.module-grid,
.premium-grid {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.module-card {
  padding: 18px;
}

.module-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 10px;
}

.identity-list {
  display: grid;
  gap: 12px;
}

.identity-list div {
  display: grid;
  gap: 4px;
}

.identity-list span {
  color: var(--text-faint);
  font-size: 13px;
}

.identity-list strong {
  font-weight: 700;
  line-height: 1.6;
}

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

.keyword-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(109, 124, 255, 0.08);
  color: var(--accent-dark);
  border: 1px solid rgba(109, 124, 255, 0.12);
  font-size: 13px;
}

.premium-status-card {
  margin-top: 16px;
}

.premium-card {
  padding: 18px;
  opacity: 0.92;
  background:
    linear-gradient(180deg, rgba(244, 244, 247, 0.84), rgba(255, 255, 255, 0.72)),
    linear-gradient(135deg, rgba(109, 124, 255, 0.08), rgba(255, 255, 255, 0));
}

.premium-card.is-locked::after {
  content: "LOCKED";
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(109, 124, 255, 0.5);
}

.premium-card.is-unlocked {
  opacity: 1;
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.96), rgba(255, 255, 255, 0.8)),
    linear-gradient(135deg, rgba(109, 124, 255, 0.12), rgba(125, 211, 252, 0.08));
  border-color: rgba(109, 124, 255, 0.16);
}

.premium-card-head {
  display: grid;
  gap: 8px;
}

.premium-card-head span {
  font-size: 12px;
  color: var(--text-faint);
}

.premium-card-head strong {
  font-size: 16px;
  color: rgba(17, 24, 39, 0.9);
}

.locked-lines {
  margin: 16px 0 14px;
  display: grid;
  gap: 10px;
  filter: blur(1.2px);
  opacity: 0.46;
}

.locked-lines span {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(109, 124, 255, 0.16), rgba(24, 32, 52, 0.08));
}

.locked-lines span:nth-child(2) {
  width: 88%;
}

.locked-lines span:nth-child(3) {
  width: 72%;
}

.premium-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.premium-body {
  margin-top: 14px;
}

.premium-footnote {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-faint);
}

.premium-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  margin-top: 14px;
  border-radius: 999px;
  background: rgba(109, 124, 255, 0.08);
  color: var(--accent-dark);
  border: 1px solid rgba(109, 124, 255, 0.14);
  font-size: 12px;
  font-weight: 600;
}

.training-meter {
  margin-top: 16px;
}

.training-meter-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--accent-dark);
  font-weight: 700;
}

.training-meter-top strong {
  font-size: 24px;
  line-height: 1;
}

.training-bar {
  margin-top: 12px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(24, 32, 52, 0.08);
}

.training-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-c), var(--accent-a), var(--accent-b));
}

.unlock-card {
  margin-top: 16px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(244, 247, 255, 0.92), rgba(255, 255, 255, 0.74)),
    linear-gradient(135deg, rgba(109, 124, 255, 0.16), rgba(125, 211, 252, 0.08));
  border: 1px solid rgba(109, 124, 255, 0.14);
  box-shadow: 0 20px 46px rgba(109, 124, 255, 0.12);
}

.unlock-title-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.unlock-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  box-shadow: 0 12px 24px rgba(109, 124, 255, 0.22);
  flex-shrink: 0;
}

.unlock-subtitle {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-faint);
}

.unlock-copy {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.unlock-highlight {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  color: var(--accent-dark);
  font-weight: 700;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(109, 124, 255, 0.12);
}

.report-signoff {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid rgba(24, 32, 52, 0.08);
  color: var(--text-faint);
  font-size: 12px;
}

.result-actions {
  margin-top: 18px;
}

.follow-helper {
  font-size: 13px;
  text-align: center;
  padding: 0 10px;
}

.brand-footer {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.96);
  }
  50% {
    transform: scale(1.04);
  }
}

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

@media (min-width: 760px) {
  .app-shell {
    padding-inline: 24px;
  }

  .identity-grid {
    grid-template-columns: 1.06fr 0.94fr;
    align-items: stretch;
  }

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

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

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

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

  .result-actions .button-tall,
  .result-actions .follow-helper {
    grid-column: 1 / -1;
  }
}

@media (max-width: 380px) {
  .hero-card,
  .section-card,
  .report-card {
    border-radius: 26px;
  }

  .hero-card {
    padding: 24px 18px 20px;
  }

  .section-card,
  .report-card {
    padding: 18px;
  }

  .result-header,
  .section-header,
  .report-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-footer {
    left: 12px;
    right: 12px;
  }
}
