/*
  Bytwise stylesheet: a cozy cafe app aesthetic with a warm neutral
  background, one accent color (a bright volt/lime), and rounded cards.
  This is a from scratch Python and Jinja2 rewrite; it does not need to
  pixel match the original Tailwind classes, just look presentable and
  consistent.
*/

:root {
    --coffee-900: #2c2016;
    --coffee-800: #3c2f26;
    --coffee-600: #6b5847;
    --coffee-500: #8a7666;
    --coffee-400: #a8988a;
    --coffee-200: #ded2c4;
    --coffee-100: #eee5d9;
    --coffee-50: #faf6ef;
    --volt-400: #F08000;
    --volt-500: #3c6f99;
    --white: #ffffff;
    --red-500: #dc2626;
    --red-50: #fef2f2;
    --emerald-600: #059669;
    --amber-600: #d97706;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 999px;
    --shadow-sm: 0 1px 2px rgba(44, 32, 22, 0.06), 0 1px 6px rgba(44, 32, 22, 0.04);
    --shadow-md: 0 6px 18px rgba(44, 32, 22, 0.1);
    --shadow-lg: 0 14px 34px rgba(44, 32, 22, 0.16);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--coffee-50);
    color: var(--coffee-900);
    line-height: 1.5;
}

h1, h2, h3 {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 700;
    color: var(--coffee-900);
    margin: 0 0 0.5em 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.hidden {
    display: none !important;
}

.text-muted {
    color: var(--coffee-500);
}

.text-muted.small {
    font-size: 0.8rem;
}

.text-muted.italic {
    font-style: italic;
}

.empty-italic {
    color: var(--coffee-400);
    font-style: italic;
    text-align: center;
    padding: 1rem 0;
}

.capitalize {
    text-transform: capitalize;
}

/* ==================== NAVBAR ==================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 500;
    height: 64px;
    background: rgba(250, 246, 239, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--coffee-200);
}

.navbar-inner {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.navbar-logo {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: var(--coffee-900);
    color: var(--volt-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.navbar-wordmark {
    font-family: "Fraunces", serif;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--coffee-900);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-link {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--coffee-500);
}

.navbar-link:hover {
    color: var(--coffee-900);
}

.navbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 2px solid var(--coffee-200);
    display: block;
}

.navbar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hide-mobile {
    display: inline;
}

@media (max-width: 640px) {
    .hide-mobile {
        display: none;
    }
}

.page-content {
    padding-top: 64px;
    min-height: 100vh;
}

/* ==================== BUTTONS ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    padding: 0.65rem 1.4rem;
    font-size: 0.95rem;
    text-align: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--coffee-900);
    color: var(--volt-400);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    background: var(--coffee-800);
}

.btn-secondary {
    background: var(--volt-400);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--volt-500);
}

.btn-outline {
    background: transparent;
    color: var(--coffee-900);
    border: 2px solid var(--coffee-900);
}

.btn-outline:hover:not(:disabled) {
    background: var(--coffee-100);
}

.btn-dark {
    background: var(--coffee-900);
    color: var(--volt-400);
}

.btn-dark:hover:not(:disabled) {
    background: var(--coffee-800);
}

.btn-location {
    background: var(--volt-400);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.btn-location:hover {
    background: var(--volt-500);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

.btn-xs {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    display: inline-flex;
    margin-bottom: 0.5rem;
}

.btn-lg {
    padding: 0.9rem 1.6rem;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

.link-accent {
    color: var(--volt-500);
    font-weight: 700;
    font-size: 0.9rem;
}

.link-accent-btn {
    background: none;
    border: none;
    color: var(--volt-500);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.link-accent-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-text-muted {
    background: none;
    border: none;
    color: var(--coffee-400);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.btn-text-muted:hover {
    color: var(--coffee-900);
}

.btn-text-accent {
    background: none;
    border: none;
    color: var(--volt-500);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-text-danger {
    background: none;
    border: none;
    color: var(--red-500);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.inline-form {
    display: inline;
}

/* ==================== CARDS ==================== */

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--coffee-100);
    margin-bottom: 1.5rem;
}

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

/* ==================== TOASTS ==================== */

