:root {
  --bg: #f4f7f6;
  --paper: #ffffff;
  --ink: #1d2422;
  --muted: #66716d;
  --line: rgba(26, 49, 45, 0.14);
  --accent: #2f6f73;
  --accent-dark: #173f43;
  --green: #6f7f4b;
  --shadow: 0 24px 70px rgba(19, 36, 34, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255,255,255,.72), rgba(214,229,225,.28)),
    var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

button,
input {
  font: inherit;
}

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

.hidden,
[hidden] {
  display: none !important;
}

.file-input-native {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.app-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 56px;
}

.hero-panel {
  min-height: min(760px, calc(100svh - 34px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 468px);
  gap: 42px;
  align-items: center;
  padding: clamp(28px, 5vw, 70px);
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 28px;
  background:
    linear-gradient(120deg, rgba(255,255,255,.92), rgba(227,237,234,.72)),
    var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  background: linear-gradient(0deg, rgba(31, 61, 57, .09), transparent);
  pointer-events: none;
}

.hero-copy,
.hero-media {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .12em;
}

.eyebrow svg {
  width: 16px;
  height: 16px;
}

.hero-copy h1 {
  margin: 0;
  max-width: 640px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(48px, 7vw, 96px);
  line-height: .95;
  letter-spacing: 0;
  font-weight: 800;
}

.hero-copy p {
  max-width: 520px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.hero-actions,
.action-row,
.result-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

.primary-action,
.secondary-action,
.ghost-action,
.icon-btn {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  border-radius: 8px;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, opacity .18s ease;
}

.primary-action {
  padding: 0 22px;
  color: #fff;
  background: #1d2422;
  box-shadow: 0 14px 34px rgba(19, 36, 34, .22);
}

.secondary-action,
.ghost-action {
  padding: 0 18px;
  color: var(--ink);
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
}

.primary-action:hover,
.secondary-action:hover,
.ghost-action:hover {
  transform: translateY(-1px);
}

.primary-action:disabled,
.secondary-action:disabled,
.ghost-action:disabled {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
}

.primary-action svg,
.secondary-action svg,
.ghost-action svg,
.icon-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.history-icon {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e7eeee;
  color: var(--accent-dark);
}

.ghost-action strong {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1d2422;
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.ghost-action.has-records .history-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d39b42;
  box-shadow: 0 0 0 0 rgba(211, 155, 66, .55);
  animation: cursorPulse 1.15s infinite;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.hero-tags span,
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: #455552;
  background: rgba(255,255,255,.64);
  font-size: 12px;
  font-weight: 800;
}

.privacy-badge svg {
  width: 15px;
  height: 15px;
  color: var(--green);
}

.hero-media {
  margin: 0;
  align-self: stretch;
  min-height: 500px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(19, 36, 34, .2);
  background: #dfe8e5;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.upload-workspace,
.compensation-entry,
.reference-section,
.standard-section,
.steps-section,
.trust-section {
  margin-top: 34px;
}

.compensation-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border: 1px solid rgba(163, 59, 49, .18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,244,236,.88));
  box-shadow: 0 16px 40px rgba(96, 38, 31, .1);
}

.compensation-entry h2 {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.18;
  letter-spacing: 0;
}

.compensation-entry p:not(.section-kicker) {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.upload-workspace {
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 20px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 18px 46px rgba(19, 36, 34, .09);
}

.workspace-head,
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.workspace-head h2,
.section-heading h2,
.standard-section h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: 0;
}

.upload-zone {
  min-height: 360px;
  border: 1.5px dashed rgba(47, 111, 115, .32);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(230,238,236,.72), rgba(255,255,255,.75));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.upload-zone:hover,
.upload-zone.is-dragging {
  border-color: rgba(47, 111, 115, .72);
  background: #f6fbfa;
  transform: translateY(-1px);
}

.upload-icon {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1d2422;
  color: #fff;
  margin-right: 20px;
  box-shadow: 0 18px 36px rgba(19, 36, 34, .18);
}

.upload-icon svg {
  width: 36px;
  height: 36px;
}

.upload-copy {
  max-width: 430px;
  text-align: left;
}

.upload-copy strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
}

.upload-copy small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.upload-preview {
  position: relative;
  width: min(100%, 380px);
  height: 320px;
  border-radius: 14px;
  overflow: hidden;
  background: #e7eeee;
  box-shadow: 0 16px 38px rgba(19, 36, 34, .15);
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #e7eeee;
}

