/* Fundy brand, from bot.fundy.tv/privacy and ai.fundy.tv: orange header, cream page, ink borders, chunky offset shadows.
   Light by default; dark when the browser or device asks for it (same colours as bot.fundy.tv/privacy). */
:root {
  color-scheme: light dark;
  --orange: #ff6601; --orange-text: #b84600; --fur: #f9a947; --cream: #f1d8bc; --ink: #1b1b1b; --orange-soft: #fff1e4;
  --bg: #fbf1e6; --card: #fff; --text: #1b1b1b; --muted: #5e5750; --line: #f1d8bc; --code-bg: #fde4cc;
  --good: #2e9e57; --bad: #c0392b; --rare-a: #6aa6ff; --rare-b: #2f6fdb;
}
@media (prefers-color-scheme: dark) {
  :root {
    --orange: #ff7a1f; --orange-text: #ffa05c; --orange-soft: #2e1f14; --bg: #141414; --card: #1f1f1f;
    --text: #f3eee8; --muted: #b9b1a8; --line: #3a2f26; --code-bg: #2e1f14; --good: #5fce83; --bad: #ff7b6b;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif; }

header { background: var(--orange); color: var(--ink); padding: 40px 20px 88px; text-align: center; border-bottom: 8px solid var(--ink); }
header .avatar { width: 112px; height: 112px; border-radius: 50%; border: 6px solid var(--ink); background: var(--orange); display: block; margin: 0 auto 14px; }
header .kicker { margin: 0 0 4px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
header h1 { margin: 0; font-size: clamp(26px, 5vw, 38px); font-weight: 900; letter-spacing: -.01em; line-height: 1.2; }
header .badge { display: inline-block; margin: 12px 0 0; font-size: 15px; font-weight: 700; background: var(--ink); color: var(--fur);
  padding: 4px 14px; border-radius: 999px; font-family: ui-monospace, Consolas, monospace; letter-spacing: .03em; max-width: 100%; overflow-wrap: anywhere; }

main { max-width: 720px; margin: -56px auto 40px; padding: 0 16px; }
.card { background: var(--card); border-radius: 16px; border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 32px clamp(18px, 5vw, 40px); }
.intro { background: var(--orange-soft); border-left: 4px solid var(--orange); border-radius: 8px; padding: 14px 18px; margin: 0 0 8px; }
.hero { font-size: 19px; }
h2 { font-size: 20px; margin: 30px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--line); display: flex; align-items: center; gap: 10px; }
h2::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); flex: none; }
.view > h2:first-child, .progress + h2 { margin-top: 8px; }
h2.center-h { justify-content: center; border: 0; }
h2.center-h::before { display: none; }
p { margin: 0 0 12px; }
ul { padding-left: 22px; margin: 6px 0 12px; } li { margin: 5px 0; } li::marker { color: var(--orange); }
code { background: var(--code-bg); padding: 1px 6px; border-radius: 5px; font-size: .92em; }
a { color: var(--orange-text); font-weight: 600; }
.muted { color: var(--muted); }
.center { text-align: center; }
.big { font-size: 56px; text-align: center; margin: 0 0 6px; line-height: 1; }
.fine { color: var(--muted); font-size: 14px; text-align: center; margin: 10px 0 0; }

.tiles { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 12px 0 6px; padding: 0; list-style: none; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tiles li { background: var(--orange-soft); border-radius: 12px; padding: 14px 16px; margin: 0; font-weight: 600; line-height: 1.35; }
.tiles .icon { display: block; font-size: 26px; margin-bottom: 6px; }
.tiles .step { display: inline-block; background: var(--ink); color: var(--fur); border-radius: 999px; font-size: 12px; font-weight: 800; padding: 1px 8px; margin-bottom: 6px; }
.tiles small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; margin-top: 2px; }

/* Example cards */
.examples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0; }
@media (max-width: 520px) { .examples { grid-template-columns: repeat(2, 1fr); } .examples figure:nth-child(2) { display: none; } }
.examples figure { margin: 0; aspect-ratio: 750 / 1050; position: relative; }
.examples img { width: 100%; height: 100%; display: block; border-radius: 10px; filter: drop-shadow(3px 3px 0 var(--ink)); }
/* Fanned out like a hand of cards; "Your pet here" sits on top while stacked. */
.examples figure:nth-child(1) { transform: translateY(10px) rotate(-6deg); z-index: 1; }
.examples figure:nth-child(2) { z-index: 2; }
.examples figure:nth-child(3) { transform: translateY(10px) rotate(6deg); z-index: 3; }
/* Starts stacked in the middle (class set in the HTML); app.js removes it when the cards scroll into view. */
@media (prefers-reduced-motion: no-preference) {
  .examples figure { transition: transform .75s cubic-bezier(.2, .9, .3, 1.25); }
  .examples figure:nth-child(1) { transition-delay: .05s; }
  .examples figure:nth-child(3) { transition-delay: .15s; }
  .examples.stacked figure:nth-child(1) { transform: translateX(calc(100% + 12px)) rotate(-2deg); }
  .examples.stacked figure:nth-child(2) { transform: rotate(1deg); }
  .examples.stacked figure:nth-child(3) { transform: translateX(calc(-100% - 12px)) rotate(-1deg); }
  @media (max-width: 520px) {
    .examples.stacked figure:nth-child(1) { transform: translateX(calc(50% + 6px)) rotate(-2deg); }
    .examples.stacked figure:nth-child(3) { transform: translateX(calc(-50% - 6px)) rotate(1deg); }
  }
}

