:root {
    --ink: #17212b;
    --muted: #687481;
    --line: #e3e8ed;
    --paper: #ffffff;
    --canvas: #f5f7f8;
    --primary: #e94e3d;
    --primary-dark: #c9382a;
    --teal: #087f78;
    --gold: #f3a712;
    --success: #17835b;
    --danger: #bd2c2c;
    --sidebar: #20282f;
    --shadow: 0 8px 28px rgba(28, 38, 47, .09);
    --content: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    color: var(--ink);
    background: var(--canvas);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    letter-spacing: 0;
}

body.drawer-open,
body.admin-menu-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    margin: 0;
    color: inherit;
    font: inherit;
    letter-spacing: 0;
}

button,
select {
    cursor: pointer;
}

img,
video {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    line-height: 1.25;
}

code {
    font-family: Consolas, Monaco, monospace;
}

.muted {
    color: var(--muted);
}

.site-header {
    position: sticky;
    z-index: 50;
    top: 0;
    border-bottom: 1px solid rgba(227, 232, 237, .9);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
}

.header-inner {
    display: grid;
    grid-template-columns: auto auto minmax(240px, 1fr) auto;
    align-items: center;
    width: min(calc(100% - 40px), var(--content));
    min-height: 68px;
    margin: 0 auto;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: none;
    color: var(--ink);
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.brand span {
    display: inline-grid;
    width: 32px;
    height: 32px;
    margin-right: 8px;
    place-items: center;
    border-radius: 6px;
    color: #fff;
    background: var(--primary);
    font-size: 18px;
}

.brand-dark {
    color: #fff;
}

.city-trigger {
    display: inline-flex;
    min-width: 94px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 13px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    font-weight: 650;
}

.city-trigger:hover,
.city-trigger[aria-expanded="true"] {
    border-color: var(--primary);
    color: var(--primary);
}

.city-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.city-arrow {
    flex: none;
    color: #8b959e;
    font-size: 18px;
    line-height: 1;
}

.header-search {
    display: grid;
    grid-template-columns: 1fr 44px;
    max-width: 600px;
    height: 40px;
    justify-self: center;
    overflow: hidden;
    border: 1px solid #dbe1e6;
    border-radius: 6px;
    background: var(--canvas);
}

.header-search:focus-within {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(8, 127, 120, .1);
}

.header-search input {
    min-width: 0;
    padding: 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
}

.header-search button {
    border: 0;
    color: #fff;
    background: var(--teal);
    font-size: 22px;
}

.header-admin {
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
}

.header-admin:hover {
    color: var(--primary);
}

.city-drawer {
    position: fixed;
    z-index: 60;
    inset: 68px 0 0;
    background: rgba(18, 27, 35, .34);
}

.city-drawer[hidden] {
    display: none;
}

.city-drawer-inner {
    width: 100%;
    padding: 24px max(20px, calc((100% - var(--content)) / 2));
    border-top: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
}

.city-drawer-inner strong {
    display: block;
    margin-bottom: 14px;
    font-size: 17px;
}

.city-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(70px, 1fr));
    gap: 8px;
}

.city-grid a {
    min-height: 38px;
    padding: 7px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    text-align: center;
}

.city-grid a:hover {
    background: var(--canvas);
}

.city-grid a.active {
    border-color: rgba(233, 78, 61, .25);
    color: var(--primary);
    background: #fff2ef;
    font-weight: 700;
}

body > main {
    min-height: 60vh;
}

.city-intro {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    width: min(calc(100% - 40px), var(--content));
    min-height: 340px;
    margin: 24px auto 18px;
    overflow: hidden;
    border-radius: 8px;
    color: #fff;
    background: #26343c;
    box-shadow: var(--shadow);
}

.city-intro > div {
    display: flex;
    padding: 44px;
    flex-direction: column;
    justify-content: center;
}

.city-intro h1 {
    max-width: 420px;
    margin-bottom: 16px;
    font-size: 40px;
}

.city-intro p:not(.eyebrow) {
    max-width: 420px;
    margin-bottom: 0;
    color: #dce5e9;
}

.eyebrow {
    margin-bottom: 10px;
    color: #8edbd2;
    font-size: 13px;
    font-weight: 800;
}

.city-feature {
    position: relative;
    min-height: 340px;
    overflow: hidden;
}

.city-feature::after {
    position: absolute;
    inset: 50% 0 0;
    content: "";
    background: linear-gradient(transparent, rgba(0, 0, 0, .7));
}

