/* =============================================================================
   PEI Tourism Explorer — stylesheet (rusty red theme)
   Palette: rust #b04a17 / deep rust #8f3a10 / warm cream / amber accents
   ============================================================================= */

:root {
    --bg:          #f7f1e8;
    --surface:     #fffdf9;
    --ink:         #35251b;
    --muted:       #8a6d5c;
    --brand:       #b04a17;
    --brand-dark:  #8f3a10;
    --brand-deep:  #6e2c0c;
    --accent:      #dd9333;
    --chip-bg:     #f8e9db;
    --chip-ink:    #9c4312;
    --line:        #e9d9c6;
    --radius:      14px;
    --shadow:      0 1px 2px rgba(84, 45, 22, .07), 0 8px 24px rgba(84, 45, 22, .08);
    --shadow-hover: 0 2px 4px rgba(84, 45, 22, .09), 0 14px 32px rgba(84, 45, 22, .14);
    --danger:      #a13026;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.55;
}

::selection { background: #f0cbaa; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a { color: var(--brand); }

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ------------------------------------------------------------------ header */

.site-header {
    background: linear-gradient(135deg, var(--brand-deep) 0%, #a4440f 55%, #c05a1d 100%);
    color: #fff;
    padding: 44px 0 40px;
    border-bottom: 4px solid var(--accent);
}

.brand {
    margin: 0 0 10px;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    opacity: .88;
}

.brand::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 8px;
    vertical-align: 1px;
}

.site-header h1 {
    margin: 0 0 8px;
    font-size: clamp(1.7rem, 3.5vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -.01em;
}

.tagline {
    margin: 0;
    font-size: 1rem;
    opacity: .9;
}

/* ------------------------------------------------------------------ layout */

main { padding: 28px 0 40px; }

/* -------------------------------------------------------------- filter bar */

.filters {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.field > label,
.filters .group-label {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.field input[type="search"],
.field select {
    font: inherit;
    color: var(--ink);
    background: #fdfaf4;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 12px;
    min-width: 170px;
}

.field input[type="search"] { min-width: 230px; }

/* multi-feature checkbox group in the filter bar */
.filters .field-wide { flex: 1 1 100%; }

.filter-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 14px;
    background: #fdfaf4;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 13px;
}

.fcheck {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .88rem;
    color: var(--ink);
    cursor: pointer;
    white-space: nowrap;
}

.fcheck input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--brand);
}

.field input:focus,
.field select:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 3px rgba(176, 74, 23, .16);
}

.btn {
    font: inherit;
    font-weight: 600;
    border: 0;
    border-radius: 10px;
    padding: 10px 18px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background .15s ease, transform .05s ease;
}

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

.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line);
}

.btn-ghost:hover { color: var(--ink); border-color: var(--muted); }

/* compact table/toolbar buttons (Edit / Delete rows in the admin lists) */
.btn-sm {
    padding: 5px 12px;
    font-size: .82rem;
    border-radius: 8px;
}

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

.btn-danger:hover { background: #86261d; }
.btn-danger:active { transform: translateY(1px); }

/* ------------------------------------------------------------- region pills */

.region-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 6px;
}

/* ---------------------------------------------------------- PEI region map */

