/* Findy v1, warm coral + mint on white. Simple, family-friendly. */
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&display=swap');

:root {
  --paper: #ffffff;
  --ink: #1a1a1a;          /* body, ~16:1 on white */
  --muted: #444444;        /* secondary/meta only */
  --coral: #ff6b4a;        /* one warm accent */
  --coral-press: #e85a3a;
  --mint: #1fb6a6;         /* success accent */
  --line: #ececec;         /* hairline borders */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20,20,20,.04), 0 6px 20px rgba(20,20,20,.06);
  --font: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--coral); text-decoration: none; }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
h2 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.muted { color: var(--muted); font-size: 15px; }

/* App chrome */
.app { max-width: 720px; margin: 0 auto; padding: 18px 16px 96px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: var(--ink); }
.brand .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--coral); display: inline-block; }

/* Search */
.search { position: relative; margin-bottom: 18px; }
.search input {
  width: 100%; font: inherit; font-size: 17px; padding: 14px 16px 14px 44px;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink);
}
.search input:focus { outline: none; border-color: var(--coral); }
.search .ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); opacity: .55; }

/* Cards / grid */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: transform .12s ease;
}
.card:active { transform: scale(.985); }
.card .thumb { width: 100%; aspect-ratio: 3 / 2; background: #f4f4f4; object-fit: cover; display: block; }
.card .thumb.empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 34px; }
.card .body { padding: 11px 12px 13px; }
.card .title { font-weight: 700; font-size: 17px; color: var(--ink); }
.card .meta { color: var(--muted); font-size: 14px; margin-top: 3px; display: flex; gap: 8px; align-items: center; }
.pill { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); }

/* Buttons */
.btn {
  font: inherit; font-size: 16px; font-weight: 700; border-radius: 12px; padding: 13px 18px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn-primary:active { background: var(--coral-press); }
.btn-mint { background: var(--mint); border-color: var(--mint); color: #fff; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.fab {
  position: fixed; right: 20px; bottom: 20px; width: 60px; height: 60px; border-radius: 50%;
  background: var(--coral); color: #fff; border: none; font-size: 30px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(255,107,74,.4); cursor: pointer; line-height: 1;
}

/* Detail page */
.hero { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); background: #f4f4f4; display: block; }
.hero.empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 46px; }
.photostrip { display: flex; gap: 9px; overflow-x: auto; padding: 4px 0 2px; }
.photostrip img { height: 74px; width: 74px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); flex: 0 0 auto; }
.field { margin: 16px 0; }
.field label { display: block; font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 17px; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 12px; background: var(--paper); color: var(--ink); resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--coral); }

/* Item list */
.items { list-style: none; margin: 8px 0 0; padding: 0; }
.items li { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); font-size: 17px; }
.items li .x { margin: -10px -6px -10px auto; color: var(--muted); cursor: pointer; font-size: 20px; border: none; background: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.additem { display: flex; gap: 9px; margin-top: 12px; }
.additem input { flex: 1; }

/* States */
.empty-state { text-align: center; color: var(--muted); padding: 56px 20px; }
.empty-state .big { font-size: 46px; margin-bottom: 10px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.toast.ok { background: var(--mint); }

/* Print sheet (A4 QR labels) */
@media screen { .printsheet { background: #f4f4f4; padding: 20px; } }
@page { size: A4; margin: 12mm; }
.sheet { width: 186mm; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.label {
  height: 62mm; padding: 6mm; border: 1px dashed #bbb; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; break-inside: avoid;
}
.label .qr { width: 38mm; height: 38mm; }
.label .qr svg { width: 100%; height: 100%; display: block; }
.label .lname { font-weight: 700; font-size: 15px; margin-top: 4px; }
.label .lcode { font-weight: 800; font-size: 26px; letter-spacing: .04em; }
@media print { .no-print { display: none !important; } .printsheet { background: #fff; padding: 0; } }
