:root {
  color-scheme: dark;
  --black: #050505;
  --black-soft: #0c0b09;
  --panel: rgba(15, 13, 9, 0.84);
  --panel-strong: rgba(22, 18, 12, 0.96);
  --line: rgba(218, 170, 73, 0.28);
  --line-strong: rgba(255, 216, 128, 0.5);
  --gold: #d6a442;
  --gold-bright: #ffdb82;
  --gold-soft: #9a7028;
  --text: #f8efd7;
  --muted: #a79b80;
  --jade: #58c9ad;
  --ruby: #d97979;
  --violet: #9f8cff;
  --shadow: rgba(0, 0, 0, 0.52);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    linear-gradient(180deg, rgba(10, 8, 5, 0.96), rgba(3, 3, 3, 1)),
    var(--black);
  color: var(--text);
  font-family:
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    system-ui,
    sans-serif;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

#starfield,
#touchEffects {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#starfield {
  z-index: -2;
}

#touchEffects {
  z-index: 40;
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: max(26px, env(safe-area-inset-top)) 16px max(26px, env(safe-area-inset-bottom));
}

.auth-gate[hidden],
.app-shell[hidden],
.auth-actions[hidden],
.auth-login[hidden] {
  display: none;
}

.auth-shell {
  width: min(100%, 620px);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 216, 128, 0.12), transparent 34%),
    rgba(10, 9, 7, 0.92);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.58),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(18px);
  padding: 22px;
}

.auth-brand {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.auth-brand img {
  width: 154px;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid rgba(255, 216, 128, 0.38);
  background: #050505;
  box-shadow: 0 0 36px rgba(255, 216, 128, 0.18);
}

.auth-brand span,
.category-heading span,
.card-kicker,
.report-kicker {
  color: var(--gold-bright);
  font-size: 13px;
  font-weight: 700;
}

.auth-brand h1 {
  margin-top: 6px;
  font-size: clamp(52px, 11vw, 84px);
  line-height: 1;
  font-weight: 760;
  letter-spacing: 0;
}

.auth-brand p {
  margin-top: 10px;
  color: rgba(248, 239, 215, 0.72);
  line-height: 1.55;
}

.auth-status {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  border-top: 1px solid rgba(255, 216, 128, 0.14);
  border-bottom: 1px solid rgba(255, 216, 128, 0.14);
  padding: 14px 0;
}

.auth-status > span {
  color: var(--jade);
  font-weight: 700;
}

.auth-status label,
.auth-login label,
.field {
  display: grid;
  gap: 8px;
}

.auth-status label span,
.auth-login label span,
.field span,
.panel-heading small,
.stage-hud span,
.category-heading small,
.metric span,
.fit-reason,
.report-note,
.empty-state p {
  color: var(--muted);
}

.auth-status input,
.auth-login input,
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 216, 128, 0.22);
  border-radius: var(--radius);
  outline: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  padding: 0 14px;
  color-scheme: dark;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
  padding: 12px 14px;
  line-height: 1.55;
}

.auth-status input:focus,
.auth-login input:focus,
.field input:focus,
.field textarea:focus {
  border-color: rgba(255, 216, 128, 0.72);
  box-shadow: 0 0 0 3px rgba(214, 164, 66, 0.14);
}

