:root {
    color-scheme: light;
    --ink: #112b29;
    --muted: #526863;
    --background: #f4f6ef;
    --surface: #fff;
    --line: #d9e3d9;
    --accent: #b4f451;
    font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); line-height: 1.65; }
a { color: inherit; text-underline-offset: .22em; }
h1, h2, h3, p { margin: 0 0 .65em; }
h1, h2, h3 { line-height: 1.35; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner, .shell { max-width: 1160px; padding-inline: clamp(16px, 4vw, 44px); margin-inline: auto; }
.header-inner { min-height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 900; font-size: 1.28rem; text-decoration: none; white-space: nowrap; }
nav { display: flex; align-items: center; gap: clamp(8px, 2.2vw, 22px); font-size: .85rem; }
nav a { text-decoration: none; font-weight: 700; }
nav form { margin: 0; }
.nav-button { border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 8px; padding: 7px 10px; font: inherit; font-weight: 700; white-space: nowrap; }
.shell { min-height: calc(100vh - 145px); padding-block: clamp(20px, 4vw, 44px) 66px; }
.map-heading { font-size: clamp(1.42rem, 3vw, 2rem); }
.map-frame { position: relative; isolation: isolate; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.offers-map { height: clamp(320px, 68vh, 700px); background: #e1edf0; }
.map-message { position: absolute; z-index: 1000; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: max-content; max-width: calc(100% - 32px); margin: 0; padding: 12px 16px; border-radius: 8px; background: var(--surface); text-align: center; }
.catalog { margin-top: clamp(24px, 5vw, 46px); }
.section-heading h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.filters, .panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.filters { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr auto; gap: 12px; padding: 16px; align-items: end; }
label { display: grid; gap: 5px; font-weight: 700; font-size: .85rem; min-width: 0; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid #bccbc1; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-weight: 500; padding: 9px 10px; }
.button { display: inline-block; border: 0; background: var(--accent); color: var(--ink); padding: 10px 15px; border-radius: 8px; text-decoration: none; font: inherit; font-weight: 800; white-space: nowrap; cursor: pointer; }
.button:hover { background: #a3e93f; }
:focus-visible { outline: 3px solid #407a41; outline-offset: 3px; }
.results { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; }
.offer-card, .empty { border: 1px solid var(--line); background: white; padding: 18px; border-radius: 13px; }
.offer-card { text-decoration: none; }
.offer-card:hover { border-color: #538451; }
.offer-card h3 { margin-block: 12px; overflow-wrap: anywhere; }
.offer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .82rem; color: var(--muted); }
.tag { padding: 2px 8px; background: #eaf6e2; color: #285d30; border-radius: 5px; font-weight: 800; }
.empty { grid-column: 1 / -1; padding-block: 28px; text-align: center; }
.empty p, .muted { color: var(--muted); }
.empty p { margin-bottom: 0; }
.panel { margin: 0 auto 16px; padding: clamp(18px, 4vw, 32px); }
.detail { max-width: 800px; overflow-wrap: anywhere; }
.detail .offer-meta { margin-block: 16px; }
.narrow { max-width: 470px; }
.stack { display: grid; gap: 14px; margin-bottom: 16px; }
.stack button { justify-self: start; }
.back { display: inline-block; margin: 0 8px 8px 0; }
.location { padding: 18px; border-radius: 12px; background: #eef4e8; margin-top: 20px; }
.location form { display: inline-block; }
.manage-form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.wide { grid-column: 1 / -1; }
.manage-list { list-style: none; padding: 0; margin: 0; }
.manage-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.manage-list span { color: var(--muted); font-size: .8rem; }
.pagination { justify-content: center; margin-top: 16px; }
.pagination a { border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; }
.notice, .errors { padding: 10px 16px; border-radius: 8px; background: #def3dc; }
.errors { padding-left: 34px; background: #fbe7e1; }
.site-footer { color: var(--muted); border-top: 1px solid var(--line); }
.site-footer a { text-decoration: none; font-weight: 800; }
@media (max-width: 830px) {
    .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .query { grid-column: span 2; }
    .filters button { grid-column: 3; }
    .results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 550px) {
    .filters, .manage-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .query { grid-column: 1 / -1; }
    .filters button { grid-column: 2; }
    .results { grid-template-columns: minmax(0, 1fr); }
    .logo { font-size: 1.06rem; }
    .logo img { width: 26px; height: 26px; }
    .header-inner { gap: 7px; }
    nav { font-size: .76rem; }
}
