:root {
  --paper: #f0eadc;
  --ink: #1f1b18;
  --rose: #b5553c;
  --ochre: #d29b3a;
  --slate: #4f6a7a;
  --moss: #7c8a5a;
  --blush: #e8b7a6;
  --fog: #cfc6b8;
  --surface: var(--paper);
  --text: var(--ink);
  --muted: #655d53;
  --line: #beb3a2;
  --card: #f7f1e6;
  --accent-text: #913d28;
  --ochre-text: #865710;
  --primary: #a84731;
  --on-primary: #fff9ed;
  color-scheme: light;
  font:
    16px/1.6 Arial,
    Helvetica,
    sans-serif;
  color: var(--text);
  background: var(--surface);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--surface);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.13;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.18' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 5;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 5px;
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent-text);
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: var(--accent-text);
  text-underline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
.display,
.wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}
h1,
h2,
.wordmark {
  font-style: italic;
}
h1 {
  font-size: clamp(48px, 8vw, 68px);
  line-height: 1.02;
  letter-spacing: -2.6px;
}
h2 {
  font-size: clamp(43px, 7vw, 64px);
  line-height: 1.08;
  letter-spacing: -1.8px;
}
h3 {
  font-size: 18px;
}
.shell {
  max-width: 560px;
  margin: auto;
  padding: 0 24px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 32px;
  letter-spacing: -1.8px;
  text-decoration: none;
  color: var(--text);
}
.wordmark svg {
  width: 35px;
  height: 35px;
}
.quiet-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}
.quiet-nav a {
  color: var(--text);
}
.theme-toggle {
  border: 0;
  background: none;
  color: var(--text);
  padding: 8px;
  font-size: 19px;
  min-width: 44px;
  min-height: 44px;
}
.skip {
  position: absolute;
  top: -90px;
  background: var(--paper);
  padding: 10px;
  z-index: 10;
}
.skip:focus {
  top: 8px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}
.hero {
  position: relative;
  padding: 48px 0 18px;
}
.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 450px;
}
.hero h1 em {
  color: var(--accent-text);
  font-style: inherit;
}
.hero .subhead {
  font-size: 17px;
  line-height: 1.6;
  margin-top: 22px;
  max-width: 340px;
  color: var(--muted);
}
.hero-art {
  height: 140px;
  position: relative;
  margin-top: 18px;
  margin-bottom: -3px;
  pointer-events: none;
}
.biomorph {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.art-eye,
.art-ear,
.art-figure {
  position: absolute;
  display: block;
  animation: drift 7s ease-in-out infinite;
}
.art-eye {
  width: 90px;
  left: 2%;
  top: 18px;
  transform: rotate(-12deg);
}
.art-ear {
  width: 102px;
  right: -15px;
  top: -55px;
  animation-delay: -2s;
}
.art-figure {
  width: 210px;
  left: 30%;
  top: -4px;
  animation-delay: -4s;
}
.wandering-line {
  position: absolute;
  left: -4%;
  top: 23px;
  width: 108%;
  height: 110px;
  opacity: 0.65;
}
.drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 210px;
  margin: 0 -2px 10px;
  padding: 32px 42px;
  background: var(--card);
  border: 1.5px solid var(--text);
  border-radius: 46% 54% 43% 47% / 25% 30% 35% 29%;
  cursor: pointer;
  transition:
    transform 0.2s,
    background 0.2s;
}
.drop-zone:hover,
.drop-zone.dragging {
  background: var(--blush);
  color: var(--ink);
  transform: rotate(-0.4deg);
}
.drop-zone:focus-within {
  outline: 3px solid var(--accent-text);
  outline-offset: 5px;
}
.drop-zone strong {
  font:
    italic 28px/1.2 Georgia,
    serif;
  max-width: 270px;
  margin: 12px 0;
}
.drop-zone small {
  font-size: 12px;
  color: var(--muted);
}
.upload-mark {
  font-size: 26px;
  line-height: 1;
}
.file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.text-link {
  display: inline-block;
  min-height: 44px;
  padding: 10px 4px;
  border: 0;
  background: none;
  color: var(--accent-text);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.paste-toggle {
  text-align: center;
}
.field {
  display: block;
  margin: 22px 0;
}
.field > span,
.field > label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}
.field textarea,
.field input,
.field select,
textarea.review {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px 18px 13px 17px;
  background: var(--card);
  color: var(--text);
  padding: 13px;
  resize: vertical;
  min-height: 48px;
}
.field input {
  font-size: 15px;
}
textarea.review {
  min-height: 210px;
  font:
    14px/1.7 ui-monospace,
    SFMono-Regular,
    monospace;
}
.help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 7px;
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 13px 26px;
  border: 1px solid var(--primary);
  border-radius: 28px 31px 24px 29px / 25px 28px 24px 27px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.primary {
  background: var(--primary);
  color: var(--on-primary);
}
.primary:hover {
  filter: brightness(0.95);
}
.secondary {
  border-color: var(--text);
  color: var(--text);
  background: transparent;
}
.full {
  width: 100%;
}
.privacy-note {
  text-align: center;
  margin: 18px auto;
  max-width: 420px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}
