:root {
    --red:#d51f27;
    --red-dark:#b5161d;
    --soft-red:#fff0f1;
    --ink:#202124;
    --muted:#6b7078;
    --line:#e4e6ea;
    --paper:#fff;
    --bg:#f5f6f8;
    --brown:#8a5a38;
    --radius:22px;
    --shadow:0 8px 24px rgba(25,28,35,.09)
}

* {
    box-sizing:border-box
}

html {
    font-size:18px
}

body {
    margin:0;
    padding-bottom:82px;
    background:var(--bg);
    color:var(--ink);
    font-family:Arial,Helvetica,sans-serif;
    line-height:1.45
}

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

img {
    max-width:100%;
    display:block
}

button,input,select {
    font:inherit
}

.sr-only {
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0
}

.site-header {
    position:sticky;
    top:0;
    z-index:50;
    background:#fff;
    border-bottom:1px solid var(--line)
}

.header-inner {
    min-height:68px;
    padding:7px 14px;
    display:flex;
    align-items:center
}

.brand {
    display:flex;
    align-items:center;
    min-width:0
}

.pin-logo {
    width:34px;
    height:42px;
    flex:0 0 auto
}

.brand span {
    font-size:1.5rem;
    letter-spacing:-1.6px;
    white-space:nowrap
}

.brand b {
    font-weight:950
}

.brand strong {
    color:var(--red);
    font-weight:950
}

.menu-button {
    margin-left:auto;
    width:48px;
    height:48px;
    border:0;
    background:transparent;
    display:grid;
    place-content:center;
    gap:5px;
    cursor:pointer
}

.menu-button span {
    width:28px;
    height:3px;
    border-radius:2px;
    background:#222
}

.desktop-nav {
    display:none;
    margin-left:auto;
    gap:24px;
    font-weight:800
}

.page {
    width:min(1180px,100%);
    margin:auto;
    padding:0 16px 24px
}

.hero-image-wrap {
    margin:0 -16px;
    background:#eef3f7;
    overflow:hidden
}

.hero-image {
    display:block;
    width:100%;
    height:auto
}

.search-form {
    display:grid;
    grid-template-columns:1fr;
    gap:9px;
    margin:16px 0;
    padding:10px;
    background:#fff;
    border-radius:18px;
    box-shadow:var(--shadow)
}

.search-form input,.search-form select {
    width:100%;
    height:54px;
    padding:0 15px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fff;
    outline:0
}

.search-form input:focus,.search-form select:focus {
    border-color:#ef969b
}

.search-form button {
    height:56px;
    border:0;
    border-radius:12px;
    background:var(--red);
    color:#fff;
    font-weight:900
}

.section-head {
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:12px;
    margin:29px 2px 14px
}

.section-head h1,.section-head h2 {
    margin:0;
    font-size:1.5rem;
    line-height:1.1
}

.section-kicker,.eyebrow {
    margin:0 0 4px;
    text-transform:uppercase;
    letter-spacing:.1em;
    font-size:.7rem;
    font-weight:900;
    color:var(--red)
}

.section-head>a,.section-head>span {
    color:var(--red);
    font-weight:850;
    white-space:nowrap
}

.category-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px
}

.category-card {
    min-height:150px;
    padding:15px 8px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    background:#fff;
    border:1px solid var(--line);
    border-radius:20px;
    box-shadow:0 4px 14px rgba(25,28,35,.05)
}

.category-icon {
    width:76px;
    height:76px;
    margin-bottom:8px;
    display:block
}

.category-icon img {
    width:76px;
    height:76px
}

.category-name {
    font-size:1rem;
    font-weight:900;
    line-height:1.1
}

.category-card small {
    margin-top:5px;
    color:var(--muted);
    font-size:.73rem
}

.ad-grid {
    display:grid;
    gap:15px
}

.ad-card {
    overflow:hidden;
    display:grid;
    grid-template-columns:42% 1fr;
    min-height:170px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:20px;
    box-shadow:0 4px 14px rgba(25,28,35,.06)
}

.ad-thumb {
    position:relative;
    min-height:170px;
    background:#e6e8eb
}

.ad-thumb img {
    width:100%;
    height:100%;
    object-fit:cover
}

.no-photo {
    height:100%;
    display:grid;
    place-items:center;
    color:#777;
    font-weight:800
}

.featured-badge {
    position:absolute;
    left:9px;
    top:9px;
    padding:5px 9px;
    border-radius:999px;
    background:#fff;
    color:var(--red);
    box-shadow:0 3px 10px rgba(0,0,0,.15);
    font-size:.67rem;
    font-weight:900
}

.ad-body {
    padding:14px;
    min-width:0
}

.price {
    margin:0;
    color:var(--red);
    font-size:1.35rem;
    font-weight:950
}

.ad-body h2 {
    margin:4px 0 9px;
    font-size:1.03rem;
    line-height:1.2
}

.ad-category {
    display:flex;
    align-items:center;
    gap:6px;
    margin:0 0 11px;
    color:#555;
    font-size:.76rem;
    font-weight:800
}

.ad-category img {
    width:19px;
    height:19px
}

.ad-meta {
    display:flex;
    flex-wrap:wrap;
    gap:4px 10px;
    color:var(--muted);
    font-size:.71rem
}

.page-heading {
    display:flex;
    align-items:center;
    gap:15px;
    margin:18px 0;
    padding:19px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:var(--radius)
}

.page-heading.simple {
    padding-left:0;
    background:transparent;
    border:0
}

.page-heading p {
    margin:0;
    color:var(--red);
    font-size:.7rem;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.1em
}

.page-heading h1 {
    margin:1px 0;
    font-size:1.75rem
}

.page-heading small {
    color:var(--muted)
}

.heading-icon {
    width:76px;
    height:76px;
    flex:0 0 auto;
    display:block
}

.heading-icon img {
    width:76px;
    height:76px
}

.back-link {
    display:inline-block;
    margin:18px 0 13px;
    color:var(--red);
    font-weight:900
}

.detail-card {
    overflow:hidden;
    background:#fff;
    border:1px solid var(--line);
    border-radius:22px;
    box-shadow:var(--shadow)
}

.detail-image {
    height:min(74vw,530px);
    min-height:285px;
    background:#e7e8eb
}

.detail-image img {
    width:100%;
    height:100%;
    object-fit:cover
}

.thumb-row {
    display:flex;
    gap:8px;
    padding:10px;
    overflow-x:auto
}

.gallery-thumb {
    width:72px;
    height:58px;
    padding:0;
    border:3px solid transparent;
    border-radius:9px;
    overflow:hidden;
    background:#ddd
}

.gallery-thumb.active {
    border-color:var(--red)
}

.gallery-thumb img {
    width:100%;
    height:100%;
    object-fit:cover
}

.detail-body {
    padding:21px
}

.detail-price {
    margin:0 0 4px;
    color:var(--red);
    font-size:1.9rem;
    font-weight:950
}

.detail-body>h1 {
    margin:0;
    font-size:clamp(1.7rem,6vw,2.6rem);
    line-height:1.08
}

.detail-meta {
    display:flex;
    flex-wrap:wrap;
    gap:7px 17px;
    margin-top:14px;
    color:var(--muted);
    font-size:.8rem
}

.description-block {
    margin-top:26px;
    padding-top:22px;
    border-top:1px solid var(--line)
}

.description-block h2,.seller-box h2 {
    margin:0 0 10px;
    font-size:1.28rem
}

.description {
    line-height:1.7
}

.seller-box {
    margin-top:27px;
    padding:19px;
    background:#fff8f3;
    border:1px solid #ead8c8;
    border-radius:18px
}

.contact-actions {
    display:grid;
    gap:10px;
    margin-top:14px
}

.button {
    min-height:56px;
    padding:0 20px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:13px;
    background:var(--red);
    color:#fff;
    font-weight:900;
    text-align:center
}

.button.outline {
    background:#fff;
    color:var(--red);
    border:2px solid var(--red)
}

.button.dark {
    background:var(--ink)
}

.empty-state,.content-card {
    grid-column:1/-1;
    padding:38px 18px;
    text-align:center;
    color:var(--muted)
}

.content-card {
    margin-top:22px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:22px;
    box-shadow:var(--shadow)
}

.content-card h1 {
    color:var(--ink)
}

.content-card .button {
    margin-top:12px
}

.pagination {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin:24px 0
}