.auth-actions,
.auth-login {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.auth-login {
  grid-template-columns: 1fr;
}

.gold-button,
.dark-button,
.primary-action,
.ghost-action,
.photo-actions button,
.category-chip {
  min-height: 46px;
  border-radius: var(--radius);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.gold-button,
.primary-action {
  border: 1px solid rgba(255, 216, 128, 0.82);
  color: #090806;
  background: linear-gradient(180deg, #ffe092, #c69231);
  font-weight: 780;
}

.dark-button,
.ghost-action,
.photo-actions button,
.category-chip {
  border: 1px solid rgba(255, 216, 128, 0.28);
  color: var(--text);
  background: rgba(255, 255, 255, 0.042);
}

.gold-button:hover,
.dark-button:hover,
.primary-action:hover,
.ghost-action:hover,
.photo-actions button:hover,
.category-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 216, 128, 0.76);
  box-shadow: 0 0 26px rgba(255, 216, 128, 0.18);
}

.auth-message {
  min-height: 24px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.system-disclaimer {
  margin-top: 14px;
  border: 1px solid rgba(255, 216, 128, 0.2);
  background: rgba(255, 216, 128, 0.055);
  color: rgba(248, 239, 215, 0.78);
  padding: 10px 12px;
  line-height: 1.65;
  font-size: 13px;
}

.system-disclaimer.in-panel {
  margin: 0 0 16px;
}

.auth-message[data-tone="warn"] {
  color: var(--gold-bright);
}

.app-shell {
  width: min(1480px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 0 max(28px, env(safe-area-inset-bottom));
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 216, 128, 0.44);
  overflow: hidden;
  background: var(--black);
  box-shadow: 0 0 24px rgba(255, 216, 128, 0.16);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-lockup h1 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-lockup p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.topbar-status {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}

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

.topbar-status strong {
  color: var(--jade);
  font-size: 14px;
}

.apk-link {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 216, 128, 0.72);
  border-radius: var(--radius);
  color: #090806;
  background: linear-gradient(180deg, #ffe092, #c69231);
  padding: 0 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 760;
}

.apk-link[hidden] {
  display: none;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.58fr) minmax(560px, 1fr);
  grid-template-areas:
    "input visual"
    "results results";
  gap: 18px;
  padding-top: 18px;
  align-items: start;
}

.input-panel,
.visual-panel,
.result-panel,
.result-card,
.category-bank,
.visual-stage {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 20px 68px var(--shadow);
  backdrop-filter: blur(16px);
}

.input-panel {
  grid-area: input;
  padding: 18px;
  position: sticky;
  top: 14px;
}

.visual-panel {
  grid-area: visual;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(260px, 0.58fr);
  gap: 14px;
  padding: 14px;
}

.result-panel {
  grid-area: results;
  min-height: 250px;
  padding: 18px;
}

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

.panel-heading > span {
  color: var(--gold-bright);
  font-size: 20px;
  font-weight: 760;
}

.panel-heading small {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(88, 201, 173, 0.28);
  border-radius: var(--radius);
  background: rgba(88, 201, 173, 0.08);
  color: var(--jade);
  padding: 0 10px;
  font-weight: 700;
}

.dual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 10px;
}

.field {
  margin-bottom: 14px;
}

.upload-zone {
  min-height: 150px;
  display: grid;
  place-items: center;
  gap: 5px;
  margin: 14px 0;
  padding: 16px;
  border: 1px dashed rgba(255, 216, 128, 0.38);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 216, 128, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.02);
  text-align: center;
  position: relative;
}

.upload-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.upload-symbol {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 216, 128, 0.58);
  border-radius: 50%;
  color: var(--gold-bright);
  box-shadow: 0 0 20px rgba(255, 216, 128, 0.14);
}

.photo-actions {
  width: min(100%, 320px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.validation-line {
  min-height: 22px;
  margin: 6px 0 12px;
  color: var(--gold-bright);
  line-height: 1.45;
}

.primary-action {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 17px;
  box-shadow: 0 18px 46px rgba(198, 146, 49, 0.22);
}

.primary-action b {
  font-size: 18px;
}

.visual-stage {
  min-height: 568px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 216, 128, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 216, 128, 0.045) 1px, transparent 1px),
    rgba(7, 6, 4, 0.76);
  background-size: 56px 56px;
}

#goldDisc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#selfiePreview {
  width: min(58%, 340px);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(255, 216, 128, 0.44);
  box-shadow:
    0 0 42px rgba(255, 216, 128, 0.14),
    0 26px 78px rgba(0, 0, 0, 0.58);
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 240ms ease,
    transform 240ms ease;
  position: relative;
  z-index: 2;
}

.visual-stage.has-photo #selfiePreview {
  opacity: 0.92;
  transform: scale(1);
}

.photo-placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  width: min(58%, 340px);
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 216, 128, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 216, 128, 0.1), rgba(255, 255, 255, 0.03)),
    rgba(5, 5, 5, 0.62);
  text-align: center;
}

.visual-stage.has-photo .photo-placeholder {
  display: none;
}

.photo-placeholder span {
  color: var(--gold-bright);
  font-size: 30px;
  font-weight: 760;
}

.photo-placeholder small {
  color: var(--muted);
}

.stage-hud {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stage-hud span,
.stage-hud strong {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 216, 128, 0.24);
  background: rgba(5, 5, 5, 0.58);
  backdrop-filter: blur(12px);
  padding: 0 10px;
  font-size: 13px;
}