.upload-preview em {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 7px 12px;
  color: #fff;
  background: rgba(29, 36, 34, .76);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.action-row {
  margin-top: 18px;
}

.status-text {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.reference-section,
.standard-section,
.steps-section,
.trust-section {
  padding: 26px 0 0;
}

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

.sample-gallery figure {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #dfe8e5;
  box-shadow: 0 18px 44px rgba(19, 36, 34, .13);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.sample-gallery img {
  width: min(100%, 420px);
  height: auto;
  object-fit: contain;
}

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

.standard-grid div {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
}

.standard-grid svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.standard-grid strong {
  display: block;
  margin-top: 16px;
  font-size: 16px;
}

.standard-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.steps-grid article {
  position: relative;
  min-height: 210px;
  padding: 22px;
  border-radius: 14px;
  background: #1d2422;
  color: #fff;
  overflow: hidden;
}

.steps-grid article::after {
  content: "";
  position: absolute;
  right: -52px;
  bottom: -54px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
}

.steps-grid span {
  display: block;
  color: rgba(255,255,255,.38);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
}

.steps-grid svg {
  width: 28px;
  height: 28px;
  margin-top: 28px;
  color: #d6b06c;
}

.steps-grid strong {
  display: block;
  margin-top: 16px;
  font-size: 18px;
}

.steps-grid p {
  margin: 10px 0 0;
  color: rgba(255,255,255,.68);
  font-size: 13px;
  line-height: 1.65;
}

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

.trust-grid div {
  min-height: 138px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.7);
}

.trust-grid strong {
  display: block;
  font-size: 17px;
}

.trust-grid span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.home-disclaimer {
  margin: 28px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
}

.state-shell {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.load-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(47, 111, 115, .12), transparent 50%),
    linear-gradient(180deg, #fafcfb, #eef3f1);
}

.load-shell {
  width: min(640px, 100%);
  text-align: center;
}

.load-preview {
  position: relative;
  width: min(100%, 280px);
  aspect-ratio: 3 / 4;
  margin: 0 auto 32px;
  overflow: hidden;
  border-radius: 18px;
  background: #dfe8e5;
  box-shadow: var(--shadow);
}

.load-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), transparent),
    #dfe8e5;
}

.load-preview img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transition: opacity .18s ease;
}

.load-preview img.is-loaded {
  opacity: 1;
}

.loading-badge {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(transparent, rgba(19, 36, 34, .68));
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.loading-badge strong {
  color: #d6b06c;
}

.load-content h1 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.12;
  letter-spacing: 0;
}

.load-content .lead {
  margin: 0 auto 24px;
  max-width: 420px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.progress-row .pct {
  color: var(--accent);
}

.track {
  height: 6px;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(47, 111, 115, .12);
}

.track-fill {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f6f73, #d6b06c);
  transition: width .4s ease;
}

.load-estimate {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(26, 49, 45, .08);
  border-radius: 8px;
  background: rgba(255,255,255,.74);
  text-align: left;
  font-size: 13px;
}

.step-item.is-active {
  border-color: rgba(47, 111, 115, .18);
  background: rgba(230, 238, 236, .92);
  font-weight: 900;
}

.step-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(47, 111, 115, .24);
}

.step-item.is-active .step-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 115, .12);
}

.step-item.is-failed {
  border-color: rgba(163, 59, 49, .22);
  background: rgba(255, 244, 241, .86);
}

.step-item.is-failed .step-dot {
  background: #a33b31;
  box-shadow: 0 0 0 3px rgba(163, 59, 49, .12);
}

.step-state {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.load-fail-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.loading-card,
.unlock-card,
.compensation-card {
  width: min(100%, 520px);
  text-align: center;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 22px;
  padding: 28px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
}

.state-icon {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: #fff;
  background: #1d2422;
  box-shadow: 0 18px 40px rgba(19, 36, 34, .18);
}

.state-icon svg {
  width: 32px;
  height: 32px;
}

.loading-visual,
.unlock-preview {
  width: min(300px, 78vw);
  aspect-ratio: 4 / 5;
  margin: 0 auto 22px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #dfe8e5;
}

.loading-visual img,
.unlock-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  z-index: 2;
  height: 4px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.96), transparent);
  box-shadow:
    0 0 18px rgba(255,255,255,.9),
    0 0 34px rgba(47, 111, 115, .34);
  animation: scanMove 1.9s ease-in-out infinite;
}

.blur-mask {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(10px);
  background: rgba(29, 36, 34, .18);
}

.loading-card h1,
.unlock-card h1,
.compensation-card h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.12;
  letter-spacing: 0;
}

.loading-card p:not(.section-kicker),
.unlock-card p:not(.section-kicker),
.compensation-card p:not(.section-kicker) {
  margin: 12px auto 0;
  max-width: 380px;
  color: var(--muted);
  line-height: 1.65;
}

.compensation-detail {
  margin: 18px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(26, 49, 45, .1);
  border-radius: 10px;
  color: #4c5c58;
  background: rgba(246, 251, 250, .88);
  font-size: 13px;
  line-height: 1.6;
}