.pagination a {
    min-height:50px;
    padding:0 17px;
    display:flex;
    align-items:center;
    background:#fff;
    border:1px solid var(--line);
    border-radius:12px;
    color:var(--red);
    font-weight:900
}

.pagination span {
    color:var(--muted);
    font-size:.78rem
}

.site-menu {
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    z-index:80;
    width:min(330px,88vw);
    padding:18px;
    background:#fff;
    transform:translateX(105%);
    transition:transform .2s ease;
    box-shadow:-12px 0 35px rgba(0,0,0,.18)
}

.menu-open .site-menu {
    transform:translateX(0)
}

.menu-backdrop {
    position:fixed;
    inset:0;
    z-index:70;
    background:rgba(0,0,0,.38);
    opacity:0;
    visibility:hidden;
    transition:.2s
}

.menu-open .menu-backdrop {
    opacity:1;
    visibility:visible
}

.menu-top {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding-bottom:16px;
    border-bottom:1px solid var(--line);
    font-size:1.25rem
}

.menu-top button {
    width:44px;
    height:44px;
    border:0;
    background:transparent;
    font-size:2rem
}

.site-menu nav {
    display:grid;
    margin-top:10px
}

.site-menu nav a,.site-menu nav span {
    padding:16px 4px;
    border-bottom:1px solid var(--line);
    font-weight:850
}

.site-menu nav small {
    float:right;
    color:var(--red);
    text-transform:uppercase
}

.site-footer {
    display:none
}

.bottom-nav {
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:60;
    display:flex;
    flex-wrap:nowrap;
    width:100%;
    padding-bottom:env(safe-area-inset-bottom);
    background:rgba(255,255,255,.97);
    border-top:1px solid var(--line);
    overflow:hidden
}

.bottom-nav a {
    min-height:74px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    font-weight:850
}

.bottom-nav span {
    font-size:1.45rem;
    line-height:1
}

.bottom-nav small {
    margin-top:4px;
    font-size:.68rem
}

@media(min-width:650px) {
    .page {
        padding:0 24px 30px
    }
    .hero-image-wrap {
        margin:0 -24px
    }
    .search-form {
        grid-template-columns:minmax(0,1fr) 210px auto
    }
    .category-grid {
        grid-template-columns:repeat(3,minmax(0,1fr))
    }
    .ad-grid {
        grid-template-columns:repeat(2,minmax(0,1fr))
    }
    .ad-card {
        display:block
    }
    .ad-thumb {
        height:230px
    }
    .detail-card {
        display:grid;
        grid-template-columns:1.05fr .95fr
    }
}

@media(min-width:980px) {
    body {
        padding-bottom:0
    }
    .header-inner {
        max-width:1180px;
        margin:auto
    }
    .menu-button {
        display:none
    }
    .desktop-nav {
        display:flex
    }
    .page {
        padding-top:0
    }
    .hero-image-wrap {
        max-height:none
    }
    .hero-image {
        width:100%;
        height:auto;
        object-fit:contain
    }
    .category-grid {
        grid-template-columns:repeat(6,minmax(0,1fr))
    }
    .ad-grid {
        grid-template-columns:repeat(4,minmax(0,1fr))
    }
    .ad-thumb {
        height:220px
    }
    .bottom-nav {
        display:none
    }
    .site-footer {
        width:min(1180px,calc(100% - 40px));
        margin:30px auto 0;
        padding:23px;
        display:flex;
        justify-content:space-between;
        border-top:1px solid var(--line);
        color:var(--muted)
    }
    .site-footer div {
        display:flex;
        gap:14px
    }
    .site-footer strong {
        color:var(--ink)
    }
}

/* Milestone 2: accounts and ad posting */
.auth-card,.form-page {
    max-width:760px;
    margin:24px auto;
    background:#fff;
    border-radius:20px;
    padding:24px;
    box-shadow:var(--shadow)
}

.auth-card h1,.form-page h1 {
    margin:4px 0 8px
}

.stack-form,.ad-form {
    display:grid;
    gap:18px;
    margin-top:22px
}

.stack-form label,.ad-form label {
    display:grid;
    gap:8px;
    font-weight:800;
    color:var(--ink)
}

.stack-form input,.ad-form input,.ad-form select,.ad-form textarea {
    width:100%;
    font:inherit;
    font-size:1rem;
    border:2px solid #dfe4ea;
    border-radius:13px;
    padding:14px;
    background:#fff;
    color:var(--ink)
}

.stack-form input:focus,.ad-form input:focus,.ad-form select:focus,.ad-form textarea:focus {
    outline:3px solid rgba(213,31,39,.15);
    border-color:var(--red)
}

.auth-switch {
    text-align:center;
    margin:20px 0 0
}

.form-errors {
    background:#fff0f1;
    border:1px solid #f3b7bb;
    border-radius:12px;
    padding:12px 16px;
    color:#8e1119
}

.form-errors p {
    margin:4px 0
}

.dashboard-head {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:18px;
    margin:20px 0
}

.dashboard-head h1 {
    margin:3px 0
}

.dashboard-stats {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px;
    margin:18px 0 28px
}

.dashboard-stats div {
    background:#fff;
    border-radius:16px;
    padding:18px;
    text-align:center;
    box-shadow:var(--shadow)
}

.dashboard-stats strong {
    display:block;
    font-size:1.8rem;
    color:var(--red)
}

.dashboard-stats span {
    font-weight:700;
    color:var(--muted)
}

.manage-list {
    display:grid;
    gap:14px
}

.manage-card {
    display:grid;
    grid-template-columns:115px 1fr;
    gap:16px;
    background:#fff;
    border-radius:17px;
    padding:12px;
    box-shadow:var(--shadow)
}

.manage-thumb {
    height:105px;
    border-radius:12px;
    overflow:hidden;
    background:#e9edf1;
    display:grid;
    place-items:center;
    color:var(--muted);
    font-weight:700
}

.manage-thumb img {
    width:100%;
    height:100%;
    object-fit:cover
}

.manage-info h2 {
    font-size:1.1rem;
    margin:6px 0
}

.manage-info p {
    margin:0 0 10px;
    color:var(--muted)
}

.status {
    display:inline-flex;
    border-radius:999px;
    padding:4px 9px;
    font-size:.78rem;
    font-weight:900;
    text-transform:uppercase;
    background:#e8edf2
}

.status-active {
    background:#dcf5e5;
    color:#14763b
}

.status-pending {
    background:#fff2ca;
    color:#8b5d00
}

.status-draft {
    background:#e8edf2;
    color:#4a5968
}

.status-sold,.status-expired {
    background:#f1e7f7;
    color:#653678
}

.button.small {
    padding:9px 14px;
    min-height:auto;
    font-size:.9rem
}

.text-link {
    display:inline-block;
    margin-left:10px;
    font-weight:800
}

.form-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:15px
}

.ad-form label small {
    font-weight:500;
    color:var(--muted)
}

.form-actions {
    display:flex;
    gap:12px;
    justify-content:flex-end
}

.file-note {
    margin:-10px 0 0;
    color:var(--muted)
}

.existing-images {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:10px
}

.existing-images img {
    width:100%;
    aspect-ratio:1;
    object-fit:cover;
    border-radius:12px
}

.post-nav span {
    background:var(--red);
    color:#fff;
    border-radius:50%;
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    margin:auto;
    font-size:1.5rem;
    line-height:1
}

@media(max-width:600px) {
    .auth-card,.form-page {
        margin:12px -4px;
        padding:20px 16px;
        border-radius:16px
    }
    .dashboard-head {
        align-items:flex-start;
        flex-direction:column
    }
    .dashboard-head .button {
        width:100%;
        text-align:center
    }
    .dashboard-stats {
        gap:8px
    }
    .dashboard-stats div {
        padding:14px 8px
    }
    .dashboard-stats strong {
        font-size:1.45rem
    }
    .manage-card {
        grid-template-columns:92px 1fr
    }
    .manage-thumb {
        height:92px
    }
    .form-grid {
        grid-template-columns:1fr
    }
    .form-actions {
        flex-direction:column-reverse
    }
    .form-actions .button {
        width:100%
    }
    .existing-images {
        grid-template-columns:repeat(3,1fr)
    }
}

/* Milestone 3: Admin Control Center */
.admin-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    margin:8px 0 18px
}

