:root {
  --ink: #2d3035;
  --muted: #707780;
  --paper: #fffdfa;
  --cream: #fff4df;
  --yellow: #ffd76a;
  --pink: #f08f9b;
  --pink-deep: #cb5f70;
  --blue: #78c9e8;
  --green: #78b996;
  --line: #e7e0d7;
  --shadow: 0 16px 44px rgba(57, 47, 36, .08);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 215, 106, .2), transparent 24rem),
    radial-gradient(circle at 92% 18%, rgba(120, 201, 232, .16), transparent 22rem),
    #f7f4ee;
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "Yu Gothic UI", sans-serif;
  min-height: 100vh;
}

button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.sky { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.sky i { position: absolute; border: 2px solid rgba(41, 49, 58, .06); border-radius: 50%; }
.sky i:nth-child(1) { width: 340px; height: 340px; top: -170px; left: 56%; }
.sky i:nth-child(2) { width: 180px; height: 180px; top: 42%; left: -90px; }
.sky i:nth-child(3) { width: 420px; height: 420px; right: -280px; bottom: 4%; }

.hero {
  position: relative;
  max-width: 1176px;
  margin: 28px auto 0;
  padding: 42px 48px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  overflow: hidden;
  border: 1px solid rgba(224, 215, 202, .92);
  border-radius: 28px;
  background:
    radial-gradient(circle at 91% 12%, rgba(240, 143, 155, .12), transparent 14rem),
    linear-gradient(135deg, rgba(255, 253, 250, .98), rgba(255, 250, 240, .92));
  box-shadow: 0 18px 55px rgba(68, 56, 40, .07);
}
.hero::after {
  position: absolute;
  right: -45px;
  bottom: -85px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(203, 95, 112, .12);
  border-radius: 50%;
  content: "";
}
.hero-copy, .hero-actions { position: relative; z-index: 1; }
.hero-copy { min-width: 0; }
.eyebrow { margin: 0 0 12px; color: var(--pink-deep); font-size: 11px; font-weight: 800; letter-spacing: .2em; }
h1 { margin: 0; font-size: clamp(40px, 5vw, 60px); line-height: 1; letter-spacing: -.05em; }
h1 span { color: var(--pink-deep); }
.title-break { display: none; }
.intro { max-width: 590px; margin: 18px 0 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.hero-actions { min-width: 250px; text-align: right; }
.scan-button {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  padding: 12px 19px;
  background: var(--ink);
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 9px 22px rgba(41, 49, 58, .16);
  transition: transform .2s, opacity .2s;
}
.scan-button:hover { transform: translateY(-2px); }
.scan-button:disabled { opacity: .55; cursor: wait; transform: none; }
.scan-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 215, 106, .18); }
.scan-button.running .scan-dot { animation: pulse 1s infinite; }
.status { max-width: 340px; margin: 11px 0 0 auto; color: var(--muted); font-size: 11px; line-height: 1.55; }

main { max-width: 1240px; margin: 0 auto; padding: 22px 32px 80px; }
.summary {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, .9);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.summary article { position: relative; padding: 19px 24px; border-right: 1px solid var(--line); }
.summary article::before { position: absolute; top: 0; right: 24px; left: 24px; height: 2px; border-radius: 2px; background: rgba(203, 95, 112, .28); content: ""; }
.summary article:last-child { border-right: 0; }
.summary span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.summary strong { font-size: 17px; letter-spacing: -.02em; }