.toast-container {
    position: fixed;
    top: 80px;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid;
    border-left-width: 4px;
    min-width: 280px;
    font-weight: 600;
    font-size: 0.9rem;
    animation: toast-in 0.25s ease;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast-success {
    background: var(--coffee-900);
    color: var(--volt-400);
    border-color: var(--volt-400);
}

.toast-error {
    background: var(--red-50);
    color: #7f1d1d;
    border-color: #fecaca;
}

.toast-info {
    background: var(--white);
    color: var(--coffee-900);
    border-color: var(--coffee-200);
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
}

.toast-close:hover {
    opacity: 1;
}

/* ==================== FORMS ==================== */

.stacked-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section h2 {
    font-family: "Inter", sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--coffee-400);
    border-bottom: 1px solid var(--coffee-100);
    padding-bottom: 0.6rem;
    margin-bottom: 1rem;
}

.form-subheading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--coffee-500);
    margin: 1rem 0 0.5rem 0;
}

.form-grid {
    display: grid;
    gap: 1.25rem;
}

.form-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.form-grid-stack {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-field {
    margin-bottom: 1rem;
}

.form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--coffee-900);
    margin-bottom: 0.4rem;
}

.form-field-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0.4rem;
}

.form-field-header label {
    margin-bottom: 0;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="url"], input[type="number"], select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--coffee-50);
    border: 1px solid var(--coffee-200);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--coffee-900);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(70, 130, 180, 0.4);
    border-color: var(--volt-400);
}

textarea {
    resize: vertical;
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--coffee-800);
}

.custom-facility-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.custom-facility-row input {
    flex: 1;
}

.form-submit-row {
    padding-top: 1rem;
}

.form-submit-row-inline {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-top: 0.5rem;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-warning {
    background: #fefce8;
    border: 1px solid #fde68a;
    color: #854d0e;
}

.alert-error {
    background: var(--red-50);
    border: 1px solid #fecaca;
    color: #7f1d1d;
}

.alert-info {
    background: rgba(70, 130, 180, 0.1);
    border: 1px solid rgba(70, 130, 180, 0.3);
    color: var(--coffee-800);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.alert-info-title {
    font-weight: 700;
    color: var(--coffee-900);
}

/* ==================== TAG CHIPS ==================== */

.tag-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tag-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--coffee-200);
    background: var(--white);
    color: var(--coffee-800);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.tag-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.tag-chip:hover {
    border-color: var(--coffee-900);
    background: var(--coffee-50);
}

.tag-chip-selected {
    background: var(--coffee-900);
    color: var(--volt-400);
    border-color: var(--coffee-900);
    box-shadow: var(--shadow-sm);
}

.tag-chip-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.4rem;
    scrollbar-width: thin;
}

.tag-chip-scroll::-webkit-scrollbar {
    height: 6px;
}

.tag-chip-scroll::-webkit-scrollbar-thumb {
    background: var(--coffee-200);
    border-radius: var(--radius-full);
}

.tag-chip-scroll .tag-chip {
    flex-shrink: 0;
}

.mini-tag {
    font-size: 0.7rem;
    background: var(--coffee-50);
    color: var(--coffee-800);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--coffee-200);
}

.pill-city {
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--coffee-100);
    color: var(--coffee-600);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.facility-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--coffee-50);
    border: 1px solid var(--coffee-200);
    border-radius: var(--radius-full);
    padding: 0.4rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--coffee-900);
}

.facility-chip i {
    color: var(--emerald-600);
}

/* ==================== HOME PAGE ==================== */

.home-layout {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 64px);
}

@media (min-width: 900px) {
    .home-layout {
        flex-direction: row;
    }
}

.home-sidebar {
    display: flex;
    flex-direction: column;
    background: var(--coffee-50);
    width: 100%;
    border-right: 1px solid var(--coffee-200);
}

@media (min-width: 900px) {
    .home-sidebar {
        width: 475px;
        flex-shrink: 0;
        height: calc(100vh - 64px);
    }
}