.city-feature img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.city-feature:hover img {
    transform: scale(1.025);
}

.city-feature span {
    position: absolute;
    z-index: 1;
    right: 24px;
    bottom: 22px;
    left: 24px;
    overflow: hidden;
    font-size: 17px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-strip,
.filter-tabs {
    display: flex;
    width: min(calc(100% - 40px), var(--content));
    margin: 0 auto;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.category-strip {
    padding: 8px 0 24px;
}

.category-strip a {
    width: 154px;
    min-width: 154px;
    padding: 15px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}

.category-strip a:hover {
    border-color: #b8c6cc;
    transform: translateY(-1px);
}

.category-strip strong,
.category-strip small {
    display: block;
}

.category-strip strong {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-strip small {
    overflow: hidden;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-section,
.listing-body {
    width: min(calc(100% - 40px), var(--content));
    margin: 0 auto;
    padding: 24px 0 36px;
}

.product-section + .product-section {
    border-top: 1px solid var(--line);
}

.section-heading,
.admin-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 20px;
}

.section-heading h2,
.admin-section-head h2 {
    margin-bottom: 3px;
    font-size: 23px;
}

.section-heading p,
.admin-section-head p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 13px;
}

.section-heading > a,
.admin-section-head > a {
    color: var(--teal);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.masonry-grid {
    column-count: 4;
    column-gap: 18px;
}
.masonry-card {
    break-inside: avoid;
    margin-bottom: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.masonry-card:hover {
    border-color: #cbd5da;
    box-shadow: 0 8px 22px rgba(28, 38, 47, .08);
    transform: translateY(-2px);
}
.masonry-media {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    background: #e8edef;
}
.masonry-media img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .35s ease;
}
.masonry-card:hover .masonry-media img {
    transform: scale(1.03);
}
.masonry-body {
    padding: 12px 14px 14px;
}
.masonry-body h3 {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.35;
}
.masonry-body h3 a {
    color: var(--ink);
}
.masonry-body p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.masonry-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}
.masonry-meta strong {
    color: var(--primary);
    font-size: 15px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.product-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--paper);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.product-card:hover {
    border-color: #cbd5da;
    box-shadow: 0 8px 22px rgba(28, 38, 47, .08);
    transform: translateY(-2px);
}

.product-cover {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e8edef;
}

.product-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.product-card:hover .product-cover img {
    transform: scale(1.03);
}

.image-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #87929a;
    background: #e8edef;
    font-weight: 750;
}

.media-badge {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 3px 7px;
    border-radius: 3px;
    color: #fff;
    background: rgba(17, 26, 32, .8);
    font-size: 11px;
}

.product-info {
    display: flex;
    min-height: 132px;
    padding: 13px 14px 14px;
    flex-direction: column;
}

.product-info h3 {
    display: -webkit-box;
    min-height: 44px;
    margin-bottom: 7px;
    overflow: hidden;
    font-size: 15px;
    font-weight: 700;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-info h3 a:hover {
    color: var(--primary);
}

.sold {
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 12px;
}

.product-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: auto;
    gap: 8px;
}

.price {
    min-height: 29px;
    color: var(--primary);
    white-space: nowrap;
}

.price small {
    font-size: 12px;
    font-weight: 700;
}

.price strong {
    font-size: 22px;
    line-height: 1;
}

.price del {
    margin-left: 4px;
    color: #929ca4;
    font-size: 11px;
}

.text-link {
    color: var(--teal);
    font-size: 13px;
    font-weight: 700;
}

.listing-head {
    padding: 48px 20px 32px;
    color: #fff;
    background: #26343c;
}

.listing-head > div {
    width: min(100%, var(--content));
    margin: 0 auto;
}

.listing-head a,
.listing-head span {
    margin-right: 6px;
    color: #a7d8d3;
    font-size: 13px;
}

.listing-head h1 {
    margin: 9px 0 7px;
    font-size: 34px;
}

.listing-head p {
    margin-bottom: 0;
    color: #cbd4d9;
}

.filter-tabs {
    padding: 18px 0 0;
}

.filter-tabs a {
    flex: none;
    padding: 8px 13px;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-weight: 650;
}

.filter-tabs a:hover,
.filter-tabs a.active {
    border-color: var(--primary);
    color: var(--primary);
}

.empty-state {
    width: min(calc(100% - 40px), var(--content));
    margin: 28px auto;
    padding: 60px 24px;
    border: 1px dashed #c7d0d5;
    border-radius: 7px;
    text-align: center;
    background: #fff;
}

.empty-state h2 {
    margin-bottom: 6px;
}

.empty-state p {
    color: var(--muted);
}

.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-weight: 700;
    line-height: 1.2;
}

