*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --font-display: '911porscha', 'Orbitron', monospace;
    --font-body: 'Inter', system-ui, sans-serif;
    --white: #ffffff;
    --black: #000000;
    --dim: rgba(255, 255, 255, 0.42);
    --faint: rgba(255, 255, 255, 0.08);
    --ease: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@font-face {
    font-family: '911porscha';
    src: url('/911porscha/911porschav3.ttf') format('truetype');
    font-weight: normal;
    font-display: swap;
}

html, body {
    font-family: var(--font-body);
    background: var(--black);
    color: var(--white);
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

/* Prevent scroll on map page, allow on others */
body { overflow: hidden; }
body.scrollable { overflow-y: auto; overflow-x: hidden; }


/* ─────────────────────────────────────────
   HEADER
───────────────────────────���───────────── */

.pdx-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--faint);
    z-index: 20;
}

.pdx-back {
    font-family: var(--font-body);
    font-size: 0.58rem;
    letter-spacing: 2px;
    color: var(--dim);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s;
    min-width: 60px;
}

.pdx-back:hover { color: var(--white); }

.pdx-logo {
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.pdx-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dim);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 60px;
    transition: color 0.2s;
}

.pdx-menu-btn:hover { color: var(--white); }


/* ─────────────────────────────────────────
   SIDE PANEL
───────────────────────────────────────── */

.pdx-panel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(320px, 88vw);
    background: rgba(6, 6, 6, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid var(--faint);
    z-index: 50;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto;
    scrollbar-width: none;
}

.pdx-panel::-webkit-scrollbar { display: none; }
.pdx-panel.open { transform: translateX(0); }

.pdx-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
}

.pdx-panel-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.pdx-panel-body {
    padding: calc(env(safe-area-inset-top, 0px) + 28px) 24px
             calc(env(safe-area-inset-bottom, 0px) + 48px);
}

.panel-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
}

.panel-title {
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.panel-close {
    background: none;
    border: none;
    color: var(--dim);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.panel-close:hover { color: var(--white); }

.panel-section {
    margin-bottom: 36px;
}

.panel-section-label {
    font-family: var(--font-body);
    font-size: 0.46rem;
    letter-spacing: 3px;
    color: var(--dim);
    text-transform: uppercase;
    margin-bottom: 14px;
}

.panel-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel-username {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--white);
}

.panel-signout-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.5rem;
    letter-spacing: 2px;
    color: var(--dim);
    text-transform: uppercase;
    padding: 0;
    transition: color 0.2s;
}

.panel-signout-btn:hover { color: var(--white); }

.panel-my-spots-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 14px;
    padding: 10px 0;
    background: none;
    border: none;
    border-top: 1px solid var(--faint);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 300;
    cursor: pointer;
    text-align: left;
    transition: opacity 0.2s;
}

.panel-my-spots-btn:hover { opacity: 0.65; }

.panel-my-spots-arrow {
    font-size: 0.5rem;
    color: var(--dim);
}

.panel-my-spots-count {
    color: var(--dim);
    font-size: 0.75rem;
}

.panel-filter-count {
    font-family: var(--font-body);
    font-size: 0.46rem;
    letter-spacing: 3px;
    color: var(--dim);
    text-transform: uppercase;
    margin: 14px 0 10px;
}

.panel-spot-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.panel-signin-link {
    font-family: var(--font-body);
    font-size: 0.58rem;
    letter-spacing: 2px;
    color: var(--white);
    text-decoration: none;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    padding-bottom: 2px;
    transition: border-color 0.2s;
}

.panel-signin-link:hover { border-color: var(--white); }

.panel-search-input {
    flex: 1;
    background: #111;
    border: 1px solid var(--faint);
    border-radius: 4px;
    padding: 10px 12px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--white);
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    transition: border-color 0.2s;
}

.panel-search-input::placeholder { color: rgba(255,255,255,0.2); }
.panel-search-input:focus { border-color: rgba(255,255,255,0.28); }

.panel-stat {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--dim);
}

.panel-empty {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--dim);
    line-height: 1.7;
}