.home-search-form {
    padding: 1rem;
    border-bottom: 1px solid var(--coffee-200);
    background: var(--white);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.home-filter-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

@media (max-width: 480px) {
    .home-filter-controls {
        grid-template-columns: 1fr;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--coffee-600);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.filter-label i {
    color: var(--volt-400);
    font-size: 0.75rem;
}

.filter-select {
    width: 100%;
    padding: 0.45rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--coffee-50);
    border: 1px solid var(--coffee-200);
    border-radius: var(--radius-sm);
    color: var(--coffee-900);
    cursor: pointer;
    text-overflow: ellipsis;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--volt-400);
    box-shadow: 0 0 0 2px rgba(240, 128, 0, 0.2);
}

.filter-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: var(--coffee-50);
    border: 1px solid var(--coffee-200);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: var(--coffee-600);
}

.filter-count-label {
    font-weight: 600;
    color: var(--coffee-800);
}

.filter-reset-link {
    color: var(--volt-400);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-size: 0.75rem;
    text-decoration: none;
}

.filter-reset-link:hover {
    text-decoration: underline;
}

.search-input-wrap {
    position: relative;
}

.search-input-wrap i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--coffee-500);
}

.search-input-wrap input {
    padding-left: 2.5rem;
}

.home-shop-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--coffee-500);
}

.empty-state i {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state-large {
    background: var(--coffee-50);
    border: 2px dashed var(--coffee-200);
    border-radius: var(--radius-lg);
    padding: 3rem 1rem;
}

.empty-state-dashed {
    grid-column: 1 / -1;
    border: 2px dashed var(--coffee-200);
    border-radius: var(--radius-md);
    padding: 2rem 1rem;
}

.shop-card {
    display: block;
    background: transparent;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--coffee-100);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.shop-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(70, 130, 180, 0.5);
}

.shop-card-image-wrap {
    position: relative;
    height: 175px;
    overflow: hidden;
    background: var(--coffee-100);
    flex-shrink: 0;
}

.shop-card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    position: absolute;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-claimed {
    top: 0.75rem;
    right: 0.75rem;
    background: var(--volt-400);
    color: var(--white);
}

.badge-rating {
    bottom: 0.75rem;
    left: 0.75rem;
    background: rgba(0, 0, 0, 0.6);
    color: var(--white);
}

.badge-verified {
    background: var(--volt-400);
    color: var(--white);
    position: static;
}

.badge-dark {
    background: rgba(0, 0, 0, 0.35);
    color: var(--white);
    position: static;
}

.shop-card-body {
    padding: 1rem;
}

.shop-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    padding-top: 0.5rem;
}

.shop-card-header h3 {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    overflow-wrap: anywhere;
}

.shop-card-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
}

.shop-card-header .pill-city {
    flex: 0 1 auto;
    overflow-wrap: anywhere;
    text-align: center;
}

.pill-distance {
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(240, 128, 0, 0.12);
    color: var(--volt-400);
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(240, 128, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.pill-distance i {
    font-size: 0.65rem;
}

.shop-card-rating {
    margin: 0 0 0.65rem;
    color: var(--coffee-600);
    font-size: 0.85rem;
    font-weight: 600;
}

.shop-card-rating i {
    color: #eab308;
}

.home-map-section {
    flex: 1;
    position: relative;
    background: var(--coffee-100);
    min-height: 400px;
}

@media (min-width: 900px) {
    .home-map-section {
        height: calc(100vh - 64px);
    }
}

.map-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
    z-index: 0;
}

.map-locate-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    background: var(--white);
    color: var(--coffee-900);
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.map-locate-btn:hover {
    background: var(--coffee-50);
}

.home-map-search-mobile {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 4.5rem;
    z-index: 500;
}

.home-map-search-mobile form {
    position: relative;
}

.home-map-search-mobile i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--coffee-500);
}

.home-map-search-mobile input {
    padding-left: 2.75rem;
    box-shadow: var(--shadow-md);
}

@media (min-width: 900px) {
    .home-map-search-mobile {
        display: none;
    }
}

.mobile-view-toggle {
    display: none;
}

