/* Shared storefront mobile layout; administration and desktop stay separate. */
.mobile-store-heading, .mobile-checkout-heading { display: none; }
.personal-order-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 12px; background: white; }
.personal-order-tabs { scrollbar-width: none; }
.personal-order-tabs::-webkit-scrollbar { display: none; }
.personal-order-tabs a { flex-shrink: 0; padding: 10px 14px; border-radius: 22px; font-size: 13px; color: #776b60; }
.personal-order-tabs a[aria-current] { color: #db5913; background: #fff0e2; font-weight: 600; }
@media (max-width: 899px) {
  body:not([data-page^="/admin"]) { --mobile-nav-height: 64px; --mobile-line: #eee8e1; background: #f7f6f3; -webkit-text-size-adjust: 100%; }
  body:not([data-page^="/admin"]) #root > div:first-child { min-height: 100dvh; background: #f7f6f3; }
  body:not([data-page^="/admin"]) #root .max-w-md { width: 100%; max-width: 600px; }
  body:not([data-page^="/admin"]) input:not([type="checkbox"]), body:not([data-page^="/admin"]) textarea, body:not([data-page^="/admin"]) select { font-size: 16px; }
  body:not([data-page^="/admin"]) .native-button { min-height: 44px; border-radius: 10px; }
  body:not([data-page^="/admin"]) :is(button,a):focus-visible { outline: 2px solid #ea671b; outline-offset: 3px; }
  body:not([data-page^="/admin"]) #root > div > header:has(.mobile-store-heading) { background: #fffdf9; border-color: var(--mobile-line); backdrop-filter: blur(12px); }
  body:not([data-page^="/admin"]) #root > div > header:has(.mobile-store-heading) > div:not(.mobile-store-heading) { display: none; }
  body:not([data-page^="/admin"]) #root > div > header > .mobile-store-heading { display: flex; justify-content: space-between; align-items: center; max-width: 600px; margin: auto; padding: 14px 18px; min-height: 74px; }
  .mobile-store-heading small { color: #9d8770; font-size: 10px; letter-spacing: 1px; }
  .mobile-store-heading h1 { color: #372c23; font-size: 21px; font-weight: 700; margin-top: 3px; }
  .mobile-search-link { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #eee3d5; border-radius: 14px; background: white; color: #965a33; }
  body:not([data-page^="/admin"]) nav[aria-label="底部导航"] { border-top: 1px solid var(--mobile-line); background: #fffffff5; padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(16px); box-shadow: 0 -4px 24px #372c2305; }
  body:not([data-page^="/admin"]) nav[aria-label="底部导航"] > div { height: var(--mobile-nav-height); }
  body:not([data-page^="/admin"]) nav[aria-label="底部导航"] a { min-height: 52px; gap: 5px; font-size: 11px; }
  body:not([data-page^="/admin"]) nav[aria-label="底部导航"] a svg { width: 22px; height: 22px; }
  body:not([data-page^="/admin"]) nav[aria-label="底部导航"] a[aria-current] { font-weight: 600; }
  body:not([data-page^="/admin"]) #root > div > main.pb-16 { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  body:is([data-page="/"],[data-page="/category"]) .grid > a { border: 1px solid var(--mobile-line); border-radius: 14px; box-shadow: 0 3px 10px #39251304; }
  body:is([data-page="/"],[data-page="/category"]) .grid > a > .p-2 { padding: 10px; gap: 6px; }
  body:is([data-page="/"],[data-page="/category"]) .grid > a h3 { font-size: 13px; line-height: 1.5; -webkit-line-clamp: 2; min-height: 39px; }
  body:is([data-page="/"],[data-page="/category"]) .grid > a .items-baseline { flex-wrap: wrap; }
  body:is([data-page="/"],[data-page="/category"]) .grid > a .text-red-500 { color: #e46622; font-size: 18px; }
  body:is([data-page="/"],[data-page="/category"]) .grid > a button { width: 38px; height: 38px; right: 6px; bottom: 6px; box-shadow: 0 3px 10px #ad551530; }
  body[data-page="/"] main > .max-w-md > .sticky { position: static; background: transparent; padding-top: 14px; }
  body[data-page="/"] main input { border: 1px solid #eee2d4; height: 44px; }
  body[data-page="/"] [data-home-categories] { gap: 14px 6px; margin: 16px; padding: 14px 8px; background: white; border: 1px solid var(--mobile-line); border-radius: 16px; }
  body[data-page="/"] [data-home-categories] > .opacity-0 { display: none; }
  body[data-page="/"] [data-home-sections] h2 { font-size: 18px; color: #3c3026; }
  body[data-page="/category"] main > .max-w-md > .sticky { position: static; box-shadow: none; padding: 12px; background: #f7f6f3; }
  body[data-page="/category"] main input { height: 44px; background: white; border: 1px solid var(--mobile-line); border-radius: 12px; }
  body[data-page="/category"] main aside { width: 88px; background: #f0eeea; border-radius: 0 14px 14px 0; align-self: flex-start; position: sticky; top: 86px; max-height: calc(100dvh - 166px); }
  body[data-page="/category"] main aside button { min-height: 52px; padding: 12px 8px; font-size: 12px; }
  body[data-page="/category"] main aside .line-clamp-1 { -webkit-line-clamp: 2; }
  body[data-page="/category"] main main { min-width: 0; padding: 8px 10px; }
  body[data-page="/category"] main main h2 { font-size: 16px; padding: 4px 0 8px; }
  body[data-page="/category"] [data-category-products] { gap: 10px; }
  body[data-page="/product"] main > .max-w-md { padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
  body[data-page="/product"] #root > div > header > div { min-height: 68px; justify-content: center; }
  body[data-page="/product"] main > .max-w-md > .bg-white:not(.fixed) { margin: 0 12px; padding: 16px; }
  body[data-page="/product"] main > .max-w-md > .pt-4 { margin-top: 12px; border-radius: 16px 16px 0 0; padding-bottom: 6px; }
  body[data-page="/product"] main > .max-w-md > .py-3 { border-radius: 0 0 16px 16px; padding-top: 6px; }
  body[data-page="/product"] main > .max-w-md > .py-4 { border-radius: 16px; }
  body[data-page="/product"] main h1 { font-size: 21px; line-height: 1.5; overflow-wrap: anywhere; }
  body[data-page="/product"] main > .max-w-md > .fixed.top-0 button { width: 44px; height: 44px; }
  body[data-page="/product"] .fixed.bottom-0 { padding-bottom: env(safe-area-inset-bottom); border-color: var(--mobile-line); }
  body[data-page="/product"] .fixed.bottom-0 > .max-w-md > button { min-height: 46px; border-radius: 12px; }
  body[data-page="/product"] .fixed.z-50 { max-height: 88dvh; overflow-y: auto; }
  body[data-page="/product"] .fixed.z-50 button { min-height: 40px; }
  body[data-page="/product"] .fixed.z-50 .sticky { padding-bottom: 12px; }
  body[data-page="/cart"] [data-cart-items] > div { border-color: var(--mobile-line); border-radius: 16px; padding: 14px 12px; gap: 10px; }
  body[data-page="/cart"] [data-cart-items] .items-end { flex-wrap: wrap; gap: 10px; }
  body[data-page="/cart"] [data-cart-items] .items-end > .flex { margin-left: auto; }
  body[data-page="/cart"] [data-cart-items] .items-end button { width: 34px; height: 34px; border-radius: 10px; }
  body[data-page="/cart"] main > .max-w-md { padding-bottom: 88px; }
  body[data-page="/cart"] main > .max-w-md > .sticky { position: static; background: transparent; border: 0; padding: 6px 16px; }
  body[data-page="/cart"] main > .max-w-md > .sticky h1 { font-size: 14px; color: #8b7b6b; font-weight: 400; }
  body[data-page="/cart"] main > .max-w-md > .sticky button { min-height: 44px; min-width: 44px; }
  body[data-page="/cart"] .fixed.bottom-16 { bottom: calc(64px + env(safe-area-inset-bottom)); border-color: var(--mobile-line); }
  body[data-page="/cart"] .fixed.bottom-16 > div { gap: 8px; padding: 12px; }
  body[data-page="/cart"] .fixed.bottom-16 button[data-slot="button"] { min-height: 44px; border-radius: 12px; padding: 10px 14px; }
  body[data-page="/checkout"] #root > div { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .mobile-checkout-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 40; min-height: 62px; background: #fffdf9; padding: 8px 16px; border-bottom: 1px solid var(--mobile-line); }
  .mobile-checkout-heading a { display: grid; place-items: center; width: 40px; height: 44px; font-size: 30px; }
  .mobile-checkout-heading h1 { font-size: 18px; font-weight: 600; }
  .mobile-checkout-heading span { font-size: 11px; color: #9d8770; }
  body[data-page="/checkout"] [data-checkout-section]:not(.fixed) { margin: 12px 12px 0; border-radius: 16px; border-color: var(--mobile-line); box-shadow: 0 2px 12px #36271703; }
  body[data-page="/checkout"] [data-checkout-section="2"] > .grid { gap: 8px; }
  body[data-page="/checkout"] [data-checkout-section="2"] button { min-height: 48px; padding: 10px 8px; border-radius: 10px; }
  body[data-page="/checkout"] [data-checkout-section="6"] { padding-bottom: env(safe-area-inset-bottom); }
  body[data-page="/checkout"] [data-checkout-section="6"] button { min-height: 46px; border-radius: 12px; }
  body[data-page="/orders"] #root > div > .sticky { min-height: 64px; background: #fffdf9; border-color: var(--mobile-line); }
  body[data-page="/orders"] #root > div > .sticky button { width: 44px; height: 44px; }
  body[data-page="/orders"] .native-order { border-radius: 16px; border-color: var(--mobile-line); margin-bottom: 14px; }
  body[data-page="/orders"] .native-order-header { background: #fffaf3; gap: 12px; align-items: start; }
  body[data-page="/orders"] .native-order-header > span:first-child { overflow-wrap: anywhere; min-width: 0; }
  body[data-page="/orders"] .native-status { white-space: nowrap; font-size: 12px; }
  body[data-page="/mine"] main > .max-w-md > .bg-gradient-to-r { margin: 12px; border-radius: 20px; background: linear-gradient(125deg,#ed742e,#d65313); padding: 24px 20px 46px; }
  body[data-page="/mine"] main .rounded-lg { border-radius: 16px; border-color: var(--mobile-line); }
  body[data-page="/mine"] main .grid-cols-5 { gap: 3px; }
  body[data-page="/mine"] main .grid-cols-5 button { min-height: 52px; gap: 8px; }
  body[data-page="/mine"] main .grid-cols-5 svg { color: #c8753e; }
  body[data-page="/mine"] main button.w-full { min-height: 52px; }
  body:is([data-page="/addresses"],[data-page="/payment"]) .address-page { width: 100%; max-width: 600px; background: #f7f6f3; min-height: 100dvh; }
  body:is([data-page="/addresses"],[data-page="/payment"]) .address-header { min-height: 66px; background: #fffdf9; border-color: var(--mobile-line); }
  body:is([data-page="/addresses"],[data-page="/payment"]) .address-card { border-radius: 16px; border-color: var(--mobile-line); padding: 18px; }
  body[data-page="/addresses"] .address-footer { width: 100%; max-width: 600px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
  body[data-page="/addresses"] .address-footer button { min-height: 48px; }
  body:not([data-page^="/admin"]) #modal { width: calc(100% - 24px); max-width: 560px; max-height: calc(100dvh - 32px); border-radius: 20px; padding: 22px 18px; }
  body:not([data-page^="/admin"]) #modal .modal-close { min-width: 40px; min-height: 40px; top: 6px; right: 8px; }
  body:not([data-page^="/admin"]) #modal .native-actions { flex-wrap: wrap; }
  body:not([data-page^="/admin"]) #modal .native-input { min-height: 44px; }
  body:not([data-page^="/admin"]) #toast { max-width: calc(100% - 32px); width: max-content; top: calc(14px + env(safe-area-inset-top)); }
}
@media (max-width: 359px) {
  body[data-page="/category"] main aside { width: 74px; }
  body[data-page="/category"] [data-category-products] { gap: 6px; }
  body[data-page="/category"] .grid > a > .p-2 { padding: 7px; }
  body[data-page="/cart"] [data-cart-items] .h-20 { width: 64px; height: 64px; }
  body[data-page="/checkout"] [data-checkout-section="2"] .grid { grid-template-columns: 1fr; }
}