/* "Your pet here" card, drawn in CSS to echo the Boots card layout */
.mock { height: 100%; border-radius: 10px; padding: 5%; background: linear-gradient(160deg, var(--fur), var(--orange)); filter: drop-shadow(3px 3px 0 var(--ink));
  display: flex; flex-direction: column; gap: 4%; container-type: inline-size; }
.mock > * { background: #fff; color: #1b1b1b; border-radius: 6px; }
.mock-top { display: flex; justify-content: space-between; align-items: baseline; padding: 3% 5%; font-size: 7cqi; }
.mock-top b { font-weight: 900; } .mock-top span { color: #c0392b; font-size: .8em; }
.mock-photo { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4%; text-align: center;
  background: repeating-linear-gradient(45deg, #fff1e4 0 10px, #fde4cc 10px 20px); border: 2px dashed var(--orange); font-size: 8cqi; color: #b84600; }
.mock-photo span { font-size: 2em; line-height: 1; }
.mock-move { display: flex; align-items: center; gap: 4%; padding: 2.5% 5%; font-size: 6cqi; }
.mock-move i { font-style: normal; color: var(--orange); font-size: .7em; } .mock-move b { flex: 1; } .mock-move span { font-weight: 800; }
.mock-flavour { margin: 0; padding: 3% 5%; font-size: 4.6cqi; font-style: italic; color: #5e5750; line-height: 1.3; }

/* Buttons */
.cta { text-align: center; margin: 28px 0 8px; }
.btn { display: inline-block; background: var(--orange); color: var(--ink); text-decoration: none; padding: 13px 28px; border-radius: 10px; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 18px; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn:hover:not(:disabled) { transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active:not(:disabled) { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.alt { background: var(--card); color: var(--text); font-size: 16px; padding: 10px 20px; }
.btn:focus-visible, .choice:focus-visible, .drop:focus-within { outline: 3px solid var(--orange); outline-offset: 3px; }

/* Steps */
.progress { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 18px; counter-reset: step; }
.progress li { flex: 1; margin: 0; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); counter-increment: step; }
.progress li::before { content: counter(step); display: flex; align-items: center; justify-content: center; margin: 0 auto 4px;
  width: 28px; height: 28px; line-height: 1; font-variant-numeric: tabular-nums; border-radius: 50%;
  border: 2px solid var(--line); background: var(--card); }
.progress li.on { color: var(--text); } .progress li.on::before { background: var(--orange); border-color: var(--ink); color: var(--ink); }
.progress li.done::before { content: '✓'; background: var(--ink); border-color: var(--ink); color: var(--fur); }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 8px 0 4px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choice { font: inherit; font-weight: 700; color: var(--text); background: var(--orange-soft); border: 3px solid var(--line); border-radius: 14px; padding: 18px 10px 14px;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; line-height: 1.25; }
.choice .icon { font-size: 40px; line-height: 1; }
.pet-icon { display: flex; align-items: flex-end; justify-content: center; height: 52px; gap: 2px; }
.pet-icon img { width: 52px; height: 52px; display: block; }
.pet-icon.pair img { width: 36px; height: 36px; }
.choices.two .choice { padding: 28px 10px 22px; font-size: 20px; } .choices.two .choice .icon { font-size: 52px; }
.choice:hover { border-color: var(--orange); }
.choice[aria-checked="true"] { border-color: var(--ink); background: var(--orange); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }

.nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.nav .btn:only-child { margin-right: auto; }

/* Uploads */
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 28px 16px; border: 3px dashed var(--orange);
  border-radius: 14px; background: var(--orange-soft); cursor: pointer; }
.drop.over { background: var(--code-bg); border-style: solid; }
.drop .icon { font-size: 40px; line-height: 1; } .drop small { color: var(--muted); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop.disabled { opacity: .5; cursor: not-allowed; }

.thumbs { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.thumbs li { margin: 0; position: relative; border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--orange-soft); }
.thumbs .img { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 34px; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .status { font-size: 12.5px; font-weight: 700; padding: 5px 8px; line-height: 1.3; background: var(--card); border-top: 2px solid var(--ink); }
.thumbs .status.ok { color: var(--good); } .thumbs .status.bad { color: var(--bad); font-weight: 600; }
.thumbs .remove { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ink); background: var(--card);
  color: var(--text); font: 700 16px/1 system-ui; cursor: pointer; }
.thumbs li.checking .img { opacity: .55; }
.thumbs li.checking .status::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%;
  border: 2px solid var(--orange); border-right-color: transparent; animation: spin .8s linear infinite; vertical-align: -1px; }
.thumbs li.rejected { border-color: var(--bad); }
.thumbs.final li { border-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .thumbs li.checking .status::before { animation: none; } .btn, .choice { transition: none; } }

.notice { background: var(--orange-soft); border-left: 4px solid var(--bad); border-radius: 8px; padding: 10px 14px; margin: 14px 0 0; font-size: 15px; }

footer { text-align: center; color: var(--muted); font-size: 14px; padding: 0 16px 40px; }

/* Flaticon images in place of emoji */
.tiles .icon-img { display: flex; align-items: flex-end; gap: 2px; height: 34px; }
.tiles .icon-img img { width: 34px; height: 34px; display: block; }
.tiles .icon-img.pair img { width: 30px; height: 30px; }

/* Easter egg: Horse > Good boy (see index.html) */
.ban-warning { display: flex; gap: 14px; align-items: center; margin: 0 4px 22px; padding: 14px 18px; background: var(--orange); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 14px; box-shadow: 5px 5px 0 var(--ink); transform: rotate(-1.2deg); }
.ban-warning b { display: block; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.ban-warning p { margin: 2px 0 4px; font-weight: 700; line-height: 1.35; }
.ban-warning cite { font-style: normal; font-weight: 800; font-size: 14px; }
.ban-warning cite::before { content: '\2014\00a0'; }
.ban-hammer { flex: none; font-size: 44px; line-height: 1; transform-origin: 80% 80%; animation: bonk 2.4s ease-in-out infinite; }
.ban-hammer img { width: 56px; height: 56px; display: block; }
@keyframes bonk { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-28deg); } 86% { transform: rotate(12deg); } 92% { transform: rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .ban-hammer { animation: none; } }

/* Four steps on the front page */
@media (min-width: 480px) { .tiles.four { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 720px) { .tiles.four { grid-template-columns: repeat(4, 1fr); } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Name step */
.name-field input { width: 100%; font: inherit; font-size: 24px; font-weight: 800; color: var(--text); background: var(--orange-soft);
  border: 3px solid var(--ink); border-radius: 12px; padding: 14px 18px; box-shadow: 4px 4px 0 var(--ink); }
.name-field input::placeholder { color: var(--muted); font-weight: 600; }
.name-field input:focus { outline: 3px solid var(--orange); outline-offset: 3px; }

/* One-liner per pet type on the photo step */
.quip { margin: -4px 0 8px; font-weight: 700; color: var(--orange-text); }
.quip:empty { display: none; }

/* Done: card preview and scouting report */
.scouting { display: flex; gap: 22px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 18px 0 8px; }
.card-preview { margin: 0; width: min(240px, 70vw); aspect-ratio: 750 / 1050; transform: rotate(-2deg); }
.card-preview .mock { background: linear-gradient(160deg, color-mix(in srgb, var(--type, #ff6601) 55%, #fff), var(--type, #ff6601)); }
.card-preview .mock-photo { padding: 0; overflow: hidden; border: 0; background: #ddd; }
.card-preview .mock-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mock-type { align-self: center; padding: 1.5% 6% !important; border-radius: 999px !important; font-size: 5cqi; font-weight: 800;
  background: var(--type, #ff6601) !important; color: #fff !important; }
.scout-report { max-width: 300px; }
.scout-title { display: inline-block; background: var(--ink); color: var(--fur); border-radius: 999px; font-size: 12px; font-weight: 800; padding: 2px 10px;
  letter-spacing: .06em; text-transform: uppercase; }
.scout-report p { margin: 8px 0 6px; font-size: 18px; line-height: 1.4; }
.scout-report small { color: var(--muted); font-size: 13px; }

/* Confetti on the done screen */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 10; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; animation: confetti-fall var(--d, 3s) cubic-bezier(.25, .6, .5, 1) var(--delay, 0s) forwards; }
@keyframes confetti-fall {
  to { transform: translate(var(--drift, 0), 110vh) rotate(var(--spin, 720deg)); opacity: .9; }
}

/* Flaticon icons that replaced the last emoji */
.choices.two .icon-img img { width: 60px; height: 60px; display: block; }
.drop .icon-img img { width: 52px; height: 52px; display: block; }
.big.icon-img { display: flex; justify-content: center; }
.big.icon-img img { width: 72px; height: 72px; display: block; }
.mock-icons { display: flex; gap: 2px; font-size: 1em; }
.mock-icons img { width: 1.6em; height: 1.6em; display: block; }
.thumbs .img .placeholder { width: 44px; height: 44px; object-fit: contain; opacity: .8; }