button.button {
    appearance: none;
}

.button-primary {
    color: #fff;
    background: var(--primary);
}

.button-primary:hover {
    background: var(--primary-dark);
}

.button-secondary {
    border-color: #ccd5da;
    background: #fff;
}

.button-secondary:hover {
    border-color: #96a4ac;
}

.button-danger {
    border-color: var(--danger);
    color: #fff;
    background: var(--danger);
}

.button-danger:hover {
    border-color: #982323;
    background: #982323;
}

.button-buy {
    min-height: 50px;
    color: #fff;
    background: var(--primary);
    font-size: 17px;
}

.button-block {
    width: 100%;
}

.listing-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.refresh-trigger {
    border-color: var(--teal);
    color: #fff;
    background: var(--teal);
}
.refresh-trigger:hover {
    border-color: #063d39;
    background: #063d39;
}
.refresh-trigger:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.article-page {
    width: min(calc(100% - 40px), var(--content));
    margin: 0 auto;
    padding: 20px 0 56px;
}

.breadcrumbs {
    display: flex;
    min-height: 36px;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.breadcrumbs a:hover {
    color: var(--teal);
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.detail-media {
    display: grid;
    min-height: 450px;
    place-items: center;
    overflow: hidden;
    background: #e9edef;
}

.detail-media img,
.detail-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-summary {
    display: flex;
    padding: 34px;
    flex-direction: column;
}

.product-id {
    margin-bottom: 7px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 750;
}

.detail-summary h1 {
    margin-bottom: 12px;
    font-size: 27px;
}

.lead {
    color: var(--muted);
    font-size: 14px;
}

.detail-price {
    display: flex;
    min-height: 58px;
    align-items: baseline;
    margin: 10px 0 18px;
    color: var(--primary);
    gap: 4px;
}

.detail-price > span {
    font-weight: 800;
}

.detail-price strong {
    font-size: 40px;
    line-height: 1;
}

.detail-price small {
    color: var(--muted);
}

.detail-price del {
    margin-left: 10px;
    color: #929ca4;
    font-size: 12px;
}

.purchase-notes {
    margin: 0 0 22px;
    padding: 15px 18px 15px 35px;
    border-left: 3px solid var(--gold);
    color: #596570;
    background: #fff8e7;
    font-size: 13px;
}

.detail-summary .button-buy {
    margin-top: auto;
}

.article-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    margin-top: 22px;
    gap: 22px;
}

.article-content,
.article-aside {
    min-width: 0;
}

.content-section,
.article-aside {
    margin-bottom: 20px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.content-section > h2,
.article-aside > h2 {
    margin-bottom: 20px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--line);
    font-size: 21px;
}

.package-list {
    display: grid;
    gap: 8px;
}

.package-row {
    display: flex;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 5px;
    gap: 14px;
}

.package-row p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.package-row b {
    flex: none;
    color: var(--primary);
}

.remote-content {
    overflow-wrap: anywhere;
}

.remote-content img,
.remote-content video,
.remote-content iframe {
    max-width: 100% !important;
    height: auto !important;
    margin: 8px auto;
}

.remote-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.remote-content td,
.remote-content th {
    padding: 8px;
    border: 1px solid var(--line);
}

.article-aside {
    position: sticky;
    top: 90px;
}

.aside-item {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    gap: 10px;
}

.aside-item:last-child {
    border: 0;
}

.aside-item img {
    width: 82px;
    height: 66px;
    border-radius: 4px;
    object-fit: cover;
}

.aside-item strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.aside-item b {
    display: block;
    margin-top: 5px;
    color: var(--primary);
    font-size: 13px;
}

.comment {
    display: grid;
    grid-template-columns: 42px 1fr;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    gap: 12px;
}

.comment > img,
.avatar {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--teal);
    object-fit: cover;
    font-weight: 700;
}

.comment time {
    margin-left: 9px;
    color: #8a949d;
    font-size: 11px;
}

.comment p {
    margin: 6px 0 0;
}

.comment-form {
    margin-top: 24px;
    padding-top: 4px;
}

