/* Shared visual system. Status colours in booking calendars keep their meaning. */
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; line-height: 1.55; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { max-width: 100%; }
button, summary, a { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .55; }
[hidden] { display: none !important; }
h1,h2,h3,h4,p { overflow-wrap: anywhere; }
.topbar { box-shadow: none; background: var(--bg); }
.topbar-inner, .container { width: min(1440px, calc(100% - 64px)); }
.btn, .nav a, .nav-button { min-height: 44px; border-radius: var(--radius); box-shadow: none; background: transparent; font-weight: 500; }
.btn:hover,.nav a:hover,.nav-button:hover,a.card:hover,.product-card:hover { box-shadow: none; transform: none; border-color: var(--text); }
.btn.primary, .nav-button.active, .admin-section-tab.active, .template-type-button.active { background: var(--brand); color: var(--bg); border-color: var(--brand); }
input, select, textarea { background: #F8F6F1; border-color: var(--line); border-radius: var(--radius); color: var(--text); }
input::placeholder,textarea::placeholder { color: #777269; }
.card,.panel,.content,.sidebar,.product-card { box-shadow: none; }
.brand { letter-spacing: -.7px; font-size: 22px; }
.brand-note { font-size: 12px; font-weight: 400; color: var(--muted); padding-left: 12px; letter-spacing: 1px; }
.market-topbar .topbar-inner { min-height: 88px; display: grid; grid-template-columns: auto minmax(220px, 440px) auto auto; gap: 32px; }
.market-topbar .brand { white-space: nowrap; }
.market-search { display: flex; align-items: center; gap: 10px; background: var(--panel-soft); border: 1px solid transparent; border-radius: 30px; padding: 0 6px 0 16px; margin: 0; min-width: 0; }
.market-search:focus-within { border-color: var(--text); }
.market-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; margin: 0; height: 44px; padding: 0; font-size: 14px; box-shadow: none; }
.market-search svg { flex-shrink: 0; color: var(--muted); }
.market-search button { border: 0; background: transparent; padding: 0 12px; height: 44px; white-space: nowrap; cursor: pointer; color: var(--text); }
.city-trigger,.market-manage { border: 0; background: transparent; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; cursor: pointer; white-space: nowrap; font-size: 14px; color: var(--text); }
.city-trigger span[data-city-label] { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.market-manage { justify-content: end; }
.market-container { padding-top: 32px; }
.market-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.eyebrow { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.market-intro h1 { font-size: 34px; font-weight: 600; letter-spacing: -1px; margin: 4px 0 0; line-height: 1.4; }
.market-count { font-size: 12px; padding-bottom: 4px; }
.market-controls { display: flex; justify-content: space-between; gap: 20px; align-items: center; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.market-categories,.market-order { display: flex; gap: 26px; align-items: center; }
.market-categories { overflow-x: auto; scrollbar-width: none; }
.market-categories::-webkit-scrollbar { display: none; }
.market-controls button { min-height: 48px; border: 0; border-bottom: 2px solid transparent; padding: 0 3px; background: transparent; color: var(--muted); cursor: pointer; flex-shrink: 0; white-space: nowrap; font-size: 15px; }
.market-controls button.active { color: var(--text); border-bottom-color: var(--text); font-weight: 650; }
.market-order { flex-shrink: 0; gap: 20px; }
.market-order button { font-size: 13px; display: flex; align-items: center; gap: 5px; }
.market-order svg { width: 16px; }
.market-grid,.display-container .product-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 28px 20px; }
.market-card { min-width: 0; display: flex; flex-direction: column; }
.market-cover { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--panel-soft); border-radius: 5px; position: relative; }
.market-cover img { width: 100%; height: 100%; object-fit: cover; display: block; filter: none; opacity: 1; }
.market-cover:hover img { transform: scale(1.025); transition: transform .25s; }
.market-no-cover { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; font-size: 24px; color: var(--muted); }
.market-no-cover small { font-size: 12px; }
.market-card-body { padding: 10px 0 0; display: grid; gap: 6px; align-content: start; }
.market-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.market-title:hover { text-decoration: underline; text-underline-offset: 4px; }
.market-price { font-size: 13px; margin: 0; font-weight: 550; }
.market-merchant { display: flex; align-items: center; min-width: 0; gap: 7px; color: #56544E; font-size: 12px; min-height: 26px; }
.market-merchant > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.market-merchant img,.market-merchant .avatar-initial { height: 24px; width: 24px; flex: 0 0 24px; border-radius: 50%; object-fit: cover; font-size: 11px; }
.avatar-initial { display: inline-flex; align-items: center; justify-content: center; background: #E2DED4; color: #555148; }
.market-card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; font-size: 12px; color: var(--muted); }
.market-pagination { text-align: center; padding: 36px 0; }
.market-feedback:empty { display: none; }
.market-feedback { margin: 0 0 16px; font-size: 14px; }
.market-empty { text-align: center; padding: 54px 16px; border-block: 1px solid var(--line); }
.market-empty h2 { font-size: 20px; font-weight: 550; }
.market-empty p { color: var(--muted); }
.market-loading { grid-column: 1/-1; min-height: 40vh; padding-top: 40px; color: var(--muted); }
.market-bottom { display: none; }
.city-dialog { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 24px; width: min(480px,calc(100vw - 32px)); max-height: 85dvh; overflow: auto; }
.city-dialog::backdrop { background: #0005; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-heading h2 { margin: 0; font-size: 22px; }
.city-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.city-dialog p { font-size: 13px; }
.city-dialog > .btn { gap: 8px; }
.market-back { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.display-container { max-width: 1440px; padding: 24px 0 64px; }
.display-container > .panel { border: 0; padding: 0; background: transparent; }
.store-profile { max-width: 800px; margin: 0 0 32px; }
.profile-main { display: flex; align-items: center; gap: 20px; }
.profile-main h1 { font-size: 32px; font-weight: 600; line-height: 1.4; margin: 4px 0; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; font-size: 28px; }
.profile-page-title { color: var(--muted); margin: 0; font-size: 14px; }
.profile-bio,.profile-description { margin: 16px 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.profile-contact { margin-top: 16px; }
.profile-contact summary { width: fit-content; min-width: 140px; }
.profile-contact p { border-left: 2px solid var(--line); padding-left: 16px; }
.section-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin: 24px 0; }
.section-heading h2 { font-size: 19px; margin: 0; }
.section-heading .muted { font-size: 13px; }
.partner-strip { display: flex; flex-wrap: wrap; gap: 24px; margin: 20px 0; }
.partner-card { width: 110px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 12px; }
.partner-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; font-size: 20px; }
.partner-card h4 { margin: 0; font-size: 14px; }
.display-container .product-card { background: transparent; border: 0; display: block; border-radius: 0; }
.display-container .product-card > img { display: block; aspect-ratio: 3/4; height: auto; border-radius: 5px; background: var(--panel-soft); }
.display-container .product-body { padding: 10px 0; gap: 6px; }
.display-container .product-body h4 { font-size: 15px; line-height: 1.5; min-height: 0; }
.display-container .product-body > p { display: none; }
.display-container .product-body .chips { margin: 0; }
.display-container .catalog-controls { background: var(--bg); box-shadow: none; border-bottom: 1px solid var(--line); padding: 12px 0; }
.display-container .product-detail-media img,.display-container .image-list img { object-fit: contain; height: auto; max-height: none; filter: none; }
.display-container .product-detail-media img { cursor: zoom-in; }
.display-container .service-package-card { background: transparent; box-shadow: none; }
.admin-container { max-width: 1440px; }
.admin-container > .content { background: transparent; border: 0; padding: 0; }
.admin-product-row,.service-package-row,.admin-more-menu { background: #F8F6F1; box-shadow: none; }
.admin-more-menu { z-index: 60; }
.profile-location-settings { margin: 16px 0; }
.profile-location-settings summary { min-height: 44px; cursor: pointer; }
@media (min-width:1600px) { .market-grid,.display-container .product-grid { grid-template-columns: repeat(5,minmax(0,1fr)); } }
@media (min-width:821px) and (max-width:1100px) { .market-grid,.display-container .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .market-topbar .topbar-inner { gap: 16px; grid-template-columns: auto minmax(160px,1fr) auto auto; } .brand-note { display: none; } }
@media (max-width:820px) {
  .topbar-inner,.container { width: calc(100% - 32px); }
  .market-topbar .topbar-inner { display: grid; grid-template-columns: minmax(0,1fr) auto; min-height: 0; padding: 10px 0 12px; gap: 4px 12px; }
  .market-topbar .brand { font-size: 21px; }
  .brand-note { display: none; }
  .market-topbar .market-search { grid-row: 2; grid-column: 1/-1; border-radius: 8px; margin-top: 2px; }
  .market-topbar .city-trigger { grid-column: 2; grid-row: 1; font-size: 13px; }
  .market-manage { display: none; }
  .market-container { padding: 0 0 92px; }
  .market-intro { margin: 0; padding-top: 16px; }
  .market-intro h1 { font-size: 22px; letter-spacing: -.4px; margin: 0; }
  .market-intro .eyebrow { display: none; }
  .market-count { font-size: 11px; max-width: 130px; text-align: right; }
  .market-controls { margin: 8px 0 18px; display: block; }
  .market-categories { gap: 0; justify-content: space-between; }
  .market-categories button { min-width: 40px; min-height: 48px; padding: 0 2px; font-size: 14px; }
  .market-order { display: none; }
  .market-grid,.display-container .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px 12px; }
  .market-card-body { padding-top: 8px; gap: 5px; }
  .market-title { font-size: 14px; }
  .market-price { font-size: 12px; }
  .market-merchant,.market-card-meta { font-size: 11px; }
  .market-card-meta { gap: 3px; }
  .market-merchant img,.market-merchant .avatar-initial { width: 21px; height: 21px; flex-basis: 21px; }
  .market-bottom { position: fixed; z-index: 30; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(3,1fr); background: var(--bg); border-top: 1px solid var(--line); padding: 6px 16px max(6px,env(safe-area-inset-bottom)); }
  .market-bottom a,.market-bottom button { min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
  .market-bottom .active { color: var(--text); font-weight: 700; }
  .market-bottom svg { width: 21px; height: 21px; }
  .market-bottom .active svg { stroke-width: 2.3; }
  .display-container { padding: 8px 0 40px; }
  .storefront-topbar .topbar-inner { min-height: 56px; padding: 4px 0; display: flex; gap: 12px; }
  .storefront-topbar .brand { font-size: 18px; }
  .storefront-topbar .muted { font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 42%; }
  .store-profile { margin-bottom: 24px; }
  .profile-main { gap: 14px; }
  .profile-main h1 { font-size: 25px; }
  .profile-avatar { width: 64px; height: 64px; font-size: 24px; }
  .profile-description,.profile-bio { font-size: 13px; }
  .display-container .product-body h4 { font-size: 14px; }
  .display-container .product-body { gap: 5px; }
  .display-container .product-body .chip { font-size: 11px; }
  .display-container .catalog-controls { top: var(--catalog-topbar-height,56px); }
  .admin-container { padding-top: 14px; }
  .admin-workspace-nav { flex-wrap: nowrap; gap: 12px; }
  .current-page-selector { flex: 1; font-size: 0; gap: 0; }
  .current-page-selector select { font-size: 14px; }
  .admin-section-tabs { flex-shrink: 0; }
}
@media (max-width:359px) { .market-grid,.display-container .product-grid { gap: 20px 10px; } .market-categories button { min-width: 38px; font-size: 13px; } .market-intro h1 { font-size: 20px; } .market-count { max-width: 108px; font-size: 10px; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { transition: none !important; scroll-behavior: auto !important; } }
.sample-editor { border-top: 1px solid var(--line); padding-top: 12px; }
.sample-editor h4 { margin: 0; }
.sample-group-editor { border-top: 1px solid var(--line); padding: 12px 0; }
.sample-thumbs { display: flex; gap: 12px; overflow-x: auto; padding: 8px 0; }
.sample-thumbs > div { flex: 0 0 90px; }
.sample-thumbs img { width: 90px; height: 110px; object-fit: cover; border-radius: 4px; display: block; }
.sample-thumbs button { width: 100%; margin-top: 5px; }
.full-photo-gallery { max-width: 1000px; margin: 0 auto; display: grid; gap: 20px; }
.full-photo-gallery img { width: 100%; height: auto; display: block; cursor: zoom-in; }
.service-package-card > .market-cover { margin-bottom: 16px; }
.service-package-card .btn { margin-top: 16px; }
.image-viewer { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; padding: 64px 16px 16px; border: 0; background: var(--bg); margin: 0; }
.image-viewer::backdrop { background: var(--bg); }
.image-viewer[open] { display: flex; align-items: center; justify-content: center; }
.image-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.image-viewer .btn { position: absolute; right: 16px; top: 12px; min-width: 44px; font-size: 24px; }
.profile-media-editor { display: grid; grid-template-columns: 200px minmax(0,1fr); gap: 24px; margin: 20px 0; }
.profile-media-editor > div { min-width: 0; }
.profile-media-editor .profile-avatar { display: block; margin: 12px 0; }
.profile-description-long { margin: 16px 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.profile-description-long summary { cursor: pointer; }
.profile-description-long summary span { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
@media(max-width:640px) { .profile-media-editor { grid-template-columns: 1fr; gap: 16px; } }
input:focus, textarea:focus, select:focus { border-color: var(--text); box-shadow: 0 0 0 2px #28282518; }
.chip { border-color: var(--line); }
.tag-option.active { background: var(--brand); color: var(--bg); border-color: var(--brand); }
.market-card-body .market-title { min-height: 3em; }
.admin-product-row.product-sort-ghost { box-shadow: 0 8px 20px #28282520; }
.profile-page-title { font-weight: 400; }
.display-container .catalog-head { flex-direction: row; align-items: center; }
.display-container .catalog-head h3 { margin: 0; }
.profile-description-long summary span { white-space: nowrap; }
.profile-description-long:not([open]) summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media(max-width:820px) { .display-container .catalog-head .muted { font-size: 12px; } }
@media(max-width:820px) { .market-search input { font-size: 16px; } }