.panel-link {
    color: var(--white);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.panel-spots-list {
    display: flex;
    flex-direction: column;
}

.panel-spot-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    text-decoration: none;
    border-bottom: 1px solid var(--faint);
    transition: opacity 0.2s;
}

.panel-spot-item:last-child { border-bottom: none; }
.panel-spot-item:hover { opacity: 0.65; }

.panel-spot-thumb {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    background: #111 center/cover no-repeat;
    flex-shrink: 0;
}

.panel-spot-model {
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 5px;
}

.panel-spot-meta {
    font-family: var(--font-body);
    font-size: 0.58rem;
    letter-spacing: 1px;
    color: var(--dim);
    text-transform: uppercase;
}


/* ─────────────────────────────────────────
   MAP
───────────────────────────────────────── */

#map {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.map-placeholder {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #080808;
}

.map-placeholder-label {
    font-family: var(--font-body);
    font-size: 0.52rem;
    letter-spacing: 4px;
    color: var(--dim);
    text-transform: uppercase;
}

.map-placeholder-title {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--white);
}

.map-placeholder-sub {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--dim);
    text-align: center;
    max-width: 280px;
    line-height: 1.6;
}


/* ───────────────────────────────────────���─
   FAB
───────────────────���───────────────────── */

.pdx-fab {
    position: fixed;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--white);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    text-decoration: none;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
    transition: transform 0.2s, box-shadow 0.2s;
}

.pdx-fab:hover {
    transform: translateX(-50%) scale(1.08);
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.9);
}

.pdx-fab:active {
    transform: translateX(-50%) scale(0.96);
}


/* ────────────────────────────────────────��
   MAP PIN
───────────────────��───────────────────── */

/* ─────────────────────────────────────────
   MAKE AUTOCOMPLETE  (inside panel)
───────────────────────────────────────── */

.panel-make-wrap {
    position: relative;
    margin-top: 14px;
}

.panel-make-wrap .panel-search-input {
    width: 100%;
    padding-right: 34px;
}

.panel-make-clear {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--dim);
    cursor: pointer;
    font-size: 0.72rem;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.panel-make-clear:hover { color: var(--white); }

.panel-make-suggestions {
    background: #111;
    border: 1px solid var(--faint);
    border-top: none;
    border-radius: 0 0 4px 4px;
    overflow: hidden;
}

.panel-make-option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--faint);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.panel-make-option:last-child { border-bottom: none; }
.panel-make-option:hover { background: rgba(255,255,255,0.06); }

.panel-make-empty {
    padding: 10px 12px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--dim);
}


.pdx-marker {
    width: 36px;
    height: 36px;
    cursor: pointer;
}

.pdx-marker-dot {
    width: 100%;
    height: 100%;
    background: var(--white);
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.4);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.15s;
}

.pdx-marker-dot img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.pdx-marker:hover .pdx-marker-dot { transform: scale(1.2); }


/* ─────────────────────────────────────────
   SPOT PAGE
──────────────────���────────────────────── */

.spot-main {
    padding: 72px 24px 60px;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Capture area */
.capture-area {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--faint);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #080808;
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.capture-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    height: 100%;
    cursor: pointer;
    color: var(--dim);
    font-family: var(--font-display);
    font-size: 0.58rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: color 0.2s;
}

.capture-label:hover { color: var(--white); }

.photo-preview {
    position: absolute;
    inset: 0;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hidden { display: none !important; }

/* Action row below capture */
.spot-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pdx-btn-identify {
    flex: 1;
    padding: 15px;
    background: var(--white);
    color: var(--black);
    border: none;
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.2s;
}

.pdx-btn-identify:disabled { opacity: 0.28; cursor: not-allowed; }

.fill-manually-btn {
    font-family: var(--font-body);
    font-size: 0.55rem;
    letter-spacing: 2px;
    color: var(--dim);
    text-transform: uppercase;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 4px;
    white-space: nowrap;
    transition: color 0.2s;
}

.fill-manually-btn:hover { color: var(--white); }

.identify-status {
    font-family: var(--font-body);
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: var(--dim);
    text-transform: uppercase;
    text-align: center;
    min-height: 1rem;
}

/* Fields */
.result-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.field-label {
    font-family: var(--font-body);
    font-size: 0.5rem;
    letter-spacing: 3px;
    color: var(--dim);
    text-transform: uppercase;
}

.field-input {
    background: #0c0c0c;
    border: 1px solid var(--faint);
    border-radius: 4px;
    padding: 13px 14px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--white);
    width: 100%;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.field-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.28);
}

