.detect-body .gate-link {
  margin: 1.1rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}
.detect-body .gate-link a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}
.detect-body .gate-link a:hover { text-decoration: underline; }

.detect-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.detect-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.4rem;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 252, 247, 0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.detect-brand {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.detect-brand .mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}
.detect-brand .slash { color: var(--muted); }
.detect-brand .tool-name {
  font-weight: 600;
  color: var(--teal);
}
.linkish {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.detect-main {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 1.6rem 1.2rem 3rem;
}

.hero-copy h1 {
  margin: 0.25rem 0 0.55rem;
  font-family: var(--display);
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.hero-copy .sub {
  margin: 0 0 1.4rem;
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.5;
}

.workspace {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1rem;
}
@media (max-width: 860px) {
  .workspace { grid-template-columns: 1fr; }
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem;
}

.upload-panel {
  min-height: 320px;
  display: grid;
  place-items: stretch;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.upload-panel:hover,
.upload-panel.dragover {
  border-color: rgba(31, 111, 106, 0.55);
  box-shadow: 0 22px 55px rgba(21, 32, 41, 0.16);
  transform: translateY(-2px);
}
.drop-inner {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 2rem 1rem;
  border: 1.5px dashed rgba(21, 32, 41, 0.18);
  border-radius: 14px;
  min-height: 280px;
  animation: rise 0.5s ease both;
}
.drop-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(31, 111, 106, 0.12);
  color: var(--teal);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.drop-title { margin: 0; font-weight: 600; }
.drop-meta { margin: 0; color: var(--muted); font-size: 0.88rem; }

.drop-preview {
  display: grid;
  gap: 0.85rem;
}
.drop-preview img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(21, 32, 41, 0.04);
}
.drop-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  align-items: center;
}
.drop-preview-meta strong { font-size: 0.95rem; }
.drop-preview-meta span { color: var(--muted); font-size: 0.88rem; }

.score-card {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(31, 111, 106, 0.1), rgba(196, 92, 38, 0.08));
  margin-bottom: 1rem;
}
.score-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: 0.2rem;
}
.score-num {
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.score-diff {
  color: var(--muted);
  font-size: 0.92rem;
}
.signal-bars {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.85rem;
}
.signal-bars .bar {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
}
.signal-bars .bar i {
  display: block;
  height: 0.45rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--accent));
  width: 0%;
  transition: width 0.45s ease;
}

.control-block {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
}
.control-block legend {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.choice {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  background: #fff;
}
.choice:has(input:checked) {
  border-color: rgba(31, 111, 106, 0.45);
  background: rgba(31, 111, 106, 0.06);
}
.choice input { margin-top: 0.25rem; }
.choice strong { display: block; font-size: 0.95rem; }
.choice small { color: var(--muted); line-height: 1.35; }

.slider-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
#strength {
  width: 100%;
  margin-bottom: 0.9rem;
  accent-color: var(--teal);
}

.check-row {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  cursor: pointer;
}
.check-row em {
  font-style: normal;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.actions .primary { border-radius: 999px; }
.actions .primary:disabled,
.actions .ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.status {
  min-height: 1.3rem;
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
  color: var(--teal);
}
.status.error { color: #b42318; }

.disclaimer {
  margin: 0.9rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
}

.compare-panel { margin-top: 1rem; animation: rise 0.45s ease both; }
.compare-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.compare-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
@media (max-width: 700px) {
  .compare-grid { grid-template-columns: 1fr; }
}
.compare-grid figure {
  margin: 0;
  background: rgba(21, 32, 41, 0.03);
  border-radius: 14px;
  padding: 0.65rem;
}
.compare-grid figcaption {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.compare-grid img {
  width: 100%;
  border-radius: 10px;
  display: block;
  background: #fff;
}
.fig-score {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  color: var(--ink);
}