.admin-tabs {
    display:flex;
    gap:8px;
    overflow:auto;
    margin-bottom:20px;
    padding-bottom:4px
}

.admin-tabs a {
    white-space:nowrap;
    padding:11px 15px;
    border-radius:999px;
    background:#fff;
    border:1px solid var(--border);
    font-weight:800
}

.admin-tabs a.active {
    background:var(--red);
    color:#fff;
    border-color:var(--red)
}

.admin-stat-grid {
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:12px
}

.admin-stat-grid>a,.admin-stat-grid>div {
    background:#fff;
    border:1px solid var(--border);
    border-radius:18px;
    padding:20px;
    box-shadow:var(--shadow);
    display:flex;
    flex-direction:column
}

.admin-stat-grid strong {
    font-size:2rem;
    color:var(--red)
}

.admin-stat-grid span {
    font-weight:800
}

.admin-filter {
    display:grid;
    gap:10px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:18px;
    padding:14px;
    margin-bottom:18px
}

.admin-filter input,.admin-filter select {
    min-height:50px;
    border:1px solid var(--border);
    border-radius:12px;
    padding:0 14px;
    font:inherit
}

.admin-ad-list {
    display:grid;
    gap:14px
}

.admin-ad-card {
    background:#fff;
    border:1px solid var(--border);
    border-radius:18px;
    padding:14px;
    display:grid;
    grid-template-columns:88px 1fr;
    gap:14px;
    box-shadow:var(--shadow)
}

.admin-ad-thumb {
    width:88px;
    height:88px;
    border-radius:12px;
    overflow:hidden;
    background:#eef1f4;
    display:grid;
    place-items:center
}

.admin-ad-thumb img {
    width:100%;
    height:100%;
    object-fit:cover
}

.admin-ad-title {
    display:flex;
    gap:8px;
    align-items:center;
    justify-content:space-between
}

.admin-ad-main h2 {
    font-size:1.1rem;
    margin:7px 0
}

.admin-ad-main p {
    margin:4px 0
}

.admin-seller {
    font-size:.9rem;
    color:var(--muted)
}

.moderation-form {
    grid-column:1/-1;
    display:flex;
    gap:10px;
    align-items:flex-start;
    flex-wrap:wrap
}

.moderation-form details {
    width:100%
}

.moderation-form summary {
    cursor:pointer;
    font-weight:800;
    color:var(--red)
}

.moderation-form textarea {
    width:100%;
    margin:8px 0;
    border:1px solid var(--border);
    border-radius:12px;
    padding:10px;
    font:inherit
}

.button.danger {
    background:#9b111e
}

.notice {
    padding:13px 15px;
    border-radius:12px;
    margin-bottom:16px;
    font-weight:700
}

.notice.success {
    background:#e9f7ee;
    color:#176b35
}

.notice.error {
    background:#fdeced;
    color:#951c25
}

.rejection-note {
    background:#fff4f4;
    border-left:4px solid var(--red);
    padding:8px
}

.admin-table-wrap {
    overflow:auto;
    background:#fff;
    border-radius:18px;
    border:1px solid var(--border)
}

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

.admin-table th,.admin-table td {
    text-align:left;
    padding:14px;
    border-bottom:1px solid var(--border)
}

.system-grid {
    display:grid;
    gap:14px
}

.system-grid>div {
    background:#fff;
    border:1px solid var(--border);
    border-radius:18px;
    padding:18px
}

.system-grid h2 {
    margin-top:0
}

@media(min-width:760px) {
    .admin-stat-grid {
        grid-template-columns:repeat(4,1fr)
    }
    .admin-filter {
        grid-template-columns:1fr 180px auto
    }
    .admin-ad-card {
        grid-template-columns:110px 1fr auto
    }
    .admin-ad-thumb {
        width:110px;
        height:110px
    }
    .moderation-form {
        grid-column:auto;
        align-content:start;
        max-width:220px
    }
    .system-grid {
        grid-template-columns:repeat(3,1fr)
    }
}

/* Final mobile bottom navigation */
.bottom-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
}

.bottom-nav > a {
    flex: 1 1 25% !important;
    width: 25% !important;
    min-width: 0 !important;
    max-width: 25% !important;
    min-height: 70px !important;
    padding: 7px 1px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-align: center !important;
}

.bottom-nav > a span {
    display: grid !important;
    place-items: center !important;
    flex: 0 0 auto !important;
}

.bottom-nav > a small {
    display: block !important;
    width: 100% !important;
    margin-top: 3px !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
}

/* Account forms: labels always above fields */
.auth-card .stack-form {
    display: block !important;
}

.auth-card .stack-form .form-field {
    display: block !important;
    width: 100% !important;
    margin: 0 0 18px !important;
}

.auth-card .stack-form .form-field > label {
    display: block !important;
    width: 100% !important;
    margin: 0 0 7px !important;
    font-weight: 800 !important;
}

.auth-card .stack-form .form-field > input {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Also supports the original account form markup */
.auth-card .stack-form > label {
    display: block !important;
    width: 100% !important;
    margin: 0 0 18px !important;
}

.auth-card .stack-form > label > input {
    display: block !important;
    width: 100% !important;
    margin-top: 7px !important;
}

.auth-card .stack-form > input:not([type="hidden"]) {
    display: block !important;
    width: 100% !important;
    margin: 7px 0 18px !important;
}

.auth-card .stack-form > input[type="hidden"] {
    display: none !important;
}

.detail-image {
    display:flex;
    align-items:center;
    justify-content:center;
    background:#eef1f4
}

.detail-image img {
    width:100%;
    height:100%;
    object-fit:contain!important;
    object-position:center center
}

.contact-preferences {
    margin:4px 0;
    padding:18px;
    border:2px solid var(--line);
    border-radius:15px
}

.contact-preferences legend {
    padding:0 7px;
    font-weight:900
}

.contact-preferences .field-help {
    margin:0 0 12px;
    color:var(--muted);
    font-size:.86rem
}

.contact-preferences .check-option {
    display:grid!important;
    grid-template-columns:30px 1fr;
    align-items:start;
    gap:10px!important;
    padding:11px 0;
    border-top:1px solid var(--line)
}

.contact-preferences .check-option input {
    width:24px!important;
    height:24px;
    margin:2px 0 0!important
}

.contact-preferences .check-option span,.contact-preferences .check-option strong,.contact-preferences .check-option small {
    display:block
}

.contact-preferences .check-option small {
    margin-top:2px;
    color:var(--muted);
    font-weight:500
}

.field-warning {
    margin:10px 0 0;
    padding:10px 12px;
    border-radius:10px;
    background:#fff4d8;
    color:#755100;
    font-weight:700
}

.auth-switch a {
    color:var(--red)!important;
    font-weight:900!important;
    text-decoration:underline!important;
    text-decoration-thickness:2px!important;
    text-underline-offset:3px!important
}

.auth-switch a:hover,.auth-switch a:focus {
    color:var(--red-dark)!important
}

.photo-manager {
    margin-top:20px;
    padding-top:18px;
    border-top:1px solid var(--line)
}

.photo-manager h2 {
    margin:0 0 4px
}

.photo-manager>p {
    margin:0 0 14px;
    color:var(--muted)
}

.existing-images {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px
}

.photo-item {
    position:relative;
    padding:7px;
    background:#fff;
    border:2px solid var(--line);
    border-radius:14px
}

.photo-item.primary-photo {
    border-color:var(--red)
}

.photo-item>img {
    width:100%;
    aspect-ratio:1;
    object-fit:contain;
    background:#eef1f4;
    border-radius:9px
}

.primary-label {
    position:absolute;
    top:13px;
    left:13px;
    padding:4px 8px;
    border-radius:999px;
    background:var(--red);
    color:#fff;
    font-size:.7rem;
    font-weight:900
}

.photo-actions form {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:8px
}

.photo-actions button {
    min-height:38px;
    padding:6px 9px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    font:inherit;
    font-size:.76rem;
    font-weight:800
}

.photo-actions .danger-link {
    color:#9b111e;
    border-color:#e6b7bc
}

@media(min-width:650px) {
    .existing-images {
        grid-template-columns:repeat(4,minmax(0,1fr))
    }
}

/* v0.6.1 seller account settings */
.settings-page {
    max-width:820px;
    margin:20px auto
}

.settings-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-bottom:16px
}

.settings-head h1 {
    margin:3px 0
}