.map-section {
    margin: 4px 0 10px;
    padding: 20px 22px 8px;
    background: linear-gradient(180deg, #fdf6ec, #f8ecdb);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.map-head h2 { margin: 0 0 4px; font-size: 1.3rem; }

.map-head p {
    margin: 0 0 12px;
    font-size: .92rem;
    color: var(--muted);
}

.pei-svg {
    display: block;
    width: 100%;
    max-width: 640px;
    height: auto;
    margin: 0 auto;
}

.pei-svg .water-bg { fill: #dbe4e1; }

.pei-svg .island {
    fill: #f1e5d0;
    stroke: none;
}

.pei-svg .island-edge {
    fill: none;
    stroke: #b3855c;
    stroke-width: 2;
    stroke-linejoin: round;
}

.pei-svg .zshape {
    stroke: #ffffff;
    stroke-width: 1.4;
    stroke-linejoin: round;
    cursor: pointer;
    transition: fill-opacity .15s ease, opacity .15s ease;
}

.pei-svg a.pz:hover .zshape,
.pei-svg a.pz:focus .zshape { fill-opacity: .82; }

/* dim the other zones while one region is filtered */
.pei-svg.has-active .zshape { fill-opacity: .3; }
.pei-svg.has-active a.pz.active .zshape,
.pei-svg.has-active a.pz:hover .zshape { fill-opacity: .82; }

.pei-svg .pbadge circle {
    transition: stroke-width .15s ease;
}

.pei-svg a.pblink { cursor: pointer; }

.pei-svg a.pblink:hover circle,
.pei-svg a.pblink:focus circle { stroke-width: 3.5; }

.pei-svg .pbadge text {
    font-size: 12px;
    font-weight: 700;
    fill: var(--ink);
    pointer-events: none;
}

.pei-svg .plabel {
    font-size: 11px;
    font-weight: 700;
    fill: #55341f;
}

.pei-svg .water-label {
    font-size: 10px;
    font-style: italic;
    fill: #7d918d;
}

.pei-svg .pleader {
    stroke: #a98b6e;
    stroke-width: 1;
    stroke-dasharray: 3 3;
    fill: none;
}

/* legend under the map: live counts per feature, chips toggle the filter */
.map-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 12px 2px 14px;
    border-top: 1px dashed var(--line);
}

.legend-total {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-right: 4px;
}

.legend-chip {
    font-size: .8rem;
    font-weight: 600;
    color: var(--brand);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 12px;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.legend-chip:hover { background: var(--chip-bg); }

.legend-chip strong { color: var(--ink); margin-left: 2px; }

.legend-chip.active,
.legend-chip.active:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.legend-chip.active strong { color: #fff; }

@media (max-width: 640px) {
    .map-section { padding: 16px 14px 4px; }
    .pei-svg .plabel { font-size: 13px; }
}

.pill {
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--brand);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.pill:hover { background: var(--chip-bg); border-color: #e3c7a8; }

.pill.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

/* ----------------------------------------------------------- result summary */

.summary {
    margin: 14px 2px 22px;
    color: var(--muted);
    font-size: .95rem;
}

.summary strong { color: var(--ink); }

/* ------------------------------------------------------------ region blocks */

.region {
    margin: 0 0 34px;
    scroll-margin-top: 16px;
}

.region-head { margin-bottom: 14px; }

.region-head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 4px;
    font-size: 1.35rem;
    letter-spacing: -.01em;
}

.region-head h2::before {
    content: "";
    width: 5px;
    height: 22px;
    border-radius: 3px;
    background: var(--brand);
    flex: none;
}

.count-badge {
    font-size: .74rem;
    font-weight: 700;
    color: var(--chip-ink);
    background: var(--chip-bg);
    border-radius: 999px;
    padding: 3px 10px;
    letter-spacing: .04em;
}

.region-desc {
    margin: 0 0 6px 15px;
    color: var(--muted);
    font-size: .92rem;
    max-width: 70ch;
}

/* ------------------------------------------------------------------- cards */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
    gap: 16px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.chip {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--chip-ink);
    background: var(--chip-bg);
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.rating {
    font-weight: 700;
    font-size: .9rem;
    white-space: nowrap;
}

.rating .star { color: var(--accent); }
.rating small { color: var(--muted); font-weight: 500; }
.rating.unrated { color: var(--muted); font-weight: 500; font-size: .82rem; }

.card h3 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.3;
}

.card .meta {
    margin: 0;
    font-size: .85rem;
    color: var(--muted);
}

.card .desc {
    margin: 2px 0 0;
    font-size: .92rem;
    color: #51402f;
}

/* address / gps / website rows on the card */
.card .contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px dashed var(--line);
    font-size: .84rem;
}

.card .contact .addr,
.card .contact .gps,
.card .contact .tel,
.card .contact .web {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    line-height: 1.35;
}

.card .contact svg { flex: 0 0 auto; color: var(--brand); }

.card .contact a {
    color: var(--brand-dark);
    text-decoration: none;
    font-weight: 500;
}

.card .contact a:hover { text-decoration: underline; }
.card .contact small { color: var(--muted); font-weight: 400; }

/* feature chips on the card (child/pet friendly, adults only, seasons) */
.card .features {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 2px;
}

.feat {
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.4;
    color: #9c4312;
    background: #f8e9db;
    border: 1px solid #eed7bd;
    border-radius: 999px;
    padding: 2px 9px;
    white-space: nowrap;
}

.feat.feat-adult {
    color: #7c3c0c;
    background: #f5ddbd;
    border-color: #e8c493;
}

.feat.feat-open {
    color: #44603a;
    background: #eaf0e0;
    border-color: #d4dfc3;
}

.feat.feat-closed {
    color: #7d7268;
    background: #f1ebe2;
    border-color: #e0d6c6;
}

/* ------------------------------------------------------------ empty / error */

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 42px 26px;
    text-align: center;
    color: var(--muted);
}

.panel.empty { border-style: dashed; }

.panel h2 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 1.25rem;
}

