:root {
    --bg: #f6f8f5;
    --panel: #ffffff;
    --text: #17231d;
    --muted: #5f6f66;
    --line: #dfe7df;
    --strong-line: #9eb2a5;
    --green: #20894f;
    --green-dark: #176c3b;
    --red: #c24132;
    --yellow: #d99a1b;
    --shadow: 0 18px 45px rgba(31, 54, 39, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
}

a {
    color: var(--green-dark);
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header,
.site-footer,
.site-main {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 0;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: var(--text);
}

.brand-logo {
    display: block;
    width: min(260px, 48vw);
    height: auto;
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 13px;
    background: var(--green);
    color: #fff;
    font-weight: 800;
    font-size: 24px;
}

.brand small {
    display: block;
    color: var(--muted);
}

.brand-logo + span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.hero {
    display: grid;
    gap: 18px;
    padding: 42px 0 24px;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1;
}

.hero-logo {
    display: block;
    width: min(320px, 82vw);
    height: auto;
}

.hero p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 22px;
}

.search-panel,
.place-card,
.add-card,
.coming-soon-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.search-panel {
    display: grid;
    gap: 22px;
    padding: 28px;
    margin-bottom: 22px;
}

.search-panel__header {
    display: grid;
    gap: 8px;
}

.search-panel__header h2 {
    margin: 0;
    font-size: 32px;
    line-height: 1.1;
}

.search-panel__header p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.45;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 22px;
}

.stat-card {
    display: grid;
    gap: 10px;
    min-height: 148px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.stat-card__label {
    color: var(--muted);
    font-size: 17px;
    font-weight: 800;
}

.stat-card__value {
    color: var(--text);
    font-size: 46px;
    line-height: 1;
}

.stat-card__helper {
    color: var(--muted);
    font-size: 16px;
    font-weight: 700;
}

.stat-card--open {
    border-color: rgba(32, 137, 79, 0.35);
    background: #f0fbf4;
}

.stat-card--open .stat-card__value {
    color: var(--green);
}

.search-form {
    display: grid;
    gap: 18px;
}

.search-main-field {
    display: grid;
    gap: 10px;
}

.search-label,
.search-filters span {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
}

.search-control-row,
.search-row,
.filter-row,
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.search-control-row {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
}

.search-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(130px, 0.6fr) minmax(150px, 0.7fr) minmax(170px, 0.8fr);
}

input,
select,
textarea {
    width: 100%;
    min-height: 56px;
    padding: 14px 16px;
    border: 2px solid #c4d2c8;
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 19px;
}

input:focus,
select:focus,
textarea:focus {
    outline: 4px solid rgba(32, 137, 79, 0.18);
    border-color: var(--green);
}

textarea {
    min-height: 110px;
}

.search-input {
    min-height: 64px;
    border-color: var(--strong-line);
    font-size: 22px;
    font-weight: 700;
}

.search-input::placeholder {
    color: #6e7d73;
    font-weight: 500;
}

.search-button,
.clear-search-button {
    min-height: 64px;
    min-width: 140px;
}

.category-select,
.subcategory-select {
    min-height: 58px;
}

.search-filters > label {
    flex: 1 1 240px;
}

.search-helper {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.45;
}

.search-status {
    min-height: 28px;
    color: var(--green-dark);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.45;
}

.status-message {
    color: var(--muted);
    font-size: 18px;
    font-weight: 700;
}

.is-disabled {
    opacity: 0.7;
}

.filter-row > * {
    flex: 1 1 180px;
}

.checkbox-line {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1 1 220px;
    min-height: 58px;
    font-size: 18px;
    font-weight: 700;
}

.checkbox-line input {
    width: 22px;
    min-height: 22px;
    accent-color: var(--green);
}

.open-now-filter {
    padding-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 14px 20px;
    border: 0;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--green);
    color: #fff;
}

.btn-primary:hover {
    background: var(--green-dark);
}