.settings-card {
    margin-bottom:18px;
    padding:22px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:20px;
    box-shadow:var(--shadow)
}

.settings-card h2 {
    margin:0 0 5px
}

.settings-card>p {
    margin:0 0 18px;
    color:var(--muted)
}

.readonly-field {
    margin:0 0 18px;
    padding:14px;
    border:1px solid var(--line);
    border-radius:13px;
    background:#f7f8fa
}

.readonly-field span,.readonly-field strong,.readonly-field small {
    display:block
}

.readonly-field span {
    font-weight:800
}

.readonly-field strong {
    margin-top:4px
}

.readonly-field small {
    margin-top:4px;
    color:var(--muted)
}

.account-status-card dl {
    margin:0
}

.account-status-card dl div {
    display:flex;
    justify-content:space-between;
    gap:18px;
    padding:11px 0;
    border-top:1px solid var(--line)
}

.account-status-card dl div:first-child {
    border-top:0
}

.account-status-card dt {
    font-weight:800
}

.account-status-card dd {
    margin:0;
    text-align:right;
    color:var(--muted)
}

.dashboard-account-links {
    display:flex;
    justify-content:flex-end;
    gap:18px;
    margin:-12px 2px 10px
}

.dashboard-account-links a,.forgot-link a {
    color:var(--red);
    font-weight:900;
    text-decoration:underline;
    text-underline-offset:3px
}

.forgot-link {
    text-align:center;
    margin:12px 0 0
}

@media(max-width:600px) {
    .settings-head {
        align-items:flex-start;
        flex-direction:column
    }
    .settings-head .button {
        width:100%
    }
    .settings-card {
        padding:19px 16px
    }
    .dashboard-account-links {
        justify-content:space-between
    }
}

.card-badges {
    position:absolute;
    left:9px;
    top:9px;
    display:flex;
    flex-wrap:wrap;
    gap:6px
}

.card-badges .featured-badge {
    position:static
}

.fresh-badge {
    display:inline-flex;
    padding:5px 9px;
    border-radius:999px;
    font-size:.67rem;
    font-weight:900;
    text-transform:uppercase
}

.badge-new {
    background:#dcf5e5;
    color:#14763b
}

.badge-updated {
    background:#e9f3ff;
    color:#175a99
}

.detail-badges {
    display:flex;
    gap:7px;
    margin-top:12px
}

.ad-action-row {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
    margin:18px 0 4px!important
}

.ad-action-row form {
    margin:0!important
}

.ad-action-button {
    width:100%!important;
    min-height:54px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    border:2px solid var(--line)!important;
    border-radius:12px!important;
    background:#fff!important;
    font-size:.75rem!important;
    font-weight:900!important
}

.ad-action-button span {
    font-size:1.25rem!important;
    color:var(--red)!important
}

.ad-action-button.active {
    background:var(--soft-red)!important
}

.report-card {
    margin:18px 0;
    padding:16px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px
}

.report-form {
    display:grid;
    gap:10px;
    margin-top:14px
}

.report-form select,.report-form textarea {
    width:100%;
    padding:12px;
    border:2px solid #dfe4ea;
    border-radius:12px
}

.preview-banner {
    margin:16px 0;
    padding:14px;
    background:#fff4d8;
    border:1px solid #edcf7f;
    border-radius:14px
}

.dashboard-account-links {
    flex-wrap:wrap
}

/* v0.7.1: adaptive contact actions */
.contact-actions {
    display:grid;
    gap:10px;
    margin-top:14px;
}

.contact-actions.contact-count-1 {
    grid-template-columns:1fr;
}

.contact-actions.contact-count-2 {
    grid-template-columns:repeat(2,minmax(0,1fr));
}

.contact-actions.contact-count-3 {
    grid-template-columns:repeat(3,minmax(0,1fr));
}

.contact-actions .button {
    width:100%;
    min-width:0;
    padding-left:8px;
    padding-right:8px;
}

.contact-actions.contact-count-1 .button {
    min-height:62px;
    font-size:1.02rem;
}

/* v0.7.1: report modal */
.report-modal {
    position:fixed;
    inset:0;
    z-index:120;
    display:none;
}

.report-modal.is-open {
    display:block;
}

.report-modal-backdrop {
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.48);
}

.report-modal-panel {
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    max-height:88vh;
    overflow:auto;
    padding:20px 18px calc(22px + env(safe-area-inset-bottom));
    background:#fff;
    border-radius:22px 22px 0 0;
    box-shadow:0 -16px 40px rgba(0,0,0,.22);
}

.report-modal-head {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:16px;
}

.report-modal-head h2 {
    margin:0;
}

.report-modal-close {
    width:44px;
    height:44px;
    flex:0 0 auto;
    border:0;
    border-radius:50%;
    background:#f0f1f3;
    color:var(--ink);
    font-size:1.8rem;
    line-height:1;
    cursor:pointer;
}

.report-modal-actions {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-top:6px;
}

.report-modal-open {
    overflow:hidden;
}

.report-form {
    display:grid;
    gap:10px;
}

.report-form label {
    font-weight:800;
}

.report-form label small {
    color:var(--muted);
    font-weight:500;
}

.report-form select, .report-form textarea {
    width:100%;
    padding:12px;
    border:2px solid #dfe4ea;
    border-radius:12px;
    background:#fff;
    font:inherit;
}

@media(min-width:700px) {
    .report-modal-panel {
        left:50%;
        right:auto;
        bottom:50%;
        width:min(560px,calc(100% - 36px));
        transform:translate(-50%,50%);
        border-radius:22px;
    }
}

@media(max-width:430px) {
    .contact-actions.contact-count-3 {
        grid-template-columns:1fr;
    }
    .contact-actions.contact-count-3 .button {
        min-height:54px;
    }
}

/* v0.8 Operations Console */
.market-health {
    margin:0 0 18px;
    padding:16px 18px;
    border-radius:18px;
    border:1px solid var(--line);
    background:#fff
}

.market-health>div {
    display:flex;
    align-items:center;
    gap:9px
}

.market-health p {
    margin:5px 0 0;
    color:var(--muted)
}

.health-dot {
    width:13px;
    height:13px;
    border-radius:50%;
    background:#2b9d55
}

.health-healthy {
    border-color:#b9e3c8;
    background:#f2fbf5
}

.health-watch {
    border-color:#edd48c;
    background:#fff9e8
}

.health-watch .health-dot {
    background:#d79b13
}

.health-attention {
    border-color:#efb2b7;
    background:#fff1f2
}

.health-attention .health-dot {
    background:var(--red)
}

.admin-stat-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
}

.admin-card-actions {
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:8px
}

.report-alert {
    display:inline-block;
    margin:7px 0 0!important;
    padding:5px 9px;
    border-radius:999px;
    background:#fff1f2;
    color:#9b111e!important;
    font-weight:900
}

.report-list {
    display:grid;
    gap:12px
}

.report-item {
    padding:16px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:17px;
    box-shadow:var(--shadow)
}

.report-item-head {
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:center
}

.report-item-head time {
    color:var(--muted);
    font-size:.76rem
}

.report-item h3 {
    margin:10px 0 5px
}

.report-item p {
    margin:5px 0
}

.report-item-actions {
    display:flex;
    align-items:center;
    gap:12px;
    margin-top:12px
}

.compact-filter {
    grid-template-columns:1fr auto
}

.admin-detail-grid {
    display:grid;
    gap:16px
}

.admin-detail-main {
    display:grid;
    gap:16px
}

.admin-detail-card {
    padding:20px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px;
    box-shadow:var(--shadow)
}

.admin-detail-card h1 {
    margin:8px 0
}

.admin-detail-card h2 {
    margin:0 0 12px
}

.admin-photo-strip {
    display:flex;
    gap:8px;
    overflow-x:auto;
    margin:14px 0
}

.admin-photo-strip img {
    width:110px;
    height:90px;
    flex:0 0 auto;
    object-fit:contain;
    background:#eef1f4;
    border-radius:10px
}

.admin-detail-actions {
    margin-top:16px
}

.moderation-panel {
    display:flex;
    gap:9px;
    flex-wrap:wrap;
    margin-top:14px
}

.moderation-panel details {
    width:100%
}

.moderation-panel summary {
    cursor:pointer;
    color:var(--red);
    font-weight:900
}