.panel p { margin: 0 0 18px; }

.panel.error { border-top: 4px solid var(--danger); }

.panel .hint {
    text-align: left;
    display: inline-block;
    margin: 0 auto 18px;
    padding-left: 20px;
}

.panel .hint li { margin-bottom: 6px; }

.panel code {
    background: #f4ecdf;
    border-radius: 5px;
    padding: 1px 6px;
    font-size: .88em;
}

/* ------------------------------------------------------------------- footer */

.site-footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .85rem;
    padding: 22px 0 34px;
    background: #f4ecdf;
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
}

/* -------------------------------------------------------------- small screens */

@media (max-width: 640px) {
    .field input[type="search"],
    .field input:not([type="checkbox"]):not([type="radio"]),
    .field select { min-width: 100%; width: 100%; }

    .field { width: 100%; }

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

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

    .filters .btn { width: 100%; }

    .site-footer .container { flex-direction: column; }
}

/* =============================================================================
   Admin panel
   ============================================================================= */

.admin-body { background: #f4ede2; }

.admin-bar {
    background: linear-gradient(120deg, #4a2008 0%, #8f3a10 100%);
    color: #fff;
    padding: 14px 0;
    border-bottom: 3px solid var(--accent);
}

.admin-bar .container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
}

.admin-brand {
    margin: 0;
    font-weight: 700;
    letter-spacing: .04em;
}

.admin-brand span {
    display: inline-block;
    margin-left: 8px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #3d1c05;
    background: var(--accent);
    border-radius: 999px;
    padding: 2px 9px;
    vertical-align: 2px;
}

.admin-user {
    margin: 2px 0 0;
    font-size: .8rem;
    opacity: .82;
}

.admin-bar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.admin-bar nav a {
    color: #f2ddc8;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 8px;
    transition: background .15s ease, color .15s ease;
}

.admin-bar nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.admin-bar nav a.active { background: rgba(255, 255, 255, .18); color: #fff; }

.admin-main { padding: 26px 0 44px; }

.admin-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.admin-title h1 {
    margin: 0;
    font-size: 1.45rem;
    letter-spacing: -.01em;
}

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

/* ------------------------------------------------------------------ flashes */

.flash {
    border-radius: 10px;
    padding: 12px 16px;
    margin: 0 0 18px;
    font-weight: 600;
    font-size: .92rem;
    border: 1px solid transparent;
}

.flash.success { background: #eaf2e2; color: #47632f; border-color: #cfdfba; }
.flash.error   { background: #fbece9; color: var(--danger); border-color: #efc6bd; }
.flash.info    { background: #f3ede0; color: #7a5a22; border-color: #e2d3ae; }

.flash a { color: inherit; }

/* -------------------------------------------------------------------- table */

.table-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 11px 16px;
    border-bottom: 1px solid var(--line);
    font-size: .92rem;
    vertical-align: top;
}

.admin-table th {
    background: #f6ecdd;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    white-space: nowrap;
}

.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #fbf6ee; }

.admin-table td.actions { text-align: right; white-space: nowrap; }
.admin-table td.actions form { display: inline-block; margin-left: 6px; }

.inline-form { display: inline-block; margin: 0; }

/* -------------------------------------------------------------------- forms */

.form-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    max-width: 720px;
}

.form-card h2 { font-size: 1.15rem; }

.form-card .field { margin-bottom: 15px; }

/* two fields side by side (latitude / longitude) */
.form-card .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 4px;
}

.form-card .field-row .field { margin-bottom: 0; }

.form-card .hint {
    margin: 6px 0 15px;
    font-size: .82rem;
    color: var(--muted);
}

/* "Features" group label (filter bar + admin location form) */
.group-label {
    display: block;
    margin-bottom: 5px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

/* feature checkboxes in the admin location form:
   three grouped panels of tappable checkbox tiles */
.form-card .check-groups {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.check-group {
    background: #fdfaf4;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 12px 12px;
}

.check-group-title {
    display: block;
    margin-bottom: 8px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.check-tiles {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-card .check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    color: var(--ink);
    cursor: pointer;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 10px;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.form-card .check:hover { border-color: #dcb894; }

.form-card .check:has(input:checked) {
    background: var(--chip-bg);
    border-color: #dca670;
    color: var(--chip-ink);
    font-weight: 600;
}

.form-card .check input {
    width: 15px;
    height: 15px;
    margin: 0;
    flex: none;
    accent-color: var(--brand);
}

.form-card .check-groups + .hint { margin-bottom: 15px; }

/* compact feature tags in the locations list table */
.admin-table td.ftags { max-width: 230px; }

.ftag {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    color: #9c4312;
    background: #f8e9db;
    border-radius: 999px;
    padding: 2px 8px;
    margin: 1px 3px 1px 0;
    white-space: nowrap;
}

.form-card input[type="text"],
.form-card input[type="password"],
.form-card input[type="number"],
.form-card input[type="search"],
.form-card select,
.form-card textarea {
    width: 100%;
    font: inherit;
    color: var(--ink);
    background: #fdfaf4;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 3px rgba(176, 74, 23, .16);
}

.req { color: var(--danger); }

/* ----------------------------------------------------------- stats + login */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-num {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1.1;
}

.stat-label {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.toolbar {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 18px;
}

.toolbar .field { display: flex; flex-direction: column; gap: 5px; }

.toolbar .field > label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.toolbar input:not([type="checkbox"]):not([type="radio"]),
.toolbar select {
    font: inherit;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 11px;
    background: #fdfaf4;
    min-width: 180px;
}

/* full-width feature checkbox row in the locations toolbar */
.toolbar .field-wide { flex: 1 1 100%; }

.count-line { margin: 0 0 12px; }

.login-wrap {
    min-height: 92vh;
    display: grid;
    place-items: center;
    padding: 30px 16px;
}

.login-card {
    width: min(400px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    padding: 30px 28px;
    border-top: 4px solid var(--brand);
}

.login-card h1 {
    margin: 0 0 18px;
    font-size: 1.4rem;
}

.login-card .field { margin-bottom: 14px; }

.login-card input {
    width: 100%;
    font: inherit;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    background: #fdfaf4;
}

.login-card input:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 3px rgba(176, 74, 23, .16);
}

.login-card .btn { width: 100%; margin-top: 4px; }

.muted { color: var(--muted); font-size: .85rem; }

.muted code {
    background: #f4ecdf;
    border-radius: 5px;
    padding: 1px 5px;
}

.admin-footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .85rem;
    padding: 18px 0 30px;
}

/* ------------------------------------------------------- admin small screens */

@media (max-width: 720px) {
    .admin-bar .container { flex-direction: column; align-items: flex-start; }

    .admin-bar nav { width: 100%; }

    .admin-title { flex-direction: column; align-items: flex-start; }
}

/* ------------------------------------------------------ region ad banners */

.region-banner {
    position: relative;
    margin: 0 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.region-banner .ad-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--chip-ink);
    background: rgba(255, 253, 249, .92);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 9px;
}

/* Locked banner size: the strip is always exactly 150 px tall (110 px on
   phones) no matter what image the admin uploads — object-fit crops the
   picture to fit, so an oversized or odd-shaped source can never stretch
   the page or shrink other regions' banners. */
.region-banner img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
}

@media (max-width: 640px) {
    .region-banner img { height: 110px; }
}

.region-banner a { display: block; }

.region-banner a:focus-visible { outline-offset: -3px; }

/* ------------------------------------------------- admin: region banners */

.banner-thumb {
    display: block;
    width: 132px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--bg);
}

/* Admin preview mirrors the public strip: same locked 150 px height, so
   what the admin sees here is what visitors get. */
.banner-preview {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
    margin-top: 8px;
}

.status {
    display: inline-block;
    font-size: .74rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 10px;
    letter-spacing: .04em;
}

.status-on {
    color: #1e6b3a;
    background: #e2f3e6;
}

.status-off {
    color: var(--muted);
    background: #f1e7dc;
}

.banner-hint {
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--chip-bg);
    color: var(--chip-ink);
    padding: 12px 16px;
    font-size: .9rem;
}
