:root {
  --ink: #141414;
  --paper: #f7f3eb;
  --porcelain: #fffdf7;
  --jade: #31584b;
  --blue: #244c72;
  --cinnabar: #9d3f2f;
  --bronze: #ad8b57;
  --line: rgba(20, 20, 20, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui,
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: env(safe-area-inset-top) 16px 96px;
}

.app-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: 38px 42px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 8px;
  align-items: center;
  padding: 10px 0 12px;
  background: rgba(247, 243, 235, 0.92);
  backdrop-filter: blur(14px);
}

.back-link {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--porcelain);
  font-size: 20px;
}

.app-logo {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(20, 20, 20, 0.12);
}

.app-header > div {
  min-width: 0;
}

.app-header strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.app-header strong {
  font-size: 15px;
}

.app-header small {
  display: none;
}

.app-language {
  display: grid;
  grid-column: 1 / -1;
  gap: 3px;
  margin-top: 2px;
  font-size: 11px;
  color: rgba(20, 20, 20, 0.58);
}

.app-language span {
  display: none;
}

.app-language select {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--porcelain);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  padding: 0 10px;
}

.app-hero {
  min-height: 280px;
  padding: 28px;
  border-radius: 24px;
  color: var(--porcelain);
  background:
    linear-gradient(180deg, rgba(20, 20, 20, 0.16), rgba(20, 20, 20, 0.82)),
    url("../assets/chopsticks-hero.png") center / cover;
  box-shadow: 0 18px 48px rgba(20, 20, 20, 0.18);
}

.app-hero p:first-child {
  margin: 0 0 42px;
  color: var(--bronze);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-hero h1 {
  max-width: min(100%, 340px);
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", Georgia, serif;
  font-size: 34px;
  line-height: 1.08;
  overflow-wrap: break-word;
  word-break: normal;
  line-break: auto;
  white-space: pre-line;
}

.app-hero p:last-child {
  max-width: 460px;
  margin: 16px 0 0;
  color: rgba(255, 253, 247, 0.84);
  line-height: 1.6;
}

.app-download-panel {
  display: grid;
  gap: 16px;
  margin: 16px 0 4px;
  border: 1px solid rgba(49, 88, 75, 0.16);
  border-radius: 20px;
  background: var(--porcelain);
  padding: 18px;
  box-shadow: 0 12px 32px rgba(20, 20, 20, 0.06);
}

.app-download-panel span {
  display: block;
  color: var(--bronze);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-download-panel h2 {
  margin: 6px 0 0;
  font-size: 22px;
  line-height: 1.2;
}

.app-download-panel p {
  margin: 8px 0 0;
  color: rgba(20, 20, 20, 0.64);
  font-size: 13px;
  line-height: 1.6;
}

.app-download-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.app-download-primary,
.app-download-secondary {
  display: grid;
  min-height: 42px;
  place-items: center;
  border-radius: 999px;
  padding: 9px 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.app-download-primary {
  color: var(--porcelain);
  background: var(--cinnabar);
}

.app-download-secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(247, 243, 235, 0.72);
}

.toolbar {
  padding: 18px 0 12px;
}

.toolbar input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--porcelain);
  padding: 0 18px;
  font: inherit;
  outline: none;
}

.filter-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 14px;
  scrollbar-width: none;
}

.filter-strip::-webkit-scrollbar {
  display: none;
}

.filter-strip button {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--porcelain);
  color: rgba(20, 20, 20, 0.68);
  padding: 8px 13px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.filter-strip button.is-active {
  border-color: var(--cinnabar);
  color: var(--porcelain);
  background: var(--cinnabar);
}

.app-facets {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.app-facet-group {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.74);
  padding: 12px;
}

.app-facet-group > span {
  color: var(--jade);
  font-size: 12px;
  font-weight: 900;
}

.app-facet-group > div {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.app-facet-group > div::-webkit-scrollbar {
  display: none;
}

.app-facet-group button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(20, 20, 20, 0.68);
  background: var(--porcelain);
  padding: 7px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.app-facet-group button.is-active {
  border-color: var(--jade);
  color: var(--porcelain);
  background: var(--jade);
}

.product-feed {
  display: grid;
  gap: 14px;
  padding-bottom: 24px;
}

.mobile-product {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--porcelain);
  box-shadow: 0 10px 28px rgba(20, 20, 20, 0.07);
}

.mobile-product.is-highlighted {
  border-color: rgba(157, 63, 47, 0.62);
  box-shadow: 0 14px 34px rgba(157, 63, 47, 0.18);
}

.mobile-product.is-highlighted .mobile-product-image {
  outline: 3px solid rgba(157, 63, 47, 0.48);
  outline-offset: -3px;
}