.moderation-panel textarea {
    width:100%;
    margin:9px 0;
    padding:11px;
    border:1px solid var(--line);
    border-radius:10px;
    font:inherit
}

.report-reason-summary {
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin-bottom:12px
}

.report-reason-summary span {
    padding:6px 9px;
    border-radius:999px;
    background:#f1f3f5;
    font-size:.78rem
}

.inline-report {
    padding:13px 0;
    border-top:1px solid var(--line)
}

.inline-report:first-of-type {
    border-top:0
}

.inline-report>div {
    display:flex;
    align-items:center;
    gap:9px
}

.inline-report p {
    margin:7px 0
}

.inline-report textarea {
    width:100%;
    padding:10px;
    border:1px solid var(--line);
    border-radius:10px;
    font:inherit
}

.inline-report-actions {
    display:flex!important;
    gap:7px!important;
    flex-wrap:wrap;
    margin-top:8px
}

.note-form {
    display:grid;
    gap:10px
}

.note-form textarea {
    width:100%;
    padding:12px;
    border:2px solid #dfe4ea;
    border-radius:12px;
    font:inherit
}

.note-list article {
    padding:13px 0;
    border-top:1px solid var(--line)
}

.note-list p {
    margin:0 0 5px
}

.note-list small {
    color:var(--muted)
}

.activity-list article {
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding:11px 0;
    border-top:1px solid var(--line)
}

.activity-list article:first-child {
    border-top:0
}

.activity-list span {
    color:var(--muted);
    font-size:.78rem;
    text-align:right
}

.seller-summary {
    margin:0
}

.seller-summary div {
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding:9px 0;
    border-top:1px solid var(--line)
}

.seller-summary div:first-child {
    border-top:0
}

.seller-summary dt {
    font-weight:800
}

.seller-summary dd {
    margin:0;
    color:var(--muted);
    text-align:right
}

.muted-copy {
    color:var(--muted)
}

.developer-banner {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
    margin-bottom:16px;
    padding:17px;
    background:#202124;
    color:#fff;
    border-radius:18px
}

.developer-banner h2 {
    margin:2px 0
}

.developer-banner span {
    padding:6px 10px;
    border-radius:999px;
    background:#fff;
    color:#202124;
    font-weight:900
}

.path-copy {
    overflow-wrap:anywhere;
    font-size:.75rem
}

.status-reviewing {
    background:#e9f3ff;
    color:#175a99
}

.status-resolved {
    background:#dcf5e5;
    color:#14763b
}

.status-dismissed {
    background:#eceff2;
    color:#505a64
}

.status-open {
    background:#fff2ca;
    color:#8b5d00
}

@media(min-width:760px) {
    .admin-stat-grid {
        grid-template-columns:repeat(3,minmax(0,1fr))
    }
    .admin-detail-grid {
        grid-template-columns:minmax(0,1fr) 300px;
        align-items:start
    }
    .admin-detail-side {
        position:sticky;
        top:88px
    }
}

@media(max-width:600px) {
    .report-item-head {
        align-items:flex-start;
        flex-direction:column
    }
    .report-item-actions {
        align-items:flex-start;
        flex-direction:column
    }
    .report-item-actions .button {
        width:100%
    }
    .activity-list article {
        flex-direction:column
    }
    .activity-list span {
        text-align:left
    }
}

/* v0.8.1 Seller Operations */
.seller-filter {
    grid-template-columns:minmax(0,1fr) 210px auto
}

.seller-list {
    display:grid;
    gap:12px
}

.seller-list-card {
    display:grid;
    gap:13px;
    padding:17px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px;
    box-shadow:var(--shadow)
}

.seller-list-card.seller-suspended {
    border-color:#efb2b7;
    background:#fff8f8
}

.seller-name-line {
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap
}

.seller-name-line h2 {
    margin:0
}

.seller-list-card p {
    margin:5px 0
}

.seller-list-card small {
    color:var(--muted)
}

.seller-mini-stats {
    display:flex;
    gap:8px;
    flex-wrap:wrap
}

.seller-mini-stats span {
    padding:7px 10px;
    border-radius:999px;
    background:#f1f3f5;
    font-size:.76rem
}

.seller-mini-stats .has-reports {
    background:#fff1f2;
    color:#9b111e
}

.status-suspended {
    background:#fdeced;
    color:#951c25
}

.seller-ops-head {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    margin-bottom:16px;
    padding:20px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:20px;
    box-shadow:var(--shadow)
}

.seller-ops-head h1 {
    margin:3px 0
}

.seller-ops-head p {
    margin:3px 0
}

.seller-id-line {
    color:var(--muted);
    font-size:.78rem
}

.seller-is-suspended {
    border-color:#efb2b7
}

.seller-quality {
    text-align:right
}

.quality-stars {
    color:#d79b13;
    font-size:1.3rem;
    letter-spacing:1px
}

.seller-quality strong,.seller-quality .status {
    display:block;
    margin-top:5px
}

.suspension-banner {
    display:grid;
    gap:4px;
    margin-bottom:16px;
    padding:14px 17px;
    border:1px solid #efb2b7;
    border-radius:15px;
    background:#fff1f2;
    color:#8e1119
}

.suspension-banner small {
    color:#a34a50
}

.seller-stat-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin-bottom:16px
}

.seller-stat-grid>a,.seller-stat-grid>div {
    padding:15px;
    text-align:center;
    background:#fff;
    border:1px solid var(--line);
    border-radius:15px
}

.seller-stat-grid strong {
    display:block;
    color:var(--red);
    font-size:1.45rem
}

.seller-stat-grid span {
    font-size:.76rem;
    font-weight:800;
    color:var(--muted)
}

.seller-ops-grid {
    display:grid;
    gap:16px
}

.seller-ops-main {
    display:grid;
    gap:16px
}

.compact-head {
    margin:0 0 14px
}

.bulk-toolbar {
    display:grid;
    grid-template-columns:auto 1fr;
    gap:9px;
    margin-bottom:12px;
    padding:12px;
    background:#f5f6f8;
    border-radius:13px
}

.bulk-toolbar label {
    display:flex;
    align-items:center;
    gap:6px;
    font-weight:800
}

.bulk-toolbar select,.bulk-toolbar input {
    min-height:44px;
    padding:0 10px;
    border:1px solid var(--line);
    border-radius:9px;
    background:#fff;
    font:inherit
}

.bulk-toolbar .button {
    grid-column:1/-1
}

.seller-ad-list {
    display:grid;
    gap:9px
}

.seller-ad-row {
    display:grid;
    grid-template-columns:28px 74px minmax(0,1fr);
    gap:10px;
    align-items:center;
    padding:10px;
    border:1px solid var(--line);
    border-radius:13px
}

.seller-ad-check input {
    width:20px;
    height:20px
}

.seller-ad-thumb {
    width:74px;
    height:65px;
    display:grid;
    place-items:center;
    overflow:hidden;
    border-radius:9px;
    background:#eef1f4;
    color:var(--muted);
    font-size:.7rem
}

.seller-ad-thumb img {
    width:100%;
    height:100%;
    object-fit:cover
}

.seller-ad-info h3 {
    margin:5px 0;
    font-size:.96rem
}

.seller-ad-info p {
    margin:0;
    color:var(--muted);
    font-size:.78rem
}

.seller-ad-actions {
    grid-column:2/-1
}

.seller-report-list article {
    padding:12px 0;
    border-top:1px solid var(--line)
}

.seller-report-list article:first-child {
    border-top:0
}

.seller-report-list article>div {
    display:flex;
    gap:8px;
    align-items:center
}

.seller-report-list h3 {
    margin:6px 0
}

.seller-report-list p {
    margin:4px 0
}

.seller-action-form {
    display:grid;
    gap:10px
}

.seller-action-form label {
    display:grid;
    gap:6px;
    font-weight:800
}

.seller-action-form select,.seller-action-form input {
    width:100%;
    min-height:48px;
    padding:0 11px;
    border:1px solid var(--line);
    border-radius:10px;
    background:#fff;
    font:inherit
}

.danger-zone {
    border-color:#efc4c7
}

.danger-zone hr {
    border:0;
    border-top:1px solid var(--line);
    margin:20px 0
}

.danger-zone h3 {
    margin:0 0 10px
}

.seller-view-button {
    width:100%;
    margin-top:14px
}

