:root {
  color-scheme: light;
  --orange: #fd7a44;
  --orange-deep: #f26a30;
  --orange-dark: #e2521f;
  --cream: #fff7f1;
  --cream-soft: #fffaf7;
  --line: #f2c9b4;
  --line-soft: #f6d3c0;
  --ink: #3b2a22;
  --ink-soft: #4b352a;
  --muted: #a07863;
  --gold: #d9a441;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font-sans);
  background-color: #fff6ef;
  background-image:
    radial-gradient(ellipse 72% 42% at 50% 22%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.42) 46%, rgba(255, 255, 255, 0) 72%),
    radial-gradient(circle at 102% 0%, rgba(250, 172, 132, 0.8) 0%, rgba(250, 172, 132, 0) 38%),
    linear-gradient(180deg, #fff7f1 0%, #fff0e7 46%, #fff7f1 100%);
  -webkit-tap-highlight-color: transparent;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 209, 188, 0.4) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 209, 188, 0.4) 1px, transparent 1px);
  background-size: 27px 27px;
  -webkit-mask-image: radial-gradient(ellipse 95% 70% at 50% 24%, #000 0%, rgba(0, 0, 0, 0.6) 58%, transparent 92%);
  mask-image: radial-gradient(ellipse 95% 70% at 50% 24%, #000 0%, rgba(0, 0, 0, 0.6) 58%, transparent 92%);
}

[hidden] {
  display: none !important;
}

button {
  font-family: inherit;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 36px 13px 10px;
  padding: calc(36px + env(safe-area-inset-top)) 13px calc(10px + env(safe-area-inset-bottom));
}

/* ---------- 头部 ---------- */

.hero {
  position: relative;
  padding-top: 4px;
  text-align: center;
}

.brand {
  --brand-logo-size: 64px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
}

.brand-logo {
  display: block;
  flex: none;
  width: var(--brand-logo-size);
  height: var(--brand-logo-size);
  filter: drop-shadow(0 2px 4px rgba(176, 118, 35, 0.18));
}

.brand-text {
  text-align: left;
}

.brand-name {
  color: var(--ink);
  font-size: clamp(31px, 9.4vw, 39px);
  font-weight: 800;
  line-height: var(--brand-logo-size);
  letter-spacing: 2px;
  white-space: nowrap;
}

.brand-bar {
  margin: 0 1px;
  color: #6b5144;
  font-weight: 300;
}

.brand-sub {
  --brand-sub-tracking: 3px;
  margin-top: 2px;
  padding-left: var(--brand-sub-tracking);
  color: #5d463a;
  font-size: clamp(10.5px, 3.05vw, 12.5px);
  letter-spacing: var(--brand-sub-tracking);
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.page-title {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin: 38px 0 0;
  font-size: clamp(56px, 17vw, 70px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 6px;
  isolation: isolate;
}

.page-title::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: #fff;
  -webkit-text-stroke: 8px #fff;
  text-shadow:
    -4px -4px 0 #fff,
    4px -4px 0 #fff,
    -4px 4px 0 #fff,
    4px 4px 0 #fff,
    0 -4px 0 #fff,
    0 4px 0 #fff,
    -4px 0 0 #fff,
    4px 0 0 #fff,
    0 12px 18px rgba(222, 91, 48, 0.2);
}

.page-title span {
  position: relative;
  color: transparent;
  background: linear-gradient(180deg, #ffb05f 0%, #fb7c37 42%, #f0561f 72%, #e64716 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-art {
  position: relative;
  width: min(92vw, 360px);
  margin: 2px auto 0;
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 10px rgba(190, 95, 50, 0.16));
}

/* ---------- 内容 ---------- */

.content {
  position: relative;
}

.card-frame {
  padding: 7px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: #fff7f1;
  box-shadow:
    0 10px 24px rgba(197, 100, 55, 0.1),
    0 2px 4px rgba(197, 100, 55, 0.04);
}

.gift-section {
  margin-top: 30px;
}

.gift-card {
  overflow: hidden;
  border: 1.5px solid #fb7b45;
  border-radius: 13px;
  background: var(--cream-soft);
}

.gift-card-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 43px;
  color: #fff;
  background: linear-gradient(180deg, #ff905d 0%, #fa763f 55%, #f56a31 100%);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 6px;
  text-indent: 6px;
  text-shadow: 0 1px 0 rgba(180, 60, 20, 0.12);
}

.gift-card-head::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
}

.gift-tag {
  position: absolute;
  top: 50%;
  right: 12px;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  text-indent: 0;
  transform: translateY(-50%);
}

.gift-card-body {
  padding: 12px;
}

.gift-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.gift-item + .gift-item {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-soft);
}

