/* Consumer design system: original warm convenience-store palette, 8px rhythm. */
.consumer #app {
  overflow-x: clip;
}
.profile-detail dd {
  min-width: 0;
}
:root {
  --ui-font-page: 24px;
  --ui-font-module: 19px;
  --ui-font-card: 16px;
  --ui-font-body: 14px;
  --ui-font-caption: 12px;
  --ui-bg: #fffaf2;
  --ui-surface: #fffefb;
  --ui-primary: #ff653e;
  --ui-ink: #39271e;
  --ui-muted: #8d7767;
  --ui-line: #f0dfcc;
  --ui-soft: #fff0de;
  --ui-gold: #f8bd61;
  --ui-radius: 16px;
  --ui-gap: 8px;
  --ui-shadow: 0 2px 6px #7146270a;
  --ui-nav-height: 68px;
}
body.consumer {
  width: 100%;
  background: var(--ui-bg);
  color: var(--ui-ink);
  font-size: 15px;
  line-height: 1.5;
}
.consumer main {
  padding: 16px 16px
    calc(var(--ui-nav-height) + env(safe-area-inset-bottom) + 16px);
  width: 100%;
}
.consumer h1 {
  font-size: var(--ui-font-page);
  line-height: 1.3;
}
.consumer h2 {
  font-size: var(--ui-font-module);
  line-height: 1.4;
}
.consumer h3 {
  font-size: var(--ui-font-card);
  line-height: 1.4;
}
.consumer p {
  font-size: var(--ui-font-body);
}
.consumer small {
  font-size: var(--ui-font-caption);
}
.consumer header {
  padding: 10px 16px;
  min-height: 48px;
  gap: 8px;
  background: var(--ui-bg);
  border-bottom: 1px solid #f1e6d9;
}
.consumer header strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 18px;
}
.consumer header .brand-icon {
  width: 24px;
  height: 24px;
}
.consumer header small {
  font-size: var(--ui-font-caption);
  white-space: nowrap;
}
.consumer .preview-notice {
  padding: 6px 10px;
  margin: 0 0 12px;
  font-size: var(--ui-font-caption);
  border-radius: 10px;
  line-height: 1.4;
}
.consumer .panel,
.consumer .card {
  border-radius: var(--ui-radius);
  border-color: var(--ui-line);
  box-shadow: var(--ui-shadow);
}
.consumer button {
  white-space: nowrap;
}
.consumer button:active:not(:disabled) {
  transform: scale(0.96);
}
button[data-busy="true"] {
  pointer-events: none;
  opacity: 0.72;
}
button[data-busy="true"]::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  animation: ui-spin 0.7s linear infinite;
}
.consumer .nav {
  height: calc(var(--ui-nav-height) + env(safe-area-inset-bottom));
  padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
  background: #fffefb;
  gap: 6px;
  align-items: stretch;
}
.consumer .nav a {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border-radius: 14px;
  transition:
    background 0.18s,
    color 0.18s;
  color: #8c7e72;
  filter: saturate(0.55);
}
.consumer .nav a.active {
  background: #fff0e3;
  color: #e95832;
  filter: none;
  font-weight: 750;
}
.consumer .nav .nav-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
  margin: 0;
}
.consumer .nav a span {
  font-size: var(--ui-font-caption);
  line-height: 17px;
  margin-top: 2px;
}
.consumer[data-screen="welcome"] header {
  display: none;
}
.consumer[data-screen="welcome"] main {
  padding-bottom: 16px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.consumer .welcome-scene {
  padding: 0;
  background: transparent;
  max-width: 420px;
  width: 100%;
  margin: auto;
}
.consumer .welcome-store {
  height: clamp(140px, 28dvh, 230px);
  width: 100%;
  object-fit: contain;
}
.consumer .welcome-card {
  position: static;
  margin: -16px 0 0;
  padding: 24px 20px;
  background: #fffdf8;
  box-shadow: var(--ui-shadow);
  border: 1px solid var(--ui-line);
  border-radius: 24px;
}
.consumer .welcome-card h1 {
  font-size: var(--ui-font-page);
  margin-bottom: 12px;
}
.consumer .welcome-card h2 {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.consumer .welcome-card p {
  max-width: none;
  font-size: var(--ui-font-body);
}
.consumer .asset-entry {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 20px auto 0;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--ui-primary);
  font-size: var(--ui-font-card);
  color: white;
  border-radius: 22px;
}
.consumer .home-carousel {
  margin: 0 0 12px;
  border-radius: 20px;
  box-shadow: none;
}
.consumer .carousel-slide {
  min-height: 0;
  padding: 20px 16px;
  grid-template-columns: 1.1fr 1fr;
}
.consumer .carousel-slide .carousel-art {
  height: clamp(128px, 37vw, 168px);
  width: 100%;
  object-fit: contain;
}
.consumer .carousel-copy h1 {
  font-size: clamp(23px, 6vw, 28px);
  letter-spacing: 0;
}
.consumer .carousel-copy p {
  font-size: var(--ui-font-caption);
}
.consumer .carousel-copy span {
  font-size: var(--ui-font-caption);
  padding: 7px 12px;
}
.consumer .carousel-controls {
  padding: 0 0 4px;
  gap: 0;
  margin-top: -6px;
}
.consumer .carousel-dots {
  gap: 0;
}
.consumer .carousel-dots button {
  min-width: 26px;
  min-height: 24px;
}
.home-store {
  padding: 12px 14px;
  border: 1px solid var(--ui-line);
  border-radius: 18px;
  background: var(--ui-surface);
  margin: 0 0 12px;
  box-shadow: var(--ui-shadow);
}
.store-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.store-line > img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}
.store-line > div {
  flex: 1;
  min-width: 0;
}
.store-line h2 {
  font-size: var(--ui-font-card);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-line p {
  font-size: var(--ui-font-caption);
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ui-muted);
}
.text-action {
  font-size: var(--ui-font-caption);
  color: #dd6a3f;
  white-space: nowrap;
}
.home-store .store-copy {
  flex: 1;
  min-width: 0;
}
.store-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.store-title-line h2 {
  flex: 1;
  min-width: 0;
}
.store-title-line .text-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #f0c6ae;
  border-radius: 18px;
  line-height: 1;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
  border-top: 1px solid #f7eddf;
  padding-top: 8px;
  text-align: center;
}
.home-stats a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.home-stats strong {
  font-size: var(--ui-font-page);
  line-height: 30px;
  color: var(--ui-primary);
  white-space: nowrap;
}
.home-stats img {
  width: 28px;
  height: 30px;
  object-fit: contain;
}
.home-stats small {
  font-size: var(--ui-font-caption);
  color: var(--ui-muted);
  margin-top: 3px;
  white-space: nowrap;
}
.home-core {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.core-tile {
  position: relative;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  background: #fff4e6;
  border: 1px solid var(--ui-line);
  border-radius: 16px;
  padding: 12px 10px;
  min-height: 90px;
  min-width: 0;
}
.core-tile > img {
  width: 48px;
  height: 60px;
  object-fit: contain;
}
.core-tile > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.core-tile b {
  font-size: 18px;
  white-space: nowrap;
}
.core-tile small {
  font-size: var(--ui-font-caption);
  color: var(--ui-muted);
  white-space: nowrap;
}
.home-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  background: #fffcf7;
  border: 1px solid var(--ui-line);
  padding: 12px 8px;
  border-radius: 16px;
  margin-bottom: 20px;
}
.home-quick > a,
.home-quick > button {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: flex-start;
  gap: 5px;
  padding: 0;
  color: var(--ui-ink);
  background: none;
  min-width: 0;
  min-height: 0;
  position: relative;
}
.home-quick img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.home-quick span {
  font-size: var(--ui-font-caption);
  white-space: nowrap;
}
.product-section {
  margin: 16px 0 20px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.section-heading h2 {
  margin: 0;
}
.section-heading > a {
  font-size: var(--ui-font-caption);
  color: var(--ui-muted);
  white-space: nowrap;
}
.section-heading small {
  font-size: var(--ui-font-caption);
  color: var(--ui-muted);
}
.consumer .product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}
.consumer .product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 6px;
  overflow: hidden;
  border-radius: 12px;
  margin: 0;
  background: #fffdf9;
  box-shadow: none;
}
.consumer .product-picture {
  display: block;
  position: relative;
  padding: 0;
  margin: 0 0 8px;
  width: 100%;
  aspect-ratio: 1;
  min-height: 0;
  background: #fffaf0;
  overflow: hidden;
  border-radius: 8px;
}
.consumer .product-picture > img,
.consumer .product-card .product-art {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fffaf0;
  margin: 0;
  border-radius: 8px;
  min-height: 0;
}
.consumer .product-card .original-placeholder img {
  width: 65%;
  height: 65%;
  object-fit: contain;
}
.consumer .product-card .product-art {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.consumer .product-card .sample-caption {
  font-size: var(--ui-font-caption);
  line-height: 1.2;
  margin: 0;
}
.consumer .product-card .snack-sprite {
  transform: scale(0.65);
  margin: -10px;
}
.consumer .product-card h3 {
  font-size: var(--ui-font-body);
  line-height: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
  margin: 0 0 4px;
  word-break: break-all;
  text-align: center;
}
.consumer .product-card .price {
  font-size: var(--ui-font-body);
  white-space: nowrap;
  margin: 0;
  line-height: 20px;
  color: #e85635;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}
.consumer .product-card .price small {
  font-size: var(--ui-font-caption);
  color: inherit;
  margin-left: 2px;
}
.consumer .product-status {
  font-size: var(--ui-font-caption);
  line-height: 16px;
  color: var(--ui-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 2px 0 6px;
}
.quantity-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  margin-top: auto;
  min-height: 36px;
}
.quantity-control button {
  min-height: 32px;
  width: 30px;
  padding: 0;
  flex: 0 0 30px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 32px;
}
.quantity-control .qty-minus {
  background: #fff0e0;
  color: #b77849;
  border: 1px solid #ebcba8;
}
.quantity-control output {
  font-size: var(--ui-font-caption);
  text-align: center;
  min-width: 16px;
  flex: 1;
  white-space: nowrap;
}
.sold-out {
  font-size: var(--ui-font-caption) !important;
  background: #f2ede5;
  color: #a99a8b;
  border-radius: 8px;
  padding: 6px 2px;
  width: 100%;
  text-align: center;
}
.consumer .product-card .redeem-button {
  margin-top: auto;
  padding: 5px 0;
  min-height: 32px;
  width: 100%;
  font-size: var(--ui-font-caption);
  border-radius: 9px;
}
.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #fff2df;
  border: 1px solid #f0d3b1;
  border-radius: 16px;
  margin: 16px 0;
}
.cart-summary span {
  font-size: 13px;
  white-space: nowrap;
}
.cart-summary button {
  font-size: var(--ui-font-body);
  min-height: 40px;
}
.cart-summary button:disabled {
  background: #dfd3c4;
  opacity: 1;
  color: #fff;
}
.lower-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 2.4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(115deg, #ffe9ca, #fff6e3);
  border-radius: 18px;
  border: 1px solid #f0d6ac;
  padding: 12px 16px;
  margin: 16px 0;
  overflow: hidden;
}
.lower-banner > div {
  z-index: 1;
  min-width: 0;
}
.lower-banner img {
  width: 32%;
  height: 100%;
  object-fit: contain;
}
.lower-banner small {
  font-size: var(--ui-font-caption);
  color: #98714b;
}
.lower-banner h2 {
  font-size: 21px;
  margin: 3px 0;
}
.lower-banner p {
  font-size: var(--ui-font-caption);
  margin: 0 0 5px;
  color: #98714b;
}
.lower-banner span {
  font-size: var(--ui-font-caption);
  color: #dd6136;
}
.member-heading {
  margin: 0 -16px;
  padding: 14px 16px 46px;
  background: #ffe0c0 url("/assets/mdrp/eVUVrGaqA8z0cEW.png") right 20px center/100px
    no-repeat;
}
.member-heading h1 {
  margin: 0 0 6px;
}
.member-heading p {
  font-size: var(--ui-font-body);
  margin: 0;
}
.member-pass {
  position: relative;
  margin: -30px 0 16px;
  padding: 18px 14px;
  background: #463123;
  color: #fff8ee;
  border-radius: 20px;
  box-shadow: 0 8px 16px #734c2515;
}
.member-identity {
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-avatar {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #ecdaca;
  flex-shrink: 0;
}
.member-identity > div {
  flex: 1;
  min-width: 0;
}
.member-identity h2 {
  font-size: var(--ui-font-card);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.member-identity p {
  font-size: var(--ui-font-caption);
  margin: 4px 0 0;
  color: #d3bda6;
}
.member-emblem {
  width: 48px;
  height: 62px;
  object-fit: contain;
}
.member-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 16px;
}
.member-stats > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.member-stats strong {
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-stats small {
  font-size: var(--ui-font-caption);
  color: #ebd9c7;
  white-space: nowrap;
}
.points-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ui-line);
  border-radius: 16px;
  background: #fff0df;
  margin-bottom: 20px;
}
.points-link > img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  order: 2;
}
.points-link > div {
  flex: 1;
}
.points-link > span {
  order: 3;
}
.points-link h2 {
  font-size: 17px;
  margin: 0 0 3px;
}
.points-link p {
  font-size: var(--ui-font-caption);
  color: var(--ui-muted);
  margin: 0;
}
.benefits > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.benefits a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.benefits img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.mine-heading {
  position: relative;
  text-align: center;
  padding: 4px 32px 12px;
}
.mine-heading h1 {
  margin: 0 0 4px;
}
.mine-heading p {
  font-size: var(--ui-font-caption);
  color: var(--ui-muted);
  margin: 0;
}
.mine-heading > a {
  position: absolute;
  right: 0;
  top: 4px;
  font-size: 22px;
  width: 32px;
  text-align: center;
}
.profile-summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 12px;
  background: #ffeddb;
  border-radius: 20px;
  margin-bottom: 12px;
}
.profile-summary > div {
  min-width: 0;
  flex: 1;
}
.profile-summary h2 {
  font-size: 17px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-summary p {
  font-size: var(--ui-font-caption);
  margin: 4px 0;
  color: var(--ui-muted);
}
.profile-summary small {
  font-size: var(--ui-font-caption);
  color: #c27841;
}
.member-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-size: var(--ui-font-caption);
  color: #a56d39;
}
.claim-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(110deg, #ff985d, #ff6b3e);
  border: 3px solid #ffc591;
  border-radius: 18px;
  color: #fff;
  margin: 0 0 18px;
  box-shadow: var(--ui-shadow);
}
.claim-banner > span {
  font-size: 32px;
}
.claim-banner > div {
  flex: 1;
}
.claim-banner h2 {
  margin: 0;
  font-size: 20px;
}
.claim-banner p {
  font-size: var(--ui-font-caption);
  margin: 3px 0 0;
}
.mine-orders {
  margin-bottom: 16px;
}
.mine-orders > div:last-child {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #fffdf8;
  border: 1px solid var(--ui-line);
  border-radius: 16px;
  padding: 12px;
}
.mine-orders a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.mine-orders img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.account-menu {
  border: 1px solid var(--ui-line);
  border-radius: 16px;
  background: #fffdf8;
  overflow: hidden;
}
.menu-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border-bottom: 1px solid #f5eade;
  font-size: 15px;
}
.menu-row:last-child {
  border: 0;
}
.menu-row > img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}
.menu-row > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
}
.menu-row b {
  font-size: 18px;
  color: #a58c72;
}
.menu-row strong {
  font-size: 15px;
  font-weight: 600;
}
.profile-detail {
  text-align: center;
  padding: 16px 0;
}
.profile-detail > .profile-avatar {
  margin: 0 auto 12px;
  width: 72px;
  height: 72px;
}
.profile-detail dl {
  margin: 20px 0;
  text-align: left;
  background: #fffdf8;
  border: 1px solid var(--ui-line);
  border-radius: 16px;
  padding: 0 16px;
}
.profile-detail dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ui-line);
}
.profile-detail dt {
  color: var(--ui-muted);
  white-space: nowrap;
}
.profile-detail dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.settings-note {
  padding: 12px 16px;
  color: var(--ui-muted);
  font-size: 13px !important;
}
.logout-button {
  display: block;
  margin: 16px;
  width: calc(100% - 32px);
}
.feature-closed {
  position: relative;
  filter: saturate(0.35);
  opacity: 0.75;
}
.closed-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: var(--ui-font-caption) !important;
  line-height: 15px;
  background: #eee1d0;
  color: #866d53 !important;
  border-radius: 8px;
  padding: 1px 5px;
  white-space: nowrap;
}
.menu-row .closed-badge {
  top: auto;
  right: 32px;
}
.home-quick .closed-badge {
  top: -8px;
  right: 0;
}
.ui-state {
  padding: 28px 16px;
  text-align: center;
  border-radius: 18px;
  background: #fff9ee;
}
.ui-state h2 {
  margin: 12px 0 8px;
  font-size: 20px;
}
.ui-state p {
  font-size: var(--ui-font-body);
  color: var(--ui-muted);
  max-width: 320px;
  margin: 0 auto 18px;
}
.state-symbol {
  margin: auto;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #ffe7c9;
  color: #e98944;
  font-size: 38px;
  display: grid;
  place-items: center;
}
.ui-state button {
  min-width: 140px;
}
.ui-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 24px 12px !important;
  grid-column: 1/-1;
}
.ui-empty > span {
  font-size: 38px;
  color: #e4b07d;
}
.ui-empty strong {
  font-size: var(--ui-font-body);
  color: #947d67;
  font-weight: 500;
}
.ui-empty > a {
  font-size: 13px;
  color: #e77443;
}
.product-grid > .empty {
  grid-column: 1/-1;
}
.page-skeleton {
  position: fixed;
  z-index: 8;
  top: 55px;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 760px);
  bottom: calc(var(--ui-nav-height) + env(safe-area-inset-bottom));
  padding: 16px;
  background: var(--ui-bg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  pointer-events: all;
}
.page-skeleton > i {
  display: block;
  height: 160px;
  border-radius: 18px;
}
.page-skeleton > i:nth-child(2) {
  height: 96px;
}
.page-skeleton > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.page-skeleton > div i {
  display: block;
  height: 140px;
  border-radius: 12px;
}
.page-skeleton i {
  background: linear-gradient(90deg, #f5e9db 20%, #fff7ea 45%, #f5e9db 70%);
  background-size: 200% 100%;
  animation: ui-shimmer 1.2s linear infinite;
}
body:has(dialog[open]) {
  overflow: hidden;
  overscroll-behavior: none;
}
dialog {
  width: calc(100% - 32px);
  max-width: 480px;
  max-height: calc(100dvh - 48px);
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--ui-line);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
dialog[open] {
  animation: ui-dialog 0.18s ease-out;
}
dialog::backdrop {
  background: #35231966;
}
dialog h2 {
  font-size: 20px;
}
dialog p {
  font-size: var(--ui-font-body);
  line-height: 1.6;
}
dialog > .actions,
dialog form > .actions {
  position: sticky;
  bottom: -20px;
  background: #fffdf8;
  padding: 12px 0;
  margin-top: 16px;
  z-index: 3;
}
dialog .actions button {
  min-height: 44px;
}
.consumer:not([data-screen="play"]) main {
  animation: ui-fade 0.18s ease-out;
}
.consumer:is(
    [data-screen="profile"],
    [data-screen="orders"],
    [data-screen="settings"],
    [data-screen="claims"],
    [data-screen="draw-records"],
    [data-screen="points"],
    [data-screen="stores"],
    [data-screen="activities"],
    [data-screen="wheel"],
    [data-screen="slots"],
    [data-screen="game"],
    [data-screen="rankings"],
    [data-screen="mall"]
  )
  main {
  animation: ui-slide 0.22s ease-out;
}
@keyframes ui-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes ui-shimmer {
  to {
    background-position: -200% 0;
  }
}
@keyframes ui-fade {
  from {
    opacity: 0.6;
  }
  to {
    opacity: 1;
  }
}
@keyframes ui-slide {
  from {
    opacity: 0.6;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ui-dialog {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 360px) {
  .consumer main {
    padding-left: 12px;
    padding-right: 12px;
  }
  .consumer .product-card h3 {
    font-size: 13px;
  }
  .consumer .product-card .price {
    font-size: var(--ui-font-caption);
  }
  .consumer .product-card .product-status {
    font-size: var(--ui-font-caption);
  }
  .quantity-control button {
    flex-basis: 28px;
    width: 28px;
  }
  .quantity-control output {
    min-width: 14px;
  }
  .core-tile {
    padding: 10px 8px;
  }
  .core-tile > img {
    width: 40px;
  }
  .core-tile b {
    font-size: var(--ui-font-card);
  }
  .core-tile small {
    font-size: var(--ui-font-caption);
  }
  .home-quick {
    gap: 4px;
  }
  .home-quick span {
    font-size: var(--ui-font-caption);
  }
  .member-stats strong {
    font-size: 15px;
  }
  .member-identity p {
    font-size: var(--ui-font-caption);
  }
  .member-emblem {
    width: 36px;
  }
  .lower-banner {
    padding: 10px 12px;
  }
  .lower-banner h2 {
    font-size: var(--ui-font-module);
  }
  .lower-banner p {
    font-size: var(--ui-font-caption);
  }
}
@media (prefers-reduced-motion: reduce) {
  .consumer main,
  dialog[open],
  .page-skeleton i {
    animation: none !important;
  }
  .consumer .nav a {
    transition: none;
  }
}

@media (max-width: 360px) {
  .member-heading {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }
}

.consumer .product-picture {
  flex: none;
}
.consumer .product-picture > img {
  position: absolute;
  inset: 0;
}
.consumer[data-screen="shop"] .product-card {
  padding: 6px;
}
.consumer[data-screen="shop"] .product-card .price {
  font-size: var(--ui-font-body);
}
.profile-avatar {
  padding: 12px;
  color: #f58a5b;
  background: #fff5e8;
  fill: #ffd9b8;
}
.consumer .nav .nav-icon {
  padding: 3px;
}

.consumer .product-card h3,
.consumer[data-screen="shop"] .product-card h3 {
  font-size: var(--ui-font-card);
  line-height: 22px;
  min-height: 44px;
}
.consumer .product-status {
  font-size: var(--ui-font-caption);
}
.consumer .product-card .price small {
  font-size: var(--ui-font-caption);
}

/* Preserve the original homepage artwork; interactive dots replace the baked-in dots. */
.consumer .carousel-slide {
  height: clamp(290px, calc((100vw - 32px) * 1.04), 385px);
}
.consumer .carousel-slide.slide-0 {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
}
.consumer .slide-0 .carousel-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.consumer .slide-0 .carousel-art {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: none;
}
.consumer .carousel-slide:not(.slide-0) {
  grid-template-columns: 1fr;
  text-align: center;
  padding: 24px 16px 16px;
}
.consumer .carousel-slide:not(.slide-0) .carousel-art {
  height: clamp(110px, 36vw, 150px);
  margin: auto;
}
.consumer .nav .original-nav-icon {
  display: block;
  position: relative;
  overflow: hidden;
  width: 32px;
  height: 30px;
  padding: 0;
  margin: 0;
}
.consumer .nav .original-nav-icon img {
  position: absolute;
  width: 44px;
  height: 44px;
  max-width: none;
  left: -6px;
  top: -2px;
  object-fit: contain;
}
.consumer .nav a > span:last-child {
  margin-top: 2px;
}

.closed-activity {
  border-style: dashed !important;
  background: #f5eee5 !important;
}
.closed-activity h2 {
  font-size: 18px;
}
.closed-activity p {
  color: var(--ui-muted);
}
.detail-actions {
  gap: 12px;
}
.detail-quantity {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  min-width: 170px;
}
.detail-quantity .quantity-control {
  margin: 0;
  min-width: 96px;
}
.detail-quantity .quantity-control output {
  min-width: 32px;
}

.consumer .profile-detail h1,
dialog h2,
dialog p {
  overflow-wrap: anywhere;
}
dialog::backdrop {
  animation: ui-fade 0.18s ease-out;
}

/* Native dialog exit transition; older browsers retain the entry animation. */
@supports (transition-behavior: allow-discrete) {
  dialog {
    opacity: 0;
    transform: translateY(8px);
    transition:
      opacity 0.15s ease,
      transform 0.15s ease,
      display 0.15s allow-discrete,
      overlay 0.15s allow-discrete;
  }
  dialog[open] {
    opacity: 1;
    transform: none;
    animation: none;
  }
  dialog::backdrop {
    background: #35231900;
    animation: none;
    transition:
      background 0.15s ease,
      display 0.15s allow-discrete,
      overlay 0.15s allow-discrete;
  }
  dialog[open]::backdrop {
    background: #35231966;
  }
  @starting-style {
    dialog[open] {
      opacity: 0;
      transform: translateY(8px);
    }
    dialog[open]::backdrop {
      background: #35231900;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  dialog,
  dialog::backdrop {
    transition: none !important;
    animation: none !important;
  }
}

.ui-empty h2 {
  font-size: var(--ui-font-card);
  margin: 0;
}
.ui-empty p {
  font-size: var(--ui-font-body);
  color: var(--ui-muted);
  max-width: 320px;
  margin: 0;
}


/* Homepage enterprise WeChat poster: preserve the full poster and keep its QR readable. */
.consumer .carousel-slide.slide-3 {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  background: #fff;
}
.consumer .slide-3 .carousel-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.consumer .slide-3 .carousel-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  object-fit: contain;
  filter: none;
}


/* WebView carousel controls: visible and tappable above poster artwork. */
.consumer .home-carousel { position: relative; }
.consumer .carousel-controls { position: absolute; z-index: 8; left: 50%; bottom: 6px; transform: translateX(-50%); margin: 0; padding: 1px 5px; border-radius: 999px; background: rgba(255,255,255,.82); }
.consumer .carousel-controls .carousel-dots button { min-width: 22px; min-height: 22px; padding: 0; }