@media(min-width:700px) {
    .seller-list-card {
        grid-template-columns:minmax(0,1fr) auto auto;
        align-items:center
    }
    .seller-stat-grid {
        grid-template-columns:repeat(6,minmax(0,1fr))
    }
    .seller-ops-grid {
        grid-template-columns:minmax(0,1fr) 310px;
        align-items:start
    }
    .seller-ops-side {
        position:sticky;
        top:88px;
        display:grid;
        gap:16px
    }
    .bulk-toolbar {
        grid-template-columns:auto 190px minmax(160px,1fr) auto;
        align-items:center
    }
    .bulk-toolbar .button {
        grid-column:auto
    }
    .seller-ad-row {
        grid-template-columns:28px 82px minmax(0,1fr) auto
    }
    .seller-ad-actions {
        grid-column:auto
    }
}

@media(max-width:600px) {
    .seller-filter {
        grid-template-columns:1fr
    }
    .seller-ops-head {
        flex-direction:column
    }
    .seller-quality {
        text-align:left
    }
    .bulk-toolbar {
        grid-template-columns:1fr
    }
    .bulk-toolbar .button {
        grid-column:auto
    }
}

/* v0.8.2a: compact mobile menu with all admin links visible */
html.menu-open, body.menu-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}

.site-menu {
    height: 100vh;
    height: 100dvh;
    padding: 6px 11px calc(6px + env(safe-area-inset-bottom)) !important;
    overflow: hidden !important;
    overscroll-behavior: none;
}

.menu-top {
    min-height: 36px !important;
    padding: 0 0 3px !important;
    font-size: .98rem !important;
}

.menu-top button {
    width: 34px !important;
    height: 34px !important;
    font-size: 1.55rem !important;
}

.site-menu nav {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100% - 39px) !important;
    min-height: 0 !important;
    margin-top: 1px !important;
    overflow: hidden !important;
}

.site-menu nav a, .site-menu nav span {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    padding: 1px 4px !important;
    display: flex !important;
    align-items: center !important;
    border-bottom: 1px solid var(--line);
    font-size: .80rem !important;
    line-height: 1 !important;
    font-weight: 850;
}

.site-menu nav a:last-child, .site-menu nav span:last-child {
    border-bottom: 0;
}

@media (min-height: 700px) {
    .site-menu {
        padding-top: 9px !important;
    }
    .menu-top {
        min-height: 41px !important;
        padding-bottom: 5px !important;
        font-size: 1.05rem !important;
    }
    .site-menu nav {
        height: calc(100% - 46px) !important;
        margin-top: 3px !important;
    }
    .site-menu nav a, .site-menu nav span {
        padding: 3px 4px !important;
        font-size: .87rem !important;
    }
}

@media (max-height: 560px) {
    .site-menu {
        padding: 3px 9px calc(3px + env(safe-area-inset-bottom)) !important;
    }
    .menu-top {
        min-height: 30px !important;
        padding-bottom: 1px !important;
        font-size: .90rem !important;
    }
    .menu-top button {
        width: 29px !important;
        height: 29px !important;
        font-size: 1.35rem !important;
    }
    .site-menu nav {
        height: calc(100% - 31px) !important;
        margin-top: 0 !important;
    }
    .site-menu nav a, .site-menu nav span {
        padding: 0 3px !important;
        font-size: .72rem !important;
    }
}

/* v0.8.3 Launch Polish */
.preview-banner {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px !important;
}

.preview-banner strong, .preview-banner span, .preview-banner a {
    display: inline-block;
}

.preview-banner a {
    margin-left: auto;
}

.account-action-notice {
    margin-top: 18px;
    margin-bottom: 4px;
}

@media (max-width: 520px) {
    .preview-banner {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px !important;
    }
    .preview-banner a {
        margin-left: 0;
        margin-top: 3px;
    }
}

/* v0.9 Messaging */
.dashboard-head-actions {
    display:flex;
    gap:8px;
    flex-wrap:wrap
}

.messages-page {
    max-width:900px;
    margin:0 auto
}

.messages-head {
    display:grid;
    gap:10px;
    margin:0 0 16px
}

.messages-head h1,.messages-head p {
    margin:3px 0
}

.conversation-list {
    display:grid;
    gap:9px
}

.conversation-row {
    display:flex;
    justify-content:space-between;
    gap:14px;
    padding:15px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:15px;
    color:inherit;
    text-decoration:none;
    box-shadow:var(--shadow)
}

.conversation-row.has-unread {
    border-color:#e7a2a7;
    background:#fffafa
}

.conversation-main {
    min-width:0
}

.conversation-name {
    display:flex;
    align-items:center;
    gap:7px;
    margin-bottom:4px;
    font-weight:900
}

.conversation-main strong {
    display:block
}

.conversation-main p {
    margin:5px 0 0;
    color:var(--muted);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis
}

.conversation-row>small {
    flex:0 0 auto;
    color:var(--muted)
}

.unread-pill {
    display:inline-grid;
    place-items:center;
    min-width:22px;
    height:22px;
    padding:0 6px;
    border-radius:999px;
    background:var(--red);
    color:#fff;
    font-size:.7rem
}

.message-thread {
    display:flex;
    flex-direction:column;
    gap:10px;
    padding:14px;
    margin-bottom:12px;
    background:#f4f5f7;
    border:1px solid var(--line);
    border-radius:17px
}

.message-bubble {
    max-width:84%;
    padding:11px 13px;
    border-radius:15px;
    background:#fff;
    border:1px solid var(--line)
}

.message-bubble.mine {
    align-self:flex-end;
    background:#fff2f3;
    border-color:#edc2c5
}

.message-bubble.theirs {
    align-self:flex-start
}

.message-author {
    margin-bottom:5px;
    font-size:.74rem;
    font-weight:900;
    color:var(--muted)
}

.message-body {
    line-height:1.45;
    overflow-wrap:anywhere
}

.message-bubble small {
    display:block;
    margin-top:6px;
    color:var(--muted);
    font-size:.68rem
}

.message-empty {
    text-align:center;
    color:var(--muted);
    padding:25px 10px
}

.message-compose {
    display:grid;
    gap:8px;
    padding:14px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:15px
}

.message-compose label {
    font-weight:900
}

.message-compose textarea,.message-report-form textarea,.message-report-form select {
    width:100%;
    box-sizing:border-box;
    padding:10px;
    border:1px solid var(--line);
    border-radius:10px;
    background:#fff;
    font:inherit
}

.message-compose textarea {
    resize:vertical
}

.message-tools {
    margin-top:14px;
    padding:12px 14px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:14px
}

.message-tools summary {
    cursor:pointer;
    font-weight:850
}

.message-tool-actions {
    display:grid;
    gap:15px;
    margin-top:13px
}

.message-report-form {
    display:grid;
    gap:9px;
    padding-top:13px;
    border-top:1px solid var(--line)
}

.message-report-form label {
    display:grid;
    gap:5px;
    font-weight:800
}

.message-report-form label span {
    font-weight:400;
    color:var(--muted)
}

@media(max-width:560px) {
    .dashboard-head-actions {
        width:100%;
        display:grid;
        grid-template-columns:1fr 1fr
    }
    .dashboard-head-actions .button {
        width:100%
    }
    .conversation-row {
        padding:12px
    }
    .conversation-row>small {
        font-size:.68rem
    }
    .message-bubble {
        max-width:91%
    }
}

/* v0.9.1 Search & Saved Searches */
.search-form {
    grid-template-columns:minmax(0,1.4fr) minmax(130px,.8fr) minmax(140px,.8fr) auto;
}

.save-search-strip {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin:-5px 0 16px;
    padding:11px 13px;
    border:1px solid var(--line);
    border-radius:13px;
    background:#fff;
}

.save-search-strip span {
    font-weight:750
}

.saved-search-intro {
    margin-top:-4px;
    color:var(--muted)
}

.saved-search-list {
    display:grid;
    gap:11px
}

.saved-search-card {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
    padding:16px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:16px;
    box-shadow:var(--shadow);
}

.saved-search-main {
    min-width:0
}

.saved-search-title {
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap
}

.saved-search-title h2 {
    margin:0;
    font-size:1.03rem
}

.saved-search-main p {
    margin:6px 0 3px;
    color:var(--muted)
}

.saved-search-main small {
    color:var(--muted)
}

.new-match-pill {
    display:inline-flex;
    padding:4px 8px;
    border-radius:999px;
    background:var(--red);
    color:#fff;
    font-size:.7rem;
    font-weight:900;
}