.field-input::placeholder { color: rgba(255, 255, 255, 0.2); }

.field-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

/* Camera / Gallery buttons inside capture area */
.capture-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    height: 100%;
}

.capture-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    color: var(--dim);
    font-family: var(--font-display);
    font-size: 0.52rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: color 0.2s, background 0.2s;
    user-select: none;
    -webkit-user-select: none;
}

.capture-btn:first-child {
    border-right: 1px solid var(--faint);
}

.capture-btn:hover,
.capture-btn:active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.03);
}

/* Retake button overlaid on photo preview */
.retake-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.52rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.retake-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Location search row (shown for gallery photos without EXIF GPS) */
.location-search-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-search-wrap {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.location-search-wrap .field-input {
    flex: 1;
}

.location-search-btn {
    padding: 13px 18px;
    background: transparent;
    color: var(--white);
    border: 1px solid var(--faint);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s;
}

.location-search-btn:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.04);
}

.location-search-status {
    font-family: var(--font-body);
    font-size: 0.58rem;
    letter-spacing: 2px;
    color: var(--dim);
    text-transform: uppercase;
    min-height: 1rem;
}

/* GPS row */
.gps-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.52rem;
    letter-spacing: 2px;
    color: var(--dim);
    text-transform: uppercase;
}

/* Save button */
.pdx-btn-save {
    width: 100%;
    padding: 18px;
    background: transparent;
    color: var(--white);
    border: 1px solid var(--faint);
    font-family: var(--font-display);
    font-size: 0.68rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: border-color 0.2s, background 0.2s;
    margin-top: 4px;
}

.pdx-btn-save:hover { border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.03); }
.pdx-btn-save:disabled { opacity: 0.35; cursor: not-allowed; }


/* ───────────────────────────────────────��─
   CARD PAGE
───────────────────────────────────────── */

.card-back {
    position: fixed;
    top: 20px; left: 20px;
    z-index: 10;
    font-family: var(--font-body);
    font-size: 0.56rem;
    letter-spacing: 2px;
    color: var(--white);
    text-decoration: none;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.55);
    padding: 9px 14px;
    border-radius: 4px;
    backdrop-filter: blur(8px);
    transition: background 0.2s;
}

.card-back:hover { background: rgba(0, 0, 0, 0.85); }

.card-photo-wrap {
    position: relative;
    width: 100%;
    background: #111;
}

.card-photo {
    width: 100%;
    height: auto;
    display: block;
}

.card-photo-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(to bottom, transparent, #0a0a0a);
    pointer-events: none;
}

.card-content {
    background: #0a0a0a;
    padding: 40px 28px 80px;
    max-width: 600px;
    margin: 0 auto;
}

.card-make {
    font-family: var(--font-body);
    font-size: 0.56rem;
    letter-spacing: 4px;
    color: var(--dim);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.card-model {
    font-family: var(--font-display);
    font-size: clamp(2rem, 7vw, 2.8rem);
    font-weight: normal;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 10px;
}

.card-year {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--dim);
    letter-spacing: 2px;
    margin-bottom: 36px;
}

.card-divider {
    height: 1px;
    background: var(--faint);
    margin-bottom: 28px;
}

.card-meta-row {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    align-items: baseline;
}

.card-meta-label {
    font-family: var(--font-body);
    font-size: 0.48rem;
    letter-spacing: 3px;
    color: var(--dim);
    text-transform: uppercase;
    flex-shrink: 0;
    width: 70px;
}

.card-meta-value {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--white);
    line-height: 1.5;
}