.mobile-product > div:last-child {
  min-width: 0;
}

.mobile-product-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
  background: #eadfce;
}

.mobile-symbol {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 14px;
  color: var(--porcelain);
  background: linear-gradient(135deg, var(--jade), var(--ink));
  font-family: "Noto Serif SC", "Songti SC", Georgia, serif;
  font-size: 30px;
}

.mobile-product h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.mobile-series {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--cinnabar);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.mobile-product p {
  margin: 0;
  color: rgba(20, 20, 20, 0.62);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.mobile-meta {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
}

.mobile-meta div {
  display: grid;
  gap: 2px;
}

.mobile-meta dt {
  color: var(--cinnabar);
  font-size: 10px;
  font-weight: 900;
}

.mobile-meta dd {
  margin: 0;
  color: rgba(20, 20, 20, 0.6);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.mobile-product-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.mobile-product button,
.product-detail-panel button[data-add-product],
.checkout-button {
  max-width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  color: var(--porcelain);
  background: var(--cinnabar);
  padding: 9px 14px;
  font: inherit;
  font-weight: 800;
}

.app-stories {
  display: grid;
  gap: 12px;
  margin: 8px 0 24px;
}

.app-story {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.72);
}

.app-story h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.app-story p {
  margin: 0;
  color: rgba(20, 20, 20, 0.62);
  font-size: 13px;
}

.cart-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--porcelain);
}

.profile-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 247, 0.78);
}

.profile-panel p {
  margin: 0;
  color: rgba(20, 20, 20, 0.62);
  font-size: 13px;
}

.profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-actions a {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--porcelain);
  background: var(--jade);
  font-size: 13px;
  font-weight: 900;
}

.app-account-entry {
  display: grid;
  gap: 10px;
}

.app-account-entry a {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--porcelain);
  background: var(--jade);
  font-size: 13px;
  font-weight: 900;
}

.app-account-entry a:first-child {
  background: var(--cinnabar);
}

.app-provider-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-provider-preview span {
  border: 1px solid rgba(49, 88, 75, 0.16);
  border-radius: 999px;
  color: var(--jade);
  background: rgba(49, 88, 75, 0.06);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.app-auth-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 247, 0.86);
  padding: 18px;
}

.app-auth-panel[hidden] {
  display: none;
}

.app-auth-panel .cart-head a {
  color: var(--jade);
  font-size: 13px;
  font-weight: 900;
}

.app-auth-panel p {
  margin: 0;
  color: rgba(20, 20, 20, 0.64);
  font-size: 13px;
  line-height: 1.55;
}

.app-login-form {
  display: grid;
  gap: 10px;
}

.app-auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(49, 88, 75, 0.06);
  padding: 4px;
}

.app-auth-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  color: var(--jade);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.app-auth-tabs a {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--jade);
  font-size: 12px;
  font-weight: 900;
}

.app-auth-tabs button.is-active {
  color: var(--porcelain);
  background: var(--jade);
}

.app-auth-tabs a.is-active,
.app-auth-tabs.compact button.is-active {
  color: var(--porcelain);
  background: var(--jade);
}

.app-auth-tabs.compact {
  border-radius: 12px;
}

.app-login-form small {
  color: rgba(20, 20, 20, 0.62);
  line-height: 1.45;
}

.app-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
}

.app-captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px 76px;
  gap: 8px;
  align-items: center;
}

.app-captcha-row canvas {
  width: 118px;
  height: 44px;
  border: 1px solid rgba(49, 88, 75, 0.22);
  border-radius: 12px;
  background: var(--porcelain);
}

.app-captcha-row button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--jade);
  background: var(--porcelain);
  padding: 0 8px;
  font-size: 12px;
}

.app-auth-status {
  border: 1px solid rgba(173, 139, 87, 0.26);
  border-radius: 10px;
  background: rgba(173, 139, 87, 0.1);
  padding: 9px 11px;
}

.app-social-login {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.app-social-login strong {
  color: var(--ink);
  font-size: 14px;
}

.app-social-login div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.app-social-login button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--porcelain);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.app-login-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--porcelain);
  padding: 0 13px;
  font: inherit;
}

.app-login-form button,
.profile-secondary {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  color: var(--porcelain);
  background: var(--jade);
  padding: 9px 14px;
  font: inherit;
  font-weight: 900;
}

.profile-secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--porcelain);
}

.mobile-member-card {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(49, 88, 75, 0.16);
  border-radius: 18px;
  background: rgba(49, 88, 75, 0.06);
  padding: 16px;
}

.mobile-member-card span {
  color: var(--cinnabar);
  font-size: 11px;
  font-weight: 900;
}

