:root {
    color-scheme: light;
    --ink: #17231f;
    --ink-soft: #44534e;
    --muted: #6e7c77;
    --surface: #ffffff;
    --surface-alt: #f4f7f5;
    --surface-warm: #f7f3eb;
    --line: #dce4df;
    --line-strong: #c5d1cb;
    --brand: #176b55;
    --brand-dark: #0f4d3d;
    --brand-deep: #143f35;
    --brand-soft: #e3f1ec;
    --accent: #d98b36;
    --danger: #a43f38;
    --danger-soft: #f7e9e7;
    --success-soft: #e2f2ea;
    --shadow-sm: 0 8px 24px rgba(20, 63, 53, .08);
    --shadow: 0 20px 55px rgba(20, 45, 37, .12);
    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 28px;
    --header-height: 88px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--surface-alt); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--surface-alt); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--brand); }
img { max-width: 100%; }

/* Keep the global responsive-image rule from affecting Leaflet tiles and markers. */
.leaflet-container .leaflet-tile,
.leaflet-container .leaflet-marker-icon,
.leaflet-container .leaflet-marker-shadow,
.leaflet-container img.leaflet-image-layer {
    max-width: none !important;
    max-height: none !important;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .45rem; font-size: clamp(1.75rem, 2.6vw, 2.65rem); line-height: 1.08; letter-spacing: -.035em; }
h2 { margin-bottom: .3rem; font-size: clamp(1.2rem, 1.7vw, 1.55rem); line-height: 1.2; letter-spacing: -.02em; }
h3 { margin-bottom: .25rem; }