.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  margin: 26px -12px 0;
  padding: 13px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(250, 247, 241, .88);
  backdrop-filter: blur(14px);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 15px;
  background: var(--paper);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
}
.tab:hover { border-color: var(--pink); }
.tab.active { border-color: var(--ink); background: var(--ink); color: white; }
.content { min-height: 320px; padding-top: 18px; }
.collection { margin: 34px 0 54px; }
.collection-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.collection-title { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.collection-title a { text-decoration: none; }
.collection-title a:hover { text-decoration: underline; }
.collection-meta { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.badge { display: inline-block; margin-left: 8px; border-radius: 999px; padding: 4px 9px; background: var(--yellow); font-size: 11px; vertical-align: 3px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  text-decoration: none;
  box-shadow: 0 7px 20px rgba(76, 62, 43, .045);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card.picked { border-color: var(--pink-deep); box-shadow: 0 0 0 2px var(--pink-deep); }
.card-image { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--cream); }
.no-image { display: grid; place-items: center; width: 100%; aspect-ratio: 1; background: var(--cream); color: #b6aa97; font-size: 12px; }
.card-body { padding: 14px 14px 16px; }
.card-title { min-height: 3.1em; margin: 0; font-size: 13px; font-weight: 700; line-height: 1.55; }
.card-code { margin-top: 8px; color: #a1988b; font-size: 10px; }
.card-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; font-size: 12px; }
.price { font-weight: 800; }
.stock { color: var(--green); font-weight: 700; }
.stock.out { color: var(--pink-deep); }
.event { margin-top: 8px; color: #b47b22; font-size: 11px; line-height: 1.45; }
.pick-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 2px solid white;
  border-radius: 50%;
  background: rgba(41, 49, 58, .62);
  color: white;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .15);
}
.card.picked .pick-button { background: var(--pink-deep); }
.pending, .empty, .loading-card {
  border: 1px dashed #ddc99a;
  border-radius: var(--radius);
  padding: 34px;
  background: rgba(255, 245, 223, .72);
  color: #82745c;
  line-height: 1.7;
}
.empty, .loading-card { margin-top: 24px; text-align: center; }
.loader { display: inline-block; width: 12px; height: 12px; margin-right: 9px; border: 2px solid #ccbfa8; border-top-color: var(--pink-deep); border-radius: 50%; animation: spin .8s linear infinite; }

.picks {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 40;
  display: none;
  max-width: 1160px;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px 16px;
  background: rgba(255, 253, 248, .96);
  box-shadow: 0 18px 60px rgba(41, 49, 58, .2);
  backdrop-filter: blur(18px);
}
.picks.show { display: block; }
.pick-summary { display: flex; align-items: center; gap: 16px; }
.pick-summary > div:first-child { margin-right: auto; }
#pick-warning { display: block; margin-top: 3px; color: var(--pink-deep); font-size: 11px; }
.pick-total { font-size: 13px; font-weight: 800; }
.pick-total small { display: block; color: var(--muted); font-weight: 500; }
.pick-actions { display: flex; gap: 7px; }
.pick-actions button { border: 0; border-radius: 999px; padding: 9px 14px; background: var(--pink-deep); color: white; cursor: pointer; }
.pick-actions .quiet { border: 1px solid var(--line); background: white; color: var(--ink); }
.pick-list { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; }
.pick-chip { position: relative; flex: none; width: 74px; text-decoration: none; }
.pick-chip img, .pick-chip .no-image { width: 74px; height: 74px; border-radius: 12px; object-fit: cover; }
.pick-chip p { height: 2.7em; overflow: hidden; margin: 5px 2px 0; font-size: 10px; line-height: 1.35; }
.remove-pick { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(41,49,58,.72); color: white; cursor: pointer; }
.to-top { position: fixed; right: 20px; bottom: 22px; z-index: 30; display: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--ink); color: white; cursor: pointer; }
.to-top.show { display: block; }
footer { padding: 22px 30px 120px; color: var(--muted); text-align: center; font-size: 11px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.7); } }

@media (max-width: 760px) {
  .hero { margin: 14px 14px 0; padding: 28px 23px 24px; display: block; border-radius: 22px; }
  .title-break { display: initial; }
  h1 { font-size: clamp(36px, 9.2vw, 42px); line-height: 1.01; letter-spacing: -.045em; }
  .eyebrow { margin-bottom: 10px; font-size: 10px; }
  .intro { margin-top: 15px; font-size: 14px; line-height: 1.65; }
  .hero-actions { margin-top: 20px; padding-top: 18px; min-width: 0; border-top: 1px solid var(--line); text-align: left; }
  .status { margin-left: 0; }
  main { padding: 16px 14px 70px; }
  .summary { grid-template-columns: 1fr 1fr; }
  .summary article { padding: 16px; border-bottom: 1px solid var(--line); }
  .summary article::before { right: 16px; left: 16px; }
  .summary article:nth-child(2) { border-right: 0; }
  .summary article:nth-child(n+3) { border-bottom: 0; }
  .summary strong { font-size: 15px; }
  .tabs { margin-top: 22px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { border-radius: 16px; }
  .card-body { padding: 11px; }
  .card-title { font-size: 12px; }
  .card-row { display: block; }
  .stock { display: block; margin-top: 3px; }
  .pick-summary { flex-wrap: wrap; }
  .pick-summary > div:first-child { width: 100%; }
  .pick-total { margin-right: auto; }
}

@media (max-width: 380px) {
  .hero { padding-right: 19px; padding-left: 19px; }
  h1 { font-size: 34px; }
  .summary strong { font-size: 14px; }
}