.mobile-member-card h3 {
  margin: 0;
  font-size: 22px;
}

.mobile-member-card p {
  margin: 0;
}

.mobile-member-card > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.mobile-member-card strong {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--porcelain);
  padding: 12px;
  color: var(--cinnabar);
  font-size: 20px;
}

.mobile-member-card small {
  display: block;
  margin-top: 2px;
  color: rgba(20, 20, 20, 0.58);
  font-size: 11px;
}

.profile-service-list {
  display: grid;
  gap: 10px;
}

.profile-service-list article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(247, 243, 235, 0.72);
  padding: 13px;
}

.profile-service-list strong,
.profile-service-list span {
  display: block;
}

.profile-service-list strong {
  color: var(--jade);
  font-size: 14px;
}

.profile-service-list span {
  margin-top: 4px;
  color: rgba(20, 20, 20, 0.62);
  font-size: 12px;
  line-height: 1.45;
}

.cart-head,
.cart-total,
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-head h2 {
  margin: 0;
  font-size: 24px;
}

.cart-item {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.cart-item span {
  color: rgba(20, 20, 20, 0.64);
  font-size: 13px;
}

.cart-total {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.checkout-button {
  display: flex;
  justify-content: center;
}

.checkout-note {
  margin: 12px 0 0;
  color: rgba(20, 20, 20, 0.58);
  font-size: 12px;
  line-height: 1.5;
}

.bottom-tabs {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.94);
  backdrop-filter: blur(16px);
}

.bottom-tabs a {
  padding: 8px 4px;
  color: rgba(20, 20, 20, 0.68);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 420px) {
  .app-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .app-header {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .app-header small,
  .app-hero {
    padding: 24px 20px;
  }

  .app-hero h1 {
    max-width: 310px;
    font-size: 32px;
  }

  .app-download-actions {
    grid-template-columns: 1fr;
  }

  .mobile-product {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mobile-symbol {
    width: 72px;
    height: 72px;
  }

  .mobile-product-foot {
    align-items: flex-start;
    flex-direction: column;
  }
}

.app-categories {
  margin: 18px 0 8px;
}

.category-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.category-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--porcelain);
  padding: 10px;
  text-align: left;
  font: inherit;
}

.category-card.is-active {
  border-color: var(--cinnabar);
  box-shadow: 0 10px 28px rgba(157, 63, 47, 0.14);
}

.category-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.category-card span {
  color: var(--cinnabar);
  font-family: "Noto Serif SC", "Songti SC", Georgia, serif;
  font-size: 20px;
}

.category-card strong,
.category-card small {
  overflow-wrap: anywhere;
}

.category-card small {
  color: rgba(20, 20, 20, 0.58);
  font-size: 11px;
  line-height: 1.35;
}

.product-detail-panel {
  scroll-margin-top: 96px;
  display: grid;
  gap: 14px;
  margin: 8px 0 18px;
  border: 1px solid rgba(157, 63, 47, 0.34);
  border-radius: 22px;
  background: var(--porcelain);
  padding: 16px;
  box-shadow: 0 18px 42px rgba(157, 63, 47, 0.12);
}

.product-detail-panel[hidden] {
  display: none;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.detail-head span {
  color: var(--cinnabar);
  font-size: 12px;
  font-weight: 900;
}

.detail-head h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.2;
}

.detail-head button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 20px;
}

.product-detail-panel > img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 16px;
}

.product-detail-panel > p {
  margin: 0;
  color: rgba(20, 20, 20, 0.66);
  line-height: 1.5;
}

.mobile-related {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(49, 88, 75, 0.07);
  padding: 12px;
}

.mobile-related strong {
  color: var(--jade);
  font-size: 12px;
}

.mobile-related span {
  color: rgba(20, 20, 20, 0.68);
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 420px) {
  .app-code-row {
    grid-template-columns: 1fr;
  }

  .category-cards {
    grid-template-columns: 1fr;
  }
}

.paypal-checkout {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.paypal-checkout > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.paypal-checkout h3,
.paypal-checkout p {
  margin: 0;
}

.paypal-checkout span {
  color: var(--cinnabar);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.paypal-checkout p,
.paypal-checkout small {
  color: rgba(20, 20, 20, 0.62);
  font-size: 12px;
  line-height: 1.55;
}

.paypal-checkout paypal-button {
  display: block;
  min-height: 48px;
}

.paypal-checkout.is-success p {
  color: var(--jade);
  font-weight: 800;
}

.paypal-checkout.is-sandbox p {
  color: var(--blue);
  font-weight: 800;
}

.paypal-checkout.is-live p {
  color: var(--jade);
  font-weight: 800;
}

.paypal-checkout.is-error p {
  color: var(--cinnabar);
}
