/* Potefinder — the neighbourhood notice board for lost and found cats. */
:root {
  --paper: #f4ede2;
  --paper-2: #ebe1d1;
  --card: #fffaf2;
  --ink: #1d2a27;
  --ink-2: #4b5a55;
  --muted: #7a7166;
  --pine: #1f3b36;
  --pine-2: #2c524b;
  --lost: #d9612a;
  --lost-soft: #fbe1d2;
  --found: #2f7d57;
  --found-soft: #d8eedf;
  --line: #ddd0bd;
  --tape: rgba(240, 214, 150, .78);
  --shadow: 0 1px 0 rgba(29, 42, 39, .05), 0 10px 26px -14px rgba(29, 42, 39, .35);
  --radius: 14px;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--body); color: var(--ink); background: var(--paper); font-size: 16px; line-height: 1.5;
  background-image: radial-gradient(rgba(29, 42, 39, .045) 1px, transparent 1px);
  background-size: 18px 18px;
}
img { max-width: 100%; display: block; }
a { color: var(--pine-2); }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- header ---------- */
.pf-header { position: sticky; top: 0; z-index: 50; background: rgba(244, 237, 226, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.pf-header .wrap { display: flex; align-items: center; gap: 18px; height: 66px; }
.pf-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--pine); }
.pf-brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--pine); color: #fffaf2; display: grid; place-items: center; transform: rotate(-6deg); box-shadow: 3px 3px 0 var(--lost); }
.pf-brand-mark .ic { width: 22px; height: 22px; stroke-width: 2.2; }
.pf-brand b { font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.pf-brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: -3px; }
.pf-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.pf-nav a { text-decoration: none; color: var(--ink-2); font-weight: 600; padding: 8px 12px; border-radius: 999px; font-size: 15px; }
.pf-nav a:hover, .pf-nav a.is-active { background: var(--paper-2); color: var(--ink); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s; line-height: 1.1; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-pine { background: var(--pine); color: #fffaf2; box-shadow: 0 3px 0 #0f201d; }
.btn-lost { background: var(--lost); color: #fff; box-shadow: 0 3px 0 #9c3f14; }
.btn-found { background: var(--found); color: #fff; box-shadow: 0 3px 0 #1d5439; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { background: var(--card); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-link { background: none; border: 0; padding: 0; color: var(--pine-2); font-weight: 600; text-decoration: underline; cursor: pointer; }
.btn-danger { background: transparent; border: 1.5px solid #e4b7a6; color: #a2391a; }

/* ---------- hero ---------- */
.pf-hero { padding: 54px 0 34px; position: relative; overflow: hidden; }
.pf-hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.pf-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pine-2); }
.pf-eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--lost); }
.pf-hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 6vw, 74px); line-height: .95; letter-spacing: -.035em; margin: 14px 0 18px; color: var(--pine); }
.pf-hero h1 em { font-style: normal; color: var(--lost); position: relative; white-space: nowrap; }
.pf-hero h1 em::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: .06em; height: .14em; background: var(--lost-soft); z-index: -1; border-radius: 4px; }
.pf-hero p.lead { font-size: 19px; color: var(--ink-2); max-width: 560px; margin: 0 0 26px; }
.pf-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 580px; }
.pf-choice { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 18px; text-decoration: none; color: #fff; position: relative; overflow: hidden; transition: transform .2s ease; }
.pf-choice:hover { transform: translateY(-3px) rotate(-.4deg); }
.pf-choice b { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.pf-choice span { font-size: 14px; opacity: .9; }
.pf-choice .ic { position: absolute; right: 14px; top: 14px; width: 26px; height: 26px; opacity: .85; }
.pf-choice.lost { background: var(--lost); box-shadow: 0 5px 0 #9c3f14; }
.pf-choice.found { background: var(--found); box-shadow: 0 5px 0 #1d5439; }
.pf-stats { display: flex; gap: 24px; margin-top: 26px; color: var(--ink-2); font-size: 14px; flex-wrap: wrap; }
.pf-stats b { display: block; font-family: var(--display); font-size: 28px; color: var(--ink); font-weight: 800; letter-spacing: -.02em; }

/* the pinned poster collage */
.pf-collage { position: relative; height: 430px; }
.pf-collage .poster { position: absolute; width: 210px; background: var(--card); padding: 10px 10px 14px; border-radius: 6px; box-shadow: var(--shadow); }
.pf-collage .poster::before { content: ""; position: absolute; top: -10px; left: 50%; width: 70px; height: 22px; margin-left: -35px; background: var(--tape); transform: rotate(-3deg); }
.pf-collage .poster .ph { aspect-ratio: 4/3; border-radius: 4px; background: var(--paper-2); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.pf-collage .poster .ph img { width: 100%; height: 100%; object-fit: cover; }
.pf-collage .poster b { display: block; font-family: var(--display); font-weight: 800; margin-top: 8px; font-size: 17px; }
.pf-collage .poster small { color: var(--muted); font-size: 12px; }
.pf-collage .p1 { left: 4%; top: 18px; transform: rotate(-5deg); }
.pf-collage .p2 { right: 2%; top: 0; transform: rotate(4deg); }
.pf-collage .p3 { left: 30%; top: 215px; transform: rotate(1.5deg); z-index: 2; }
.pf-collage .stamp { position: absolute; top: 18px; right: 14px; }

/* ---------- stamps / pills ---------- */
.stamp { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; border-radius: 6px; border: 2px solid currentColor; background: rgba(255, 250, 242, .92); }
.stamp.lost { color: var(--lost); transform: rotate(-4deg); }
.stamp.found { color: var(--found); transform: rotate(3deg); }
.stamp.resolved { color: var(--pine-2); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--paper-2); color: var(--ink-2); }
.pill.ok { background: var(--found-soft); color: #1e5a3d; }
.pill.warn { background: #fbecc8; color: #7a5410; }
.pill.bad { background: var(--lost-soft); color: #8f3311; }

/* ---------- board ---------- */
.pf-board { padding: 10px 0 70px; }
.pf-board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 16px; flex-wrap: wrap; }
.pf-board-head h2 { font-family: var(--display); font-size: 34px; letter-spacing: -.02em; margin: 0; color: var(--pine); }
.pf-tabs { display: inline-flex; background: var(--paper-2); border-radius: 999px; padding: 4px; gap: 2px; }
.pf-tabs button { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; font-weight: 700; color: var(--ink-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.pf-tabs button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.pf-tabs .n { font-size: 12px; background: var(--paper); border-radius: 999px; padding: 1px 7px; }
.pf-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 18px; }
.pf-filters input[type="search"], .pf-filters select { border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; min-width: 0; }
.pf-filters input[type="search"] { flex: 1 1 220px; }
.pf-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; padding: 0; position: relative; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--pine); }
.swatch[data-c="sort"] { background: #1f1f1f; } .swatch[data-c="hvid"] { background: #fdfdfb; } .swatch[data-c="graa"] { background: #8d949a; }
.swatch[data-c="roed"] { background: #d9822f; } .swatch[data-c="creme"] { background: #ecd6ae; } .swatch[data-c="brun"] { background: #6b4630; }
.pf-view-toggle { margin-left: auto; }

.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px 18px; }
.cat-card { background: var(--card); border-radius: 10px; padding: 10px 10px 14px; box-shadow: var(--shadow); text-decoration: none; color: inherit; position: relative; transition: transform .2s ease, box-shadow .2s ease; display: flex; flex-direction: column; }
.cat-card:nth-child(3n+1) { transform: rotate(-.6deg); } .cat-card:nth-child(3n+2) { transform: rotate(.5deg); }
.cat-card:hover { transform: translateY(-4px) rotate(0); box-shadow: 0 18px 34px -18px rgba(29, 42, 39, .45); }
.cat-card::before { content: ""; position: absolute; top: -9px; left: 50%; width: 64px; height: 20px; margin-left: -32px; background: var(--tape); transform: rotate(-2deg); z-index: 2; }
.cat-card .ph { aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--paper-2); display: grid; place-items: center; color: var(--muted); position: relative; }
.cat-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.cat-card .ph .ic { width: 46px; height: 46px; opacity: .5; }
.cat-card .stamp { position: absolute; left: 10px; top: 10px; }
.cat-card h3 { font-family: var(--display); font-size: 20px; font-weight: 800; margin: 10px 0 2px; letter-spacing: -.01em; }
.cat-card .meta { color: var(--ink-2); font-size: 14px; }
.cat-card .where { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; margin-top: 6px; }
.pf-empty { text-align: center; padding: 60px 20px; color: var(--ink-2); background: var(--card); border-radius: var(--radius); border: 1.5px dashed var(--line); }
.pf-more { display: flex; justify-content: center; margin-top: 26px; }
.pf-map { height: 520px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); isolation: isolate; z-index: 0; }
.pf-dot { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.pf-dot.lost { background: var(--lost); } .pf-dot.found { background: var(--found); }
.pf-legend { display: flex; gap: 16px; font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.pf-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pf-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* ---------- how it works ---------- */
.pf-how { background: var(--pine); color: #f2eadd; padding: 60px 0; margin-top: 10px; }
.pf-how h2 { font-family: var(--display); font-size: 36px; letter-spacing: -.02em; margin: 0 0 26px; color: #fffaf2; }
.pf-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.pf-steps div { border-top: 2px solid rgba(255, 250, 242, .25); padding-top: 16px; }
.pf-steps div::before { counter-increment: step; content: "0" counter(step); font-family: var(--display); font-weight: 800; color: #f3a072; font-size: 15px; }
.pf-steps b { display: block; font-size: 18px; margin: 4px 0 6px; color: #fffaf2; }
.pf-steps p { margin: 0; color: #c9d6d1; font-size: 15px; }

/* ---------- panels / forms ---------- */
.pf-page { padding: 34px 0 80px; }
.pf-back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-weight: 600; margin-bottom: 16px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 18px; }
.panel h1, .panel h2 { font-family: var(--display); letter-spacing: -.02em; color: var(--pine); margin: 0 0 6px; }
.panel h1 { font-size: 34px; } .panel h2 { font-size: 24px; }
.panel .sub { color: var(--ink-2); margin: 0 0 18px; }
.form-narrow { max-width: 520px; margin: 0 auto; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.field > span small { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea { border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; font-weight: 400; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus, .pf-filters input:focus { outline: none; border-color: var(--pine-2); box-shadow: 0 0 0 3px rgba(44, 82, 75, .15); }
.field textarea { min-height: 96px; resize: vertical; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stack { display: grid; gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 15px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--pine); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; cursor: pointer; font-weight: 600; font-size: 14px; display: inline-flex; gap: 7px; align-items: center; }
.chip[aria-pressed="true"] { background: var(--pine); color: #fffaf2; border-color: var(--pine); }
.chip .swatch { width: 16px; height: 16px; border-width: 1.5px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.err { color: #a2391a; background: var(--lost-soft); border-radius: 10px; padding: 10px 12px; font-weight: 600; margin: 0; }
.ok-box { color: #1e5a3d; background: var(--found-soft); border-radius: 10px; padding: 10px 12px; font-weight: 600; margin: 0 0 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.auth-tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1.5px solid var(--line); }
.auth-tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1.5px; }
.auth-tabs button[aria-pressed="true"] { color: var(--pine); border-color: var(--lost); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- create wizard ---------- */
.wizard { display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: start; }
.wizard-steps { position: sticky; top: 92px; display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.wizard-steps li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 600; }
.wizard-steps li b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font-family: var(--display); color: var(--ink-2); flex: none; }
.wizard-steps li.is-current { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.wizard-steps li.is-current b { background: var(--pine); color: #fff; }
.wizard-steps li.is-done b { background: var(--found); color: #fff; }
.kind-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 600; }
.kind-banner.lost { background: var(--lost-soft); color: #7f2d0d; }
.kind-banner.found { background: var(--found-soft); color: #1a4f36; }

.dropzone { border: 2px dashed var(--line); border-radius: 16px; padding: 28px; text-align: center; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--pine-2); background: #fbf7ef; }
.dropzone .ic { width: 40px; height: 40px; color: var(--pine-2); margin: 0 auto 8px; }
.dropzone b { display: block; font-size: 17px; }
.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.photo { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: grid; gap: 8px; }
.photo .frame { position: relative; border-radius: 8px; overflow: hidden; background: #222; aspect-ratio: 4/3; display: grid; place-items: center; }
.photo .frame img { width: 100%; height: 100%; object-fit: contain; }
.photo .frame .box { position: absolute; border: 2.5px solid #ffd45c; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45); border-radius: 4px; pointer-events: none; }
.photo .row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.photo .tag { font-size: 12px; font-weight: 700; color: var(--found); }

/* crop modal */
.modal { position: fixed; inset: 0; z-index: 200; background: rgba(20, 28, 26, .72); display: grid; place-items: center; padding: 16px; }
.modal-card { background: var(--card); border-radius: 18px; padding: 20px; width: min(920px, 100%); max-height: calc(100dvh - 32px); overflow: auto; }
.modal-card h2 { font-family: var(--display); margin: 0 0 4px; color: var(--pine); }
.crop-stage { position: relative; margin: 14px auto; user-select: none; touch-action: none; width: fit-content; max-width: 100%; cursor: crosshair; }
.crop-stage img { max-height: min(62vh, 620px); width: auto; max-width: 100%; display: block; border-radius: 8px; pointer-events: none; }
.crop-stage .box { position: absolute; border: 3px solid #ffd45c; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5); border-radius: 6px; cursor: move; }
.crop-stage .box::after { content: "Katten"; position: absolute; top: -26px; left: -3px; background: #ffd45c; color: #3a2a00; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 6px 6px 6px 0; }
.crop-stage .handle { position: absolute; width: 18px; height: 18px; background: #ffd45c; border: 2px solid #3a2a00; border-radius: 50%; right: -10px; bottom: -10px; cursor: nwse-resize; }

.pin-map { height: 340px; border-radius: 12px; border: 1px solid var(--line); isolation: isolate; z-index: 0; }

/* ---------- detail ---------- */
.detail { display: grid; grid-template-columns: 1.1fr .9fr; gap: 26px; align-items: start; }
.gallery .main { border-radius: 14px; overflow: hidden; background: #222; aspect-ratio: 4/3; position: relative; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery .thumbs button { width: 74px; height: 74px; border-radius: 10px; overflow: hidden; padding: 0; border: 2px solid transparent; cursor: pointer; background: var(--paper-2); }
.gallery .thumbs button[aria-pressed="true"] { border-color: var(--pine); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery .noimg { aspect-ratio: 4/3; border-radius: 14px; background: var(--paper-2); display: grid; place-items: center; color: var(--muted); }
.detail h1 { font-family: var(--display); font-size: clamp(34px, 4vw, 48px); letter-spacing: -.03em; line-height: 1; margin: 12px 0 8px; color: var(--pine); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 16px 0; font-size: 15px; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }
.ai-note { background: #f1f4ef; border: 1px solid #d6e2d8; border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--ink-2); }
.ai-note b { display: flex; align-items: center; gap: 6px; color: var(--pine); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.ai-note ul { margin: 6px 0 0; padding-left: 18px; }
.mini-map { height: 220px; border-radius: 12px; margin-top: 14px; isolation: isolate; z-index: 0; border: 1px solid var(--line); }
.privacy { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin-top: 12px; }

/* ---------- owner ---------- */
.mine-list { display: grid; gap: 14px; }
.mine-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-decoration: none; color: inherit; transition: box-shadow .15s; }
.mine-row:hover { box-shadow: var(--shadow); }
.mine-row .ph { width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: var(--paper-2); display: grid; place-items: center; color: var(--muted); }
.mine-row .ph img { width: 100%; height: 100%; object-fit: cover; }
.mine-row h3 { margin: 4px 0; font-family: var(--display); font-size: 21px; }
.mine-row .badges { display: flex; gap: 6px; flex-wrap: wrap; }
.progress { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #fff7e6; border: 1px solid #f0dcae; font-weight: 600; color: #6b4b0c; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #f0dcae; border-top-color: var(--lost); animation: spin 0.9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.match { display: grid; grid-template-columns: 150px 1fr; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.match + .match { margin-top: 14px; }
.match .ph { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--paper-2); display: grid; place-items: center; color: var(--muted); }
.match .ph img { width: 100%; height: 100%; object-fit: cover; }
.match h3 { margin: 0; font-family: var(--display); font-size: 20px; }
.score { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.score .bar { flex: 1; height: 10px; background: var(--paper-2); border-radius: 999px; overflow: hidden; max-width: 260px; }
.score .bar i { display: block; height: 100%; background: var(--found); border-radius: 999px; }
.score .bar i.mid { background: #d9a22a; } .score .bar i.low { background: #b9ab98; }
.score b { font-family: var(--display); font-size: 22px; }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; padding: 0; list-style: none; }
.reasons li { font-size: 13px; padding: 2px 9px; border-radius: 999px; background: var(--paper); color: var(--ink-2); }
.reasons li.plus { background: var(--found-soft); color: #1e5a3d; }
.reasons li.minus { background: var(--lost-soft); color: #8f3311; }
.contact-msg { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.contact-msg + .contact-msg { margin-top: 10px; }
.contact-msg p { white-space: pre-line; margin: 8px 0 0; }
.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.side-card { position: sticky; top: 92px; }

footer.pf-footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 14px; }
footer.pf-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer.pf-footer a { color: var(--ink-2); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--pine); color: #fffaf2; padding: 12px 18px; border-radius: 999px; font-weight: 600; z-index: 300; box-shadow: var(--shadow); }

@media (max-width: 960px) {
  .pf-hero .wrap { grid-template-columns: 1fr; }
  .pf-collage { display: none; }
  .pf-steps { grid-template-columns: 1fr 1fr; }
  .wizard { grid-template-columns: 1fr; }
  .wizard-steps { position: static; grid-template-columns: repeat(4, 1fr); }
  .wizard-steps li { flex-direction: column; text-align: center; font-size: 12px; padding: 8px 4px; gap: 4px; }
  .detail, .two-col { grid-template-columns: 1fr; }
  .side-card { position: static; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 28px); }
  .pf-header .wrap { height: 58px; gap: 8px; }
  .pf-brand small { display: none; }
  .pf-nav a { padding: 7px 9px; font-size: 14px; }
  .pf-nav .hide-sm { display: none; }
  .pf-choices { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .pf-grid { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .cat-card h3 { font-size: 17px; }
  .panel { padding: 18px; }
  .mine-row { grid-template-columns: 72px 1fr; }
  .mine-row .ph { width: 72px; height: 72px; }
  .mine-row > :last-child { grid-column: 1 / -1; }
  .match { grid-template-columns: 1fr; }
  .match .ph { aspect-ratio: 4/3; }
  .pf-steps { grid-template-columns: 1fr; }
  .pf-view-toggle { margin-left: 0; }
}