@media (max-width: 899px) {
    .mobile-view-toggle {
        display: flex;
        position: fixed;
        bottom: 1.5rem;
        left: 50%;
        transform: translateX(-50%);
        background: var(--coffee-900);
        border-radius: var(--radius-full);
        box-shadow: var(--shadow-lg);
        z-index: 1000;
        padding: 0.25rem;
    }
    .home-sidebar.hidden-mobile,
    .home-map-section.hidden-mobile {
        display: none;
    }
}

.view-toggle-btn {
    background: none;
    border: none;
    color: var(--volt-400);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}

.view-toggle-btn.active {
    background: var(--volt-400);
    color: var(--white);
}

/* Custom leaflet marker pin */
.custom-marker-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.custom-marker-pin {
    width: 26px;
    height: 26px;
    background: var(--coffee-900);
    border: 3px solid var(--volt-400);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: var(--shadow-md);
}

.custom-marker-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--white);
    border: 1px solid var(--coffee-200);
    border-radius: var(--radius-full);
    padding: 0.15rem 0.55rem;
    margin-bottom: 0.3rem;
    box-shadow: var(--shadow-sm);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--coffee-900);
    white-space: nowrap;
    max-width: 160px;
}

.custom-marker-name {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.custom-marker-rating {
    color: var(--coffee-600);
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.custom-marker-rating i {
    color: #eab308;
    font-size: 0.65rem;
}

/* ==================== SHOP DETAIL ==================== */

.shop-detail-page {
    background: var(--coffee-50);
    min-height: 100vh;
    padding-bottom: 4rem;
}

.shop-hero {
    height: 50vh;
    min-height: 320px;
    width: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.shop-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.shop-hero-back {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(6px);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.shop-hero-back:hover {
    background: var(--white);
    color: var(--coffee-900);
}

.visited-stamp {
    position: absolute;
    top: 5.5rem;
    right: 2rem;
    transform: rotate(12deg);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(70, 130, 180, 0.8);
    background: rgba(44, 32, 22, 0.8);
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.visited-stamp-brand {
    color: var(--volt-400);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.visited-stamp-label {
    font-family: "Fraunces", serif;
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0.1rem 0;
}

.shop-hero-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem;
    color: var(--white);
}

.shop-hero-info h1 {
    color: var(--white);
    font-size: 2.6rem;
    margin: 0.4rem 0;
}

.shop-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.shop-detail-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .shop-detail-grid {
        grid-template-columns: 2fr 1fr;
        /* Without this, the sidebar column stretches to match the (much
           taller) main column's height by default, giving the sticky card
           room to keep floating down past the community card below it. */
        align-items: start;
    }
}

.shop-description {
    font-size: 1.1rem;
    color: rgba(44, 32, 22, 0.8);
    margin-bottom: 1.25rem;
}

.vibe-vote-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.vibe-vote-chip {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--coffee-50);
    border: 1px solid var(--coffee-200);
    border-radius: var(--radius-full);
    padding: 0.25rem 0.3rem 0.25rem 0.85rem;
}

.vibe-vote-label {
    font-size: 0.75rem;
    font-weight: 600;
}

.vibe-vote-score {
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-full);
}

.score-good { color: var(--emerald-600); background: #ecfdf5; }
.score-mid { color: var(--amber-600); background: #fffbeb; }
.score-bad { color: var(--red-500); background: var(--red-50); }
.score-new { color: var(--coffee-400); background: var(--coffee-100); }

.vibe-vote-btn {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--coffee-500);
    cursor: pointer;
}

.vibe-vote-btn:hover {
    background: var(--volt-400);
    color: var(--white);
}

.section-header-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.segmented-control {
    display: flex;
    padding: 0.25rem;
    background: var(--coffee-100);
    border-radius: var(--radius-full);
    width: fit-content;
}

.segmented-btn {
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
    border: none;
    background: transparent;
    color: var(--coffee-500);
    cursor: pointer;
}

.segmented-btn.active {
    background: var(--white);
    color: var(--coffee-900);
    box-shadow: var(--shadow-sm);
}

.gallery-grid {
    columns: 2;
    gap: 1rem;
}

@media (min-width: 768px) {
    .gallery-grid {
        columns: 3;
    }
}

.gallery-item {
    position: relative;
    break-inside: avoid;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1rem;
    background: var(--coffee-200);
    cursor: zoom-in;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-item-type {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.5);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
}

.gallery-item-delete {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: var(--red-500);
    color: var(--white);
    border: none;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.upload-photo-row {
    margin-top: 1.5rem;
}

.vibe-check-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .vibe-check-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.vibe-check-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--white);
    border: 1px solid transparent;
    color: var(--coffee-400);
}

.vibe-check-active {
    background: var(--coffee-50);
    border-color: var(--coffee-200);
    color: var(--coffee-900);
    box-shadow: var(--shadow-sm);
}

.vibe-check-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--coffee-300, var(--coffee-200));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--volt-400);
    font-size: 0.6rem;
}