.btn-dark {
    background: #21362b;
    color: #ffffff;
}

.btn-dark:hover {
    background: #14241b;
}

.btn-light {
    background: #e8efe9;
    color: var(--text);
}

.btn-warning {
    background: #fff5d6;
    color: #744b00;
}

.places-grid {
    display: grid;
    gap: 14px;
    margin: 22px 0;
}

.results-loading,
.results-empty,
.results-error {
    margin: 22px 0;
    padding: 22px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    font-size: 20px;
    font-weight: 800;
}

.results-loading {
    color: var(--green-dark);
}

.results-empty {
    color: #6a5315;
    background: #fff8df;
}

.results-error {
    color: #8a2d23;
    background: #fff0ec;
}

.results-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 10px;
}

.results-info {
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
}

.results-page-info {
    margin-top: 5px;
    color: var(--muted);
    font-size: 16px;
    font-weight: 700;
}

.limit-select {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-weight: 800;
}

.limit-select select {
    width: auto;
    min-width: 92px;
    min-height: 48px;
    padding: 10px 12px;
    font-size: 17px;
}

.place-card {
    display: grid;
    gap: 14px;
    padding: 20px;
}

.place-card h3 {
    margin: 0;
    font-size: 26px;
    line-height: 1.15;
}

.place-meta {
    color: var(--muted);
    font-size: 17px;
    font-weight: 700;
}

.place-card__top {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
}

.place-address,
.place-hours {
    font-size: 18px;
    line-height: 1.4;
}

.place-hours {
    font-weight: 800;
}

.empty-state {
    font-size: 20px;
    font-weight: 800;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 900;
    white-space: nowrap;
}

.status-badge--open {
    background: #e5f8ed;
    color: var(--green-dark);
}

.status-badge--closed {
    background: #ffe8e3;
    color: var(--red);
}

.status-badge--unknown {
    background: #fff4d5;
    color: #755000;
}

.place-extra {
    display: none;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: #f5f8f5;
    color: var(--muted);
    line-height: 1.45;
}

.place-card.is-expanded .place-extra {
    display: grid;
}

.place-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin: 18px 0 28px;
}

.pagination__button {
    min-width: 52px;
    min-height: 52px;
    padding: 12px 16px;
    border: 2px solid #c4d2c8;
    border-radius: 12px;
    background: #ffffff;
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}

.pagination__button:hover:not(:disabled) {
    border-color: var(--green);
    color: var(--green-dark);
}

.pagination__button--active {
    border-color: var(--green);
    background: var(--green);
    color: #ffffff;
}

.pagination__button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.pagination__ellipsis,
.pagination__summary {
    color: var(--muted);
    font-size: 18px;
    font-weight: 800;
}

.pagination__summary {
    flex-basis: 100%;
    text-align: center;
}

.add-card,
.coming-soon-card {
    padding: 22px;
    margin: 22px 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.full {
    grid-column: 1 / -1;
}

.muted,
.disclaimer {
    color: var(--muted);
    line-height: 1.5;
}

.site-footer {
    margin-top: auto;
    padding: 28px 0;
    color: var(--muted);
}

.site-footer nav {
    display: flex;
    gap: 16px;
}

@media (max-width: 760px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .hero {
        padding-top: 26px;
    }

    .hero p {
        font-size: 19px;
    }

    .search-panel {
        padding: 18px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-height: 112px;
    }

    .search-control-row,
    .search-actions,
    .results-toolbar {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .search-input,
    .search-button,
    .clear-search-button,
    .btn {
        width: 100%;
    }

    .limit-select {
        align-items: stretch;
        flex-direction: column;
    }

    .limit-select select {
        width: 100%;
    }

    .pagination {
        justify-content: stretch;
    }

    .pagination__button {
        flex: 1 1 42%;
    }

    .open-now-filter {
        padding-top: 0;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}