.saved-search-actions {
    display:flex;
    align-items:center;
    gap:10px;
    flex:0 0 auto;
}

.saved-search-actions form {
    margin:0
}

.saved-search-actions button.text-link {
    border:0;
    background:transparent;
    padding:5px;
    cursor:pointer;
    font:inherit;
}

.danger-text {
    color:#9b111e!important
}

@media(max-width:700px) {
    .search-form {
        grid-template-columns:1fr 1fr
    }
    .search-form input[type="search"] {
        grid-column:1/-1
    }
    .search-form button {
        grid-column:1/-1
    }
}

@media(max-width:520px) {
    .search-form {
        grid-template-columns:1fr
    }
    .search-form input[type="search"],.search-form button {
        grid-column:auto
    }
    .save-search-strip {
        align-items:stretch;
        flex-direction:column
    }
    .save-search-strip .button {
        width:100%
    }
    .saved-search-card {
        align-items:stretch;
        flex-direction:column
    }
    .saved-search-actions {
        justify-content:space-between
    }
}

/* v0.9.2 Category & Site Administration */
.category-admin-grid {
    display:grid;
    gap:16px;
}

.category-admin-list {
    display:grid;
    gap:8px;
}

.category-admin-row {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto auto auto;
    align-items:center;
    gap:10px;
    padding:11px 12px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fff;
}

.category-admin-row.category-inactive {
    opacity:.68;
    background:#f5f6f7;
}

.category-admin-main strong, .category-admin-main small {
    display:block;
}

.category-admin-main small {
    margin-top:3px;
    color:var(--muted);
}

.category-admin-state {
    font-size:.75rem;
    font-weight:900;
}

.category-order-actions form {
    display:flex;
    gap:4px;
}

.category-order-actions button {
    width:34px;
    height:34px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    font-size:1rem;
    font-weight:900;
    cursor:pointer;
}

.category-edit-card {
    align-self:start;
}

.category-edit-card .form-field small {
    display:block;
    margin-top:5px;
    color:var(--muted);
}

.category-delete-form {
    margin-top:18px;
    padding-top:14px;
    border-top:1px solid var(--line);
}

.category-delete-form button {
    border:0;
    background:transparent;
    cursor:pointer;
    font:inherit;
}

.site-settings-card {
    max-width:760px;
}

.site-settings-form {
    display:grid;
    gap:15px;
}

.site-settings-form textarea {
    width:100%;
    box-sizing:border-box;
    padding:12px;
    border:2px solid #dfe4ea;
    border-radius:12px;
    background:#fff;
    font:inherit;
    resize:vertical;
}

@media(min-width:900px) {
    .category-admin-grid:has(.category-edit-card) {
        grid-template-columns:minmax(0,1.5fr) minmax(300px,.8fr);
        align-items:start;
    }
    .category-edit-card {
        position:sticky;
        top:88px;
    }
}

@media(max-width:650px) {
    .category-admin-row {
        grid-template-columns:minmax(0,1fr) auto;
    }
    .category-admin-state {
        grid-column:2;
        grid-row:1;
    }
    .category-order-actions {
        grid-column:1;
    }
    .category-admin-row>.button {
        grid-column:2;
    }
}

/* v0.9.2a Category + desktop header polish */
/* Category Active control: do not inherit generic stacked-form label behavior. */
.category-active-option {
    display:grid !important;
    grid-template-columns:28px minmax(0,1fr) !important;
    align-items:start !important;
    gap:10px !important;
    width:100% !important;
    margin:4px 0 10px !important;
    padding:12px 0 !important;
    cursor:pointer;
}

.category-active-option input {
    width:22px !important;
    height:22px !important;
    margin:1px 0 0 !important;
}

.category-active-option span, .category-active-option strong, .category-active-option small {
    display:block !important;
}

.category-active-option strong {
    margin:0 !important;
    line-height:1.2;
}

.category-active-option small {
    margin-top:3px !important;
    color:var(--muted);
    font-weight:500;
    line-height:1.35;
}

/* Make the Category Management Add button unmistakable. */
.category-admin-grid .section-head > .button {
    color:#fff !important;
    white-space:nowrap;
}

/* Desktop: retain the responsive site, but make the header an intentional
   desktop layout instead of a stretched mobile navigation row. */
@media (min-width:980px) {
    .site-header {
        position:sticky;
    }
    .header-inner {
        width:min(1380px,100%);
        max-width:none;
        min-height:66px;
        padding:7px 16px;
        gap:18px;
    }
    .brand {
        flex:0 0 auto;
    }
    .pin-logo {
        width:30px;
        height:38px;
    }
    .brand span {
        font-size:1.34rem;
        letter-spacing:-1.4px;
    }
    .desktop-nav {
        display:flex;
        flex:1 1 auto;
        align-items:center;
        justify-content:flex-end;
        flex-wrap:nowrap;
        gap:clamp(9px,1.15vw,17px);
        min-width:0;
        font-size:clamp(.72rem,.87vw,.88rem);
        line-height:1.15;
        font-weight:850;
    }
    .desktop-nav a {
        flex:0 0 auto;
        white-space:nowrap;
    }
}

/* On narrower desktop/laptop widths, stay with the compact mobile menu
   rather than forcing a crowded desktop link row. */
@media (min-width:980px) and (max-width:1180px) {
    .desktop-nav {
        display:none;
    }
    .menu-button {
        display:grid;
    }
}

/* Full desktop navigation starts only when there is genuinely enough room. */
@media (min-width:1181px) {
    .desktop-nav {
        display:flex;
    }
    .menu-button {
        display:none;
    }
}

/* v0.9.3 Soft Launch Preparation */
body.env-staging {
    background:#fff2a8
}

body.env-staging main {
    background:transparent
}

.staging-badge {
    position:fixed;
    right:8px;
    bottom:74px;
    z-index:1200;
    padding:6px 9px;
    border:2px solid #111;
    border-radius:8px;
    background:#ffe100;
    color:#111;
    font-size:.68rem;
    font-weight:1000;
    letter-spacing:.08em;
    box-shadow:0 2px 7px rgba(0,0,0,.18)
}

.env-production .staging-badge {
    display:none
}

.environment-card.is-staging {
    background:#fff2a8!important;
    border-color:#d8b900!important
}

.environment-card.is-production {
    background:#f3fff6!important
}

.policy-page {
    max-width:850px
}

.policy-list {
    display:grid;
    gap:8px;
    padding-left:22px;
    line-height:1.45
}

.settings-divider {
    display:grid;
    gap:3px;
    margin-top:8px;
    padding:14px 0 4px;
    border-top:1px solid var(--line)
}

.settings-divider small {
    color:var(--muted);
    font-weight:500
}

@media(min-width:760px) {
    .staging-badge {
        bottom:12px
    }
}

/* v0.9.3a environment/footer correction */
.site-footer .footer-brand {
    display:flex;
    gap:14px;
    align-items:center;
}

.site-footer .footer-links {
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:8px 16px;
    font-size:.76rem;
    font-weight:800;
}

.site-footer .footer-links a {
    color:var(--muted);
}

.site-footer .footer-links a:hover {
    color:var(--red);
}

@media(min-width:980px) {
    .site-footer {
        align-items:flex-start;
        gap:24px;
    }
    .site-footer .footer-brand {
        flex:0 0 auto;
    }
    .site-footer .footer-links {
        flex:1 1 auto;
    }
}

/* v0.9.3b: launch footer visible at every responsive width */
.site-footer {
    width:calc(100% - 28px) !important;
    margin:24px auto 88px !important;
    padding:18px 14px !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    justify-content:flex-start !important;
    gap:14px !important;
    border-top:1px solid var(--line);
    color:var(--muted);
}

.site-footer .footer-brand {
    display:flex !important;
    flex-direction:column;
    align-items:flex-start;
    gap:2px !important;
}

.site-footer .footer-brand strong {
    color:var(--ink);
}

.site-footer .footer-links {
    width:100%;
    display:flex !important;
    flex-wrap:wrap;
    justify-content:flex-start;
    gap:9px 16px;
    font-size:.76rem;
    line-height:1.25;
}

.site-footer .footer-links a {
    display:inline-block;
    white-space:nowrap;
}