.vibe-check-active .vibe-check-box {
    background: var(--coffee-900);
    border-color: var(--coffee-900);
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.reviews-card {
    margin-top: 1rem;
    border-top: 3px solid var(--volt-400);
}

.review-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--coffee-100);
    transition: transform 0.15s ease;
}

.review-item:hover {
    transform: translateX(2px);
}

.review-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--coffee-100);
    flex-shrink: 0;
    border: 2px solid var(--coffee-100);
}

.review-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-username {
    font-weight: 700;
    font-size: 0.9rem;
}

.review-date {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--coffee-400);
}

.star-rating .star-filled {
    color: #eab308;
}

.star-rating .star-empty {
    color: #d1d5db;
}

.sticky-card {
    position: static;
}

.verified-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--coffee-900);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.verified-banner i {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--volt-400);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.verified-banner-title {
    color: var(--volt-400);
    font-weight: 700;
    font-size: 0.85rem;
    margin: 0;
}

.verified-banner-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
    margin: 0;
}

.detail-block {
    margin-bottom: 1.5rem;
}

.detail-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--coffee-400);
    margin-bottom: 0.3rem;
}

.hours-list p {
    margin: 0.15rem 0;
    font-size: 0.9rem;
}

.hours-list span {
    font-weight: 600;
}

.action-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.claim-block {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--coffee-100);
    text-align: center;
}

.pending-banner {
    background: #fefce8;
    border: 1px solid #fde68a;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    color: #854d0e;
    font-weight: 700;
    font-size: 0.75rem;
}

.facepile {
    display: flex;
    margin-bottom: 0.75rem;
}

.facepile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-left: -10px;
}

.facepile-avatar:first-child {
    margin-left: 0;
}

.facepile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-list {
    margin-top: 0.5rem;
}

/* ==================== MODALS AND LIGHTBOX ==================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(44, 32, 22, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--coffee-500);
    cursor: pointer;
    font-size: 1rem;
}

.modal-close:hover,
.modal-close:focus-visible {
    background: var(--coffee-100);
    color: var(--coffee-900);
}

.modal-subtitle {
    color: var(--coffee-600);
    font-size: 0.9rem;
    margin-top: -0.5rem;
}

.star-picker {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.25rem 0;
}

.star-picker-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #e5e7eb;
    cursor: pointer;
}

.star-picker-btn.active {
    color: #facc15;
}

.modal-card textarea {
    margin-bottom: 1.25rem;
    text-align: left;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.people-say-card h2 i {
    color: #facc15;
}

.people-say-list {
    display: grid;
    gap: 0.75rem;
}

.people-say-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--coffee-100);
}

.people-say-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.people-say-item h3 {
    margin: 0;
    font-family: inherit;
    font-size: 0.95rem;
}

.people-say-average {
    margin: 0.15rem 0 0;
    color: var(--coffee-500);
    font-size: 0.8rem;
}

.people-say-stars {
    display: flex;
    flex: 0 0 auto;
}

.people-say-star {
    padding: 0.2rem;
    border: 0;
    background: transparent;
    color: #d1d5db;
    cursor: pointer;
    font-size: 1rem;
}

.people-say-star:hover,
.people-say-star:focus-visible,
.people-say-star.active {
    color: #facc15;
}

@media (max-width: 480px) {
    .people-say-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-height: 85vh;
    max-width: 90vw;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
    font-weight: 700;
}

/* ==================== ADD SPOT / EDIT SHOP ==================== */

