:root {
    --ink: #1c2833;
    --paper: #f6f8fa;
    --white: #ffffff;
    --tag: #f4b942;
    --teal: #0f766e;
    --red: #b42318;
    --grey: #5b6770;
    --line: #d9e0e5;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "DM Sans", "Segoe UI", Arial, sans-serif; background: var(--paper); color: var(--ink); line-height: 1.6; }
h1, h2, h3, .logo, .badge, .keytag .big { font-family: "Bricolage Grotesque", "DM Sans", sans-serif; }
h1 { font-size: 2.3rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 12px; }
h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 16px; }
h3 { margin: 6px 0; font-weight: 700; }
a { color: var(--teal); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.container { width: 92%; max-width: 1050px; margin: 0 auto; }
.narrow { max-width: 720px; }
.section { padding: 36px 0; }

/* Header */
.site-header { background: var(--ink); position: sticky; top: 0; z-index: 10; }
.nav { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.logo { color: var(--white); font-weight: 800; font-size: 1.4rem; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo svg { transform: rotate(-12deg); }
nav a { color: #d6dde2; text-decoration: none; margin-left: 20px; }
nav a:hover { color: var(--white); }
nav a.btn-small { background: var(--tag); color: var(--ink); padding: 7px 14px; border-radius: 6px; font-weight: 700; }
.menu-btn { display: none; background: none; border: 1px solid #55636d; color: var(--white); padding: 6px 12px; border-radius: 6px; cursor: pointer; }

/* Buttons */
.btn { display: inline-block; background: var(--teal); color: var(--white); border: 2px solid var(--teal); padding: 11px 22px; border-radius: 6px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: #0b5c56; border-color: #0b5c56; }
.btn-outline { background: transparent; color: var(--teal); }
.btn-outline:hover { color: var(--white); }
:focus-visible { outline: 3px solid var(--tag); outline-offset: 2px; }

/* Hero */
.hero { background: var(--white); border-bottom: 1px solid var(--line); padding: 50px 0; }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.hero p { color: var(--grey); font-size: 1.1rem; margin-bottom: 22px; }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.hero-brand svg { background: var(--ink); border-radius: 14px; padding: 8px; }
.hero-brand span { font-family: "Bricolage Grotesque", sans-serif; font-size: 1.6rem; font-weight: 800; color: var(--teal); }
.keytag { background: var(--tag); border-radius: 18px 18px 18px 60px; padding: 50px 28px 28px; text-align: center; max-width: 270px; margin: 0 auto; position: relative; transform: rotate(3deg); box-shadow: 0 6px 0 #d49a22; }
.keytag .hole { width: 22px; height: 22px; background: var(--white); border-radius: 50%; position: absolute; top: 16px; left: 50%; margin-left: -11px; }
.keytag .big { font-size: 3.4rem; font-weight: 800; line-height: 1; margin: 4px 0; }
.keytag p { margin: 0; font-size: 0.95rem; color: var(--ink); }

/* Filters */
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid #b8c3cb; border-radius: 6px; background: var(--white); width: 100%; }
.filters input { flex: 1; min-width: 200px; width: auto; }
.filters select { width: auto; }
.count { margin: 14px 0; color: var(--grey); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; }
.card:hover { border-color: var(--teal); transform: translateY(-2px); transition: 0.15s; }
.card img, .no-img { width: 100%; height: 170px; object-fit: cover; }
.no-img { background: #e6ecef; color: var(--grey); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.card-body { padding: 14px; }
.meta { color: var(--grey); font-size: 0.9rem; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; color: var(--white); margin-right: 4px; }
.badge.lost { background: var(--red); }
.badge.found { background: var(--teal); }
.badge.returned { background: var(--grey); }
.empty { background: var(--white); border: 1px dashed #b8c3cb; padding: 24px; border-radius: 8px; color: var(--grey); grid-column: 1 / -1; }
.link { display: inline-block; margin-top: 14px; font-weight: 700; }
.steps { padding-left: 22px; }
.steps li { margin-bottom: 10px; max-width: 650px; }

/* Forms */
.toggle { display: flex; margin-bottom: 18px; }
.toggle input { display: none; }
.toggle label { flex: 1; text-align: center; padding: 11px; border: 2px solid var(--ink); cursor: pointer; font-weight: 700; background: var(--white); }
.toggle label:first-of-type { border-radius: 8px 0 0 8px; }
.toggle label:last-of-type { border-radius: 0 8px 8px 0; border-left: 0; }
.toggle input:checked + label { background: var(--ink); color: var(--tag); }
.form { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.form label { display: block; font-weight: 700; margin-bottom: 14px; }
.form label input, .form label select, .form label textarea { margin-top: 5px; font-weight: 400; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.preview { max-width: 200px; border-radius: 8px; margin-bottom: 14px; border: 1px solid var(--line); }
.error { color: var(--red); font-weight: 700; margin-bottom: 10px; }
.ok { background: #e3f4ef; border: 1px solid #9fd5c7; padding: 12px; border-radius: 8px; margin-top: 12px; }
input.invalid, select.invalid, textarea.invalid { border-color: var(--red); }

/* Popup */
.modal { position: fixed; inset: 0; background: rgba(28,40,51,0.6); display: flex; align-items: flex-start; justify-content: center; padding: 30px 14px; overflow-y: auto; z-index: 50; }
.modal-box { background: var(--white); border-radius: 12px; max-width: 760px; width: 100%; padding: 24px; position: relative; }
.close { position: absolute; top: 10px; right: 14px; background: none; border: 0; font-size: 2rem; cursor: pointer; color: var(--grey); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 8px; }
.detail-img { width: 100%; height: 260px; object-fit: cover; border-radius: 10px; }
.info { width: 100%; margin-top: 12px; border-collapse: collapse; }
.info td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.info td:first-child { color: var(--grey); width: 90px; }
.contact-box { margin-top: 24px; padding-top: 18px; border-top: 2px solid var(--line); }
.small-btn { margin-top: 10px; background: none; border: 1px solid var(--ink); border-radius: 6px; padding: 6px 12px; cursor: pointer; font: inherit; }

/* Footer */
.site-footer { background: var(--ink); color: #b5c0c7; padding: 24px 0; margin-top: 40px; font-size: 0.95rem; }
.footer-link { color: #b5c0c7; font-size: 0.85rem; }

@media (max-width: 760px) {
    .hero-grid, .detail-grid, .row { grid-template-columns: 1fr; }
    .menu-btn { display: block; }
    #menu { display: none; width: 100%; flex-direction: column; padding-top: 10px; }
    #menu.open { display: flex; }
    nav a { margin: 8px 0; }
    .nav { flex-wrap: wrap; }
    h1 { font-size: 1.7rem; }
}