.hidden { display: none !important; }
.muted, .helper { color: var(--muted); }
.helper { margin: .5rem 0 0; font-size: .83rem; line-height: 1.45; }
.subtitle { max-width: 720px; margin: 0; color: var(--ink-soft); line-height: 1.5; }
.eyebrow { margin: 0 0 .35rem; color: var(--brand); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.centered { text-align: center; }
.text-link { display: inline-block; font-weight: 700; text-decoration: none; }

.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .68rem 1rem;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid rgba(23, 107, 85, .24); outline-offset: 2px; }
.button:disabled { opacity: .58; cursor: wait; transform: none; }
.button.primary { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(23, 107, 85, .2); }
.button.primary:hover { background: var(--brand-dark); }
.button.secondary { border-color: var(--brand-dark); background: var(--brand-deep); color: #fff; }
.button.ghost { border-color: var(--line); background: rgba(255,255,255,.76); }
.button.ghost:hover { border-color: var(--line-strong); background: #fff; }
.button.danger-ghost { border-color: #e7c8c4; background: var(--surface); color: var(--danger); }
.button.large { min-height: 50px; padding: .85rem 1.25rem; border-radius: 14px; }
.button.compact { min-height: 36px; padding: .52rem .72rem; font-size: .86rem; }
.header-admin-button { border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.12); color: #fff; backdrop-filter: blur(10px); }
.header-admin-button:hover { background: rgba(255,255,255,.2); }

label { display: grid; gap: .42rem; color: var(--ink); font-size: .88rem; font-weight: 720; }
input, select, textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    padding: .75rem .85rem;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input, select { min-height: 45px; }
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #98a29e; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(23, 107, 85, .12); }
input[type="checkbox"] { width: 20px; min-height: 20px; accent-color: var(--brand); }
.stack { display: grid; gap: 1rem; }
.form-grid { display: grid; gap: .9rem; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: 1fr .55fr 1.25fr; }
.address-grid { grid-template-columns: minmax(0, 1.6fr) minmax(180px, .7fr); }
.input-button-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel-lite { border: 1px solid rgba(255,255,255,.58); border-radius: 18px; background: rgba(255,255,255,.86); box-shadow: var(--shadow-sm); backdrop-filter: blur(16px); }
.alert { padding: .9rem 1rem; border: 1px solid #c5dfd3; border-radius: 14px; background: var(--success-soft); color: var(--brand-dark); line-height: 1.45; }
.alert.error { border-color: #ebc4bf; background: var(--danger-soft); color: #7d2f29; }
.alert.success { background: var(--success-soft); }
.floating-message { margin-bottom: 1rem; }

/* Setup and sign-in */
.setup-page {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 4vw, 3rem);
    background:
        radial-gradient(circle at 15% 15%, rgba(217,139,54,.18), transparent 32rem),
        radial-gradient(circle at 85% 90%, rgba(23,107,85,.22), transparent 36rem),
        var(--surface-alt);
}
.auth-card { width: min(100%, 460px); padding: clamp(1.35rem, 4vw, 2.2rem); border: 1px solid rgba(255,255,255,.75); border-radius: var(--radius-lg); background: rgba(255,255,255,.92); box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.auth-card.install-card { width: min(100%, 930px); }
.brand-mark { display: grid; width: 54px; height: 54px; place-items: center; margin-bottom: 1rem; border-radius: 17px; background: var(--brand-soft); font-size: 1.65rem; }
.install-form fieldset { display: grid; gap: 1rem; margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 16px; }
.install-form legend { padding: 0 .35rem; color: var(--brand-dark); font-weight: 800; }
.requirements-box { display: grid; gap: .75rem; padding: 1rem; border-radius: 16px; background: var(--surface-warm); }
.requirements-box p { margin: 0; }
.requirements-box code { display: block; overflow-wrap: anywhere; padding: .8rem; border-radius: 10px; background: var(--brand-deep); color: #fff; }

/* Shared brands and headers */
.brand-icon { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 15px; background: rgba(255,255,255,.16); font-size: 1.45rem; }
.site-header {
    display: flex;
    min-height: var(--header-height);
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 3vw, 2.2rem);
    background: linear-gradient(125deg, #103e34, #176b55 68%, #327864);
    color: #fff;
}
.site-header .eyebrow { color: #bbdfd1; }
.site-header h1 { margin-bottom: .25rem; font-size: clamp(1.5rem, 2.5vw, 2.35rem); }
.site-header .subtitle { color: rgba(255,255,255,.78); }
.public-brand { display: flex; align-items: center; gap: 1rem; }

.admin-header {
    position: sticky;
    z-index: 1000;
    top: 0;
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem clamp(1rem, 3vw, 2rem);
    border-bottom: 1px solid rgba(220,228,223,.9);
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(18px);
}
.admin-brand { display: flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; }
.admin-brand .brand-icon { width: 44px; height: 44px; background: var(--brand-soft); }
.admin-brand small, .admin-brand strong { display: block; }
.admin-brand small { margin-bottom: .12rem; color: var(--muted); font-size: .7rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.admin-brand strong { font-size: 1rem; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .45rem; }
.header-actions form { margin: 0; }

/* Public map */
.public-page { min-height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.travel-app { display: grid; min-height: 680px; grid-template-columns: minmax(350px, 430px) minmax(0, 1fr); }
.travel-sidebar { z-index: 2; overflow-y: auto; max-height: calc(100dvh - var(--header-height) - 42px); padding: 1rem; border-right: 1px solid var(--line); background: #edf3ef; }
.stats-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.stat { min-width: 0; padding: .8rem; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm); }
.stat strong, .stat span { display: block; }
.stat strong { margin-bottom: .18rem; color: var(--brand-dark); font-size: 1.35rem; line-height: 1; }
.stat span { overflow: hidden; color: var(--muted); font-size: .72rem; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.filters { display: grid; gap: .85rem; padding: .9rem; }
.filter-grid { display: grid; grid-template-columns: 1.35fr .75fr; gap: .65rem; }
.list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1.1rem .2rem .6rem; }
.list-heading h2 { margin: 0; }
.list-heading span { color: var(--muted); font-size: .8rem; font-weight: 700; }
.location-list { display: grid; gap: .65rem; padding-bottom: 1rem; }
.location-card {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: .8rem;
    width: 100%;
    padding: .65rem;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--surface);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(20,63,53,.04);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.location-card:hover { transform: translateY(-2px); border-color: #a9c8bb; box-shadow: var(--shadow-sm); }
.location-card:focus-visible { outline: 3px solid rgba(23,107,85,.2); outline-offset: 2px; }
.location-card-media { display: grid; min-height: 84px; place-items: center; overflow: hidden; border-radius: 12px; background: var(--brand-soft); font-size: 1.75rem; }
.location-card-media img { width: 100%; height: 100%; object-fit: cover; }
.location-card-copy, .location-card-topline, .location-card-footer { display: flex; }
.location-card-copy { min-width: 0; flex-direction: column; justify-content: center; gap: .35rem; }
.location-card-topline { align-items: start; justify-content: space-between; gap: .5rem; }
.location-card-topline strong { overflow: hidden; font-size: .96rem; text-overflow: ellipsis; white-space: nowrap; }
.location-card-topline small { flex: 0 0 auto; padding: .2rem .4rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: .65rem; font-weight: 780; }
.location-card-meta { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: .77rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.location-card-footer { align-items: center; justify-content: space-between; gap: .6rem; color: var(--muted); font-size: .72rem; }
.location-card-footer span:first-child { color: #a9681f; letter-spacing: .02em; }
.map-panel { position: relative; min-width: 0; min-height: 680px; background: #dbe5df; }
#map { position: absolute; inset: 0; }
.map-overlay-card { position: absolute; z-index: 500; top: 1rem; left: 50%; display: flex; align-items: center; gap: .5rem; max-width: calc(100% - 6rem); padding: .55rem .8rem; border: 1px solid rgba(255,255,255,.8); border-radius: 999px; background: rgba(255,255,255,.9); box-shadow: var(--shadow-sm); color: var(--ink-soft); font-size: .78rem; font-weight: 750; transform: translateX(-50%); backdrop-filter: blur(12px); }
.status-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #2fa16f; box-shadow: 0 0 0 4px rgba(47,161,111,.14); }
.map-status { position: absolute; z-index: 600; top: 50%; left: 50%; padding: .8rem 1rem; border-radius: 13px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); transform: translate(-50%, -50%); }
.site-footer { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; background: var(--brand-deep); color: rgba(255,255,255,.7); font-size: .72rem; }
.empty-state { display: grid; gap: .35rem; padding: 1.3rem; border: 1px dashed var(--line-strong); border-radius: 16px; background: rgba(255,255,255,.55); color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); }

.camper-marker-wrap { background: transparent; border: 0; }
.camper-marker { position: relative; display: grid; width: 40px; height: 40px; place-items: center; border: 3px solid #fff; border-radius: 50% 50% 50% 10%; background: var(--brand); box-shadow: 0 7px 18px rgba(20,63,53,.28); transform: rotate(-45deg); }
.camper-marker > span { font-size: 1.05rem; transform: rotate(45deg); }
.admin-saved-marker { opacity: .72; }
.leaflet-popup-content-wrapper { overflow: hidden; padding: 0; border-radius: 17px; box-shadow: 0 18px 50px rgba(20,45,37,.2); }
.leaflet-popup-content { width: auto !important; margin: 0; }
.leaflet-popup-close-button { z-index: 3; width: 30px !important; height: 30px !important; margin: .45rem; border-radius: 50%; background: rgba(255,255,255,.9) !important; color: var(--ink) !important; font-size: 20px !important; line-height: 29px !important; box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.popup-card { min-width: 260px; max-width: 380px; padding: .9rem; color: var(--ink); }
.popup-gallery { margin: -.9rem -.9rem .85rem; }
.popup-primary-photo { display: block; width: 100%; height: 190px; padding: 0; border: 0; background: var(--surface-alt); cursor: zoom-in; }
.popup-primary-photo img { width: 100%; height: 100%; object-fit: cover; }
.popup-photo-strip { display: flex; gap: .25rem; overflow: hidden; padding: .25rem; background: var(--surface-alt); }
.popup-photo-strip button { width: 46px; height: 42px; flex: 0 0 auto; overflow: hidden; padding: 0; border: 0; border-radius: 6px; cursor: zoom-in; }
.popup-photo-strip img { width: 100%; height: 100%; object-fit: cover; }
.more-photo-count { display: grid; width: 46px; height: 42px; place-items: center; border-radius: 6px; background: var(--brand-deep); color: #fff; font-size: .75rem; font-weight: 800; }
.popup-heading { display: flex; align-items: flex-start; gap: .65rem; }
.popup-heading > span { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: var(--brand-soft); }
.popup-heading h3 { margin: .05rem 0 .2rem; font-size: 1.05rem; }
.popup-meta, .popup-address, .popup-notes { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.popup-address, .popup-notes { margin-top: .55rem; }
.site-number { display: inline-flex; margin: .65rem 0 0; padding: .3rem .5rem; border-radius: 8px; background: var(--surface-warm); color: #7f5526; font-size: .75rem; font-weight: 800; }
.rating { margin: .6rem 0 0; color: #b87427; letter-spacing: .05em; }
.popup-link { display: inline-flex; margin-top: .7rem; font-size: .8rem; font-weight: 800; text-decoration: none; }

.photo-lightbox { width: min(94vw, 1100px); max-width: none; padding: 0; border: 0; border-radius: 18px; background: #101413; color: #fff; box-shadow: 0 30px 100px rgba(0,0,0,.5); }
.photo-lightbox::backdrop { background: rgba(8,14,12,.86); backdrop-filter: blur(5px); }
.photo-lightbox img { display: block; width: 100%; max-height: 82vh; object-fit: contain; }
.photo-lightbox p { margin: 0; padding: .8rem 1rem; color: rgba(255,255,255,.76); font-size: .85rem; }
.lightbox-close { position: absolute; z-index: 2; top: .65rem; right: .65rem; display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: #111; font-size: 1.5rem; cursor: pointer; }

/* Admin */
.admin-page { min-height: 100dvh; background: #f0f4f2; }
.admin-shell { width: min(100%, 1540px); margin: 0 auto; padding: clamp(1rem, 2.5vw, 2rem); }
.dashboard-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.2rem; }
.dashboard-intro h1 { margin-bottom: .4rem; }
.dashboard-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.status-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-soft); font-size: .75rem; font-weight: 750; box-shadow: var(--shadow-sm); }
.admin-workspace { display: grid; grid-template-columns: minmax(500px, .9fr) minmax(480px, 1.1fr); gap: 1rem; align-items: start; }
.editor-panel { padding: clamp(1rem, 2vw, 1.35rem); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading h2, .map-editor-heading h2 { margin: 0; }
.geocoder-box { padding: .9rem; margin-bottom: 1rem; border: 1px solid #c8dfd5; border-radius: 15px; background: var(--brand-soft); }
.geocoder-box > label { margin-bottom: .45rem; }
.geocode-results { display: grid; gap: .45rem; margin-top: .6rem; }
.geocode-result { display: grid; gap: .15rem; padding: .65rem; border: 1px solid #b8d4c8; border-radius: 10px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.geocode-result strong { font-size: .85rem; }
.geocode-result span { color: var(--muted); font-size: .75rem; line-height: 1.35; }
.coordinate-box { padding: .85rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-alt); }
.visibility-toggle { display: flex; min-height: 72px; align-items: center; gap: .65rem; padding: .72rem .8rem; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); cursor: pointer; }
.visibility-toggle span, .visibility-toggle strong, .visibility-toggle small { display: block; }
.visibility-toggle span { min-width: 0; }
.visibility-toggle small { margin-top: .16rem; color: var(--muted); font-size: .72rem; font-weight: 500; }
.map-editor-panel { position: sticky; top: 88px; overflow: hidden; }
.map-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.map-tip { padding: .35rem .55rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: .72rem; font-weight: 750; }
#admin-map { height: min(760px, calc(100dvh - 175px)); min-height: 560px; }

.photo-uploader { display: grid; gap: .75rem; padding: .9rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-alt); }
.photo-uploader-heading, .subheading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.photo-uploader-heading strong, .photo-uploader-heading span, .subheading strong, .subheading span { display: block; }
.photo-uploader-heading > div > span, .subheading span { margin-top: .15rem; color: var(--muted); font-size: .75rem; }
.upload-limit { flex: 0 0 auto; padding: .3rem .5rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: .7rem; font-weight: 800; }
.dropzone { display: flex; min-height: 92px; align-items: center; justify-content: center; gap: .8rem; padding: 1rem; border: 2px dashed #a8c5b8; border-radius: 14px; background: var(--surface); text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.dropzone:hover { border-color: var(--brand); background: #f9fcfa; }
.dropzone input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.dropzone-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: var(--brand); color: #fff; font-size: 1.5rem; }
.dropzone span strong, .dropzone span small { display: block; }
.dropzone span small { margin-top: .2rem; color: var(--muted); font-size: .72rem; font-weight: 500; }
.photo-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.photo-preview-tile { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.photo-preview-tile > img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e8edeb; }
.photo-preview-tile > div:not(.photo-tile-actions) { display: grid; gap: .1rem; padding: .5rem; }
.photo-preview-tile > div strong, .photo-preview-tile > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-preview-tile > div strong { font-size: .7rem; }
.photo-preview-tile > div span { color: var(--muted); font-size: .65rem; }
.file-only-preview { min-height: 100px; display: grid; align-content: end; }
.existing-photo-section { display: grid; gap: .55rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.photo-badge { position: absolute; top: .4rem; left: .4rem; padding: .25rem .42rem; border-radius: 999px; background: rgba(20,63,53,.88); color: #fff; font-size: .62rem; font-weight: 800; backdrop-filter: blur(6px); }
.photo-tile-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem; padding: .4rem; }
.photo-tile-actions:has(.mini-button:only-child) { grid-template-columns: 1fr; }
.mini-button { min-height: 30px; padding: .35rem .3rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--brand-dark); font-size: .64rem; font-weight: 800; cursor: pointer; }
.mini-button.danger { color: var(--danger); }
.is-cover { border-color: #8fbbaa; box-shadow: 0 0 0 2px rgba(23,107,85,.08); }

.locations-panel { margin-top: 1rem; padding: 1rem; }
.saved-heading { align-items: flex-end; }
.saved-heading input { width: min(100%, 340px); }
.count-badge { display: inline-grid; min-width: 28px; min-height: 28px; place-items: center; margin-left: .25rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: .8rem; vertical-align: middle; }
.admin-location-list { display: grid; gap: .55rem; }
.admin-location-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .65rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.admin-location-media { display: grid; width: 74px; height: 62px; place-items: center; overflow: hidden; border-radius: 11px; background: var(--brand-soft); font-size: 1.4rem; }
.admin-location-media img { width: 100%; height: 100%; object-fit: cover; }
.admin-location-copy { min-width: 0; }
.admin-location-copy > span, .admin-location-copy > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-location-title-row { display: flex; align-items: center; gap: .5rem; }
.admin-location-title-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visibility-badge { flex: 0 0 auto; padding: .2rem .4rem; border-radius: 999px; font-size: .62rem; font-weight: 800; }
.visibility-badge.public { background: var(--success-soft); color: var(--brand-dark); }
.visibility-badge.private { background: var(--surface-warm); color: #805727; }
.admin-location-copy > span { margin-top: .2rem; color: var(--muted); font-size: .75rem; }
.admin-location-copy > small { margin-top: .2rem; color: #8a9691; font-size: .7rem; }
.row-actions { display: flex; gap: .4rem; }
.settings-panel { display: grid; grid-template-columns: minmax(230px, .55fr) minmax(0, 1.45fr); gap: 1.2rem; align-items: end; margin-top: 1rem; padding: 1rem; }
.settings-copy h2 { margin-bottom: .2rem; }
.pin-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; }

@media (max-width: 1100px) {
    .admin-workspace { grid-template-columns: 1fr; }
    .map-editor-panel { position: relative; top: auto; }
    #admin-map { height: 520px; min-height: 0; }
    .settings-panel { grid-template-columns: 1fr; }
    .pin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    :root { --header-height: 112px; }
    .site-header { align-items: flex-start; }
    .public-brand { align-items: flex-start; }
    .travel-app { display: flex; min-height: 0; flex-direction: column; }
    .map-panel { order: -1; min-height: 58vh; }
    .travel-sidebar { overflow: visible; max-height: none; border-right: 0; }
    .site-footer { flex-wrap: wrap; }
    .dashboard-intro { align-items: flex-start; flex-direction: column; }
    .dashboard-badges { justify-content: flex-start; }
    .form-grid.three { grid-template-columns: 1fr 1fr; }
    .form-grid.three label:last-child { grid-column: 1 / -1; }
    .address-grid { grid-template-columns: 1fr; }
    .desktop-action { display: none; }
}

@media (max-width: 620px) {
    h1 { font-size: 1.7rem; }
    .site-header { min-height: auto; padding: .9rem; }
    .site-header .brand-icon { width: 42px; height: 42px; }
    .site-header .subtitle { font-size: .82rem; }
    .header-admin-button { min-height: 38px; padding: .6rem .75rem; }
    .travel-sidebar { padding: .75rem; }
    .stats-row { gap: .4rem; }
    .stat { padding: .65rem .55rem; }
    .stat strong { font-size: 1.15rem; }
    .filter-grid, .form-grid.two, .form-grid.three, .pin-grid { grid-template-columns: 1fr; }
    .form-grid.three label:last-child { grid-column: auto; }
    .input-button-row { grid-template-columns: 1fr; }
    .map-panel { min-height: 52vh; }
    .map-overlay-card { top: .65rem; max-width: calc(100% - 5rem); white-space: nowrap; }
    .location-card { grid-template-columns: 72px minmax(0, 1fr); }
    .location-card-media { min-height: 74px; }
    .site-footer { justify-content: center; text-align: center; }

    .admin-header { align-items: flex-start; padding: .65rem .75rem; }
    .admin-brand small { display: none; }
    .admin-brand strong { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .admin-brand .brand-icon { width: 38px; height: 38px; }
    .header-actions { gap: .3rem; }
    .header-actions .button { min-height: 36px; padding: .5rem .6rem; font-size: .75rem; }
    .admin-shell { padding: .75rem; }
    .dashboard-intro { margin-bottom: .85rem; }
    .status-pill { font-size: .68rem; }
    .editor-panel, .locations-panel, .settings-panel { padding: .8rem; }
    .section-heading { align-items: flex-start; }
    #admin-map { height: 430px; }
    .photo-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .photo-uploader-heading, .subheading { align-items: flex-start; flex-direction: column; }
    .dropzone { justify-content: flex-start; }
    .saved-heading { align-items: stretch; flex-direction: column; }
    .saved-heading input { width: 100%; }
    .admin-location-row { grid-template-columns: 62px minmax(0, 1fr); align-items: start; }
    .admin-location-media { width: 62px; height: 58px; }
    .row-actions { grid-column: 1 / -1; }
    .row-actions .button { flex: 1; }
    .settings-panel { gap: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