.form-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 6rem 1.25rem 3rem;
}

.form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--coffee-100);
}

.form-card-accent {
    border-top: 4px solid var(--volt-400);
}

.form-header {
    margin-bottom: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .form-header {
        text-align: left;
    }
}

.form-header-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.location-picker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--coffee-50);
    border: 1px solid var(--coffee-100);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.photo-grid-item, .photo-preview-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--coffee-50);
}

.photo-grid-item img, .photo-preview-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-keep-toggle {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.55);
    color: var(--white);
    font-size: 0.7rem;
    text-align: center;
    padding: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.photo-preview-remove {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--red-500);
    color: var(--white);
    border: none;
    font-size: 0.7rem;
    cursor: pointer;
}

.upload-tile {
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 200px;
    border-radius: var(--radius-md);
    border: 2px dashed var(--coffee-200);
    background: transparent;
    color: var(--coffee-400);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.8rem;
}

.upload-tile:hover {
    border-color: var(--volt-400);
    color: var(--volt-500);
    background: var(--coffee-50);
}

/* ==================== AUTH ==================== */

.auth-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    border: 1px solid var(--coffee-100);
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo {
    width: 72px;
    height: 72px;
    background: var(--coffee-900);
    color: var(--volt-400);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    background: var(--coffee-50);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--coffee-400);
}

.auth-tab-active {
    background: var(--white);
    color: var(--coffee-900);
    box-shadow: var(--shadow-sm);
}

.auth-footnote {
    text-align: center;
    font-size: 0.75rem;
    color: var(--coffee-400);
    margin-top: 1.5rem;
}

/* ==================== CLAIM SHOP ==================== */

.centered-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.centered-card {
    text-align: center;
    max-width: 420px;
}

.claim-header {
    background: var(--coffee-900);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    margin: -2rem -2rem 2rem -2rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.claim-header h1 {
    color: var(--volt-400);
}

.claim-header p {
    opacity: 0.8;
    margin: 0;
}

/* ==================== ADMIN DASHBOARD ==================== */

.admin-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 6rem 1.25rem 3rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-section {
    padding: 0;
    overflow: hidden;
}

.admin-section-header {
    background: var(--coffee-900);
    padding: 1.5rem;
}

.admin-section-header h2 {
    color: var(--volt-400);
    margin: 0;
    font-size: 1.2rem;
}

.admin-section-header-light {
    background: transparent;
    border-bottom: 1px solid var(--coffee-100);
}

.admin-section-header-light h2 {
    color: var(--coffee-900);
    font-size: 1.05rem;
}

.admin-history {
    opacity: 0.9;
}

.admin-list {
    display: flex;
    flex-direction: column;
}

.admin-list-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 1px solid var(--coffee-100);
    flex-wrap: wrap;
}

.admin-list-row:last-child {
    border-bottom: none;
}

.admin-history-row {
    justify-content: space-between;
}

.admin-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.admin-list-info {
    flex: 1;
    min-width: 160px;
}

.admin-list-title {
    font-weight: 700;
    margin: 0;
}

.admin-list-actions {
    display: flex;
    gap: 0.6rem;
}

.admin-claim-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--coffee-100);
}

@media (min-width: 768px) {
    .admin-claim-row {
        flex-direction: row;
        align-items: center;
    }
}

.admin-claim-info {
    flex: 1;
}

.admin-claim-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.admin-claim-title-row h3 {
    margin: 0;
    font-size: 1.1rem;
}

.admin-claim-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--coffee-50);
    border: 1px solid var(--coffee-100);
    border-radius: var(--radius-md);
    padding: 0.6rem;
    font-size: 0.85rem;
}

.admin-claim-detail i {
    width: 32px;
    height: 32px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--coffee-400);
    flex-shrink: 0;
}

.link-text {
    color: #2563eb;
    text-decoration: underline;
}

.status-verified {
    color: var(--emerald-600);
    font-weight: 700;
    font-size: 0.85rem;
}

/* ==================== PROFILE ==================== */

.profile-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 5.5rem 1rem 3rem;
}

.profile-header-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .profile-header-card {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }
}

