/* ============================================================
   URLABURDA — Main stylesheet
   Design system: white surface, Aegean teal primary, warm coral
   accent (the brand heart), Inter typography. Mobile-first.
   ============================================================ */

:root {
    /* Palette */
    --sea:         #0e7490;   /* Aegean teal (primary) */
    --sea-dark:    #155e75;
    --sea-light:   #e8f4f8;
    --olive:       #6d7f45;   /* olive green (secondary) */
    --olive-dark:  #52632f;
    --olive-light: #f0f3e8;
    --terracotta:  #d9543f;   /* warm coral (brand heart) */
    --sand:        #f5f7f8;   /* light gray surface (inputs, wells) */
    --sand-dark:   #e9edef;
    --white:       #ffffff;
    --ink:         #101a20;   /* body text */
    --muted:       #64737c;
    --line:        #e4e9ec;
    --error:       #b3402e;
    --success:     #2f7d46;
    --info:        #0e7490;
    --shadow:      0 1px 2px rgba(16, 26, 32, .05);
    --shadow-hover: 0 6px 20px rgba(16, 26, 32, .08);
    --radius:      12px;
    --font-display: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    --font-body:    'Inter', -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    padding-bottom: 70px; /* space for the mobile bottom bar */
}

a { color: var(--sea); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 {
    font-family: var(--font-display); color: var(--ink);
    line-height: 1.25; font-weight: 800; letter-spacing: -0.02em;
}
img { max-width: 100%; }
input, select, textarea, button { font: inherit; color: inherit; }

/* ---------- Common components ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 18px; border-radius: 999px; border: none; cursor: pointer;
    font-weight: 700; font-size: 14px; text-decoration: none !important;
    transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--sea); color: var(--white); }
.btn-primary:hover { background: var(--sea-dark); }
.btn-outline { background: transparent; color: var(--sea); border: 1.5px solid var(--sea); }
.btn-outline:hover { background: var(--sea-light); }
.btn-sm { padding: 5px 14px; font-size: 13px; }
.btn-logout { color: var(--terracotta); border-color: var(--terracotta); }
.btn-logout:hover { background: #fdf0e9; }
.btn-block { width: 100%; padding: 12px; font-size: 16px; }
.link-btn { background: none; border: none; color: var(--sea); cursor: pointer; padding: 0; font-size: 14px; }
.link-btn:hover { text-decoration: underline; }

.muted { color: var(--muted); }
.verified { color: var(--sea); font-size: .85em; }
.role-badge {
    display: inline-block; font-family: var(--font-body); font-size: 11px; font-weight: 800;
    background: var(--olive-light); color: var(--olive-dark);
    padding: 2px 8px; border-radius: 999px; vertical-align: middle;
}

.avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
    background: linear-gradient(135deg, #1993b4, var(--sea-dark));
    color: var(--white); font-weight: 700; font-size: 15px; letter-spacing: .5px;
    user-select: none;
}
.avatar-sm { width: 34px; height: 34px; font-size: 12px; }
.avatar-lg { width: 84px; height: 84px; font-size: 26px; border: 4px solid var(--white); box-shadow: var(--shadow); }
.avatar-img { overflow: hidden; background: var(--sand-dark); }
.avatar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Profile photo uploader: camera badge on the avatar (like the big platforms) */
.avatar-uploader { position: relative; display: inline-block; }
.avatar-cam {
    position: absolute; right: -3px; bottom: -3px;
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--white); border: 1.5px solid var(--line);
    box-shadow: var(--shadow); cursor: pointer; font-size: 15px; padding: 0;
    transition: transform .1s ease, border-color .1s ease;
}
.avatar-cam:hover { transform: scale(1.1); border-color: var(--sea); }
.avatar-uploader.busy { opacity: .55; pointer-events: none; }
.avatar-uploader.busy .avatar-cam { animation: avatar-pulse 1s ease-in-out infinite; }
@keyframes avatar-pulse { 50% { transform: scale(.88); } }

/* Photo row in settings */
.avatar-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.avatar-edit .avatar-lg { border-color: var(--sand); box-shadow: none; }
.avatar-edit-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.avatar-remove-btn { color: var(--terracotta); font-size: 13px; font-weight: 700; }

.alert {
    padding: 10px 14px; border-radius: var(--radius); margin: 0 0 14px;
    font-size: 14px; border: 1px solid transparent;
}
.alert-error   { background: #fdefec; color: var(--error); border-color: #f3d0c8; }
.alert-success { background: #ecf6ef; color: var(--success); border-color: #cfe6d6; }
.alert-info    { background: var(--sea-light); color: var(--sea-dark); border-color: #cfe6ee; }

.empty-state {
    background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius);
    padding: 28px 18px; text-align: center; color: var(--ink);
}
.section-title { font-size: 19px; margin: 22px 0 12px; }
.back-link { display: inline-block; margin-bottom: 12px; font-weight: 700; }
.pagination { text-align: center; margin: 18px 0; }

.chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--white); border: 1px solid var(--line); border-radius: 999px;
    padding: 4px 12px; font-size: 13px; font-weight: 600; color: var(--ink);
    text-decoration: none !important; white-space: nowrap;
}
.chip:hover { border-color: var(--sea); color: var(--sea); }
.chip.active { background: var(--sea); border-color: var(--sea); color: var(--white); }