label {
    display: grid;
    margin-bottom: 14px;
    gap: 6px;
    color: #4d5964;
    font-size: 13px;
    font-weight: 650;
}

input,
textarea,
select {
    width: 100%;
    min-height: 41px;
    padding: 8px 10px;
    border: 1px solid #cfd7dc;
    border-radius: 4px;
    outline: 0;
    background: #fff;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(8, 127, 120, .09);
}

.mobile-buybar {
    display: none;
}

.site-footer {
    padding: 32px max(20px, calc((100% - var(--content)) / 2));
    color: #bec7cc;
    background: #20282f;
    font-size: 13px;
}

.site-footer > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.site-footer strong {
    color: #fff;
    font-size: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-brand a {
    color: #9eabb3;
}

.footer-brand a:hover {
    color: #fff;
}

.footer-source {
    align-self: flex-end;
    text-align: right;
}

.alert {
    margin-bottom: 16px;
    padding: 11px 14px;
    border: 1px solid;
    border-radius: 5px;
    font-size: 14px;
}

.alert-success {
    border-color: #a8d7c3;
    color: #116044;
    background: #eaf7f1;
}

.alert-error {
    border-color: #e5b5b5;
    color: #952525;
    background: #fff0f0;
}

.alert-warning {
    border-color: #ecd28d;
    color: #765200;
    background: #fff8df;
}

.pagination {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    gap: 6px;
}

.pagination a,
.pagination span {
    display: inline-grid;
    min-width: 38px;
    height: 38px;
    padding: 0 9px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
}

.pagination span {
    border-color: transparent;
    color: var(--muted);
    background: transparent;
}

.pagination a:hover {
    border-color: #96a4ac;
}

.pagination a.active {
    border-color: var(--teal);
    color: #fff;
    background: var(--teal);
    font-weight: 750;
}

.pagination .page-direction {
    width: auto;
    white-space: nowrap;
}

/* Authentication */
.auth-page {
    min-height: 100vh;
    background: #26343c;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    padding: 28px 18px;
    place-items: center;
}

.auth-panel {
    width: min(100%, 430px);
    padding: 36px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .22);
}

.install-panel {
    width: min(100%, 620px);
}

.install-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.install-grid .span-2 {
    grid-column: span 2;
}

.install-sync {
    margin: 4px 0 18px;
}

.install-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 22px;
    gap: 10px;
}

.auth-panel .brand {
    margin-bottom: 32px;
    color: var(--ink);
}

.auth-panel h1 {
    margin-bottom: 7px;
    font-size: 27px;
}

.auth-panel form {
    margin-top: 22px;
}

.auth-back {
    display: block;
    margin-top: 22px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

/* Admin */
.admin-body {
    min-height: 100vh;
    background: #f3f5f6;
}

.admin-sidebar {
    position: fixed;
    z-index: 80;
    inset: 0 auto 0 0;
    display: flex;
    width: 240px;
    padding: 22px 16px;
    flex-direction: column;
    color: #bec7cc;
    background: var(--sidebar);
}

.admin-sidebar .brand {
    margin: 0 8px 28px;
    color: #fff;
}

.admin-sidebar nav {
    display: grid;
    gap: 4px;
}

.admin-sidebar nav a {
    min-height: 43px;
    padding: 9px 13px;
    border-radius: 5px;
    font-weight: 650;
}

.admin-sidebar nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.admin-sidebar nav a.active {
    color: #fff;
    background: var(--teal);
}

.sidebar-bottom {
    display: grid;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    gap: 8px;
}

.sidebar-bottom a,
.sidebar-bottom button {
    display: block;
    width: 100%;
    padding: 5px 8px;
    border: 0;
    color: #bec7cc;
    background: transparent;
    text-align: left;
}

.admin-main {
    min-height: 100vh;
    margin-left: 240px;
}

.admin-topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    min-height: 65px;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
}

.admin-topbar > div {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 15px;
}

.admin-topbar span {
    color: var(--muted);
    font-size: 13px;
}

.menu-button {
    display: none;
    width: 38px;
    height: 38px;
    margin-right: 12px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    font-size: 19px;
}

.admin-content {
    width: min(100%, 1440px);
    margin: 0 auto;
    padding: 28px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
    gap: 14px;
}

.metric {
    display: flex;
    min-height: 140px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 7px;
    flex-direction: column;
    background: #fff;
}

