:root {
  --bg: #f7f7f4;
  --bg-soft: rgba(255, 255, 255, 0.68);
  --card: #ffffff;
  --text: #111111;
  --text-secondary: #666666;
  --border: #e6e6e0;
  --line: rgba(17, 17, 17, 0.08);
  --shadow: 0 18px 40px rgba(17, 17, 17, 0.06);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --max-width: 1120px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(17, 17, 17, 0.04), transparent 28%),
    radial-gradient(circle at top right, rgba(17, 17, 17, 0.03), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-glow {
  position: fixed;
  z-index: 0;
  inset: auto auto 12% 0;
  width: 38vw;
  height: 38vw;
  max-width: 420px;
  max-height: 420px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  filter: blur(72px);
  pointer-events: none;
}

.page-glow--right {
  inset: 6% 0 auto auto;
  background: rgba(255, 255, 255, 0.55);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, calc(var(--max-width) + 48px));
  margin: 0 auto;
  padding: 20px 16px 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.topbar__badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-lockup {
  gap: 12px;
  padding: 8px 14px 8px 8px;
}

.brand-lockup__logo,
.unlock-card__logo,
.result-brand__logo {
  display: block;
  flex: 0 0 auto;
  object-fit: cover;
}

.brand-lockup__logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.brand-lockup__copy {
  display: grid;
  gap: 2px;
}

.brand-lockup__eyebrow,
.brand-lockup__title {
  display: block;
  text-transform: none;
  letter-spacing: 0;
}

.brand-lockup__eyebrow {
  color: var(--text-secondary);
  font-size: 11px;
}

.brand-lockup__title {
  font-size: 13px;
  font-weight: 600;
}

.topbar__ghost,
.icon-button,
.button--ghost {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
}

.topbar__ghost {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

.app-main {
  position: relative;
}

.screen {
  display: none;
  animation: fade-up 360ms ease;
}

.screen--active {
  display: block;
}

.hero-card,
.card,
.modal__panel {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 24px;
  min-height: calc(100vh - 140px);
  padding: 28px;
  border-radius: 36px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 4px 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow--small {
  margin-bottom: 10px;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  max-width: 8ch;
  font-size: clamp(2.75rem, 8vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

h2 {
  font-size: clamp(2rem, 5.2vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

h3 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

h4 {
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

p {
  line-height: 1.72;
  color: var(--text-secondary);
}

.hero-subtitle {
  max-width: 28ch;
  font-size: clamp(1rem, 2.8vw, 1.2rem);
}

.hero-actions,
.action-stack {
  display: flex;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  appearance: none;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    opacity 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:disabled {
  opacity: 0.48;
  cursor: wait;
  transform: none;
}

.button--primary {
  background: #111111;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.16);
}

.button--secondary {
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  border-color: var(--border);
}

.button--ghost {
  background: transparent;
}

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

.hero-meta {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(17, 17, 17, 0.02);
}

.hero-meta p,
.footnote {
  font-size: 0.94rem;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(250, 250, 248, 0.92)),
    #ffffff;
  border: 1px solid var(--border);
}

.hero-visual::before,
.hero-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(17, 17, 17, 0.08);
}

.hero-visual::before {
  width: 110%;
  height: 110%;
}

.hero-visual::after {
  width: 72%;
  height: 72%;
}

.hero-visual__frame {
  display: grid;
  place-items: center;
  width: min(100%, 420px);
  aspect-ratio: 1 / 1.18;
  padding: 22px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff, rgba(247, 247, 244, 0.85));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hero-palm-art {
  width: 100%;
  max-width: 280px;
  color: #111111;
  opacity: 0.96;
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.section-heading--center {
  text-align: center;
}

.card {
  border-radius: var(--radius-xl);
  padding: 22px;
}

.preview-card,
.loading-card,
.report-card {
  overflow: hidden;
}

.image-frame,
.art-frame {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 4px);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fefefe, #f3f3ef);
}

.image-frame {
  aspect-ratio: 1 / 1.15;
}

.image-frame--large {
  aspect-ratio: 1 / 1.18;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.art-frame {
  min-height: 100%;
  aspect-ratio: 1 / 1.15;
  display: grid;
  place-items: center;
  padding: 18px;
}

.art-frame svg {
  width: 100%;
  height: 100%;
  max-width: 320px;
}

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

.card-note {
  margin-top: 18px;
  flex-wrap: wrap;
}

.note-pill,
.keyword-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.02);
  color: var(--text);
  font-size: 0.92rem;
}

.card-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.card-caption {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.action-stack {
  margin-top: 18px;
  flex-direction: column;
}

.loading-shell {
  display: grid;
  gap: 24px;
  justify-items: center;
  padding: min(12vh, 80px) 0;
}

.loading-orb {
  position: relative;
  width: clamp(156px, 34vw, 220px);
  aspect-ratio: 1 / 1;
}

.loading-orb__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(17, 17, 17, 0.14);
  animation: rotate-ring 6s linear infinite;
}

.loading-orb__ring--middle {
  inset: 12%;
  animation-direction: reverse;
  animation-duration: 4.8s;
}

.loading-orb__ring--inner {
  inset: 26%;
  animation-duration: 3.8s;
}

.loading-orb::before,
.loading-orb::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 12px;
  height: 12px;
  margin: -6px;
  border-radius: 50%;
  background: #111111;
}

.loading-orb::after {
  width: 48px;
  height: 48px;
  margin: -24px;
  background: transparent;
  border: 1px solid rgba(17, 17, 17, 0.1);
}

.loading-card {
  width: min(100%, 560px);
}

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

.loading-step {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(17, 17, 17, 0.38);
  transition: color 220ms ease;
}

.loading-step--active,
.loading-step--complete {
  color: var(--text);
}

.loading-step__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: transparent;
  transition: background-color 220ms ease;
}

.loading-step--active .loading-step__dot,
.loading-step--complete .loading-step__dot {
  background: currentColor;
}

.result-grid,
.detail-grid {
  display: grid;
  gap: 18px;
}

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

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.media-card {
  display: grid;
  gap: 16px;
}

.report-card--type {
  margin-top: 18px;
}

.unlock-card,
.result-brand {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.unlock-card__brand,
.result-brand {
  align-items: center;
}

.unlock-card__brand {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
}

.unlock-card__logo,
.result-brand__logo {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.unlock-card__copy,
.result-brand__copy {
  display: grid;
  gap: 8px;
}

.unlock-card__actions {
  display: grid;
  gap: 12px;
}

.unlock-card__note {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(17, 17, 17, 0.03);
  font-size: 0.94rem;
}

.report-lock-shell {
  position: relative;
  margin-top: 18px;
}

.report-lock-content {
  display: grid;
  gap: 18px;
  transition:
    filter 220ms ease,
    opacity 220ms ease;
}

.report-lock-shell--locked .report-lock-content {
  filter: blur(12px);
  opacity: 0.32;
  pointer-events: none;
  user-select: none;
}

.report-lock-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.report-lock-shell--locked .report-lock-overlay {
  display: flex;
}

.report-lock-overlay__panel {
  width: min(100%, 440px);
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(17, 17, 17, 0.08);
  text-align: center;
}

.type-title {
  margin-bottom: 10px;
}

.type-summary {
  max-width: 58ch;
}

.analysis-block {
  display: grid;
  gap: 22px;
  margin-top: 18px;
}

.analysis-item {
  display: grid;
  gap: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.analysis-item:first-child {
  padding-top: 0;
  border-top: 0;
}

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

.action-stack--result {
  margin-top: 20px;
}

.result-brand {
  grid-template-columns: auto 1fr;
}

.footnote {
  margin-top: 16px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 18px);
  min-width: min(88vw, 280px);
  max-width: 88vw;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(17, 17, 17, 0.92);
  color: #ffffff;
  font-size: 0.94rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  z-index: 30;
}

.toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 25;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.16);
  backdrop-filter: blur(8px);
}

.modal__panel {
  position: relative;
  width: min(calc(100% - 32px), 520px);
  margin: min(16vh, 120px) auto 0;
  padding: 22px;
  border-radius: var(--radius-xl);
}

.modal__content {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 1.4rem;
  line-height: 1;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rotate-ring {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 860px) {
  .hero-card,
  .result-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: auto;
  }

  h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 14px 12px 40px;
  }

  .topbar {
    margin-bottom: 14px;
  }

  .hero-card,
  .card,
  .modal__panel {
    padding: 18px;
    border-radius: 28px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .brand-lockup {
    padding-right: 10px;
  }

  .brand-lockup__title {
    font-size: 12px;
  }

  .unlock-card__brand,
  .result-brand {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .unlock-card__logo,
  .result-brand__logo {
    width: 60px;
    height: 60px;
  }

  .report-lock-overlay__panel {
    padding: 20px;
  }

  .button {
    width: 100%;
  }

  .art-frame,
  .image-frame {
    aspect-ratio: 1 / 1.18;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .topbar,
  .action-stack,
  .footnote,
  .toast,
  .modal {
    display: none !important;
  }

  .screen {
    display: none !important;
  }

  .screen--active[data-screen="result"] {
    display: block !important;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  .card,
  .hero-card {
    box-shadow: none;
    backdrop-filter: none;
    background: #ffffff;
  }
}
