:root {
    --bg: #0b0f14;
    --panel: #111827;
    --text: #e6effa;
    --muted: #9fb0c3;
    --accent: #6d5df6;
    --accent-2: #22c55e;
    --danger: #ef4444;
    --chip: #0b1220;
    --chip-border: #1f2937;
    --found-bg: #12351f;
    --found-border: #1f3b28;
    --missing-bg: #1f2937;
    --missing-border: #222c3d;
}
* { box-sizing: border-box; }
html,body { margin:0; background:var(--bg); color:var(--text); font-family:ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; }
a { color:#c7d2fe; text-decoration:none; }
.container { max-width:1200px; margin:0 auto; padding: 16px; }

/* Sticky nav */
.nav { position: sticky; top: 0; z-index: 50; background: #6b39ff; }
.nav-inner { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:10px 16px; }
.brand { display:flex; align-items:center; gap:10px; font-weight:700; }
.brand img { width:28px; height:28px; border-radius:6px; }
.menu { display:flex; gap:18px; align-items:center; }
.cta { background:#0b1220; color:var(--text); padding:8px 14px; border-radius:10px; border:1px solid rgba(255,255,255,.08); font-weight:600; }

/* Hero banner */
.hero { margin:16px 0 8px; padding:18px; border-radius:18px; background: linear-gradient(135deg, rgba(45,212,191,0.10), rgba(109,93,246,0.12)); border:1px solid #1f2937; }
.hero h1 { margin:0 0 8px; font-size:26px; }
.hero p { margin:0 0 12px; color:var(--muted); }
.btn { display:inline-block; padding:10px 14px; border-radius:10px; border:1px solid #1f2937; background:#0b1220; color:var(--text); font-weight:600; }
.btn.primary { background: #34d399; color:#072c24; border:none; }
.btn.ghost { background: transparent; }
.btn:hover { filter:brightness(1.05); }

/* Top meta + disclaimer */
.updated { color:var(--muted); font-size:13px; margin-top:6px; }
.disclaimer { color:var(--muted); font-size:13px; background: #0b1220; border:1px solid #1f2937; border-radius:10px; padding:10px; margin-top:10px; }

/* Set section */
.set { background: var(--panel); border:1px solid #1f2937; border-radius:16px; padding:16px; margin:18px 0 28px; }
.set-header { display:grid; grid-template-columns: 1fr auto; gap:8px; align-items:center; }
.set-title { margin:0; font-size:24px; }
.set-stats { color:var(--muted); font-size:14px; }
.progress { height:8px; background:#0f172a; border-radius:999px; overflow:hidden; grid-column:1/-1; }
.progress .bar { height:100%; background:linear-gradient(90deg, var(--accent-2), #2dd4bf); width:0%; }

.grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:16px; margin-top:12px; }
@media (max-width: 1280px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1024px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, 1fr); } }

/* Card tile */
.card { border:1px solid var(--missing-border); background: var(--missing-bg); border-radius:16px; overflow:hidden; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.card.is-found { background: var(--found-bg); border-color: var(--found-border); }
.thumb-wrap { position: relative; cursor: zoom-in; }
.thumb { display:block; width:100%; aspect-ratio: 14/10; object-fit: cover; background:#0b1220; }
.card.is-missing .thumb { filter: grayscale(1); opacity: .33; }
.badge { position:absolute; top:10px; left:10px; font-size:12px; padding:4px 10px; border-radius:999px; border:1px solid var(--danger); color:#ffffff; background: rgba(239,68,68,.85); font-weight:700; letter-spacing:.3px; }
.card.is-found .badge { border-color: var(--accent-2); color:#ffffff; background: rgba(34,197,94,.85); }
.meta { padding: 12px 12px 20px; }
.name { font-size:14px; margin-bottom:6px; }
.actions { display:flex; justify-content: space-between; align-items:center; gap:8px; }
.found-by { font-size:11px; color:#bbf7d0; background: rgba(34,197,94,.35); border:1px solid var(--accent-2); padding:3px 8px; border-radius:8px; }

/* Photos row: align center + tighter spacing */
.photos-row {
    display: flex;
    align-items: center;      /* vertical alignment */
    gap: 6px;                 /* tighter than 8px */
    flex-wrap: wrap;          /* wrap nicely on mobile */
    margin-top: 6px;
}

/* Label: slightly smaller + balanced line height */
.photos-row > span {
    font-size: 12px;
    font-weight: 600;
    line-height: 1;           /* keeps baseline aligned with chips */
    display: inline-block;    /* avoids baseline wobble */
    margin-right: 2px;        /* tiny nudge from first chip */
}

/* Chips: compact size, less curvature, perfect vertical centering */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
    display: inline-flex;     /* centers text vertically */
    align-items: center;
    justify-content: center;
    padding: 4px 10px;        /* was ~6px 10px */
    border-radius: 10px;      /* less rounded */
    font-size: 12px;          /* smaller text */
    line-height: 1;           /* same as label for clean alignment */
}

/* Active outline a touch slimmer to match the smaller chips */
.chip.is-active { outline-width: 1px; }

/* Extra-compact on very small screens */
@media (max-width: 480px) {
    .photos-row { gap: 5px; }
    .chips { gap: 5px; }
    .chip { padding: 3px 8px; border-radius: 9px; font-size: 11px; }
    .photos-row > span { font-size: 11.5px; }
}

/* Bottom CTA */
.cta-block { background: #0b1220; border:1px solid #1f2937; border-radius:24px; padding:20px; margin:20px 0; text-align:center; }
.cta-block h3 { margin:0 0 8px; font-size:22px; }
.cta-block p { margin:0 0 12px; color:var(--muted); }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.75); display:none; align-items:center; justify-content:center; padding:20px; z-index: 70; }
.modal.open { display:flex; }
.modal img { max-width: 95vw; max-height: 90vh; border-radius:12px; box-shadow: 0 8px 32px rgba(0,0,0,.6); }
.modal .close { position: absolute; top: 16px; right: 16px; background: rgba(0,0,0,.4); border:1px solid #334155; color:#e5e7eb; padding:8px 12px; border-radius:8px; cursor:pointer; }

/* Compact photos row & chips (keeps current look, mobile-friendly) */
.photos-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.photos-row > span {
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    display: inline-block;
    margin-right: 2px;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1;
    background: var(--chip);
    color: var(--text);
    border: 1px solid var(--chip-border);
    cursor: pointer;
}
.chip.is-active { outline: 1px solid rgba(109,93,246,.6); background-color: rgba(109,93,246,.6);}
.chip:focus-visible { outline: 1px solid rgba(109,93,246,.8); }
@media (max-width: 480px) {
    .photos-row { gap: 5px; }
    .chips { gap: 5px; }
    .chip { padding: 3px 8px; border-radius: 9px; font-size: 11px; }
    .photos-row > span { font-size: 11.5px; }
}


.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;
}

@media (max-width: 640px) {
    .set-header { grid-template-columns: 1fr; }
    .set-title { margin-bottom: 4px; }
    .set-stats { justify-self: start; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
    .set-stats .btn { margin-left: 0; }
}

/* Tiny (i) tooltip — CSS-only */
.info-dot {
    margin-left: 6px;
    opacity: .85;
    cursor: help;
    background: transparent;
    border: 0;
    color: inherit;
    font: inherit;
    line-height: 1;
    padding: 0;
    position: relative;
}
.info-dot:focus { outline: 2px solid rgba(255,255,255,.25); border-radius: 50%; }

.info-dot::after {
    content: attr(data-remark);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 140%;
    background: #0b1220;
    color: #e5e7eb;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.2;
    min-width: 160px;
    max-width: 260px;
    white-space: normal;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
    z-index: 5;
}
.info-dot::before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 128%;
    border: 6px solid transparent;
    border-top-color: #334155;       /* border line */
}
.info-dot:hover::after,
.info-dot:focus::after { opacity: 1; }

/* keep found-by row tidy and centered */
.credits-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }

/* vertically center the (i) dot next to the pill */
.info-dot {
    display: inline-flex; align-items: center; justify-content: center;
    height: 1.25rem; line-height: 1; margin-left: 6px;
    opacity: .9; cursor: help; background: transparent; border: 0; color: inherit; padding: 0;
}

/* subtle standout for the CTA; right-aligned in the same row */
.chip-cta { margin-left: auto; background: #0b1220; border: 1px solid #475569; color: #e2e8f0; }
.chip-cta:hover { filter: brightness(1.06); }