@media(min-width:650px) {
    .site-footer {
        width:calc(100% - 48px) !important;
        padding:20px !important;
    }
    .site-footer .footer-brand {
        flex-direction:row;
        align-items:center;
        gap:14px !important;
    }
}

@media(min-width:980px) {
    .site-footer {
        width:min(1180px,calc(100% - 40px)) !important;
        margin:30px auto 0 !important;
        padding:23px !important;
        flex-direction:row !important;
        align-items:flex-start !important;
        justify-content:space-between !important;
        gap:24px !important;
    }
    .site-footer .footer-brand {
        flex:0 0 auto;
    }
    .site-footer .footer-links {
        flex:1 1 auto;
        justify-content:flex-end;
    }
}

/* v0.9.3c: explicit responsive breakpoints */
/* PHONE / TABLET HEADER:
   Always keep the hamburger available until full desktop width.
   This closes the intermediate-width gap where the original stylesheet
   could hide both the hamburger and the desktop navigation. */
@media (max-width:1180px) {
    .desktop-nav {
        display:none !important;
    }
    .menu-button {
        display:grid !important;
    }
}

/* FULL DESKTOP HEADER:
   Only switch to the expanded navigation when there is enough room. */
@media (min-width:1181px) {
    .desktop-nav {
        display:flex !important;
        flex:1 1 auto;
        align-items:center;
        justify-content:flex-end;
        flex-wrap:nowrap;
        gap:clamp(9px,1.05vw,16px);
        min-width:0;
        font-size:clamp(.72rem,.82vw,.86rem);
        line-height:1.1;
        font-weight:850;
    }
    .desktop-nav a {
        flex:0 0 auto;
        white-space:nowrap;
    }
    .menu-button {
        display:none !important;
    }
}

/* PHONE FOOTER:
   Deliberate 2-column grid instead of unpredictable wrapping. */
@media (max-width:519px) {
    .site-footer .footer-links {
        display:grid !important;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:9px 14px !important;
        width:100%;
    }
    .site-footer .footer-links a {
        white-space:normal !important;
    }
}

/* TABLET FOOTER:
   One clean horizontal row whenever there is enough width. */
@media (min-width:520px) and (max-width:979px) {
    .site-footer .footer-links {
        display:flex !important;
        flex-wrap:nowrap !important;
        justify-content:flex-start !important;
        gap:clamp(10px,2vw,18px) !important;
        font-size:.73rem;
    }
    .site-footer .footer-links a {
        white-space:nowrap !important;
    }
}

/* v0.9.3d: desktop bottom navigation fix */
/* Mobile/tablet bottom navigation remains available through 1180px. */
@media (max-width:1180px) {
    .bottom-nav {
        display:flex !important;
        flex-wrap:nowrap !important;
    }
}

/* At the exact point the full desktop header appears, remove the fixed
   mobile bottom navigation completely. */
@media (min-width:1181px) {
    .bottom-nav {
        display:none !important;
    }
    body {
        padding-bottom:0 !important;
    }
    .site-footer {
        margin-bottom:0 !important;
    }
}

/* v0.9.3g Public Seller Listings */
/* Seller listings button alignment */
.seller-all-ads-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    margin: 10px auto 0;
    text-align: center;
}

.seller-public-website {
    margin:-5px 0 18px;
}

.seller-public-website a {
    color:var(--red);
    font-weight:900;
    text-decoration:underline;
    text-underline-offset:3px;
}

/* v0.9.4 Final Launch Fixes */
.preview-banner a {
    color:var(--red) !important;
    font-weight:900 !important;
    text-decoration:underline !important;
    text-underline-offset:3px;
}

.preview-banner a:hover {
    text-decoration-thickness:2px !important;
}

.manage-actions {
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

.remove-ad-form {
    display:inline;
    margin:0 0 0 auto;
}

.remove-ad-form .danger-text {
    appearance:none;
    border:0;
    background:none;
    padding:0;
    margin:0;
    color:var(--red);
    font:inherit;
    font-weight:800;
    cursor:pointer;
}

.remove-ad-form .danger-text:hover {
    text-decoration:underline;
}

@media(max-width:480px) {
    .remove-ad-form {
        margin-left:0;
    }
}

/* v1.1 Admin & Seller Improvements */
.password-toggle {
    display:flex!important;
    align-items:center;
    gap:8px;
    margin:2px 0 14px;
    font-weight:700;
    cursor:pointer
}

.password-toggle input {
    width:auto!important;
    margin:0!important
}

.proxy-ad-panel {
    border:2px solid var(--line);
    border-radius:14px;
    padding:16px;
    margin:18px 0
}

.proxy-ad-panel legend {
    font-weight:900;
    padding:0 6px
}

.proxy-fields[hidden] {
    display:none!important
}

.proxy-fields {
    margin-top:14px;
    padding-top:14px;
    border-top:1px solid var(--line)
}

/* v1.1a Show Password alignment */
.auth-card .stack-form > label.password-toggle, .settings-card .stack-form > label.password-toggle {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    width: auto !important;
    margin: 8px 0 14px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    cursor: pointer;
}

.auth-card .stack-form > label.password-toggle > input[type="checkbox"], .settings-card .stack-form > label.password-toggle > input[type="checkbox"] {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 16px !important;
}

.auth-card .stack-form > label.password-toggle > span, .settings-card .stack-form > label.password-toggle > span {
    display: inline-block !important;
    margin: 0 !important;
    line-height: 16px !important;
}

/* v1.2 Notifications, Verification & Password Eye */
.password-toggle {
    display:none!important
}

.password-field {
    position:relative;
    width:100%
}

.password-field>input {
    width:100%!important;
    padding-right:52px!important
}

.password-eye {
    position:absolute;
    right:5px;
    top:50%;
    transform:translateY(-50%);
    width:44px;
    height:44px;
    padding:0;
    border:0;
    background:transparent;
    display:grid;
    place-items:center;
    cursor:pointer;
    color:var(--muted)
}

.password-eye::before {
    content:"";
    width:23px;
    height:15px;
    border:2px solid currentColor;
    border-radius:50% 50%;
    display:block;
    box-sizing:border-box
}

.password-eye::after {
    content:"";
    position:absolute;
    width:7px;
    height:7px;
    border-radius:50%;
    background:currentColor
}

.password-eye.is-visible::before {
    opacity:.75
}

.password-eye.is-visible::after {
    width:26px;
    height:2px;
    border-radius:2px;
    transform:rotate(-45deg);
    background:var(--red)
}

.password-eye:focus-visible {
    outline:3px solid rgba(213,31,39,.2);
    border-radius:9px
}

.verification-resend {
    margin-top:14px;
    padding-top:14px;
    border-top:1px solid var(--line)
}

.verification-resend .button {
    width:100%
}

/* v1.2b OmaAds import */
.admin-table-wrap {
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    margin:16px 0 18px
}

.admin-table {
    width:100%;
    border-collapse:collapse;
    min-width:980px;
    background:#fff
}

.admin-table th,.admin-table td {
    padding:10px 9px;
    border-bottom:1px solid #ddd;
    text-align:left;
    vertical-align:top;
    font-size:.9rem
}

.admin-table th {
    font-weight:800;
    background:#f4f4f4;
    white-space:nowrap
}

.admin-table small {
    color:#9b2c2c;
    font-weight:700
}

.check-row {
    display:flex!important;
    align-items:center;
    gap:8px;
    margin:12px 0;
    font-weight:700
}

.check-row input[type="checkbox"] {
    width:18px!important;
    height:18px!important;
    margin:0!important;
    flex:0 0 18px
}


/* 2026-09-12 account verification, online count, and approved media links */
.verification-alert{display:flex;gap:18px;align-items:center;justify-content:space-between;margin:0 0 22px;padding:16px 18px;border:1px solid #e7c45b;border-radius:12px;background:#fff9df}
.verification-alert strong{display:block;margin-bottom:4px}
.verification-alert p{margin:0;max-width:720px}
.verification-alert form{flex:0 0 auto;margin:0}
.approved-media-link{overflow-wrap:anywhere;font-weight:600}
.online-count{display:inline-flex!important;align-items:center;gap:6px;margin-top:5px;font-size:.88rem}
.online-count i{display:inline-block;width:8px;height:8px;border-radius:50%;background:#2d9d55}
@media(max-width:640px){.verification-alert{display:block}.verification-alert form{margin-top:12px}.verification-alert .button{width:100%}}