.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--coffee-100);
}

.profile-avatar-edit-btn {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
}

.profile-info {
    flex: 1;
    width: 100%;
}

.profile-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .profile-name-row {
        justify-content: flex-start;
    }
}

.profile-name-row h1 {
    margin: 0;
    font-size: 1.8rem;
}

.drip-score-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--coffee-900);
    color: var(--volt-400);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
}

.profile-bio {
    font-style: italic;
    color: var(--coffee-700, var(--coffee-600));
    margin-bottom: 1rem;
}

.social-icon-row {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .social-icon-row {
        justify-content: flex-start;
    }
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--coffee-50);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.social-icon:hover {
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.profile-stats-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .profile-stats-row {
        justify-content: flex-start;
    }
}

.profile-stat {
    text-align: center;
    padding-left: 1rem;
    border-left: 1px solid var(--coffee-100);
}

.profile-stat:first-child {
    border-left: none;
    padding-left: 0;
}

.profile-stat span {
    display: block;
    font-weight: 700;
    font-size: 1.3rem;
}

.profile-stat small {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--coffee-500);
}

.profile-actions-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    align-items: center;
}

@media (min-width: 768px) {
    .profile-actions-row {
        justify-content: flex-start;
    }
}

.profile-edit-form {
    max-width: 420px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .profile-edit-form {
        margin: 0;
    }
}

.profile-connections-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .profile-connections-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.connection-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.connection-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
}

.connection-item:hover {
    background: var(--coffee-50);
}

.connection-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.connection-item span {
    font-weight: 700;
    font-size: 0.9rem;
}

.profile-section {
    margin-bottom: 2.5rem;
}

.profile-section-last {
    margin-bottom: 4rem;
}

.section-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .badge-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .badge-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (min-width: 1280px) {
    .badge-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.badge-tile {
    min-height: 140px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    text-align: center;
    border: 2px solid;
}

.badge-unlocked {
    background: var(--coffee-50);
    border-color: var(--volt-400);
    box-shadow: var(--shadow-md);
}

.badge-locked {
    background: #f9fafb;
    border-color: #f3f4f6;
    filter: grayscale(1);
    opacity: 0.6;
}

.badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.badge-unlocked .badge-icon {
    background: var(--coffee-900);
    color: var(--volt-400);
}

.badge-locked .badge-icon {
    background: #e5e7eb;
    color: #9ca3af;
}

.badge-tile h3 {
    font-size: 0.75rem;
    margin: 0 0 0.2rem 0;
}

.badge-tile p {
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--coffee-500);
    margin: 0;
}

.badge-unlocked-tag {
    margin-top: 0.5rem;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--white);
    background: var(--volt-400);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
}

.passport-book {
    background: #fdfbf7;
    border: 2px solid var(--coffee-900);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
    .passport-book {
        padding: 2.5rem;
    }
}

.passport-city-group {
    margin-bottom: 2rem;
}

.passport-city-group:last-child {
    margin-bottom: 0;
}

.passport-city-group h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--coffee-500);
    border-bottom: 1px solid var(--coffee-200);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.passport-stamp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .passport-stamp-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .passport-stamp-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.passport-stamp {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto;
    border-radius: 50%;
    border: 3px solid rgba(44, 32, 22, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem;
    color: rgba(44, 32, 22, 0.6);
    transition: transform 0.2s ease;
}

.passport-stamp:hover {
    transform: scale(1.08);
    border-color: var(--coffee-900);
    color: var(--coffee-900);
}

.passport-stamp-gold {
    border-color: rgba(234, 179, 8, 0.6);
    color: #a16207;
    background: rgba(254, 252, 232, 0.5);
}

.passport-stamp-name {
    font-family: "Fraunces", serif;
    font-weight: 900;
    font-size: 0.65rem;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.passport-stamp-star {
    position: absolute;
    top: -0.5rem;
    right: -0.2rem;
    color: #facc15;
    font-size: 0.9rem;
}

.managed-shop-card, .saved-shop-card {
    display: block;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--coffee-100);
}

.managed-shop-card {
    border-left: 4px solid var(--volt-400);
    position: relative;
}

.managed-shop-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.managed-shop-header h3 {
    margin: 0;
    font-size: 1rem;
}

.managed-shop-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.managed-shop-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--volt-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 0.75rem;
    border-top: 1px solid var(--coffee-50);
}

