:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #242424;
  background: #f5f5f2;
  color-scheme: light;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { background: #f5f5f2; }

body {
  margin: 0;
  min-height: 100vh;
  background: #f5f5f2;
  color: #242424;
  overflow-x: hidden;
}

button { font: inherit; }

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 16px 28px;
}

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

.brand {
  color: #171717;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .1em;
}

.tagline {
  margin-top: 2px;
  color: #747474;
  font-size: 11px;
}

.status {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #666;
  font-size: 11px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2f8f57;
}

.panel {
  padding: 22px;
  background: #fff;
  border: 1px solid #deded9;
  border-radius: 16px;
}

.gate { margin-top: 10vh; }

.eyebrow {
  margin-bottom: 8px;
  color: #6b6b67;
  font-size: 11px;
  font-weight: 700;
}

h1 {
  margin: 0 0 10px;
  color: #1f1f1f;
  font-size: 26px;
  line-height: 1.2;
}

h2 {
  margin: 3px 0 6px;
  color: #1f1f1f;
  font-size: 20px;
  line-height: 1.35;
}

p {
  margin: 0 0 18px;
  color: #686864;
  font-size: 14px;
  line-height: 1.65;
}

.hidden { display: none !important; }

.btn {
  width: 100%;
  margin-top: 10px;
  padding: 14px 16px;
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.primary {
  color: #fff;
  background: #252525;
}

.ghost {
  color: #333;
  background: #fff;
  border-color: #d8d8d3;
}

.btn:hover,
.btn:focus-visible { filter: brightness(.96); }

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0 12px;
}

.mode {
  padding: 13px 4px 11px;
  color: #686864;
  background: #fff;
  border: 1px solid #d9d9d4;
  border-radius: 12px;
  cursor: pointer;
}

.mode strong {
  display: block;
  color: #222;
  font-size: 23px;
}

.mode span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
}

.mode.selected {
  color: #222;
  background: #f0f0ec;
  border-color: #333;
}

.small-note,
.muted {
  margin-top: 12px;
  color: #858580;
  font-size: 11px;
  text-align: center;
}

.progress-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 2px 2px 10px;
  color: #666;
  font-size: 12px;
}

.progress {
  height: 4px;
  overflow: hidden;
  flex: 1;
  background: #dddcd7;
  border-radius: 999px;
}

.progress i {
  display: block;
  width: 0;
  height: 100%;
  background: #343434;
  transition: width .2s ease;
}

.swipe-guide {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 5px;
  margin-bottom: 9px;
  color: #777;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.swipe-guide span {
  padding: 7px 3px;
  background: #eaeae6;
  border-radius: 8px;
  transition: color .12s ease, background-color .12s ease;
}

.guide-bad.active {
  color: #a83232;
  background: #fbe8e6;
}

.guide-skip.active {
  color: #4c5865;
  background: #e5eaf0;
}

.guide-like.active {
  color: #187047;
  background: #e1f1e8;
}

.swipe-stage {
  position: relative;
  isolation: isolate;
}

.work-card {
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d8d8d3;
  border-radius: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  transition: transform .18s ease, opacity .16s ease;
}

.work-card.dragging {
  cursor: grabbing;
  transition: none;
}

.work-card:focus-visible {
  outline: 3px solid rgba(37, 37, 37, .24);
  outline-offset: 3px;
}

.cover {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: #e9e9e5;
  background-repeat: no-repeat;
}

.lens-mark {
  color: #aaa9a3;
  font-size: 64px;
  line-height: 1;
}

.work-meta { padding: 15px 17px 16px; }

.work-meta h2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.work-meta p {
  margin: 0 0 10px;
  font-size: 12px;
}

.tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.tag {
  padding: 5px 8px;
  color: #666;
  background: #f0f0ed;
  border-radius: 6px;
  font-size: 10px;
}

.swipe-feedback {
  position: absolute;
  z-index: 3;
  padding: 7px 10px;
  opacity: 0;
  border: 2px solid currentColor;
  border-radius: 7px;
  background: rgba(255, 255, 255, .92);
  font-size: 17px;
  font-weight: 800;
  pointer-events: none;
  transition: opacity .1s ease;
}

.feedback-bad {
  top: 18px;
  left: 14px;
  color: #a83232;
  transform: rotate(-7deg);
}

.feedback-like {
  top: 18px;
  right: 14px;
  color: #187047;
  transform: rotate(7deg);
}

.feedback-skip {
  top: 12px;
  left: 50%;
  color: #4c5865;
  transform: translateX(-50%);
}

.swipe-stage[data-intent="bad"] .feedback-bad,
.swipe-stage[data-intent="skip"] .feedback-skip,
.swipe-stage[data-intent="like"] .feedback-like { opacity: 1; }

.swipe-help {
  margin: 7px 0 8px;
  color: #858580;
  font-size: 10px;
  text-align: center;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 7px;
}

.action {
  min-height: 52px;
  padding: 8px 4px;
  color: #444;
  background: #fff;
  border: 1px solid #d8d8d3;
  border-radius: 11px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.action span {
  display: block;
  margin-bottom: 1px;
  font-size: 18px;
}

.action.bad { color: #a83232; }
.action.like { color: #187047; }
.action.skip { color: #4c5865; }

.action:disabled {
  cursor: wait;
  opacity: .45;
}

.action:hover:not(:disabled),
.action:focus-visible:not(:disabled) { background: #f2f2ef; }

.result-list {
  display: grid;
  gap: 7px;
  margin: 16px 0;
}

.result {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  background: #fff;
  border: 1px solid #deded9;
  border-radius: 11px;
}

.rank {
  color: #777;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}

.result h3 { margin: 0 0 3px; font-size: 13px; }
.result p { margin: 0; color: #777; font-size: 10px; }
.match { color: #333; font-size: 14px; font-weight: 800; }
.reason { margin-top: 3px; color: #858580; font-size: 9px; }

footer {
  margin-top: 22px;
  color: #888;
  font-size: 10px;
  text-align: center;
}

.site-footer { display: grid; gap: 10px; }
.diagnosis-active .site-footer { display: none; }
.diagnosis-active .app-shell { padding-bottom: 14px; }

.site-footer nav {
  display: flex;
  gap: 8px 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.site-footer a,
.back-link {
  color: #696965;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible,
.back-link:hover,
.back-link:focus-visible { color: #111; }

.brand-link { color: #171717; text-decoration: none; }
.back-link { font-size: 12px; font-weight: 700; }

.legal-shell { width: min(100%, 680px); }
.legal-panel { padding: 26px; }
.legal-panel h2 { margin: 24px 0 7px; font-size: 17px; }
.legal-panel p { margin-bottom: 13px; }
.legal-list { margin: 20px 0 0; }

.legal-list div {
  padding: 13px 0;
  border-top: 1px solid #e1e1dc;
}

.legal-list dt {
  color: #777;
  font-size: 11px;
  font-weight: 700;
}

.legal-list dd {
  margin: 5px 0 0;
  color: #444;
  font-size: 14px;
  line-height: 1.7;
}

.contact-card {
  padding: 16px;
  overflow-wrap: anywhere;
  color: #444;
  background: #f4f4f1;
  border: 1px solid #deded9;
  border-radius: 10px;
  line-height: 1.7;
}

.legal-note,
.updated-at { color: #858580; font-size: 11px; }
.updated-at { margin-top: 26px; margin-bottom: 0; }

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

@media (min-width: 700px) {
  .app-shell { padding-top: 30px; }
  .legal-panel { padding: 32px; }
}

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