:root {
    color-scheme: light;
    --ink: #28241f;
    --muted: #6f675d;
    --paper: #f9f6f0;
    --soft: #eee8df;
    --line: #e6dfd5;
    --accent: #a04836;
    --accent-dark: #7c3126;
    --white: #fffdf9;
    --shell: 680px;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    color: var(--ink);
    background: #ede7de;
    font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: default; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { display: block; max-width: 100%; }
p, h1, h2, h3 { margin: 0; }
.shell { max-width: var(--shell); margin-inline: auto; min-height: 100vh; background: var(--paper); box-shadow: 0 0 50px #4933210b; }
#page { min-height: 55vh; }
#page.has-bottom { padding-bottom: calc(75px + env(safe-area-inset-bottom)); }
.shop-header {
    position: sticky; top: 0; z-index: 5; height: 53px; display: grid;
    grid-template-columns: 44px 1fr 44px; align-items: center; padding-inline: 12px;
    background: var(--paper); border-bottom: 1px solid var(--line);
}
.shop-header[hidden] { display: none; }
.page-title { text-align: center; font-size: 16px; font-weight: 650; }
.header-icon {
    appearance: none; padding: 0; background: none; border: 0;
    width: 42px; height: 42px; display: grid; place-items: center;
}
.shop-masthead {
    min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 11px 18px; background: var(--paper);
}
.shop-masthead .header-icon { flex: none; border: 1px solid var(--line); border-radius: 50%; background: #fffaf3; }
.wordmark {
    font-family: "STSong", "Songti SC", "Noto Serif CJK SC", SimSun, serif;
    font-weight: 750; font-size: clamp(22px, 5.8vw, 30px); line-height: 1.2;
    letter-spacing: .07em; overflow-wrap: anywhere;
}
.shop-notice {
    display: flex; gap: 9px; align-items: center; justify-content: center;
    min-height: 34px; margin: 0 15px 10px; padding: 7px 13px; border-radius: 7px;
    background: #f1e6d8; color: #713c2c; font-size: 12px; letter-spacing: .035em;
}
.shop-notice svg { flex: 0 0 auto; }
.hero { position: relative; overflow: hidden; margin: 0 15px; background: #dac5ac; border-radius: 12px; }
.hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide {
    isolation: isolate; position: relative; display: flex; align-items: center; min-width: 100%;
    height: clamp(198px, 58vw, 380px); overflow: hidden; scroll-snap-align: start;
}
.hero-slide::before {
    position: absolute; z-index: -1; inset: 0; content: '';
    background: linear-gradient(90deg, #e9dac4 0%, #e9dac4 23%, #e9dac4e8 39%, #e9dac445 57%, transparent 76%);
}
.hero-slide img {
    z-index: -2; position: absolute; width: 100%; height: 100%; right: 0; top: 0;
    object-fit: cover; object-position: 66% 43%;
}
.hero-slide:nth-child(even)::before {
    background: linear-gradient(90deg, #dbc8af 0%, #dbc8af 29%, #dbc8afe6 43%, #dbc8af38 63%, transparent);
}
.hero-copy { width: 65%; padding-left: clamp(20px, 5.6vw, 43px); padding-bottom: 10px; }
.hero-copy p { color: #573b2a; font-size: 12px; letter-spacing: .12em; font-weight: 600; margin-bottom: 8px; overflow-wrap: anywhere; }
.hero-title {
    font: 750 clamp(31px, 8vw, 60px)/1.1 "STSong", "Songti SC", "Noto Serif CJK SC", SimSun, serif;
    letter-spacing: .02em; color: #2e241a; text-wrap: balance; overflow-wrap: anywhere;
}
.hero-link {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 17px; padding: 7px 10px;
    border: 1px solid #73503870; border-radius: 5px; background: #fff9ef40;
    font-size: 12px; color: #442d20; font-weight: 650;
}
.hero-dots {
    position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 2px; max-width: calc(100% - 36px); overflow-x: auto; scrollbar-width: none;
}
.hero-dots::-webkit-scrollbar { display: none; }
.hero-dot { flex: 0 0 23px; display: grid; place-items: center; width: 23px; height: 24px; padding: 0; border: 0; background: transparent; }
.hero-dot::before { content: ''; width: 6px; height: 6px; border-radius: 10px; background: #f8f2e8; box-shadow: 0 0 0 1px #4e3b3040; }
.hero-dot[aria-current="true"]::before { width: 16px; background: #764834; }
.shop-coupon-link {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin: 12px 15px; padding: 10px 12px; border: 1px solid #e6cec2; border-radius: 7px; color: var(--accent-dark);
    background: #f8ede3; font-size: 12px;
}
.shop-coupon-link span { display: inline-flex; align-items: center; gap: 6px; }
.shop-coupon-link strong { font-size: 13px; }
.home-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 13px 15px 23px; }
.category-tile {
    position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end;
    min-height: 78px; height: clamp(83px, 22vw, 155px); padding: 9px; background: #ddd0bd; border-radius: 8px;
}
.category-color-1 { background: #d9d4c4; }
.category-color-2 { background: #e4d7c8; }
.category-color-3 { background: #dedad3; }
.category-tile img {
    position: absolute; z-index: -1; inset: 0 0 0 auto; width: 66%; height: 100%;
    object-fit: cover; object-position: center 33%;
}
.category-color-2 img, .category-color-3 img { object-position: center 63%; }
.category-tile::after {
    position: absolute; content: ''; z-index: -1; inset: 0;
    background: linear-gradient(90deg, #42342b40, transparent 70%);
}
.category-tile span {
    display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 64px;
    padding: 6px 7px 6px 9px; background: #fffaf0f2; border-radius: 4px; color: #3e3228; font-size: 13px;
    overflow-wrap: anywhere;
}
.category-tile span svg { flex: none; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.section-title h2 { font: 750 25px/1.3 "STSong", "Songti SC", "Noto Serif CJK SC", SimSun, serif; }
.section-title a { display: flex; align-items: center; gap: 3px; white-space: nowrap; color: var(--muted); font-size: 12px; }
.home-products { margin: 0 15px 20px; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 11px; }
.product-card { min-width: 0; }
.product-picture { position: relative; aspect-ratio: 4 / 4.9; overflow: hidden; background: var(--soft); border-radius: 8px; }
.product-picture img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.product-flag { position: absolute; top: 7px; left: 7px; padding: 4px 7px; border-radius: 4px; background: var(--paper); color: var(--muted); font-size: 11px; }
.product-meta { padding: 9px 2px 2px; }
.product-name, .product-subtitle { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-name { font-size: 14px; font-weight: 650; }
.product-subtitle { margin-top: 3px; color: var(--muted); font-size: 11px; }
.product-meta strong { display: block; margin-top: 6px; font-size: 17px; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.product-meta small, .detail-price small { font-size: .72em; }
.shop-tabs, .shop-actions {
    z-index: 10; position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, var(--shell));
    border-top: 1px solid var(--line); background: var(--white); padding-bottom: env(safe-area-inset-bottom);
}
.shop-tabs { display: grid; grid-template-columns: repeat(4, 1fr); }
.shop-tab { display: grid; place-content: center; justify-items: center; gap: 3px; color: var(--muted); min-height: 61px; font-size: 11px; }
.shop-tab.is-active { color: var(--accent-dark); font-weight: 700; }
.tab-icon { position: relative; padding: 3px 9px; border-radius: 16px; line-height: 0; }
.shop-tab.is-active .tab-icon { background: #f3e2d8; }
.tab-icon i {
    position: absolute; top: 0; left: calc(100% - 10px); padding: 0 3px; border-radius: 8px;
    min-width: 15px; height: 15px; display: grid; place-items: center;
    background: var(--accent); color: white; font-size: 9px; font-style: normal; font-weight: 700;
}
.shop-actions { display: flex; align-items: center; gap: 9px; min-height: calc(66px + env(safe-area-inset-bottom)); padding-inline: 13px; }
.shop-actions:empty { display: none; }
.shop-btn {
    min-height: 40px; padding: 9px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: transparent; border: 1px solid #c9b7a5; border-radius: 5px;
    color: var(--ink); font-size: 13px; font-weight: 650;
}
.shop-btn.primary { border-color: var(--accent); background: var(--accent); color: white; }
.shop-btn.primary:not(:disabled):active { background: var(--accent-dark); }
.empty { min-height: 190px; display: grid; align-content: center; justify-items: center; gap: 14px; padding: 25px; text-align: center; color: var(--muted); }
.eyebrow { font-size: 11px; letter-spacing: .09em; color: var(--muted); }
.shop-toast {
    position: fixed; z-index: 30; bottom: calc(83px + env(safe-area-inset-bottom)); left: 50%;
    transform: translate(-50%, 7px); max-width: 87%; width: max-content;
    pointer-events: none; visibility: hidden; opacity: 0; transition: .16s;
    padding: 10px 15px; border-radius: 8px; color: white; background: #332820f5; font-size: 13px;
}
.shop-toast.visible { visibility: visible; opacity: 1; transform: translate(-50%, 0); }
.listing { padding: 14px 16px 20px; }
.search-form {
    display: flex; align-items: center; gap: 7px; padding: 0 8px 0 13px;
    background: var(--soft); border: 1px solid var(--line); border-radius: 8px; min-height: 44px;
}
.search-form svg { flex: none; color: var(--muted); }
.search-form input { min-width: 0; flex: 1; border: 0; background: transparent; font-size: 15px; }
.search-form button { align-self: stretch; border: 0; background: transparent; padding-inline: 9px; flex: none; font-size: 13px; color: var(--accent-dark); font-weight: 650; }
.category-filters { display: flex; gap: 7px; padding-block: 13px 17px; overflow-x: auto; scrollbar-width: none; }
.category-filters a { flex: none; min-width: 46px; text-align: center; padding: 7px 10px; border-radius: 5px; font-size: 13px; }
.category-filters a.is-active { background: #efdfd3; color: var(--accent-dark); font-weight: 700; }
.listing-pagination {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    padding-block: 16px 3px; margin-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.listing-pagination div { display: flex; gap: 7px; }
.detail-media { overflow: hidden; margin: 12px 15px 0; border-radius: 10px; background: #e8ded1; }
.detail-media > img { width: 100%; height: clamp(290px, 107vw, 620px); object-fit: contain; object-position: center; }
.photo-thumbs { display: flex; overflow-x: auto; gap: 7px; padding: 8px 14px; }
.photo-thumbs button { width: 50px; height: 50px; border: 1px solid transparent; padding: 2px; background: none; flex: none; }
.photo-thumbs button[aria-current="true"] { border-color: var(--accent-dark); }
.photo-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-summary, .details-selection, .detail-description { padding: 17px 17px; }
.detail-price { color: var(--accent-dark); font-size: 27px; font-variant-numeric: tabular-nums; }
.detail-summary h1 { font-size: 20px; line-height: 1.4; margin: 4px 0 5px; }
.detail-summary p, .detail-description p { color: var(--muted); font-size: 14px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.product-shipping { display: flex; align-items: center; gap: 9px; padding: 11px 17px; background: var(--soft); font-size: 12px; color: #493a2d; }
.details-selection { display: grid; gap: 13px; border-bottom: 1px solid var(--line); }
.variant-row { display: flex; gap: 11px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.variant-row > span { flex: 0 0 34px; font-weight: 650; }
.variant-row > div { display: flex; gap: 6px; flex-wrap: wrap; }
.variant-row small { color: var(--muted); }
.variant-chip, .quantity-group button {
    min-height: 34px; min-width: 37px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--white);
}
.variant-chip.selected { border-color: var(--accent); color: var(--accent-dark); background: #f3e4d9; }
.variant-row .quantity-group { align-items: center; gap: 7px; }
.quantity-group output { min-width: 23px; text-align: center; }
.detail-description h2 { margin-bottom: 7px; font-size: 15px; }
.detail-cart { display: grid; place-items: center; gap: 2px; min-width: 45px; font-size: 10px; }
#add-cart, #buy-now { flex: 1; white-space: nowrap; }
@media (min-width: 550px) {
    .shop-masthead { padding-inline: 24px; }
    .shop-notice, .hero, .shop-coupon-link { margin-inline: 24px; }
    .home-categories { margin-inline: 24px; gap: 12px; }
    .home-products, .listing { margin-inline: 24px; }
    .listing { padding-inline: 0; }
    .product-grid { column-gap: 13px; }
    .category-tile span { padding: 9px 11px; }
}
@media (hover: hover) {
    .product-picture img, .category-tile img { transition: transform .22s ease; }
    .product-card:hover .product-picture img, .category-tile:hover img { transform: scale(1.035); }
    .shop-masthead .header-icon:hover { background: #f2e7da; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; scroll-behavior: auto !important; } }