.gift-figure {
  position: relative;
  flex: none;
}

.gift-thumb {
  display: grid;
  flex: none;
  width: 62px;
  height: 62px;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: transparent;
}

.gift-year {
  position: absolute;
  right: -5px;
  bottom: -4px;
  min-width: 34px;
  padding: 1px 5px;
  border: 1.5px solid #fffaf5;
  border-radius: 999px;
  color: #fff6ec;
  background: linear-gradient(135deg, #c0441c 0%, #7d1f0d 100%);
  box-shadow: 0 2px 5px rgba(120, 40, 15, 0.28);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.gift-thumb img {
  display: block;
  width: 62px;
  height: 62px;
  object-fit: cover;
}

.gift-copy {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}

.gift-name {
  color: #33231c;
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.gift-empty {
  padding: 10px 2px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* ---------- 门店区 ---------- */

.stores-section {
  margin-top: 32px;
}

.section-title {
  position: relative;
  z-index: 1;
  display: block;
  width: fit-content;
  margin: 0 auto 8px;
  font-size: clamp(24px, 6.8vw, 28px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 1px;
  isolation: isolate;
}

.section-title::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: #fff;
  -webkit-text-stroke: 5px #fff;
  text-shadow:
    -2px -2px 0 #fff,
    2px -2px 0 #fff,
    -2px 2px 0 #fff,
    2px 2px 0 #fff,
    0 -3px 0 #fff,
    0 3px 0 #fff,
    -3px 0 0 #fff,
    3px 0 0 #fff,
    0 8px 13px rgba(222, 91, 48, 0.17);
}

.section-title span {
  position: relative;
  color: transparent;
  background: linear-gradient(180deg, #ff9a52 0%, #f4652c 65%, #e94e19 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.store-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-card {
  position: relative;
  padding: 7px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fff7f1;
  box-shadow:
    0 8px 20px rgba(197, 100, 55, 0.09),
    0 2px 4px rgba(197, 100, 55, 0.04);
  touch-action: manipulation;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.store-card:active {
  transform: scale(0.995);
}

.store-card:focus-visible {
  outline: 2px solid #f47a44;
  outline-offset: 3px;
}

.store-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 10px 13px 10px 15px;
  border: 1.5px solid #fb7b45;
  border-radius: 11px;
  background: var(--cream-soft);
}

.store-icon {
  display: grid;
  flex: none;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(180deg, #ff915e 0%, #f9733d 100%);
  box-shadow: 0 4px 9px rgba(226, 100, 50, 0.22);
}

.store-icon img {
  display: block;
  width: 37px;
  height: 37px;
}

.store-main {
  flex: 1;
  min-width: 0;
}

.store-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

.store-name {
  min-width: 0;
  margin: 0;
  color: #33231c;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.store-row {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 20px;
}

.store-row + .store-row {
  margin-top: 0;
}

.store-label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
}

.store-value {
  min-width: 0;
  color: #4a372d;
  font-weight: 400;
  line-height: 20px;
  overflow-wrap: break-word;
}

.store-value a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #f3b79d;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.store-value a:focus-visible {
  outline: 2px solid #f47a44;
  outline-offset: 2px;
  border-radius: 3px;
}

.empty-stores {
  padding: 30px 12px;
  border: 1.5px dashed #f0c5af;
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 250, 247, 0.75);
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

/* ---------- 骨架屏 ---------- */

.sk {
  border-radius: 6px;
  background: linear-gradient(100deg, #f7e0d3 20%, #fff5ee 40%, #f7e0d3 60%);
  background-size: 300% 100%;
  animation: shimmer 1.35s ease-in-out infinite;
}

.skeleton-card {
  overflow: hidden;
  border: 1.5px solid #f4cbb8;
  border-radius: 13px;
  background: var(--cream-soft);
}

.sk-head {
  height: 48px;
  border-radius: 0;
  background: linear-gradient(100deg, #ffd2bd 20%, #ffe9dd 40%, #ffd2bd 60%);
  background-size: 300% 100%;
}

.sk-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 14px;
}

.sk-thumb {
  flex: none;
  width: 62px;
  height: 62px;
  border-radius: 10px;
}

.sk-copy {
  flex: 1;
  padding-top: 4px;
}

.sk-line {
  height: 14px;
}

.sk-line + .sk-line {
  margin-top: 13px;
}

.sk-w82 {
  width: 82%;
}

.sk-w26 {
  width: 26%;
}

.store-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 0;
}

.sk-store {
  height: 106px;
  border: 1.5px solid #f2d0bf;
  border-radius: 16px;
  background: linear-gradient(100deg, #fae8de 20%, #fff6f0 40%, #fae8de 60%);
  background-size: 300% 100%;
  animation: shimmer 1.35s ease-in-out infinite;
}

/* ---------- 状态卡 ---------- */

.state-card {
  max-width: 340px;
  margin: 28px auto 0;
  padding: 28px 20px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--cream-soft);
  box-shadow: 0 10px 24px rgba(197, 100, 55, 0.1);
  text-align: center;
}

.state-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, #ff9a63 0%, #f4672e 100%);
  box-shadow: 0 8px 16px rgba(226, 100, 50, 0.22);
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
}

.state-title {
  margin: 0 0 8px;
  color: #33231c;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}

.state-detail {
  max-width: 280px;
  margin: 0 auto 18px;
  color: #8a6d5c;
  font-size: 13.5px;
  line-height: 1.7;
}

.primary-button {
  padding: 10px 28px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #ff8a4f 0%, #f2622a 100%);
  box-shadow: 0 6px 14px rgba(226, 100, 50, 0.25);
  font-size: 14px;
  font-weight: 700;
  touch-action: manipulation;
  line-height: 1.4;
  cursor: pointer;
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button:focus-visible {
  outline: 2px solid #f47a44;
  outline-offset: 3px;
}

noscript .state-card {
  margin-top: 12px;
}

/* ---------- 动画 ---------- */

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* ---------- 窄屏 ---------- */

@media (max-width: 389px) {
  .gift-item {
    gap: 10px;
  }

  .gift-thumb,
  .gift-thumb img {
    width: 56px;
    height: 56px;
  }

  .gift-name {
    font-size: 15.5px;
  }
}

@media (max-width: 359px) {
  .page {
    padding-right: 14px;
    padding-left: 14px;
  }

  .brand {
    --brand-logo-size: 48px;
  }

  .brand-name {
    font-size: 24px;
  }

  .brand-sub {
    --brand-sub-tracking: 1.8px;
    font-size: 9px;
  }

  .store-inner {
    gap: 11px;
    padding: 12px 10px;
  }

  .store-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
  }

  .store-icon img {
    width: 33px;
    height: 33px;
  }

  .store-name {
    font-size: 15.5px;
  }

  .store-row {
    grid-template-columns: 43px minmax(0, 1fr);
    font-size: 13px;
  }
}

@media (max-width: 339px) {
  .page {
    padding-right: 12px;
    padding-left: 12px;
  }

  .brand {
    --brand-logo-size: 46px;
    gap: 8px;
  }

  .brand-name {
    font-size: 23px;
    letter-spacing: 1px;
  }

  .brand-sub {
    --brand-sub-tracking: 1.5px;
    font-size: 8.5px;
  }

  .page-title {
    font-size: 52px;
    letter-spacing: 4px;
  }

  .gift-card-head {
    font-size: 17px;
  }

  .gift-thumb,
  .gift-thumb img {
    width: 52px;
    height: 52px;
  }

  .gift-name {
    font-size: 14.5px;
  }

  .gift-item {
    gap: 9px;
  }

  .store-list {
    gap: 8px;
  }

  .store-inner {
    gap: 10px;
    padding: 10px;
  }

  .store-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
  }

  .store-icon img {
    width: 29px;
    height: 29px;
  }

  .store-name {
    font-size: 14px;
  }

  .store-head {
    gap: 4px;
  }

  .store-row {
    grid-template-columns: 38px minmax(0, 1fr);
    font-size: 11.5px;
    line-height: 19px;
  }

  .store-label {
    font-size: 13px;
  }

  .section-title {
    font-size: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
