:root {
  --ink: #171714;
  --muted: #6d6b64;
  --paper: #f4f2eb;
  --card: #fffef9;
  --line: #dedbd0;
  --accent: #f05a28;
  --accent-dark: #c93f14;
  --success: #18794e;
  --danger: #b42318;
  --shadow: 0 16px 45px rgba(34, 31, 24, .08);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
.eyebrow { margin-bottom: .45rem; color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.muted { color: var(--muted); }
.narrow { width: min(100% - 32px, 640px); margin-inline: auto; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; padding: 40px 20px; color: #969287; font-size: .8rem; }
.policy-links { display: flex; gap: 16px; }
.admin .policy-links, .admin-login .policy-links { display: none; }
.policy-page { padding-top: 38px; }
.policy-content { min-height: 180px; white-space: pre-wrap; line-height: 1.85; }
.store-hero { display: flex; align-items: center; gap: 18px; min-height: 190px; padding: 42px max(24px, calc((100vw - 1080px) / 2)); color: #fff; background: radial-gradient(circle at 80% 0%, #ff9f74, transparent 38%), #1d1c18; }
.store-hero h1 { margin-bottom: 8px; font-size: clamp(2rem, 7vw, 3.8rem); letter-spacing: -.04em; }
.store-hero p:last-child { margin: 0; color: #d7d3c8; }
.store-logo { flex: 0 0 auto; width: 96px; height: 96px; border: 2px solid rgba(255, 255, 255, .72); border-radius: 16px; object-fit: cover; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .22); }
.store-hero-copy { min-width: 0; }
.store-name-line, .merchant-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.store-name-line h1, .merchant-name-row h2 { margin: 0; }
.premium-store-badge { display: inline-flex; align-items: center; width: fit-content; min-height: 24px; padding: 4px 9px; border-radius: 999px; background: #fff2c6; color: #8e6411; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.store-stars { display: flex; gap: 4px; margin: 10px 0; color: #ffc53d; font-size: 1.05rem; letter-spacing: .04em; text-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.store-main { width: min(100% - 32px, 1080px); margin: 30px auto; }
.section-title, .page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-title h2, .page-heading h1 { margin: 0; letter-spacing: -.035em; }
.section-title span { color: var(--muted); font-size: .9rem; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 7px 24px rgba(34, 31, 24, .04); transition: transform .18s, box-shadow .18s; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-card img, .product-card .image-placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.image-placeholder { display: grid; place-items: center; background: linear-gradient(145deg, #ede8dd, #d8d1c3); color: #aaa295; font-size: 1.5rem; font-weight: 900; letter-spacing: .2em; }
.product-card-body { padding: 16px; }
.product-card-body h3 { min-height: 2.8em; margin-bottom: 16px; line-height: 1.4; }
.product-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; }
.product-meta strong, .price { color: var(--accent); font-size: 1.35rem; }
.business-card { display: flex; flex-wrap: wrap; gap: 10px 22px; width: min(100% - 32px, 1080px); margin: 40px auto 0; padding: 18px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.topbar { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 54px; padding: 0 18px; border-bottom: 1px solid var(--line); background: rgba(244, 242, 235, .9); backdrop-filter: blur(16px); }
.product-detail { width: min(100%, 680px); margin: 0 auto; padding-bottom: 24px; }
.product-image { display: block; width: 100%; aspect-ratio: 1 / .8; object-fit: cover; }
.product-copy, .checkout-form { margin: 16px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.product-copy h1 { font-size: 1.7rem; letter-spacing: -.035em; }
.description { white-space: pre-wrap; line-height: 1.75; }
label { display: grid; gap: 7px; margin: 14px 0; color: #4c4a44; font-size: .88rem; font-weight: 650; }
input, textarea, select { width: 100%; padding: 11px 12px; border: 1px solid #cbc7bc; border-radius: 9px; outline: 0; background: #fff; color: var(--ink); }
textarea { min-height: 82px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240, 90, 40, .12); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 17px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font-weight: 750; }
.button-primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-dark); }
.button-block { width: 100%; min-height: 50px; }
.danger { border-color: #efc6c2; color: var(--danger); background: #fff7f6; }
.form-tip { margin: 14px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.flash { margin: 14px 0; padding: 12px 14px; border-radius: 10px; font-size: .9rem; }
.flash-success { background: #e9f8f0; color: var(--success); }
.flash-error { background: #fff0ee; color: var(--danger); }
.empty { padding: 44px 20px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.center-card { margin-top: 10vh; padding: 36px 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); text-align: center; }
.status-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%; background: #eeeae0; font-size: 1.8rem; font-weight: 900; }
.status-icon.success { background: #e1f6eb; color: var(--success); }
.status-icon.waiting { background: #fff0e8; color: var(--accent); }
.order-page { padding-top: 24px; }
.order-status { padding: 28px 20px; text-align: center; }
.order-status p { color: var(--muted); }
.panel { margin-bottom: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
.order-line, .order-total { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid #ece9e0; }
.order-total { border: 0; font-size: 1.1rem; }
.order-total strong { color: var(--accent); }
.detail-list > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid #ece9e0; }
.detail-list > div:last-of-type { border-bottom: 0; }
.detail-list span { color: var(--muted); }
.detail-list strong { overflow-wrap: anywhere; text-align: right; }
.payment-card { margin-top: 8vh; }
.alipay-mark { display: grid; place-items: center; width: 68px; height: 68px; margin: auto auto 18px; border-radius: 18px; background: #1677ff; color: #fff; font-size: 2rem; font-weight: 900; }
.pay-amount { margin: 28px 0 8px; font-size: 2.7rem; font-weight: 850; letter-spacing: -.05em; }
.text-link { display: inline-block; margin-top: 20px; color: var(--muted); font-size: .9rem; }
.admin { background: #efeee9; }
.admin-header { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 28px; min-height: 62px; padding: 0 max(20px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255, 254, 249, .94); backdrop-filter: blur(16px); }
.admin-header .brand { margin-right: auto; font-weight: 900; }
.admin-header nav { display: flex; gap: 22px; color: var(--muted); font-size: .9rem; }
.admin-header form { margin: 0; }
.link-button { padding: 0; border: 0; background: none; color: var(--muted); }
.admin-main { width: min(100% - 40px, 1180px); margin: 36px auto; }
.narrow-admin { max-width: 820px; }
.page-heading h1 { font-size: 2rem; }
.badge { display: inline-flex; width: fit-content; padding: 5px 9px; border-radius: 99px; background: #e9e6dc; color: #58554e; font-size: .74rem; font-weight: 800; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
.stat span { display: block; margin-bottom: 18px; color: var(--muted); font-size: .82rem; }
.stat strong { font-size: 1.7rem; letter-spacing: -.04em; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 14px 16px; border-bottom: 1px solid #e8e5dd; text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.filter { width: 240px; margin-bottom: 16px; }
.filter-row { display: flex; align-items: end; gap: 10px; width: min(100%, 360px); }
.filter-row label { flex: 1; margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; }
.check input { width: auto; }
details summary { cursor: pointer; font-weight: 800; }
.details-form { margin-top: 18px; }
.store-qr-card { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; align-items: center; margin: 18px 0; padding: 18px; border: 1px dashed #cbc7bc; border-radius: 14px; background: #faf9f4; }
.store-qr-card img { display: block; width: 180px; height: 180px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.store-qr-card h3 { margin-bottom: 8px; }
.store-qr-card code { display: block; overflow-wrap: anywhere; color: var(--success); }
.qr-actions { margin-top: 16px; }
.store-poster-card { grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); align-items: start; }
.store-poster-preview { display: grid; justify-items: center; gap: 8px; }
.store-poster-preview canvas { display: block; width: 100%; max-width: 320px; height: auto; aspect-ratio: 1070 / 1578; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgb(18 63 120 / 12%); }
.poster-status { min-height: 1.4em; margin: 0; text-align: center; }
.action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.login-card { width: min(100% - 32px, 410px); margin: 12vh auto 0; padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.store-admin-panel { padding: 0; overflow: hidden; }
.merchant-preview { display: flex; align-items: center; gap: 20px; padding: 24px; background: #181817; color: #fff; }
.merchant-preview img { width: 108px; height: 108px; border-radius: 14px; object-fit: cover; background: #fff; }
.merchant-preview h2 { font-size: 1.8rem; letter-spacing: -.04em; }
.merchant-preview .store-stars { margin-top: 14px; font-size: 1.18rem; }
.avatar-upload-form { display: flex; align-items: end; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: #faf9f4; }
.avatar-upload-form label { flex: 1; margin: 0; }
.avatar-upload-form input[type="file"] { padding: 8px; background: #fff; }
.store-settings-form { padding: 12px 22px 22px; }

@media (max-width: 720px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-card-body { padding: 12px; }
  .product-card-body h3 { font-size: .95rem; }
  .store-hero { min-height: 160px; padding: 30px 20px; }
  .admin-header { flex-wrap: wrap; gap: 12px; padding: 13px 18px; }
  .admin-header .brand { width: calc(100% - 60px); }
  .admin-header nav { order: 3; width: 100%; justify-content: space-between; gap: 8px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .action-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .store-qr-card { grid-template-columns: 1fr; }
  .store-qr-card img { width: min(180px, 100%); height: auto; aspect-ratio: 1; }
  .store-poster-preview canvas { width: min(320px, 100%); }
  .detail-list > div { grid-template-columns: 100px 1fr; }
  .merchant-preview { padding: 18px; }
  .merchant-preview img { width: 86px; height: 86px; }
  .merchant-preview h2 { font-size: 1.35rem; }
  .avatar-upload-form { align-items: stretch; flex-direction: column; }
  .avatar-upload-form .button { width: 100%; }
  .store-settings-form { padding: 8px 16px 18px; }
}

/* Mobile shop experience */
.shop-home-hero { min-height: 260px; background: linear-gradient(125deg, rgba(18, 20, 18, .88), rgba(18, 20, 18, .28)), url('https://images.pexels.com/photos/8801174/pexels-photo-8801174.jpeg?auto=compress&cs=tinysrgb&w=1600') center 38% / cover; }
.shop-home-hero .eyebrow { color: #ffd4b6; }
.shop-benefits { display: grid; grid-template-columns: repeat(3, 1fr); margin: -52px 0 28px; padding: 17px 20px; border-radius: 18px; position: relative; z-index: 1; background: rgba(255, 254, 249, .97); box-shadow: var(--shadow); color: #4f4b43; font-size: .85rem; text-align: center; }
.card-tags { min-height: 24px; margin: -6px 0 9px; }
.card-tags span, .product-tags span { display: inline-flex; padding: 4px 7px; border: 1px solid #e5a75c; border-radius: 4px; color: #c47720; background: #fffaf1; font-size: .72rem; line-height: 1; }
.product-meta strong small { font-size: .75em; }

.product-screen { background: #fff; }
.product-detail-page { width: min(100%, 720px); margin: 0 auto; padding-bottom: 92px; background: #f7f7f7; }
.product-hero-wrap { position: sticky; top: 0; height: min(100svh, 760px); background: #ddd4cc; }
.product-hero-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.floating-back { position: absolute; top: max(18px, env(safe-area-inset-top)); left: 18px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(30, 30, 30, .5); color: #fff; font-size: 2.5rem; line-height: 1; backdrop-filter: blur(10px); }
.product-sheet { position: relative; z-index: 1; min-height: 100svh; margin-top: -108px; padding: 52px 36px 0; border-radius: 48px 48px 0 0; background: #fff; box-shadow: 0 -12px 30px rgba(0, 0, 0, .04); }
.product-sheet h1 { margin-bottom: 22px; font-size: clamp(1.55rem, 5vw, 2.15rem); line-height: 1.42; letter-spacing: -.03em; }
.sold-line { color: #9a958f; font-size: 1rem; }
.sold-line span { margin-right: 8px; }
.product-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.product-tags span { padding: 6px 9px; font-size: .78rem; }
.product-lead { margin: 24px 0 0; color: #77736e; white-space: pre-wrap; line-height: 1.75; }
.detail-heading { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 26px; margin: 70px auto 38px; color: #65615c; }
.detail-heading span { height: 1px; background: #d7d4cf; }
.detail-heading strong { font-size: 1.25rem; font-weight: 500; }
.detail-image-stack { margin-inline: -36px; background: #f4f4f4; }
.detail-image-stack img { display: block; width: 100%; height: auto; margin: 0; }
.purchase-dock { position: fixed; z-index: 5; right: 50%; bottom: 0; transform: translateX(50%); display: grid; grid-template-columns: minmax(110px, .75fr) minmax(190px, 1.25fr); align-items: center; gap: 16px; width: min(100%, 720px); min-height: 84px; padding: 11px 22px max(11px, env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid #eee; backdrop-filter: blur(16px); }
.purchase-dock > div { display: grid; gap: 4px; }
.purchase-dock > div > span { color: #888; font-size: .85rem; }
.purchase-dock strong { color: #f2352b; font-size: 1.75rem; letter-spacing: -.04em; }
.purchase-dock strong small { font-size: .65em; }
.buy-now-button { display: flex; align-items: center; justify-content: center; min-height: 58px; border-radius: 999px; background: linear-gradient(90deg, #ff7b25, #ff512e); color: #fff; font-size: 1.18rem; font-weight: 700; }
.buy-now-button.disabled { background: #bbb; }
.cart-glyph { display: inline-grid; place-items: center; width: 25px; height: 25px; margin-right: 5px; border: 2px solid currentColor; border-top: 0; border-radius: 0 0 7px 7px; font-size: .8rem; }
.product-screen .site-footer { display: none; }

.checkout-screen { background: #f7f7f7; }
.checkout-header { position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: 54px 1fr 54px; align-items: center; width: min(100%, 720px); height: 82px; margin: 0 auto; padding: max(8px, env(safe-area-inset-top)) 20px 8px; border-bottom: 1px solid #eee; background: rgba(255, 255, 255, .96); text-align: center; backdrop-filter: blur(16px); }
.checkout-header a { font-size: 2rem; font-weight: 300; text-align: left; }
.checkout-header div { display: grid; gap: 2px; }
.checkout-header strong { font-size: 1.22rem; }
.checkout-header small { color: #888; }
.checkout-header > span { font-weight: 900; letter-spacing: 3px; text-align: right; }
.checkout-page { width: min(100% - 24px, 680px); margin: 20px auto 0; }
.checkout-card, .payment-choice { margin-bottom: 16px; border-radius: 18px; background: #fff; box-shadow: 0 6px 24px rgba(30, 30, 30, .035); }
.checkout-shop { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 12px 18px; border-bottom: 1px solid #f0f0f0; }
.sale-sticker { transform: rotate(-8deg); padding: 4px 7px; border-radius: 6px 3px 6px 3px; background: #f08e73; color: #fff; font-size: .68rem; }
.checkout-product { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; padding: 18px; }
.checkout-product > img, .checkout-thumb { width: 92px; height: 108px; border-radius: 8px; object-fit: cover; }
.checkout-product h1 { display: -webkit-box; overflow: hidden; margin: 3px 0 10px; font-size: 1rem; font-weight: 600; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.checkout-product p { color: #999; font-size: .75rem; }
.checkout-price { display: grid; align-content: space-between; justify-items: end; min-width: 64px; }
.checkout-price > strong { white-space: nowrap; }
.checkout-price label { display: flex; align-items: center; gap: 4px; margin: 0; color: #888; font-weight: 500; }
.checkout-price input { width: 48px; padding: 5px; border: 0; background: #f4f4f4; text-align: center; }
.checkout-row { display: grid; grid-template-columns: 70px 1fr; align-items: center; min-height: 54px; margin: 0; padding: 0 18px; border-top: 1px solid #f1f1f1; font-size: .9rem; font-weight: 500; }
.checkout-row strong { text-align: right; }
.note-row input { border: 0; box-shadow: none; text-align: right; }
.address-card { padding: 8px 18px 16px; }
.address-card h2 { margin: 12px 0 2px; font-size: 1rem; }
.address-card label { margin: 10px 0; font-weight: 500; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.payment-title { margin: 30px 8px 14px; font-size: 1.15rem; font-weight: 500; }
.payment-choice { display: grid; grid-template-columns: 48px 1fr 28px; align-items: center; min-height: 76px; padding: 12px 18px; }
.alipay-symbol { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #1677ff; color: #fff; font-size: 1.35rem; font-weight: 700; }
.payment-check { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #ff3f70; color: #fff; font-size: .75rem; }
.checkout-notice { padding: 0 8px; color: #999; font-size: .72rem; line-height: 1.55; }
.checkout-spacer { height: 104px; }
.checkout-submit { position: fixed; z-index: 5; right: 50%; bottom: 0; transform: translateX(50%); display: flex; align-items: center; justify-content: space-between; width: min(100%, 720px); min-height: 82px; padding: 11px 22px max(11px, env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); border-top: 1px solid #eee; backdrop-filter: blur(16px); }
.checkout-submit strong { color: #f52d50; font-size: 1.75rem; }
.checkout-submit button { min-width: 164px; min-height: 54px; border: 0; border-radius: 6px; background: #ff3154; color: #fff; font-size: 1.05rem; }
.checkout-screen .site-footer { display: none; }

/* Admin remains fully usable on phones */
.form-grid small { color: #8b877f; font-weight: 400; line-height: 1.5; }
.field-label { display: block; margin-bottom: 8px; font-weight: 700; }
.tag-editor-controls { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(220px, 1fr) auto; gap: 10px; align-items: center; }
.tag-editor-controls .button { min-height: 45px; white-space: nowrap; }
.tag-list { display: flex; flex-wrap: wrap; gap: 9px; min-height: 36px; margin-top: 13px; }
.tag-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 5px 9px; border: 1px solid #e5a75c; border-radius: 5px; background: #fffaf1; color: #b96a14; cursor: pointer; }
.tag-chip span { font-size: 1.15em; line-height: 1; }
.tag-message { display: block; min-height: 1.5em; color: #c54f38 !important; }
.product-image-editor { margin: 14px 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #faf9f4; }
.image-editor-heading, .image-editor-actions, .detail-upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.image-editor-heading { margin-bottom: 16px; }
.image-editor-heading h2 { margin-bottom: 4px; font-size: 1.08rem; }
.image-editor-heading p, .image-editor-actions p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.storage-ready { background: #def5e7; color: var(--success); }
.storage-missing { background: #fff0ee; color: var(--danger); }
.main-image-editor { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.main-image-preview { position: relative; display: grid; place-items: center; width: 170px; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 12px; background: #e8e5dc; color: var(--muted); }
.main-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.main-image-preview span { display: none; }
.main-image-preview.is-empty span { display: block; }
.main-image-preview.is-empty img { display: none; }
.image-editor-actions { flex-wrap: wrap; justify-content: flex-start; }
.image-editor-actions strong, .image-editor-actions p { flex-basis: 100%; }
.image-file-button { position: relative; overflow: hidden; }
.image-file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.image-file-button.disabled { opacity: .5; cursor: not-allowed; }
.detail-image-editor { padding-top: 18px; }
.detail-upload-actions > div { flex: 1; }
.detail-upload-actions strong, .detail-upload-actions p { display: block; }
.detail-image-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.detail-image-item { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.detail-image-item img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #eee; }
.detail-image-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px; }
.detail-image-controls strong { flex-basis: 100%; font-size: .75rem; }
.detail-image-controls button { padding: 0; border: 0; background: none; color: var(--muted); font-size: .75rem; }
.detail-image-controls button:disabled { opacity: .3; cursor: not-allowed; }
.detail-image-controls .danger-link { color: var(--danger); }
.detail-images-empty { grid-column: 1 / -1; margin: 0; padding: 24px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; }
.image-upload-status { min-height: 1.5em; margin: 13px 0 0; color: var(--muted); font-size: .8rem; }
.image-upload-status.success { color: var(--success); }
.image-upload-status.error, .storage-warning { color: var(--danger); }
.storage-warning { margin: 14px 0 0; font-size: .8rem; }
@media (max-width: 720px) {
  .shop-home-hero { min-height: 220px; padding-bottom: 60px; }
  .shop-home-hero { align-items: flex-start; }
  .shop-home-hero .store-logo { width: 82px; height: 82px; border-radius: 14px; }
  .store-name-line h1 { font-size: clamp(1.65rem, 8vw, 2.2rem); }
  .shop-home-hero .premium-store-badge { margin-top: 4px; }
  .store-main { width: min(100% - 22px, 1080px); margin-top: 0; }
  .shop-benefits { margin-top: -38px; padding: 14px 5px; font-size: .73rem; }
  .product-card img, .product-card .image-placeholder { aspect-ratio: 1 / 1.16; }
  .product-card-body h3 { min-height: 2.7em; margin-bottom: 11px; font-size: .88rem; }
  .product-meta strong { font-size: 1.15rem; }
  .product-sheet { margin-top: -74px; padding: 38px 22px 0; border-radius: 34px 34px 0 0; }
  .detail-image-stack { margin-inline: -22px; }
  .detail-heading { margin-top: 54px; gap: 18px; }
  .purchase-dock { grid-template-columns: 1fr 1.55fr; padding-inline: 16px; }
  .checkout-product { grid-template-columns: 76px 1fr; }
  .checkout-product > img, .checkout-thumb { width: 76px; height: 92px; }
  .checkout-price { grid-column: 2; grid-row: 2; display: flex; align-items: center; justify-content: space-between; width: 100%; }
  .field-pair { grid-template-columns: 1fr; gap: 0; }
  .checkout-submit { padding-inline: 16px; }
  .checkout-submit button { min-width: 138px; }
  .admin-header { flex-wrap: nowrap; overflow-x: auto; padding: 10px 14px; scrollbar-width: none; }
  .admin-header .brand { flex: 0 0 auto; width: auto; margin-right: 4px; }
  .admin-header nav { order: initial; flex: 0 0 auto; width: auto; justify-content: flex-start; gap: 16px; white-space: nowrap; }
  .admin-header form { flex: 0 0 auto; }
  .admin-main { width: min(100% - 24px, 1180px); margin: 22px auto; }
  .page-heading { align-items: center; }
  .page-heading h1 { font-size: 1.55rem; }
  .panel { padding: 16px; }
  .filter-row { width: 100%; }
  th, td { padding: 12px; white-space: nowrap; }
  .tag-editor-controls { grid-template-columns: 1fr; }
  .tag-editor-controls .button { width: 100%; }
  .main-image-editor { grid-template-columns: 110px 1fr; gap: 12px; }
  .main-image-preview { width: 110px; }
  .detail-upload-actions { align-items: flex-start; flex-direction: column; }
  .detail-upload-actions .button { width: 100%; }
  .detail-image-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
}

.appearance-preview { display:block; width:min(100%,390px); height:680px; margin:24px auto; border:1px solid var(--line); border-radius:20px; background:white; }