.file-list {
  list-style: none;
  padding: 0;
  margin: 18px 0;
}
.file-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.file-list li span {
  flex: 1;
}
.file-list button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 20px;
  min-width: 38px;
  min-height: 38px;
  color: var(--text);
}
.file-list button:disabled {
  cursor: default;
}
.footer {
  padding: 27px 0 30px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
}
.footer nav {
  display: flex;
  gap: 18px;
}
.footer a {
  color: inherit;
}
.footer .small-brand {
  font:
    italic 22px Georgia,
    serif;
  color: var(--text);
}
.stage {
  padding: 46px 0 20px;
}
.stage > h1 {
  font-size: 44px;
}
.stage > p {
  margin: 17px 0;
  color: var(--muted);
}
.state-art {
  width: 200px;
  margin: 30px auto;
}
.loading-art .biomorph {
  animation: breathe 4s ease-in-out infinite;
}
.loading-label {
  text-align: center;
  font:
    italic 27px Georgia,
    serif;
  margin: 25px 0;
}
.progress-note {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 25px;
}
.actions > * {
  flex: 1;
}
.notice {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  font-size: 14px;
  margin: 15px 0;
}
.error {
  color: var(--accent-text);
  margin: 15px 0;
  font-size: 14px;
}
.side-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 28px 0;
}
.side-choice {
  border: 1px solid var(--text);
  border-radius: 25px;
  background: var(--card);
  color: var(--text);
  padding: 24px 10px;
  min-height: 95px;
}
.side-choice span {
  display: block;
  background: var(--rose);
  border-radius: 30px;
  width: 45px;
  height: 23px;
  margin: 10px auto;
}
.side-choice:last-child span {
  margin-left: auto;
  margin-right: 5px;
}
.assignment-row {
  display: flex;
  gap: 12px;
  align-items: start;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
}
.assignment-row input {
  margin-top: 6px;
  min-width: 20px;
  min-height: 20px;
}
.vision-preview {
  display: block;
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: white;
  border: 1px solid var(--line);
  margin: 20px auto;
}
.reading-card {
  position: relative;
  margin: 0 -9px 35px;
  padding: 31px 25px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px 19px 27px 20px;
}
.reading-card .eyebrow {
  margin-bottom: 21px;
}
.reading-card h1 {
  font-size: clamp(48px, 8vw, 68px);
  margin-bottom: 25px;
  max-width: 400px;
}
.reading-lines {
  font-size: 17px;
  line-height: 1.65;
  position: relative;
  z-index: 1;
  max-width: 420px;
}
.reading-lines p + p {
  margin-top: 12px;
}
.twist {
  font:
    italic 21px/1.5 Georgia,
    serif;
  margin-top: 23px;
  position: relative;
  z-index: 1;
}
.verdict {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 14px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.reading-peek {
  position: absolute;
  width: 90px;
  right: 4px;
  top: -31px;
  transform: rotate(18deg);
}
.result-section {
  margin: 32px 0;
}
.section-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
  gap: 12px;
}
.section-top h2 {
  white-space: nowrap;
  font:
    italic 30px Georgia,
    serif;
  letter-spacing: -0.7px;
}
.silhouette {
  padding: 10px 20px 16px;
  max-width: 460px;
  margin: auto;
}
.silhouette svg {
  display: block;
  width: 100%;
  max-height: 420px;
}
.silhouette-key {
  display: flex;
  gap: 20px;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
}
.key-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rose);
  margin-right: 5px;
}
.key-dot.them {
  background: var(--fog);
  outline: 1px solid var(--ink);
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 156px;
  border: 1px solid var(--line);
  border-radius: 19px 25px 20px 15px;
  padding: 20px 17px;
  background: var(--card);
}
.stat-number {
  font:
    44px/1.15 Georgia,
    serif;
  letter-spacing: -1.6px;
  color: var(--ochre-text);
}
.stat-label {
  font-size: 12px;
  margin-top: 7px;
  color: var(--muted);
  max-width: 145px;
  position: relative;
  z-index: 1;
}
.stat-companion {
  position: absolute;
  width: 63px;
  right: -13px;
  top: -9px;
  opacity: 0.65;
  transform: rotate(12deg);
}
.xray-caption {
  font:
    italic 20px/1.5 Georgia,
    serif;
  margin-top: 20px;
}
.all-stats {
  font-size: 13px;
  margin-top: 22px;
}
.all-stats summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
}
.all-stats table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.all-stats th,
.all-stats td {
  text-align: left;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
}
.all-stats th:not(:first-child),
.all-stats td:not(:first-child) {
  text-align: right;
}
.no-share {
  max-width: 490px;
  line-height: 1.8;
}
.support-list a {
  display: block;
  margin: 15px 0;
}
.share-preview {
  max-width: 350px;
  margin: 24px auto;
  line-height: 0;
  border: 1px solid var(--line);
}
.share-preview svg {
  width: 100%;
  height: auto;
  display: block;
}
.format-buttons {
  display: flex;
  gap: 12px;
  margin: 24px 0;
}
.format-buttons button {
  flex: 1;
}
.format-buttons button[aria-pressed="true"] {
  background: var(--text);
  color: var(--surface);
}
.check-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 15px 0;
  font-size: 14px;
  min-height: 35px;
}
.check-row input {
  min-width: 20px;
  min-height: 20px;
  accent-color: var(--primary);
}
.legal {
  padding: 45px 0 20px;
}
.legal h1 {
  font-size: 48px;
  margin-bottom: 25px;
}
.legal h2 {
  font:
    italic 27px Georgia,
    serif;
  margin: 30px 0 12px;
}
.legal p,
.legal li {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 15px;
}
.legal ul {
  padding-left: 22px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
@keyframes drift {
  50% {
    translate: 0 -6px;
    rotate: 2deg;
  }
}
@keyframes breathe {
  50% {
    transform: translateY(-5px) rotate(-2deg);
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #1c1916;
    --text: #f0eadc;
    --muted: #c2b7a8;
    --line: #766c60;
    --card: #28231e;
    --accent-text: #eea48c;
    --ochre-text: #e9bd68;
    --primary: #b75d44;
    --on-primary: #ffffff;
    color-scheme: dark;
  }
  .hero-art {
    opacity: 0.9;
  }
}
:root[data-theme="dark"] {
  --surface: #1c1916;
  --text: #f0eadc;
  --muted: #c2b7a8;
  --line: #766c60;
  --card: #28231e;
  --accent-text: #eea48c;
  --ochre-text: #e9bd68;
  --primary: #b75d44;
  --on-primary: #ffffff;
  color-scheme: dark;
}
@media (max-width: 420px) {
  .shell {
    padding: 0 22px;
  }
  .hero {
    padding-top: 37px;
  }
  .hero h1 {
    font-size: 54px;
    max-width: 340px;
  }
  .hero-art {
    height: 124px;
  }
  .art-figure {
    width: 180px;
    left: 27%;
    top: 1px;
  }
  .art-ear {
    width: 85px;
    right: -8px;
    top: -28px;
  }
  .art-eye {
    width: 73px;
  }
  .drop-zone {
    min-height: 185px;
    padding: 27px 26px;
  }
  .drop-zone strong {
    font-size: 25px;
  }
  .reading-card {
    padding: 28px 23px;
  }
  .stat-card {
    min-height: 155px;
    padding: 19px 14px;
  }
  .stat-number {
    font-size: 38px;
  }
  .quiet-nav {
    gap: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

body[data-mode="serious"] .small-brand {
  display: none;
}

.emoji-crop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.emoji-crop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
}
.emoji-crop img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
}
.emoji-crop input {
  width: 20px;
  height: 20px;
  accent-color: var(--rose);
}
.emoji-guess {
  font-size: 32px;
  line-height: 1.3;
}

.crop-preview {
  display: block;
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  margin: 24px 0;
}
.crop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 12px 0;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--rose);
  min-height: 44px;
  padding: 0;
}

.file-list li {
  flex-wrap: wrap;
}
.file-list li span {
  min-width: 100px;
}
.file-list button {
  min-width: 44px;
  min-height: 44px;
}
.file-list .crop-edit {
  flex-basis: 100%;
  border: none;
  text-align: left;
  padding: 4px 8px;
}