/* Feed selector: Urla + neighborhood feeds (horizontally scrollable) */
.feed-chips {
    display: flex; gap: 8px; overflow-x: auto;
    padding: 2px 2px 10px; margin-bottom: 8px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.feed-chips::-webkit-scrollbar { display: none; }
.feed-chips .chip { flex: 0 0 auto; padding: 6px 14px; }
.chip small { font-size: 11px; font-weight: 800; opacity: .65; margin-left: 4px; }
.feed-chips .chip.mine:not(.active) { border-color: var(--sea); color: var(--sea-dark); font-weight: 800; }
.feed-context {
    background: var(--sea-light); color: var(--sea-dark);
    border-radius: var(--radius); padding: 10px 14px;
    font-size: 14px; margin-bottom: 12px;
}

.badge {
    background: var(--terracotta); color: var(--white); font-size: 10px; font-weight: 800;
    border-radius: 999px; padding: 1px 5px; vertical-align: top;
}

/* ---------- Top bar ---------- */

.top-bar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.top-bar-inner {
    max-width: 1180px; margin: 0 auto; padding: 10px 14px;
    display: flex; align-items: center; gap: 12px;
}
.logo { display: flex; align-items: center; text-decoration: none !important; }
/* Wordmark: "urla" + heart + "burda" */
.logo-text {
    display: inline-flex; align-items: center; gap: 1px;
    font-family: var(--font-display);
    font-weight: 800; font-size: 22px; line-height: 1;
    color: var(--ink); letter-spacing: -0.045em;
}
.logo-heart {
    width: .8em; height: .8em; margin: 1px .06em 0;
    color: var(--terracotta); flex: 0 0 auto;
    transition: transform .15s ease;
}
.logo:hover .logo-heart { transform: scale(1.15); }
.top-search { flex: 1; max-width: 420px; margin-left: auto; }
.top-search input {
    width: 100%; padding: 9px 16px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--white); outline: none;
}
.top-search input:focus { border-color: var(--sea); }
.top-right { display: flex; align-items: center; gap: 10px; }
.top-icon { font-size: 20px; position: relative; text-decoration: none !important; }
.top-avatar { text-decoration: none !important; }

/* ---------- Main layout ---------- */

.container {
    max-width: 1180px; margin: 0 auto; padding: 16px 14px;
    display: grid; grid-template-columns: 1fr; gap: 20px;
}
.side-nav { display: none; }
.right-panel { display: none; }
.main { min-width: 0; }

/* Tablet and up: side nav visible */
@media (min-width: 760px) {
    body { padding-bottom: 0; }
    .bottom-bar { display: none !important; }
    .container { grid-template-columns: 200px minmax(0, 1fr); }
    /* Not sticky: the menu is long, so it scrolls with the page
       (no inner scrollbar of its own). */
    .side-nav {
        display: flex; flex-direction: column; gap: 4px;
        align-self: start; padding-bottom: 12px;
    }
}