.card-loading {
    font-family: var(--font-body);
    font-size: 0.52rem;
    letter-spacing: 3px;
    color: var(--dim);
    text-transform: uppercase;
    margin-bottom: 32px;
}

.card-notes-section { margin-top: 28px; }

.card-owner-actions {
    display: flex;
    gap: 12px;
    margin-top: 40px;
}

.card-action-btn {
    padding: 12px 20px;
    background: transparent;
    color: var(--white);
    border: 1px solid var(--faint);
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.58rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.card-action-btn:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.04);
}

.card-action-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.card-action-btn--delete {
    color: #e05555;
    border-color: rgba(224, 85, 85, 0.25);
}

.card-action-btn--delete:hover {
    border-color: rgba(224, 85, 85, 0.5);
    background: rgba(224, 85, 85, 0.06);
}

.card-edit-section {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-edit-status {
    font-family: var(--font-body);
    font-size: 0.68rem;
    color: #e05555;
    min-height: 1rem;
}

.save-status {
    font-family: var(--font-body);
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: #e05555;
    min-height: 1rem;
    text-align: center;
    margin-top: 4px;
}

.card-notes-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--dim);
    line-height: 1.85;
    margin-top: 10px;
}


/* ─────────────────────────────────────────
   AUTH PAGE  (/pokedex/login.html)
───────────────────────────────────────── */

.auth-body {
    overflow: auto;
    background: #0a0a0a;
}

.auth-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(env(safe-area-inset-top, 0px) + 48px) 24px
             calc(env(safe-area-inset-bottom, 0px) + 48px);
    gap: 48px;
}

/* Brand block */
.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.auth-logo-text {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--white);
}

.auth-logo-sub {
    font-family: var(--font-body);
    font-size: 0.5rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--dim);
}

/* Form box */
.auth-box {
    width: 100%;
    max-width: 360px;
}

.auth-title {
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--white);
    margin-bottom: 6px;
}

.auth-sub {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--dim);
    margin-bottom: 32px;
}

/* Fields */
.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 8px;
}

.auth-field { position: relative; }

.auth-input {
    width: 100%;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 15px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--white);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.22);
}

.auth-input:focus {
    border-color: rgba(255, 255, 255, 0.35);
    background: #161616;
}

/* Error */
.auth-error {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: #e05555;
    min-height: 1.4rem;
    margin-top: 10px;
    line-height: 1.5;
}

/* CTA button */
.auth-cta {
    width: 100%;
    margin-top: 20px;
    padding: 16px;
    background: var(--white);
    color: var(--black);
    border: none;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.auth-cta:hover { opacity: 0.88; }
.auth-cta:disabled { opacity: 0.35; cursor: not-allowed; }

/* Switch mode link */
.auth-switch {
    margin-top: 24px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--dim);
    text-align: center;
}

.auth-switch-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--white);
    padding: 0;
    margin-left: 4px;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
}
.auth-switch-btn:hover { opacity: 0.7; }

/* LOGOUT BUTTON (spot.html header) */
.pdx-logout {
    font-family: var(--font-body);
    font-size: 0.52rem;
    letter-spacing: 2px;
    color: var(--dim);
    text-transform: uppercase;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    min-width: 60px;
    text-align: right;
    transition: color 0.2s;
}
.pdx-logout:hover { color: var(--white); }


/* ─────────────────────────────────────────
   PWA / SAFE AREA (iPhone notch + home bar)
───────────────────────────────────────── */

.pdx-header {
    padding-top: max(0px, env(safe-area-inset-top));
    height: calc(56px + env(safe-area-inset-top, 0px));
}

/* Reset view button */
.pdx-reset-btn {
    position: fixed;
    bottom: max(36px, calc(20px + env(safe-area-inset-bottom, 0px)));
    left: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--dim);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.pdx-reset-btn:hover {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.8);
}

/* FAB clears the home indicator on iPhone */
.pdx-fab {
    bottom: max(36px, calc(20px + env(safe-area-inset-bottom, 0px)));
}

/* Spot page body bottom padding so save button isn't under home bar */
body.scrollable {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