.metric > span {
    color: var(--muted);
    font-size: 13px;
}

.metric > strong {
    margin: 9px 0 2px;
    font-size: 34px;
    line-height: 1.1;
}

.metric > strong i {
    font-size: 13px;
    font-style: normal;
}

.metric > small {
    margin-top: auto;
    color: var(--muted);
}

.metric-accent {
    border-top: 3px solid var(--gold);
}

.admin-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.admin-section {
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.admin-section > h2 {
    margin-bottom: 18px;
    font-size: 19px;
}

.compact-list {
    display: grid;
}

.compact-list > a,
.compact-list > div {
    display: flex;
    min-width: 0;
    min-height: 45px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #edf0f2;
    gap: 16px;
}

.compact-list > :last-child {
    border-bottom: 0;
}

.compact-list span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-list small {
    flex: none;
    color: var(--muted);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: #8d99a1;
}

.status-dot.success {
    background: var(--success);
}

.status-dot.partial {
    background: var(--gold);
}

.status-dot.failed {
    background: var(--danger);
}

.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
}

.admin-search {
    display: grid;
    grid-template-columns: minmax(220px, 380px) 140px auto;
    align-items: center;
    gap: 8px;
}

.admin-search input,
.admin-search select {
    margin: 0;
}

.toolbar-count {
    color: var(--muted);
    font-size: 13px;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.data-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e8ecef;
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: #5c6872;
    background: #f7f8f9;
    font-size: 12px;
    white-space: nowrap;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background: #fbfcfc;
}

.table-product {
    display: grid;
    grid-template-columns: 52px minmax(180px, 1fr);
    align-items: center;
    gap: 10px;
}

.table-product img {
    width: 52px;
    height: 42px;
    border-radius: 4px;
    object-fit: cover;
}

.table-product strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.table-product small {
    display: block;
    color: var(--muted);
}

.status-label {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 3px;
    color: #5e6972;
    background: #e9edef;
    font-size: 11px;
    white-space: nowrap;
}

.status-label.published,
.status-label.success {
    color: #116044;
    background: #e1f3eb;
}

.status-label.pending,
.status-label.partial,
.status-label.running {
    color: #875c00;
    background: #fff0c7;
}

.status-label.hidden,
.status-label.failed {
    color: #902c2c;
    background: #fae5e5;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.row-actions form {
    display: inline;
}

.row-actions a,
.row-actions button {
    padding: 0;
    border: 0;
    color: var(--teal);
    background: transparent;
    font-weight: 650;
}

.row-actions .danger {
    color: var(--danger);
}

.comment-cell {
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
    gap: 9px;
}

.sticky-actions {
    position: sticky;
    z-index: 20;
    top: 76px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 5px 16px rgba(30, 40, 47, .06);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.form-grid .span-2 {
    grid-column: span 2;
}

.checkbox-label {
    display: flex;
    min-height: 41px;
    align-items: center;
    gap: 8px;
}

.checkbox-label input {
    width: 17px;
    min-height: 17px;
    height: 17px;
    flex: none;
    accent-color: var(--teal);
}

.section-note {
    margin: -10px 0 18px;
    color: var(--muted);
    font-size: 13px;
}

.affiliate-lock,
.sync-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding: 11px 14px;
    border-left: 3px solid var(--teal);
    background: #edf8f7;
    gap: 16px;
    font-size: 13px;
}

.affiliate-lock span,
.sync-notice span {
    color: var(--muted);
}

.code-editor,
.command-box,
.result-box {
    font-family: Consolas, Monaco, monospace;
}

.code-editor {
    line-height: 1.55;
}

.command-box {
    display: block;
    margin-top: 12px;
    padding: 12px 14px;
    overflow-x: auto;
    color: #d8e3e7;
    background: #28343b;
    white-space: nowrap;
}

.result-box {
    max-height: 380px;
    padding: 14px;
    overflow: auto;
    color: #d8e3e7;
    background: #28343b;
    font-size: 12px;
}

.placement-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.placement-list span {
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #f7f9fa;
    font-size: 12px;
}

.taxonomy-list {
    display: grid;
    gap: 10px;
}

.taxonomy-head {
    align-items: flex-start;
    gap: 20px;
}

.taxonomy-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.taxonomy-actions form {
    margin: 0;
}

.taxonomy-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(130px, 1fr) 90px 80px auto;
    align-items: end;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf0f2;
    gap: 10px;
}