/* Desktop: right panel visible too */
@media (min-width: 1060px) {
    .container { grid-template-columns: 210px minmax(0, 1fr) 310px; }
    .right-panel { display: block; position: sticky; top: 74px; align-self: start; }
}

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 999px;
    font-size: 15px; font-weight: 600; color: var(--ink);
    text-decoration: none !important;
}
.nav-item:hover { background: var(--sand); }
.nav-item.active { background: var(--sea-light); color: var(--sea-dark); font-weight: 700; }
.nav-icon { font-size: 19px; width: 24px; text-align: center; }
.nav-badge { margin-left: auto; }
.nav-post-btn { margin-top: 10px; }
.nav-logout { margin-top: 18px; color: var(--muted); font-size: 14px; }
.nav-item-wrap { position: relative; }
.nav-item-wrap .nav-item { padding-right: 44px; }
.nav-compose {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%; color: var(--sea);
}
.nav-compose:hover { background: var(--sea-light); color: var(--sea-dark); }
.nav-section {
    margin: 16px 14px 4px; font-size: 11.5px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.nav-item.nav-cat { padding: 7px 10px 7px 14px; font-size: 14px; font-weight: 500; gap: 8px; }
.nav-item.nav-cat.active { font-weight: 700; }
.nav-item.nav-cat .nav-icon { width: 20px; }
.nav-cat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count {
    margin-left: auto; flex: 0 0 auto;
    font-size: 11px; font-weight: 700; color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.nav-item.nav-cat.active .nav-count { color: var(--sea-dark); }

/* ---------- Mobile bottom bar ---------- */

.bottom-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    display: flex; justify-content: space-around; align-items: center;
    background: var(--white); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-bar a {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    font-size: 20px; color: var(--muted); text-decoration: none !important;
    min-width: 56px; position: relative;
}
.bottom-bar a small { font-size: 10px; font-weight: 700; }
.bottom-bar a:not(.bottom-post) > span { display: inline-flex; align-items: center; justify-content: center; height: 24px; }
.bottom-bar a.active .icn { stroke-width: 2.4; }
.bottom-bar a.active { color: var(--sea); }
.bottom-post span {
    display: flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; margin-top: -20px; border-radius: 50%;
    background: var(--sea); color: var(--white);
    box-shadow: 0 4px 14px rgba(14, 116, 144, .35); font-size: 22px;
}
.bottom-dot {
    position: absolute; top: 0; right: 8px; width: 8px; height: 8px;
    background: var(--terracotta); border-radius: 50%;
}

/* ---------- Hero (guests) ---------- */

.hero {
    background: linear-gradient(135deg, #f2f8fa, #fdf6f4);
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 34px 26px; margin-bottom: 18px;
}
.hero h1 { color: var(--ink); font-size: 28px; margin: 0 0 8px; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: var(--terracotta); }
.hero p { margin: 0 0 18px; color: var(--muted); max-width: 560px; font-size: 15.5px; }
.hero .hero-tagline { color: var(--sea-dark); font-weight: 600; margin-bottom: 6px; }
.hero-more { margin-left: 14px; font-weight: 600; color: var(--sea); }

/* ---------- About page ---------- */

.about-hero { margin-bottom: 14px; }
.about-box h2 { font-size: 18px; margin: 22px 0 8px; }
.about-box h2:first-child { margin-top: 0; }
.about-box p { line-height: 1.65; }
.about-list { margin: 8px 0 0; padding-left: 20px; line-height: 1.7; }
.about-list li { margin-bottom: 6px; }

.how-grid {
    display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px;
}
@media (min-width: 640px) {
    .how-grid { grid-template-columns: 1fr 1fr; }
}
.how-card {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 16px 16px 14px;
    box-shadow: var(--shadow);
}
.how-card-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 10px; margin-bottom: 10px;
    background: var(--sea-light); color: var(--sea-dark);
}
.how-card h3 { margin: 0 0 6px; font-size: 16px; }
.how-card p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.how-courtesy {
    background: linear-gradient(135deg, #f2f8fa, #fdf6f4);
    border: 1px solid var(--line); border-left: 4px solid var(--terracotta);
    border-radius: var(--radius); padding: 16px 18px; margin: 16px 0 0;
}
.how-courtesy h2 { margin-top: 0; }
.how-cta { margin-top: 18px; }

/* ---------- Compose box ---------- */

/* Icon-only neighborhood picker: the native select sits invisible on top
   so tapping opens the OS picker; a selection just tints the icon (.on). */
.compose-neigh-wrap { position: relative; overflow: hidden; }
.compose-neigh {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; border: none; cursor: pointer; font-family: inherit;
}
.compose-neigh-wrap:focus-within { border-color: var(--sea); color: var(--sea); }

.compose-box {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px; margin-bottom: 16px;
    box-shadow: var(--shadow);
}
/* Post detail: breathing room between the post and the reply box */
.feed + .compose-box { margin-top: 18px; }
.compose-top { display: flex; gap: 12px; }
.compose-box textarea {
    flex: 1; border: none; outline: none; resize: none;
    font-size: 17px; padding-top: 8px; background: transparent; min-height: 48px;
}
.compose-bottom {
    display: flex; align-items: center; justify-content: flex-end; gap: 14px;
    border-top: 1px solid var(--sand-dark); margin-top: 10px; padding-top: 10px;
}
.char-counter { font-size: 13px; font-weight: 700; color: var(--muted); }
.char-counter.low { color: var(--terracotta); }
.compose-bottom .char-counter { margin-left: auto; }
.compose-geo {
    display: inline-flex; align-items: center; gap: 2px; white-space: nowrap;
    background: none; border: 1.5px dashed var(--line); border-radius: 999px;
    padding: 5px 11px; font-size: 15px; font-weight: 700; color: var(--muted);
    line-height: 1; cursor: pointer; transition: border-color .12s ease, color .12s ease;
}
.compose-geo .photo-label, .compose-geo #geo-label { font-size: 12px; }
.compose-geo:hover { border-color: var(--sea); color: var(--sea); }
.compose-geo.on { background: var(--sea-light); border-style: solid; border-color: var(--sea); color: var(--sea-dark); }
.compose-geo:disabled { opacity: .6; cursor: wait; }

/* Selected photo thumbnails inside the compose box */
.photo-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.photo-preview {
    position: relative; width: 76px; height: 76px; border-radius: 10px;
    overflow: hidden; border: 1px solid var(--line); flex: none;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-preview-del {
    position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
    border: none; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff;
    font-size: 11px; line-height: 20px; text-align: center; padding: 0; cursor: pointer;
}
.photo-preview-del:hover { background: rgba(0,0,0,.85); }

/* Photo grid on post cards (1-4 photos, Twitter style) */
.post-photos {
    display: grid; gap: 3px; margin-top: 10px;
    border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
}
.post-photos.count-2, .post-photos.count-3, .post-photos.count-4 { grid-template-columns: 1fr 1fr; }
.post-photo { display: block; cursor: zoom-in; background: var(--sand-dark); }
.post-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-photos.count-1 .post-photo img { height: auto; max-height: 460px; }
.post-photos.count-2 .post-photo,
.post-photos.count-4 .post-photo { height: 180px; }
.post-photos.count-3 .post-photo { height: 130px; }
.post-photos.count-3 .post-photo:first-child { grid-row: span 2; height: 263px; }

/* ---------- Admin panel ---------- */

/* Yönetim paneli: siteden bağımsız geniş yerleşim */
.admin-body { background: var(--sand); }
.admin-topbar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: 12px;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 10px 20px;
}
.admin-topbar .logo { text-decoration: none; }
.admin-topbar-label {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--sea-light); color: var(--sea-dark);
    font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
}
.admin-topbar-right { margin-left: auto; display: flex; gap: 8px; }
.admin-layout { display: flex; align-items: flex-start; min-height: calc(100vh - 58px); }
.admin-sidenav {
    flex: 0 0 220px; position: sticky; top: 58px;
    display: flex; flex-direction: column; gap: 2px;
    padding: 16px 12px; min-height: calc(100vh - 58px);
    background: var(--white); border-right: 1px solid var(--line);
}
.admin-sidenav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 10px;
    color: var(--ink); font-weight: 600; font-size: 14.5px; text-decoration: none;
}
.admin-sidenav a:hover { background: var(--sand); }
.admin-sidenav a.active { background: var(--sea-light); color: var(--sea-dark); }
.admin-main { flex: 1; min-width: 0; padding: 22px 28px 40px; }
.admin-page-title { margin: 0 0 16px; font-size: 24px; }
@media (max-width: 860px) {
    .admin-layout { flex-direction: column; }
    .admin-sidenav {
        position: static; flex: none; width: 100%; min-height: 0;
        flex-direction: row; overflow-x: auto; gap: 4px;
        padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line);
        scrollbar-width: none;
    }
    .admin-sidenav::-webkit-scrollbar { display: none; }
    .admin-sidenav a { flex: 0 0 auto; padding: 8px 12px; }
    .admin-main { width: 100%; padding: 16px 14px 32px; }
}
.admin-search { margin-bottom: 12px; }
.admin-stats {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px;
}
@media (min-width: 640px) { .admin-stats { grid-template-columns: repeat(4, 1fr); } }
.admin-stat {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px; text-align: center; box-shadow: var(--shadow);
}
.admin-stat strong { display: block; font-size: 22px; color: var(--sea-dark); }
.admin-stat small { color: var(--muted); }
.admin-cols { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .admin-cols { grid-template-columns: 1fr 1fr; } }
.admin-row-line { margin: 0 0 8px; font-size: 14px; }
.admin-table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.admin-table th {
    text-align: left; padding: 10px 12px; background: var(--sea-light);
    color: var(--sea-dark); font-size: 12px; text-transform: uppercase; letter-spacing: .4px;
}
.admin-table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.admin-row-off td { background: var(--sand); color: var(--muted); }
.admin-actions { white-space: nowrap; }
.admin-inline { display: inline-block; margin: 0 4px 4px 0; }
.btn-danger { border: 1px solid #c0392b; color: #c0392b; background: var(--white); }
.btn-danger:hover { background: #c0392b; color: var(--white); }
.admin-pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- Inline line icons (flat SVG) ---------- */

.icn { vertical-align: -0.18em; flex: 0 0 auto; }
.nav-icon { display: inline-flex; align-items: center; }
.top-icon { display: inline-flex; align-items: center; position: relative; }
.contact-list .icn { color: var(--sea); margin-right: 2px; }
.duty-icon { color: #c0392b; display: inline-flex; }
.like-btn .heart { display: inline-flex; }
.like-btn.liked { color: #e0245e; }
.like-btn.liked .heart svg { fill: #e0245e; stroke: #e0245e; }
.post-footer .action { display: inline-flex; align-items: center; gap: 5px; }
.chip .icn, .post-neigh .icn, .post-place .icn, .post-geo .icn,
.profile-neigh .icn, .place-card-neigh .icn { vertical-align: -0.15em; }

/* ---------- External ratings (Google) ---------- */

.grating {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12.5px; font-weight: 700; color: #444;
    background: #fff; border: 1px solid var(--line); border-radius: 999px;
    padding: 2px 9px; white-space: nowrap;
}
.grating em {
    font-style: normal; font-weight: 800; font-size: 11px; line-height: 16px;
    width: 16px; height: 16px; text-align: center; border-radius: 50%;
    background: conic-gradient(#ea4335 0 25%, #fbbc05 25% 50%, #34a853 50% 75%, #4285f4 75% 100%);
    color: #fff;
}
.grating small { font-weight: 600; color: var(--muted); }
.grating-lg { font-size: 14px; padding: 4px 12px; }
a.grating { text-decoration: none !important; color: inherit; }
a.grating:hover { border-color: #4285f4; box-shadow: 0 0 0 2px rgba(66, 133, 244, .12); }
.ext-ratings { margin-top: 4px; }

/* ---------- Duty pharmacy (nöbetçi eczane) ---------- */

.duty-card {
    background: #fff; border: 1px solid var(--line); border-left: 4px solid #c0392b;
    border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px;
}
.duty-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.duty-head h2, .duty-head h3 { margin: 0; font-size: 16px; }
.duty-head h2 a { color: inherit; text-decoration: none; }
.duty-head h2 a:hover { color: var(--sea); }
.duty-more { margin: 10px 0 0; font-size: 13px; font-weight: 700; }
.duty-page { display: grid; gap: 12px; margin-bottom: 18px; }
.duty-page-item h2 { margin: 0 0 4px; font-size: 18px; }
.feed-heading { font-size: 22px; margin: 2px 0 4px; }
.feed-lede { margin: 0 0 12px; font-size: 14px; }
.duty-item { border-top: 1px dashed var(--line); padding: 10px 0 4px; }
.duty-item strong { font-size: 15px; }
.duty-item p { margin: 4px 0; font-size: 13.5px; color: var(--ink); }
.duty-note { color: #a04000; font-weight: 600; }
.duty-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.btn-small { padding: 5px 12px; font-size: 13px; }

/* ---------- Tabs ---------- */

.tabs {
    display: flex; background: var(--white); border: 1px solid var(--line);
    border-radius: 999px; padding: 4px; margin-bottom: 16px;
}
.tabs a {
    flex: 1; text-align: center; padding: 8px 10px; border-radius: 999px;
    font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none !important;
}
.tabs a.active { background: var(--sea); color: var(--white); }

/* ---------- Post card ---------- */

.feed { display: flex; flex-direction: column; gap: 10px; }
.post {
    display: flex; gap: 12px;
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px;
    box-shadow: var(--shadow);
}
.post-avatar {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    flex: 0 0 auto; width: 88px; color: inherit;
}
.post-avatar-link { display: block; text-decoration: none !important; color: inherit; }
.post-avatar .avatar { width: 48px; height: 48px; font-size: 16px; }
.post-rank {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    max-width: 100%;
}
.post-rank-title {
    display: inline-block; max-width: 88px; box-sizing: border-box;
    font-size: 10px; font-weight: 800; font-style: normal;
    line-height: 1.25; text-align: center; letter-spacing: .015em;
    color: var(--rank-color, var(--sea));
    background: #f2f6f8;
    background: color-mix(in srgb, var(--rank-color, var(--sea)) 9%, #fff);
    border: 1px solid #e4e9ec;
    border-color: color-mix(in srgb, var(--rank-color, var(--sea)) 22%, #fff);
    border-radius: 999px; padding: 2px 9px 3px;
}
.post-avatar-neigh {
    display: inline-flex; align-items: center; gap: 3px; max-width: 88px;
    font-size: 11px; font-weight: 700; line-height: 1.2; text-align: center;
    color: var(--muted); text-decoration: none !important;
}
.post-avatar-neigh:hover { color: var(--sea-dark); }
.post-avatar-neigh .icn { flex: 0 0 auto; }
.rank-pips {
    display: flex; justify-content: center; align-items: center;
    gap: 2px; flex-wrap: wrap; max-width: 88px;
}
.rank-pip {
    display: block; flex: 0 0 auto;
    fill: #e2e8ec; stroke: none;
}
.rank-pip.on { fill: var(--rank-color, #e3b341); stroke: none; }
.post-body { flex: 1; min-width: 0; }
.post-header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.post-author { display: flex; align-items: center; gap: 5px; color: var(--ink); text-decoration: none !important; min-width: 0; }
.post-author strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-time { white-space: nowrap; }
.post-reply-info { font-size: 13px; color: var(--muted); margin-top: 2px; }
.post-content { margin-top: 4px; font-size: 15px; overflow-wrap: break-word; }
.post-content .hashtag, .post-content .mention { font-weight: 700; }
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.post-place {
    display: inline-block; font-size: 13px; font-weight: 700;
    background: var(--olive-light); color: var(--olive-dark);
    padding: 3px 10px; border-radius: 999px; text-decoration: none !important;
}
.post-neigh {
    display: inline-block; font-size: 13px; font-weight: 700;
    background: var(--sea-light); color: var(--sea-dark);
    padding: 3px 10px; border-radius: 999px; text-decoration: none !important;
}
.post-neigh:hover { background: #d8ebf2; }
.post-geo {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 700; background: #fdf0e9; color: var(--terracotta);
    border: none; padding: 3px 10px; border-radius: 999px; cursor: pointer;
}
.post-geo:hover { background: #f9e2d5; }
.post-map {
    margin-top: 10px; border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden; background: var(--white);
}
.post-map iframe { display: block; width: 100%; height: 260px; border: 0; }
.post-map-link {
    display: block; text-align: right; font-size: 12px; font-weight: 700;
    padding: 6px 12px; border-top: 1px solid var(--sand-dark);
}
.post-footer { display: flex; gap: 26px; margin-top: 10px; }
.action {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: none; cursor: pointer; padding: 0;
    color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none !important;
}
.action:hover { color: var(--sea); }
.like-btn.liked .like-count { color: var(--terracotta); }

/* ---------- Auth / forms ---------- */

.auth-box {
    max-width: 440px; margin: 20px auto;
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow);
}
.auth-header { text-align: center; margin-bottom: 18px; }
.auth-logo { margin-bottom: 10px; }
.auth-logo.logo-text { display: inline-flex; font-size: 32px; }
.auth-header h1 { font-size: 24px; margin: 0 0 6px; }
.auth-form { display: flex; flex-direction: column; gap: 8px; }
.auth-form label { font-weight: 700; font-size: 14px; margin-top: 8px; }
.auth-form input, .auth-form select, .auth-form textarea, .filter-strip input, .filter-strip select, .review-form textarea {
    padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px;
    background: var(--sand); outline: none; width: 100%;
}
.auth-form input:focus, .auth-form select:focus, .auth-form textarea:focus { border-color: var(--sea); background: var(--white); }
.auth-form .btn { margin-top: 12px; }
.pin-input { text-align: center; font-size: 26px !important; letter-spacing: 12px; font-weight: 800; }
.test-pin { font-size: 18px; letter-spacing: 3px; }
.auth-note { font-size: 13px; text-align: center; margin-top: 12px; }
.resend-form { text-align: center; margin-top: 14px; }
.settings-block {
    margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line);
}
.settings-block h2 { font-size: 16px; margin: 0 0 4px; }
.settings-block > .muted { margin: 0 0 4px; font-size: 13px; }

/* ---------- Explore / categories ---------- */

.explore-header h1 { font-size: 26px; margin: 4px 0 6px; }
.explore-header { margin-bottom: 16px; }
.category-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 8px;
}
@media (min-width: 560px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1060px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }
.category-card {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    border-top: 4px solid var(--cat-color, var(--sea));
    padding: 18px 10px; text-align: center; text-decoration: none !important;
    color: var(--ink); box-shadow: var(--shadow);
    transition: transform .1s ease, box-shadow .15s ease;
}
.category-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.category-icon { color: var(--cat-color, var(--sea)); display: inline-flex; margin-bottom: 2px; }

.category-header {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    background: var(--white); border: 1px solid var(--line);
    border-left: 6px solid var(--cat-color, var(--sea));
    border-radius: var(--radius); padding: 14px 18px; margin-bottom: 14px;
}
.category-header-icon { color: var(--cat-color, var(--sea)); display: inline-flex; flex: 0 0 auto; opacity: .85; }
.category-header h1 { margin: 0; font-size: 23px; }
.category-header p { margin: 2px 0 0; font-size: 14px; }

.subcategory-strip, .filter-strip, .category-strip {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.subcategory-strip::-webkit-scrollbar, .filter-strip::-webkit-scrollbar,
.category-strip::-webkit-scrollbar { display: none; }
.subcategory-strip .chip, .category-strip .chip { flex: 0 0 auto; }
/* The category strip duplicates the desktop side nav; mobile only. */
@media (min-width: 760px) { .category-strip { display: none; } }

/* Scrollable chip strips: arrow buttons (desktop; JS toggles visibility) */
.chip-scroller { position: relative; }
.chip-arrow {
    display: none; position: absolute; top: 50%; transform: translateY(-58%);
    width: 30px; height: 30px; border-radius: 50%; padding: 0;
    background: var(--white); border: 1px solid var(--line);
    box-shadow: var(--shadow); color: var(--sea-dark); cursor: pointer;
    align-items: center; justify-content: center; z-index: 5;
}
.chip-arrow svg { display: block; margin: auto; }
.chip-arrow:hover { border-color: var(--sea); color: var(--sea); }
.chip-arrow-left { left: -6px; }
.chip-arrow-right { right: -6px; }
@media (min-width: 760px) {
    .chip-arrow:not([hidden]) { display: inline-flex; }
}
.filter-strip input[type="search"] { flex: 2; min-width: 140px; }
.filter-strip select { flex: 1; min-width: 120px; }
.filter-strip .btn { flex: 0 0 auto; }

/* ---------- Place cards ---------- */

.place-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 620px) { .place-grid { grid-template-columns: repeat(2, 1fr); } }
.place-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    text-decoration: none !important; color: var(--ink); box-shadow: var(--shadow);
    transition: transform .1s ease, box-shadow .15s ease;
}
.place-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.place-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.place-card-icon { color: var(--muted); flex: 0 0 auto; margin-top: 2px; opacity: .7; }
.place-badge {
    display: inline-block; font-style: normal; margin: 2px 0 4px;
    background: var(--terracotta); color: var(--white);
    font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px;
}
.place-card-body { padding: 12px 14px 14px; }
.place-card h3 { margin: 0 0 4px; font-size: 17px; }
.place-card-neigh { display: inline-flex; align-items: center; gap: 3px; }
.place-card-summary {
    margin: 0 0 8px; font-size: 13px; color: var(--muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.place-card-footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.rating { color: var(--terracotta); font-weight: 700; }
.rating b { color: var(--ink); }
.rating-lg { font-size: 16px; margin: 6px 0; }
.price { color: var(--olive-dark); font-weight: 800; letter-spacing: 1px; }

/* ---------- Place detail ---------- */

.place-detail {
    display: flex; gap: 16px; align-items: flex-start;
    background: var(--white); border: 1px solid var(--line);
    border-top: 5px solid var(--cat-color, var(--sea));
    border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.place-detail-media {
    display: flex; align-items: center; justify-content: center;
    width: 74px; height: 74px; flex: 0 0 auto; border-radius: var(--radius);
    background: var(--sea-light); color: var(--cat-color, var(--sea));
}
.place-detail-header h1 { margin: 0 0 6px; font-size: 24px; }
.place-detail-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }
.place-detail-summary { margin: 6px 0 0; }
.place-detail-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
@media (min-width: 700px) { .place-detail-grid { grid-template-columns: 3fr 2fr; } }

.feature-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.contact-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.contact-list li {
    display: flex; align-items: flex-start; gap: 8px;
    min-width: 0; word-break: break-word;
}
.contact-list li a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hours-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hours-table td { padding: 5px 4px; border-bottom: 1px solid var(--sand-dark); }
.hours-table tr.today td { font-weight: 800; color: var(--sea-dark); }
.hours-table .closed { color: var(--error); font-weight: 700; }

/* ---------- Reviews ---------- */

.review-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.review-form .btn { align-self: flex-end; }
.rating-select { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.rating-select input { display: none; }
.rating-select label { font-size: 28px; color: var(--line); cursor: pointer; transition: color .1s; }
.rating-select input:checked ~ label,
.rating-select label:hover, .rating-select label:hover ~ label { color: var(--terracotta); }

.review { border-top: 1px solid var(--sand-dark); padding: 12px 0 4px; }
.review header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.review header a { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none !important; }
.review p { margin: 8px 0 4px; }

/* ---------- Profile ---------- */

.profile-header {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; box-shadow: var(--shadow);
}
.profile-cover {
    position: relative; height: 150px;
    background: linear-gradient(120deg, var(--sea-dark), #1993b4);
}
.profile-cover.has-photo {
    background-size: cover; background-position: center; cursor: zoom-in;
}
.profile-cover.busy { opacity: .55; pointer-events: none; }
.cover-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 8px; }
.cover-cam, .cover-del {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%; padding: 0;
    background: rgba(255, 255, 255, .92); border: 1.5px solid var(--line);
    box-shadow: var(--shadow); cursor: pointer; font-size: 15px;
    transition: transform .1s ease, border-color .1s ease;
}
.cover-cam:hover, .cover-del:hover { transform: scale(1.1); border-color: var(--sea); }
.cover-del { color: var(--terracotta); font-weight: 800; }

/* Avatar zoom trigger (someone else's profile) */
.avatar-zoom { cursor: zoom-in; display: inline-block; }
.avatar-uploader[data-lightbox] .avatar-img { cursor: zoom-in; }

/* Lightbox: large photo overlay (Twitter-style) */
.lightbox {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(10, 20, 26, .88); cursor: zoom-out;
    animation: lightbox-in .12s ease;
}
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
    max-width: min(92vw, 900px); max-height: 88vh;
    border-radius: 12px; box-shadow: 0 12px 48px rgba(0, 0, 0, .5);
}
.lightbox-close {
    position: absolute; top: 16px; right: 16px;
    width: 38px; height: 38px; border-radius: 50%; border: none;
    background: rgba(255, 255, 255, .14); color: var(--white);
    font-size: 17px; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .28); }
.profile-top {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 0 18px; margin-top: -42px;
    /* The cover is position:relative; without this the overlapping avatar
       (e.g. the initials variant) would paint underneath it */
    position: relative; z-index: 1;
}
.profile-actions { margin-top: 52px; display: flex; gap: 8px; }
.profile-info { padding: 10px 18px 16px; }
.profile-info h1 { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-bio { margin: 8px 0 0; }
.profile-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; margin: 8px 0 0; }
.profile-stats { display: flex; gap: 20px; margin: 10px 0 0; font-size: 14px; }

/* ---------- Notifications ---------- */

.notification-list { display: flex; flex-direction: column; gap: 8px; }
.notification {
    display: flex; flex-direction: column; gap: 3px;
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 12px 14px;
    text-decoration: none !important; color: var(--ink);
}
.notification.unread { border-left: 3px solid var(--terracotta); background: #fdf8f6; }
.notification-quote { font-size: 13px; color: var(--muted); font-style: italic; }
.notification-time { font-size: 12px; }

/* ---------- Right panel ---------- */

.panel-box {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.panel-box h2, .panel-box h3 { margin: 0 0 10px; font-size: 17px; }
.trend { display: flex; flex-direction: column; padding: 7px 0; text-decoration: none !important; border-bottom: 1px solid var(--sand-dark); }
.trend:last-child { border-bottom: none; }
.trend-tag { font-weight: 800; color: var(--sea-dark); }
.trend-count { font-size: 12px; color: var(--muted); }
.panel-place { display: flex; gap: 10px; align-items: center; padding: 7px 0; text-decoration: none !important; color: var(--ink); border-bottom: 1px solid var(--sand-dark); }
.panel-place:last-child { border-bottom: none; }
.panel-place-icon { color: var(--sea); display: inline-flex; }
.panel-place-info { display: flex; flex-direction: column; min-width: 0; }
.panel-place-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-place-info small { color: var(--terracotta); }
.panel-more {
    display: block; margin-top: 8px; font-size: 13px; font-weight: 600;
    color: var(--sea); text-decoration: none;
}
.panel-more:hover { text-decoration: underline; }

/* ---------- Business inquiry (claim / listing) ---------- */

.claim-box {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    background: var(--sand); border: 1px dashed var(--line);
    border-radius: var(--radius); padding: 14px 16px; margin: 18px 0;
}
.claim-box-icon { color: var(--sea); display: inline-flex; flex: 0 0 auto; }
.claim-box > div { flex: 1; min-width: 180px; }
.claim-box strong { display: block; margin-bottom: 2px; }
.claim-box p { margin: 0; font-size: 13.5px; }
.claim-box .btn { flex: 0 0 auto; }
.business-form-box { max-width: 560px; }
.business-form-box h1 { display: flex; align-items: center; gap: 8px; font-size: 21px; margin-bottom: 6px; }
.business-form .btn { margin-top: 12px; }
.business-form-note { font-size: 12.5px; margin: 6px 0 0; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.panel-user { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--sand-dark); }
.panel-user:last-child { border-bottom: none; }
.panel-user-left { display: flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--ink); min-width: 0; }
.panel-user-name { display: flex; flex-direction: column; min-width: 0; }
.panel-user-name strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-user-name small { color: var(--muted); }
.panel-footer { font-size: 12px; color: var(--muted); padding: 0 6px; }
.panel-footer p { margin-top: 6px; }

/* ---------- Place photos ---------- */

.place-photos {
    display: flex; gap: 8px; overflow-x: auto;
    margin: 10px 0 4px; padding-bottom: 4px;
    scrollbar-width: thin;
}
.place-photo {
    flex: 0 0 auto; width: 148px; height: 110px;
    border-radius: 10px; overflow: hidden; cursor: zoom-in;
    background: var(--sand); border: 1px solid var(--line);
}
.place-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.place-photo-form { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.place-photo-pick {
    display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
    padding: 7px 12px; border: 1.5px dashed var(--line); border-radius: 999px;
    color: var(--sea); font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.place-photo-pick:hover { background: var(--sea-light); border-color: var(--sea); }
.place-photo-pick input { display: none; }

/* ---------- Rank + contributions (profile) ---------- */

.rank-card {
    position: relative;
    background: var(--white); border: 1px solid var(--line);
    border-left: 4px solid var(--rank-color, var(--sea));
    border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px;
    box-shadow: var(--shadow);
}
.rank-card .rank-help { position: absolute; top: 10px; right: 12px; }
.profile-rank-line {
    display: flex; align-items: center; gap: 8px; margin: 6px 0 0;
}
.profile-rank-line .rank-pips { max-width: none; }
.profile-rank-line .rank-pip { width: 12px; height: 12px; }
.profile-rank {
    display: inline-block; font-size: 12px; font-weight: 800;
    letter-spacing: .015em; line-height: 1.3;
    color: var(--rank-color, var(--sea));
    background: #f2f6f8;
    background: color-mix(in srgb, var(--rank-color, var(--sea)) 9%, #fff);
    border: 1px solid #e4e9ec;
    border-color: color-mix(in srgb, var(--rank-color, var(--sea)) 22%, #fff);
    border-radius: 999px; padding: 3px 11px;
}
.rank-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rank-head .rank-pips { max-width: none; gap: 3px; }
.rank-head .rank-pip { width: 15px; height: 15px; }
.rank-badge {
    display: inline-flex; align-items: center;
    padding: 3px 11px; border-radius: 999px;
    background: var(--rank-color, var(--sea)); color: #fff;
    font-size: 13px; font-weight: 800; letter-spacing: .01em;
}
.rank-blurb { margin: 8px 0 10px; font-size: 14.5px; }
.rank-meter {
    height: 6px; background: var(--sand-dark); border-radius: 999px; overflow: hidden;
}
.rank-meter span {
    display: block; height: 100%; border-radius: inherit;
    background: var(--rank-color, var(--sea));
}
.rank-next { margin: 8px 0 0; font-size: 13px; }
.rank-next strong { color: var(--ink); }

.contrib-box {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px;
    box-shadow: var(--shadow);
}
.contrib-box h3 { margin: 0; font-size: 15px; }
.contrib-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-bottom: 12px;
}
.rank-help { position: relative; }
.rank-help summary {
    list-style: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%;
    border: 1.5px solid var(--line); color: var(--muted); background: var(--white);
}
.rank-help summary::-webkit-details-marker { display: none; }
.rank-help summary:hover, .rank-help[open] summary {
    border-color: var(--sea); color: var(--sea);
}
.rank-table-panel {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 8;
    width: min(360px, calc(100vw - 40px));
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px 14px 12px;
    box-shadow: var(--shadow-hover);
}
.rank-table-lead { margin: 0 0 12px; font-size: 13.5px; }
.rank-table { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rank-table li {
    display: grid; grid-template-columns: auto 1fr; gap: 2px 8px;
    padding: 8px 8px 8px 10px; border-radius: 10px;
    border-left: 3px solid var(--rank-color, var(--line));
    background: var(--sand);
}
.rank-table li.is-current { background: var(--sea-light); }
.rank-table-badge {
    grid-column: 1; font-size: 13px; font-weight: 800; color: var(--rank-color, var(--ink));
}
.rank-table .rank-pips { grid-column: 1 / -1; justify-content: flex-start; max-width: none; gap: 2px; }
.rank-table .rank-pip { width: 11px; height: 11px; }
.rank-table-meta { grid-column: 2; font-size: 11.5px; color: var(--muted); font-weight: 700; align-self: center; }
.rank-table-blurb { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink); }
.rank-table-points { margin: 12px 0 0; font-size: 12px; }
.contrib-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
}
@media (min-width: 520px) {
    .contrib-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.contrib-tile {
    background: var(--sand); border-radius: 10px; padding: 10px 12px;
    display: flex; flex-direction: column; gap: 2px;
}
.contrib-tile strong { font-size: 20px; line-height: 1.15; color: var(--sea-dark); }
.contrib-tile span { font-size: 12px; color: var(--muted); font-weight: 600; }
.contrib-note { margin: 10px 0 0; font-size: 13px; }
.contrib-cta { margin: 12px 0 0; }

.explore-add { margin: 10px 0 0; }