.saved-shop-card h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.saved-shop-card:hover, .managed-shop-card:hover {
    box-shadow: var(--shadow-md);
}

/* ==================== CHATBOT WIDGET ==================== */

.chatbot-widget {
    position: fixed;
    right: 5rem;
    bottom: 1.5rem;
    z-index: 900;
}

.chatbot-launcher {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-full);
    background: var(--coffee-900);
    color: var(--volt-400);
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: transform 0.15s ease, background 0.2s ease;
}

.chatbot-launcher:hover {
    background: var(--coffee-800);
    transform: scale(1.05);
}

.chatbot-launcher-icon-close {
    display: none;
}

.chatbot-launcher-open .chatbot-launcher-icon-open {
    display: none;
}

.chatbot-launcher-open .chatbot-launcher-icon-close {
    display: inline;
}

.chatbot-panel {
    position: absolute;
    right: 0;
    bottom: 74px;
    width: min(360px, calc(100vw - 3rem));
    height: min(520px, calc(100vh - 160px));
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--coffee-200);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    background: var(--coffee-50);
    border-bottom: 1px solid var(--coffee-200);
}

.chatbot-panel-heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.chatbot-panel-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    background: var(--coffee-900);
    color: var(--volt-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.chatbot-panel-title {
    font-family: "Fraunces", serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--coffee-900);
}

.chatbot-panel-subtitle {
    font-size: 0.75rem;
    color: var(--coffee-500);
}

.chatbot-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--coffee-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.chatbot-icon-btn:hover {
    background: var(--coffee-100);
    color: var(--coffee-900);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: var(--white);
}

.chatbot-bubble {
    max-width: 85%;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.chatbot-bubble-bot {
    align-self: flex-start;
    background: var(--coffee-100);
    color: var(--coffee-900);
    border-bottom-left-radius: 4px;
}

.chatbot-bubble-user {
    align-self: flex-end;
    background: var(--coffee-900);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.chatbot-typing {
    align-self: flex-start;
    display: flex;
    gap: 0.3rem;
    padding: 0.65rem 0.9rem;
    background: var(--coffee-100);
    border-radius: var(--radius-md);
    border-bottom-left-radius: 4px;
}

.chatbot-typing span {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--coffee-500);
    animation: chatbot-bounce 1.2s infinite ease-in-out;
}

.chatbot-typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.chatbot-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes chatbot-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.chatbot-shop-card {
    align-self: stretch;
    background: var(--coffee-50);
    border: 1px solid var(--coffee-200);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.85rem;
}

.chatbot-shop-name {
    font-family: "Fraunces", serif;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--coffee-900);
}

.chatbot-shop-meta {
    font-size: 0.78rem;
    color: var(--coffee-500);
    margin-top: 0.15rem;
}

.chatbot-shop-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.chatbot-shop-tag {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--coffee-600);
    background: var(--coffee-100);
    border-radius: var(--radius-full);
    padding: 0.2rem 0.55rem;
}

.chatbot-shop-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--volt-500);
}

.chatbot-shop-link:hover {
    color: var(--volt-400);
}

.chatbot-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid var(--coffee-200);
    background: var(--coffee-50);
}

.chatbot-input {
    flex: 1;
    border: 1px solid var(--coffee-200);
    border-radius: var(--radius-full);
    padding: 0.55rem 0.9rem;
    font-size: 0.88rem;
    font-family: inherit;
    color: var(--coffee-900);
    background: var(--white);
}

.chatbot-input:focus {
    outline: none;
    border-color: var(--volt-400);
}

.chatbot-send-btn {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    border: none;
    background: var(--coffee-900);
    color: var(--volt-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.chatbot-send-btn:hover {
    background: var(--coffee-800);
}

@media (max-width: 480px) {
    .chatbot-widget {
        left: 1rem;
        bottom: 1rem;
    }

    .chatbot-panel {
        width: calc(100vw - 2rem);
    }
}