.taxonomy-category {
    grid-template-columns: 80px minmax(120px, .8fr) minmax(120px, .8fr) minmax(180px, 1.2fr) 75px 75px auto;
}

.taxonomy-row label {
    margin: 0;
}

.taxonomy-city {
    align-self: center;
    color: var(--muted);
    font-size: 12px;
}

.sync-form {
    display: grid;
    grid-template-columns: minmax(180px, 300px) minmax(220px, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.sync-form label {
    margin: 0;
}

@media (max-width: 1080px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .city-grid {
        grid-template-columns: repeat(6, minmax(70px, 1fr));
    }

    .article-columns {
        grid-template-columns: minmax(0, 1fr) 260px;
    }

    .metric-grid {
        grid-template-columns: 1fr 1fr;
    }

    .taxonomy-row,
    .taxonomy-category {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .taxonomy-city {
        grid-column: span 2;
    }
}

@media (max-width: 820px) {
    .site-header {
        padding: 8px 0;
        background: var(--canvas);
    }

    .header-inner {
        grid-template-columns: auto 1fr;
        grid-template-rows: 44px 42px;
        min-height: 44px;
        overflow: hidden;
        gap: 0;
        border: 1px solid #dce2e6;
        border-radius: 7px;
        background: #fff;
        box-shadow: 0 2px 10px rgba(28, 38, 47, .06);
    }

    .header-inner .brand {
        display: inline-flex;
        grid-column: 1 / -1;
        grid-row: 1;
        min-height: 44px;
        padding: 6px 12px;
        border-bottom: 1px solid var(--line);
        font-size: 17px;
    }

    .header-inner .brand span {
        width: 28px;
        height: 28px;
        margin-right: 7px;
        font-size: 16px;
    }

    .header-admin {
        display: none;
    }

    .city-trigger {
        grid-column: 1;
        grid-row: 2;
        min-width: 82px;
        max-width: 110px;
        min-height: 42px;
        padding: 5px 10px 5px 12px;
        overflow: hidden;
        justify-self: start;
        border: 0;
        border-right: 1px solid var(--line);
        border-radius: 0;
    }

    .header-search {
        grid-column: 2;
        grid-row: 2;
        width: 100%;
        max-width: none;
        height: 42px;
        border: 0;
        border-radius: 0;
        background: #f7f8f9;
    }

    .header-search:focus-within {
        border-color: transparent;
        box-shadow: inset 0 0 0 2px rgba(8, 127, 120, .22);
    }

    .header-search button {
        color: var(--teal);
        background: transparent;
    }

    .city-drawer {
        inset: 104px 0 0;
    }

    .city-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .city-intro {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .city-intro > div {
        padding: 28px;
    }

    .city-intro h1 {
        font-size: 32px;
    }

    .city-feature {
        min-height: 280px;
    }

    .article-columns {
        grid-template-columns: 1fr;
    }

    .article-aside {
        position: static;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .detail-media {
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform .22s ease;
    }

    .admin-menu-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-menu-open::after {
        position: fixed;
        z-index: 70;
        inset: 0;
        content: "";
        background: rgba(15, 23, 29, .5);
    }

    .admin-main {
        margin-left: 0;
    }

    .menu-button {
        display: block;
        flex: none;
    }

    .admin-columns {
        grid-template-columns: 1fr;
    }

    .sync-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    body {
        font-size: 14px;
    }

    .header-inner,
    .category-strip,
    .filter-tabs,
    .product-section,
    .listing-body,
    .article-page {
        width: min(calc(100% - 24px), var(--content));
    }

    .header-inner {
        width: calc(100% - 20px);
    }

    .city-drawer-inner {
        max-height: calc(100vh - 104px);
        padding: 18px 12px 28px;
        overflow-y: auto;
    }

    .city-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .city-grid a {
        padding: 7px 4px;
    }

    .city-intro {
        display: flex;
        width: 100%;
        margin: 0 0 12px;
        border-radius: 0;
        flex-direction: column-reverse;
        box-shadow: none;
    }

    .city-feature {
        min-height: 0;
        aspect-ratio: 16 / 8.5;
    }

    .city-feature span {
        right: 14px;
        bottom: 12px;
        left: 14px;
        font-size: 14px;
    }

    .city-intro > div {
        padding: 20px 14px 22px;
    }

    .city-intro h1 {
        margin-bottom: 8px;
        font-size: 25px;
    }

    .city-intro p:not(.eyebrow) {
        font-size: 13px;
    }

    .category-strip {
        padding-bottom: 15px;
    }

    .category-strip a {
        width: 122px;
        min-width: 122px;
        padding: 11px;
    }

    .product-section {
        padding: 19px 0 26px;
    }

    .section-heading {
        align-items: center;
        margin-bottom: 12px;
    }

    .section-heading h2 {
        font-size: 19px;
    }

    .section-heading p {
        display: none;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .product-info {
        min-height: 120px;
        padding: 10px;
    }

    .product-info h3 {
        min-height: 40px;
        font-size: 14px;
    }

    .price strong {
        font-size: 19px;
    }

    .price del,
    .text-link {
        display: none;
    }

    .listing-head {
        padding: 28px 12px 24px;
    }

    .listing-head h1 {
        font-size: 26px;
    }

    .listing-body {
        padding-top: 18px;
    }

    .article-page {
        padding-top: 7px;
        padding-bottom: 88px;
    }

    .breadcrumbs {
        font-size: 12px;
    }

    .product-detail {
        margin-right: -12px;
        margin-left: -12px;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .detail-summary {
        padding: 20px 16px 22px;
    }

    .detail-summary h1 {
        font-size: 21px;
    }

    .detail-price {
        min-height: 46px;
        margin-bottom: 13px;
    }

    .detail-price strong {
        font-size: 33px;
    }

    .detail-summary .button-buy {
        display: none;
    }

    .article-columns {
        margin-top: 12px;
        gap: 12px;
    }

    .content-section,
    .article-aside {
        margin-bottom: 12px;
        padding: 18px 14px;
    }

    .content-section > h2,
    .article-aside > h2 {
        font-size: 18px;
    }

    .package-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .mobile-buybar {
        position: fixed;
        z-index: 45;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: 1fr 48%;
        min-height: 64px;
        padding: 8px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
        border-top: 1px solid var(--line);
        background: #fff;
        box-shadow: 0 -4px 16px rgba(27, 38, 46, .1);
    }

    .mobile-buybar > div {
        display: flex;
        align-items: baseline;
        color: var(--primary);
        gap: 2px;
    }

    .mobile-buybar strong {
        font-size: 25px;
    }

    .mobile-buybar span {
        color: var(--muted);
        font-size: 12px;
    }

    .mobile-buybar a {
        display: grid;
        min-height: 46px;
        place-items: center;
        border-radius: 5px;
        color: #fff;
        background: var(--primary);
        font-size: 16px;
        font-weight: 800;
    }

    .site-footer > div {
        flex-direction: column;
        gap: 4px;
    }

    .footer-brand {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .footer-source {
        align-self: flex-end;
        text-align: right;
    }

    .auth-panel {
        padding: 26px 20px;
    }

    .install-grid {
        grid-template-columns: 1fr;
    }

    .install-grid .span-2 {
        grid-column: auto;
    }

    .admin-topbar,
    .admin-content {
        padding-right: 14px;
        padding-left: 14px;
    }

    .metric-grid {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .metric {
        min-height: 120px;
        padding: 14px;
    }

    .metric > strong {
        font-size: 28px;
    }

    .admin-section {
        padding: 16px;
    }

    .admin-search {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .admin-toolbar {
        align-items: flex-end;
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid .span-2 {
        grid-column: auto;
    }

    .sticky-actions {
        top: 72px;
    }

    .affiliate-lock,
    .sync-notice {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .taxonomy-row,
    .taxonomy-category {
        grid-template-columns: 1fr;
        padding: 13px;
        border: 1px solid var(--line);
        border-radius: 5px;
    }

    .taxonomy-city {
        grid-column: auto;
    }

    .taxonomy-head {
        align-items: stretch;
        flex-direction: column;
    }

    .taxonomy-actions {
        justify-content: flex-start;
    }

    .pagination {
        justify-content: flex-start;
        margin-right: -12px;
        margin-left: -12px;
        padding: 0 12px 4px;
        overflow-x: auto;
    }

    .pagination a,
    .pagination span {
        flex: none;
    }
}

@media (max-width: 380px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-cover {
        aspect-ratio: 16 / 10;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }
}
.floating-buy {
    position: fixed;
    z-index: 45;
    right: 18px;
    bottom: 90px;
    display: grid;
    gap: 8px;
    width: 86px;
    place-items: center;
    padding: 10px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(28,38,47,.14);
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}
.floating-buy img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 1px solid var(--line);
}
.mobile-buybar + .floating-buy {
    bottom: 110px;
}
.qr-pos-left-bottom {
    left: 18px;
    right: auto;
}
.qr-detail-top-right {
    position: absolute;
    right: 14px;
    top: 14px;
    bottom: auto;
    width: 88px;
}
.qr-detail-top-right img {
    width: 88px;
    height: 88px;
}
.qr-article-bottom {
    position: static;
    width: auto;
    margin: 14px 0;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(28,38,47,.08);
    color: var(--ink);
    text-align: center;
}
.qr-article-bottom img {
    width: 110px;
    height: 110px;
    margin: 0 auto;
}
.qr-align-left {
    justify-self: start;
}
@media (max-width: 768px) {
    .floating-buy {
        right: 12px;
        bottom: 96px;
        width: 76px;
        padding: 8px;
    }
    .floating-buy img {
        width: 56px;
        height: 56px;
    }
    .mobile-buybar + .floating-buy {
        bottom: 108px;
    }
    .qr-pos-left-bottom {
        left: 12px;
        right: auto;
    }
    .qr-detail-top-right {
        right: 10px;
        top: 10px;
        width: 78px;
    }
    .qr-detail-top-right img {
        width: 78px;
        height: 78px;
    }
    .qr-article-bottom img {
        width: 96px;
        height: 96px;
    }
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}
.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 0;
    background: #cdd3d8;
    color: transparent;
    padding: 0;
}
.carousel-dot.active {
    background: var(--primary);
    width: 22px;
}

.subnav {
    position: sticky;
    top: 68px;
    z-index: 40;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.subnav[hidden] {
    display: none;
}
.subnav-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 6px;
    width: min(calc(100% - 40px), var(--content));
    margin: 0 auto;
    padding: 10px 0;
}
.subnav a {
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 6px;
    text-align: center;
    background: var(--canvas);
    font-weight: 650;
}
.subnav a.active {
    background: #fff;
    border: 1px solid rgba(233,78,61,.25);
    color: var(--primary);
}

.article-columns {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 18px;
    align-items: start;
}
.article-content h2 {
    margin-top: 22px;
}
.article-aside {
    position: sticky;
    top: 84px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
}
.article-aside > h2 {
    margin-top: 0;
    font-size: 16px;
}
.aside-item {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.aside-item:last-child {
    border-bottom: 0;
}
.aside-item img {
    width: 88px;
    height: 66px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}
.aside-item span {
    display: grid;
    gap: 6px;
}
.aside-item strong {
    font-size: 14px;
    line-height: 1.35;
}
.aside-item b {
    color: var(--primary);
    font-size: 15px;
}

.product-section {
    margin: 22px auto;
    width: min(calc(100% - 40px), var(--content));
}
.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.section-heading h2 {
    margin: 0;
    font-size: 20px;
}
.section-heading p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}
.section-heading a {
    color: var(--primary);
    font-weight: 650;
}

.city-intro {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 18px;
    align-items: center;
    width: min(calc(100% - 40px), var(--content));
    margin: 22px auto 14px;
    padding: 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, #142232, #1f3a4f);
    color: #fff;
    box-shadow: var(--shadow);
}
.city-intro .eyebrow {
    margin: 0 0 8px;
    color: #9fb6c6;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.city-intro h1 {
    margin: 0 0 10px;
    font-size: 26px;
    line-height: 1.25;
}
.city-intro p {
    margin: 0;
    color: #dbe4ec;
    font-size: 14px;
    line-height: 1.55;
}
.city-feature {
    position: relative;
    display: grid;
    height: 220px;
    place-items: end;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.14);
    color: #fff;
}
.city-feature img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.city-feature span {
    position: relative;
    z-index: 1;
    padding: 14px;
    background: linear-gradient(0deg, rgba(0,0,0,.45), rgba(0,0,0,0));
    font-weight: 700;
    font-size: 14px;
}

.category-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    width: min(calc(100% - 40px), var(--content));
    margin: 0 auto 18px;
}
.category-strip a {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 10px;
    background: var(--paper);
    border: 1px solid var(--line);
    text-align: center;
    box-shadow: 0 6px 18px rgba(28,38,47,.06);
}
.category-strip strong {
    font-size: 15px;
}
.category-strip small {
    color: var(--muted);
    font-size: 12px;
}