.stage-hud strong {
  color: var(--jade);
}

.category-bank {
  padding: 14px;
}

.category-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 216, 128, 0.14);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

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

.category-chip {
  width: 100%;
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  text-align: left;
}

.category-chip span {
  color: var(--gold-bright);
  font-weight: 720;
}

.category-chip small {
  color: var(--muted);
  line-height: 1.55;
}

.category-chip b {
  color: rgba(248, 239, 215, 0.88);
  font-size: 13px;
  line-height: 1.55;
}

.category-chip em {
  color: var(--jade);
  font-style: normal;
  font-size: 12px;
  line-height: 1.5;
}

.empty-state {
  min-height: 210px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}

.empty-state span {
  color: var(--gold-bright);
  font-size: 42px;
  text-shadow: 0 0 24px rgba(255, 216, 128, 0.52);
}

.report-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 216, 128, 0.16);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.report-title h2 {
  margin-top: 6px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: 0;
}

.report-title p {
  margin-top: 10px;
  color: rgba(248, 239, 215, 0.82);
  line-height: 1.72;
}

.score-ring {
  width: 138px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #10100d 0 52%, transparent 53%),
    conic-gradient(var(--gold-bright) var(--score), rgba(255, 216, 128, 0.12) 0);
  box-shadow: 0 0 28px rgba(255, 216, 128, 0.16);
}

.score-ring div {
  text-align: center;
}

.score-ring strong {
  display: block;
  color: var(--gold-bright);
  font-size: 38px;
  line-height: 1;
}

.score-ring span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.86fr);
  gap: 14px;
}

.result-card {
  padding: 16px;
}

.result-card.full {
  grid-column: 1 / -1;
}

.result-card h3 {
  margin-top: 4px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.22;
}

.result-card p,
.result-card li {
  color: rgba(248, 239, 215, 0.86);
  line-height: 1.72;
}

.result-card ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 19px;
}

.dimension-wrap {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: center;
}

.radar-box {
  min-height: 320px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 216, 128, 0.16);
  background: rgba(255, 255, 255, 0.025);
}

#resultRadar {
  width: min(100%, 380px);
  aspect-ratio: 1;
}

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

.dimension-item {
  display: grid;
  gap: 7px;
}

.dimension-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.dimension-row strong {
  color: var(--gold-bright);
}

.meter {
  height: 8px;
  border: 1px solid rgba(255, 216, 128, 0.18);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  width: var(--value);
  background: linear-gradient(90deg, var(--jade), var(--gold-bright));
}

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

.fit-card {
  min-height: 220px;
  border: 1px solid rgba(255, 216, 128, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 216, 128, 0.075), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.025);
  padding: 14px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.fit-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 216, 128, 0.58);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.fit-rank {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 216, 128, 0.42);
  color: var(--gold-bright);
  background: rgba(214, 164, 66, 0.12);
  font-weight: 800;
}

.fit-card h4 {
  margin: 12px 0 8px;
  font-size: 20px;
}

.fit-score {
  color: var(--jade);
  font-weight: 760;
}