.compensation-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.compensation-code-box {
  min-width: min(100%, 260px);
  padding: 14px 16px;
  border: 1px solid rgba(47, 111, 115, .22);
  border-radius: 12px;
  background: #f7fbfa;
  text-align: left;
}

.compensation-code-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.compensation-code-box strong {
  display: block;
  margin-top: 6px;
  color: #1d2422;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: clamp(24px, 6vw, 34px);
  line-height: 1;
  letter-spacing: .08em;
  word-break: break-all;
}

.compensation-card > .ghost-action {
  margin-top: 14px;
}

.progress-track {
  height: 8px;
  margin: 24px 0 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #d9e5e2;
}

.progress-track span {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f6f73, #b7793b);
  transition: width .5s ease;
}

.loading-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.loading-steps span {
  min-height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: #e8f0ee;
  font-size: 12px;
  font-weight: 900;
}

.loading-steps span.active {
  color: #fff;
  background: #1d2422;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 60px;
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  gap: 8px;
  padding: 0 max(14px, calc((100vw - 960px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(244,247,246,.86);
  backdrop-filter: blur(16px);
}

.topbar strong {
  text-align: center;
  font-size: 16px;
}

.icon-btn {
  width: 42px;
  min-height: 42px;
  padding: 0;
  color: var(--ink);
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
}

.result-shell {
  width: min(960px, calc(100% - 28px));
  margin: 24px auto 120px;
}

.result-card {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.result-status {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #f5faf8;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 24px;
}

.compare-grid figure {
  margin: 0;
}

.compare-grid figcaption {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.compare-grid img {
  width: 100%;
  min-height: 320px;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #e8f0ee;
}

.compare-grid.is-failed #output-image {
  opacity: .18;
}

.analysis-section {
  padding: 0 24px 24px;
}

.analysis-section h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

#analysis-blocks {
  display: grid;
  gap: 10px;
}

#analysis-blocks article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #f7fbfa;
  animation: riseIn .38s ease both;
}

#analysis-blocks strong {
  display: block;
  font-size: 14px;
}

#analysis-blocks p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.result-actions {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 12;
  transform: translateX(-50%);
  width: min(960px, calc(100% - 28px));
  justify-content: center;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 14px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 18px 44px rgba(19, 36, 34, .18);
  backdrop-filter: blur(16px);
}

.toast-root {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 99999;
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  opacity: 0;
  transform: translateY(-10px);
  border-radius: 999px;
  padding: 10px 14px;
  color: #fff;
  background: #1d2422;
  box-shadow: 0 12px 32px rgba(19, 36, 34, .22);
  font-size: 13px;
  font-weight: 900;
  transition: opacity .18s ease, transform .18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  background: #a33b31;
}

.rt-record-modal {
  z-index: 99990;
}

@keyframes cursorPulse {
  0% { box-shadow: 0 0 0 0 rgba(211, 155, 66, .6); }
  70% { box-shadow: 0 0 0 9px rgba(211, 155, 66, 0); }
  100% { box-shadow: 0 0 0 0 rgba(211, 155, 66, 0); }
}

@keyframes scanMove {
  0% { top: -8px; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { top: calc(100% + 8px); opacity: 0; }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100% - 20px, 680px);
    padding-top: 10px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: auto;
    padding: 24px;
    border-radius: 22px;
  }

  .hero-copy h1 {
    font-size: clamp(42px, 12vw, 68px);
  }

  .hero-copy p {
    font-size: 15px;
    line-height: 1.7;
  }

  .hero-actions,
  .action-row,
  .compensation-entry,
  .compensation-actions,
  .load-fail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .compensation-entry {
    padding: 18px;
  }

  .primary-action,
  .secondary-action,
  .ghost-action {
    width: 100%;
  }

  .hero-media {
    min-height: 360px;
  }

  .workspace-head,
  .section-heading {
    display: block;
  }

  .privacy-badge {
    margin-top: 12px;
  }

  .upload-zone {
    min-height: 280px;
    display: grid;
    gap: 16px;
  }

  .upload-icon {
    margin: 0 auto;
  }

  .upload-copy {
    text-align: center;
  }

  .upload-preview {
    height: 280px;
  }

  .sample-gallery,
  .compare-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .sample-gallery img {
    width: min(100%, 360px);
  }

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

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

  .compare-grid {
    padding: 16px;
    gap: 16px;
  }

  .analysis-section {
    padding: 0 16px 18px;
  }
}

@media (max-width: 520px) {
  .hero-panel {
    padding: 20px 16px 16px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-media {
    min-height: 300px;
  }

  .upload-workspace {
    padding: 18px 12px;
    border-radius: 16px;
  }

  .upload-copy strong {
    font-size: 18px;
  }

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

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

  .loading-card,
  .unlock-card,
  .compensation-card {
    padding: 22px 16px;
  }

  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