.fit-reason {
  margin-top: 10px;
  line-height: 1.7;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.metric {
  border: 1px solid rgba(255, 216, 128, 0.18);
  background: rgba(255, 255, 255, 0.028);
  padding: 12px;
}

.metric strong {
  display: block;
  margin-top: 6px;
  color: var(--gold-bright);
  font-size: 18px;
}

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

.mini-panel {
  min-height: 180px;
  border: 1px solid rgba(255, 216, 128, 0.18);
  background: rgba(255, 255, 255, 0.025);
  padding: 14px;
}

.mini-panel h4 {
  margin: 0 0 10px;
  color: var(--gold-bright);
  font-size: 18px;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.ghost-action {
  min-width: 118px;
  padding: 0 14px;
}

.error-card {
  border-color: rgba(217, 121, 121, 0.4);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
  z-index: 30;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loading-card {
  width: min(88vw, 520px);
  display: grid;
  place-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 216, 128, 0.42);
  background: rgba(10, 8, 5, 0.92);
  box-shadow: 0 22px 68px rgba(0, 0, 0, 0.56);
  padding: 22px;
}

.loading-logo-wrap {
  position: relative;
  width: min(72vw, 340px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.loading-logo-wrap::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(255, 216, 128, 0.2);
  box-shadow: 0 0 44px rgba(255, 216, 128, 0.14);
  animation: haloPulse 2.4s ease-in-out infinite;
}

.loading-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(255, 216, 128, 0.22));
}

.loading-spark {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffe69e;
  box-shadow:
    0 0 10px #ffe69e,
    0 0 26px rgba(255, 216, 128, 0.9);
  opacity: 0;
  animation: sparkPulse 1.9s ease-in-out infinite;
}

.loading-spark.s1 { left: 48%; top: 16%; animation-delay: 0s; }
.loading-spark.s2 { left: 35%; top: 36%; animation-delay: 0.22s; }
.loading-spark.s3 { left: 63%; top: 36%; animation-delay: 0.44s; }
.loading-spark.s4 { left: 50%; top: 48%; animation-delay: 0.66s; }
.loading-spark.s5 { left: 39%; top: 58%; animation-delay: 0.88s; }
.loading-spark.s6 { left: 60%; top: 58%; animation-delay: 1.1s; }
.loading-spark.s7 { left: 49%; top: 69%; animation-delay: 1.32s; }
.loading-spark.s8 { left: 50%; top: 82%; animation-delay: 1.54s; }

.loading-card strong {
  color: var(--gold-bright);
  font-size: clamp(22px, 5vw, 34px);
  text-align: center;
}

.loading-card span {
  color: rgba(248, 239, 215, 0.82);
  font-weight: 760;
}

.loading-progress {
  width: min(100%, 360px);
  height: 7px;
  border: 1px solid rgba(255, 216, 128, 0.2);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.loading-progress i {
  display: block;
  width: 44%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  animation: progressSweep 1.7s ease-in-out infinite;
}

.truth-toast {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  top: max(18px, env(safe-area-inset-top));
  width: min(420px, calc(100vw - 36px));
  z-index: 50;
  border: 1px solid rgba(255, 216, 128, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 216, 128, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(8, 7, 5, 0.92);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.58), 0 0 36px rgba(255, 216, 128, 0.12);
  backdrop-filter: blur(16px);
  padding: 15px;
  animation:
    toastIn 260ms ease both,
    toastAutoOut 260ms ease 5s forwards;
}

.truth-toast[hidden] {
  display: none;
}

.truth-toast.is-leaving {
  animation: toastOut 260ms ease both;
}

.truth-toast span {
  color: var(--jade);
  font-size: 13px;
  font-weight: 760;
}

.truth-toast strong {
  display: block;
  margin-top: 7px;
  color: var(--gold-bright);
  font-size: 18px;
  line-height: 1.3;
}

.truth-toast p {
  margin-top: 8px;
  color: rgba(248, 239, 215, 0.84);
  line-height: 1.68;
}

@keyframes sparkPulse {
  0%, 100% {
    transform: scale(0.55);
    opacity: 0;
  }
  36% {
    transform: scale(1.25);
    opacity: 1;
  }
  62% {
    transform: scale(0.78);
    opacity: 0.36;
  }
}

@keyframes haloPulse {
  0%, 100% {
    transform: scale(0.98);
    opacity: 0.36;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.78;
  }
}

@keyframes progressSweep {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(260%);
  }
}

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

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-12px);
    visibility: hidden;
  }
}

@keyframes toastAutoOut {
  to {
    opacity: 0;
    transform: translateY(-12px);
    visibility: hidden;
  }
}

.ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 1fr;
    grid-template-areas:
      "input"
      "visual"
      "results";
  }

  .visual-panel,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .input-panel {
    position: static;
  }

  .visual-panel {
    display: grid;
  }

  .report-grid {
    grid-template-areas: none;
  }
}

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

  .topbar,
  .report-header,
  .dimension-wrap,
  .category-results,
  .metric-grid,
  .plan-grid,
  .dual-grid,
  .auth-brand {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    align-items: start;
    padding-bottom: 12px;
  }

  .topbar-status {
    align-items: flex-start;
    text-align: left;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .auth-brand img {
    width: 128px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .visual-stage {
    min-height: 480px;
  }

  #selfiePreview,
  .photo-placeholder {
    width: min(74%, 300px);
  }

  .stage-hud {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-header {
    justify-items: start;
  }

  .score-ring {
    width: 124px;
  }

  .result-card.full {
    grid-column: auto;
  }
}

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