@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&display=swap");

:root {
  --primary: #00a8ca;
  --primary-dark: #0086a8;
  --primary-light: #e0f7fb;
  --line: #06c755;
  --line-dark: #05b34c;
  --main: #1e1e1e;
  --subtle: #6b7280;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-900: #111827;
  --green-50: #f0fdf4;
  --blue-50: #eff6ff;
  --blue-500: #3b82f6;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --content: 72rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, "Noto Sans TC", sans-serif;
  color: var(--main);
  background: var(--white);
  line-height: 1.7;
  font-size: 1rem;
}

img { max-width: 100%; display: block; }

button, input { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: var(--primary-dark); }

:focus-visible {
  outline: 3px solid var(--primary-dark);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--main);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  z-index: 30;
}

.skip:focus { top: 0.5rem; }

.wrap {
  width: min(var(--content), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgb(0 0 0 / 0.08);
}

.nav {
  min-height: 3.5rem;
  padding: 0.75rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--main);
  text-decoration: none;
  font-weight: 700;
}

.brand img {
  width: 50px;
  height: 50px;
  aspect-ratio: 1;
  object-fit: contain;
}

.brand-name {
  color: #4a584b;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

.nav-toggle {
  display: none;
  min-height: 44px;
  border: 1px solid var(--gray-100);
  background: var(--white);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a,
.login > button {
  color: #5a6a5a;
  text-decoration: none;
  background: none;
  border: 0;
  min-height: 0;
  padding: 0;
  font-size: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  font-weight: 500;
}

.nav-links a:hover,
.login > button:hover { color: var(--main); }

.login > button {
  background: transparent;
  color: #00a8ca;
  border: 1.5px solid #00a8ca;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-size: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  font-weight: 700;
}

.login > button:hover {
  background: #e0f7fb;
  color: #0086a8;
  border-color: #0086a8;
}

.login { position: relative; }

.login-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 16rem;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  padding: 0.4rem;
  display: grid;
}

.login-menu[hidden] { display: none; }

.login-menu a {
  display: block;
  padding: 0.75rem 0.8rem;
  border-radius: 0.75rem;
  color: var(--main);
  text-decoration: none;
  font-weight: 600;
}

.login-menu a:hover { background: var(--gray-50); }

.hero-trust {
  min-height: calc(100svh - 75px);
  min-height: calc(100dvh - 75px);
  display: flex;
  flex-direction: column;
}

.hero {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 1rem 0 0.75rem;
  border-radius: 0;
  background-color: #f5f6f8;
  background-image: linear-gradient(150deg, #ecfafe 0%, #f5f6f8 45%, #fef9ee 100%);
}

h1 em {
  color: #00bcd4;
  font-style: normal;
  text-shadow:
    0 0 1px rgb(255 255 255 / 0.85),
    0 0 16px rgb(62 255 236 / 0.55),
    0 0 26px rgb(165 243 234 / 0.45);
}

.trust-bar {
  flex-shrink: 0;
  margin-top: auto;
  background: #f8f9fa;
  border-bottom: 1px solid rgb(0 0 0 / 0.08);
  padding: 1.25rem 1rem;
}

.trust-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  width: min(var(--content), 100%);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.trust-list li {
  text-align: center;
  font-size: clamp(0.9375rem, 0.82rem + 0.55vw, 1.25rem);
  font-weight: 700;
  color: #00a8ca;
  line-height: 1.3;
}

.hero-grid,
.xiaomei-grid {
  display: grid;
  gap: 1.5rem;
}

h1 {
  margin: 0.85rem 0 1rem;
  font-size: 2.25rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--main);
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 1.875rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--main);
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 700;
  color: var(--gray-900);
}

.lede, .muted, .step p {
  color: var(--subtle);
}

.lede { font-size: 1rem; margin-top: 0; }

.step p { font-size: 0.875rem; line-height: 1.625; }

.tag {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  border-radius: 999px;
  background: #e0f7fb;
  color: #0086a8;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
}

.flag {
  display: inline-flex;
  border-radius: 999px;
  background: #17343a;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
}

.actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.75rem; margin-top: 2rem; }

.hero-primary { display: grid; justify-items: center; }
@media (min-width: 768px) { .hero-primary { justify-items: start; } }

.hero .btn-primary {
  width: 180px;
  min-height: 0;
  padding: 16px 32px;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgb(0 168 202 / 0.28);
}

.hero .btn-primary:hover { transform: translateY(-1px); }

.hero .btn-ghost {
  min-height: 0;
  padding: 16px 24px;
  border: 0;
  border-radius: 20px;
  font-weight: 500;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.07);
}

.hero-note {
  margin: 12px 0 0;
  font-size: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  color: #777a77;
  line-height: 1.4;
}

/* 「看概念示範」只在窄螢幕出現；桌機可並排就不需要按鈕。 */
.hero .hero-demo-cta {
  display: none;
  min-height: 52px;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 24px rgb(0 168 202 / 0.28);
  transition: transform 160ms ease, background 160ms ease;
}
.hero .hero-demo-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.btn-primary { background: #00a8ca; color: white; }
.btn-primary:hover { background: #0086a8; }

.btn-ghost {
  background: white;
  color: var(--main);
  border-color: var(--gray-100);
}

.btn-line { background: var(--line); color: white; }
.btn-line:hover { background: var(--line-dark); }
#collaborate .btn-line {
  border-color: transparent;
  box-shadow: none;
}
#collaborate .btn-line:hover { background: var(--line-dark); }
#collaborate .btn-line:focus { outline: none; }
#collaborate .btn-line:focus-visible {
  outline: 3px solid var(--line-dark);
  outline-offset: 3px;
}
#collaborate .btn-login {
  background: #fff;
  color: var(--primary-dark);
  border-color: var(--primary);
  box-shadow: none;
}
#collaborate .btn-login:hover { background: var(--primary-light); }
#collaborate .btn-login:focus { outline: none; }
#collaborate .btn-login:focus-visible {
  outline: 3px solid var(--primary-dark);
  outline-offset: 3px;
}

.demo-card {
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 180ms ease;
}

.demo-card:hover { box-shadow: var(--shadow-md); }

.demo-card { padding: 2rem; }

.band { padding: 4rem 0; }
.band.alt { background: var(--gray-50); }
.band.tight { padding: 3rem 0; }

.section-intro { max-width: 48rem; margin-bottom: 1.5rem; }

.is-center {
  text-align: center;
  margin-inline: auto;
}

.is-center .lede { margin-inline: auto; }

/* 申請區：手機單一 LINE 入口；桌機原地展開 QR Code。 */
#apply .apply-lead {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}
#apply .apply-cta {
  margin-top: 1.5rem;
  min-height: 52px;
  padding-inline: 1.6rem;
  font-size: 1.0625rem;
  font-family: inherit;
}
#apply .apply-cta:focus { outline: none; }
#apply .apply-cta:focus-visible {
  outline: 3px solid var(--line-dark);
  outline-offset: 3px;
}
#apply .apply-hint {
  margin: 1rem 0 0;
  color: var(--subtle);
  font-size: 0.875rem;
  line-height: 1.65;
}
/* QR 卡片沿用 xiaomei-v2 首頁 CTA 的比例；圖與連結都是小美官方帳號。 */
#apply .apply-qr {
  margin: 1.75rem auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
}
#apply .apply-qr[hidden] { display: none; }
#apply .apply-qr-label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--subtle);
  letter-spacing: 0.02em;
}
#apply .apply-qr-card {
  display: inline-block;
  line-height: 0;
  background: #fff;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
#apply .apply-qr-card:hover { transform: translateY(-2px); }
#apply .apply-qr-card:focus { outline: none; }
#apply .apply-qr-card:focus-visible {
  outline: 3px solid var(--line-dark);
  outline-offset: 3px;
}
#apply .apply-qr-img {
  display: block;
  width: clamp(7.5rem, 24vw, 10rem);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}
#apply .apply-qr-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--subtle);
}
#apply .apply-qr-account {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--subtle);
}
#apply .apply-qr-account span {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* 是否為觸控裝置由程式判定（coarse pointer），不看視窗寬度。 */
#apply .apply-mobile-only { display: none; }
#apply .apply-desktop-only { display: inline-flex; }
#apply[data-input="touch"] .apply-hint.apply-mobile-only { display: block; }
#apply[data-input="touch"] .apply-cta.apply-mobile-only { display: inline-flex; }
#apply[data-input="touch"] .apply-desktop-only { display: none; }

#manager .flow-lead,
#collaborate .close-lead {
  max-width: 40rem;
  margin-inline: auto;
}
#collaborate .close-lead { text-align: center; }
#manager .flow-lead p,
#xiaomei .flow-copy {
  margin: 0;
  color: var(--subtle);
  font-size: 1rem;
  line-height: 1.75;
}
#xiaomei .wheel-demo { margin: 0; }
#xiaomei .xiaomei-actions,
#collaborate .close-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
#collaborate .close-actions { justify-content: center; }
@media (max-width: 767px) {
  #xiaomei .xiaomei-actions,
  #collaborate .close-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Hero 後四段：一段一訊息，每段接近一屏高、內容垂直居中。 */
#manager,
#apply,
#xiaomei,
#collaborate {
  display: grid;
  align-content: center;
  min-height: 88vh;
  min-height: 88svh;
  padding: 112px 0;
}
#collaborate { padding-bottom: 128px; }
#manager .flow-lead { text-align: center; }
#manager .flow-lead p { margin-inline: auto; }
@media (max-width: 1239px) {
  #manager,
  #apply,
  #xiaomei,
  #collaborate { padding: 104px 0; }
  #collaborate { padding-bottom: 120px; }
}
@media (max-width: 767px) {
  #manager,
  #apply,
  #xiaomei,
  #collaborate {
    padding: 72px 0;
    min-height: 78vh;
    min-height: 78svh;
  }
  #collaborate { padding-bottom: 80px; }
}

.demo-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 0.5rem;
}
.demo-kicker {
  display: inline-flex;
  width: fit-content;
  margin: 0;
  padding: 0.28rem 0.7rem;
  border: 1px solid #e6e8eb;
  border-radius: 999px;
  background: #fff;
  color: #24313b;
  font-size: 0.8125rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgb(30 40 48 / 0.06);
}
.demo-toggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 1px solid #e6e8eb;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
}
.demo-toggle svg { width: 0.7rem; height: 0.7rem; fill: currentColor; }
.demo-toggle .icon-pause { display: none; }
.demo-toggle.is-on .icon-play { display: none; }
.demo-toggle.is-on .icon-pause { display: block; }
.demo-toggle:hover { color: #24313b; }
.demo-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.stage-demo {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  container-type: inline-size;
  container-name: demo;
}
.stage-demo:hover { box-shadow: none; }
.stage-demo .flag { margin-bottom: 0.7rem; }
.stage-layout {
  position: relative;
  display: grid;
  gap: 0.75rem;
  container-type: inline-size;
  overflow: visible;
}
.customer-window {
  position: relative;
  min-width: 0;
  background: #fff;
  border: 1px solid rgb(30 30 30 / 0.08);
  border-radius: 1.15rem;
  box-shadow: 0 16px 40px rgb(30 40 48 / 0.08);
  transition: opacity 280ms ease;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.15rem;
  padding: 0.35rem 0.75rem;
  border-bottom: 1px solid rgb(30 30 30 / 0.06);
  color: var(--subtle);
  font-size: 0.75rem;
}
.window-dots { display: inline-flex; gap: 0.32rem; }
.window-dots i { position: relative; width: 0.72rem; height: 0.72rem; border-radius: 50%; background: #d5dbe0; }
.window-dots i:nth-child(1) { background: #ff5f57; }
.window-dots i:nth-child(2) { background: #febc2e; }
.window-dots i:nth-child(3) { background: #28c840; }
.window-dots i.is-hover::after {
  content: "×";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a2018;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}
.window-label { color: var(--main); font-weight: 700; }
.window-url { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.15rem;
  padding: 0.35rem 0.9rem;
  border-bottom: 1px solid rgb(30 30 30 / 0.05);
  color: #8b939a;
  font-size: 0.75rem;
}
.store-name { color: var(--main); font-weight: 700; }
.store-bag {
  width: 1rem;
  height: 1rem;
  margin-left: auto;
  fill: none;
  stroke: #8b939a;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.product-layout { display: grid; gap: 0.85rem; padding: 0.75rem 0.75rem 0.9rem; }
.product-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
  background: #f3f4f6;
}
.product-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 18rem;
  object-fit: contain;
}
.shop-name { margin: 0; font-size: 1rem; line-height: 1.35; }
.shop-price { margin: 0.15rem 0 0.55rem; color: var(--main); font-weight: 700; }
.shop-label { margin: 0 0 0.35rem; color: var(--subtle); font-size: 0.75rem; font-weight: 700; }
.size-row { display: flex; gap: 0.4rem; }
.size-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.25rem;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 0.6rem;
  background: #fff;
  color: var(--main);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.size-opt.is-on {
  border-color: var(--main);
  box-shadow: inset 0 0 0 1px var(--main);
  font-weight: 800;
}
.size-opt.is-on::after { content: " ✓"; font-size: 0.75rem; }
.size-help { display: grid; grid-template-rows: 0fr; margin-top: 0; transition: grid-template-rows 280ms ease, margin 280ms ease; }
.size-help.is-open { grid-template-rows: 1fr; margin-top: 0.4rem; }
.size-help-inner { overflow: hidden; border-left: 3px solid var(--primary); background: var(--primary-light); border-radius: 0.55rem; padding: 0 0.6rem; }
.size-help.is-open .size-help-inner { padding: 0.4rem 0.55rem 0.45rem; }
.size-help strong { display: block; color: var(--primary-dark); font-size: 0.8125rem; }
.size-help p { margin: 0.15rem 0 0; color: var(--main); font-size: 0.8125rem; line-height: 1.35; }
.layer-row { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.layer-opt {
  flex: 1 1 7.2rem;
  min-height: 1.9rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid #7ecfe0;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}
.layer-opt.is-on {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: #fff;
}
.cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.5rem;
  margin: 0.45rem 0 0;
  padding: 0.35rem 0.85rem;
  border: 0;
  border-radius: 0.7rem;
  background: #24313b;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.cart-btn.is-added {
  background: var(--green-50);
  color: #166534;
  box-shadow: inset 0 0 0 1.5px #166534;
}
.judge-card { min-width: 0; color: #f3f6f7; text-align: center; transition: opacity 280ms ease; }
.judge-shell { position: relative; border-radius: 0.85rem; }
.judge-glow,
.judge-flow {
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
  background-size: 250% 250%;
  background-position: 0% 50%;
  animation: aurora-pan 8s ease-in-out infinite;
  transition: opacity 700ms ease;
}
.tone-cool { background-image: linear-gradient(115deg, #06b6d4, #38bdf8, #818cf8, #38bdf8, #06b6d4); }
.tone-amber { background-image: linear-gradient(115deg, #f6c56b, #f0a04a, #f8d48a, #f0a04a, #f6c56b); opacity: 0; }
.tone-alert { background-image: linear-gradient(115deg, #f97316, #ef4444, #fb7185, #ef4444, #f97316); opacity: 0; }
.judge-card.is-warm .tone-amber { opacity: 1; }
.judge-card.is-alert .tone-alert { opacity: 1; }
.judge-card.is-warm .tone-cool,
.judge-card.is-alert .tone-cool { opacity: 0; }
.judge-glow { inset: -12px; z-index: 0; filter: blur(16px); }
.judge-glow.tone-cool { opacity: 0.5; }
.judge-card.is-warm .judge-glow.tone-amber { opacity: 0.38; }
.judge-card.is-alert .judge-glow.tone-alert { opacity: 0.5; }
.judge-flow {
  inset: -2px;
  z-index: 1;
  padding: 2px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.judge-face {
  position: relative;
  z-index: 2;
  padding: 0.85rem 0.95rem 0.72rem;
  text-align: left;
  border-radius: 0.78rem;
  background: rgba(28, 49, 60, 0.93);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 28px rgb(16 24 32 / 0.18);
}
.judge-face::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(103, 232, 249, 0.32);
  border-radius: calc(0.78rem - 6px);
  pointer-events: none;
}
@keyframes aurora-pan {
  0% { background-position: 0% 40%; }
  50% { background-position: 100% 60%; }
  100% { background-position: 0% 40%; }
}
.judge-head { display: flex; align-items: center; gap: 6px; }
.judge-head::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #67E8F9;
  box-shadow: 0 0 8px #67E8F9;
}
.judge-head strong { display: block; color: #67E8F9; font-size: 12px; font-weight: 700; }
.judge-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin: -0.35rem 0 0.85rem;
  padding: 4px 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.judge-note svg { display: block; flex: none; }
.judge-line {
  margin: 0.28rem 0 0;
  min-height: 2.7em;
  color: #F8FAFC;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
  opacity: 1;
  transition: opacity 220ms ease;
}
.judge-line.is-out { opacity: 0; transition-duration: 150ms; }
.judge-clues { display: flex; flex-wrap: wrap; align-items: center; gap: 0.28rem; min-height: 1.4rem; margin: 0.35rem 0 0; padding: 0; list-style: none; }
.judge-clues li {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  background: rgba(255, 255, 255, 0.1);
  color: #E2E8F0;
  font-size: 0.8125rem;
  opacity: 0;
  transform: translateY(4px);
}
.judge-clues li.is-on { opacity: 1; transform: none; transition: opacity 240ms ease, transform 240ms ease; }
.judge-clues .judge-leave {
  width: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  color: #FECACA;
  background: rgba(239, 68, 68, 0.22);
  white-space: nowrap;
  transform: scale(0.88);
}
.judge-card.is-alert .judge-clues .judge-leave {
  width: auto;
  padding: 0.1rem 0.48rem;
  border: 1px solid rgba(248, 113, 113, 0.55);
  opacity: 1;
  overflow: visible;
  transform: scale(1);
  transition: opacity 200ms ease, transform 260ms cubic-bezier(0.2, 1.15, 0.32, 1);
}
.judge-end { margin: 0.32rem 0 0; min-height: 1.15em; color: #b7e4ef; font-size: 0.75rem; font-weight: 500; opacity: 0; }
.judge-end.is-on { opacity: 1; }
.stage-caption {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  justify-self: center;
  width: fit-content;
  max-width: 100%;
  margin: 0.2rem auto 0;
  padding: 0.42rem 0.9rem;
  border: 1px solid #e6e8eb;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.94);
  color: #3f474c;
  font-size: 0.97rem;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgb(30 40 48 / 0.06);
}
.stage-caption span { transition: opacity 180ms ease; }
.stage-caption i {
  width: 0.42rem;
  height: 0.42rem;
  flex: none;
  border-radius: 50%;
  background: #22d3ee;
  transition: background 700ms ease;
}
.stage-caption.is-alert i { background: #e36a4f; }
.stage-caption.is-swap span { opacity: 0; }
.handoff {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: visible;
  pointer-events: none;
}
.handoff[hidden],
.demo-pointer[hidden] { display: none; }
.handoff path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.75;
  stroke-linecap: round;
}
.handoff-dot { fill: var(--primary); }
.hint-spark {
  position: absolute;
  z-index: 3;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--primary);
  pointer-events: none;
}
.hint-spark.is-hot { animation: land-dot 720ms ease forwards; }
@keyframes land-dot {
  0% { box-shadow: 0 0 0 0 rgb(0 168 202 / 0.5); transform: scale(1); opacity: 1; }
  100% { box-shadow: 0 0 0 16px rgb(0 168 202 / 0); transform: scale(1.35); opacity: 0; }
}
.judge-card.is-from .judge-glow { opacity: 1; filter: blur(18px); }
.size-help.is-to { box-shadow: 0 0 0 2px rgb(0 168 202 / 0.35), 0 0 16px rgb(0 168 202 / 0.28); }
.demo-pointer {
  position: absolute;
  z-index: 5;
  width: 16px;
  height: 21px;
  pointer-events: none;
  transform-origin: 1px 1px;
  transition: opacity 240ms ease, transform 120ms ease;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.28));
}
.demo-pointer svg { display: block; width: 16px; height: 21px; }
.demo-pointer path { fill: #2c3136; stroke: #fff; stroke-width: 1.35; stroke-linejoin: round; }
.demo-pointer.is-press { transform: scale(0.92); }
.stage-layout.is-reset .customer-window,
.stage-layout.is-reset .judge-card { opacity: 0.4; }
.tap-ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border: 2px solid transparent;
  border-radius: 50%;
}
.demo-pointer.is-tap .tap-ring { animation: tap-ring 380ms ease; }
@keyframes tap-ring {
  0% { border-color: rgb(44 49 54 / 0.55); transform: scale(0.5); }
  100% { border-color: rgb(44 49 54 / 0); transform: scale(2.1); }
}
@container (max-width: 459px) {
  .window-url, .store-nav { display: none; }
  .product-photo img { max-height: 10rem; }
  .demo-head { margin-bottom: 6px; }
  .product-layout { padding: 0.45rem 0 0.55rem; }
  /* 窄螢幕也把判讀卡排成橫向，避免直向堆疊撐高整段。 */
  .judge-face {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    padding: 0.45rem 0.65rem;
  }
  .judge-copy { min-width: 0; flex: 1 1 auto; }
  .judge-line { min-height: 1.3em; margin: 0.05rem 0 0; }
  .judge-line br { display: none; }
  .judge-end { margin: 0; min-height: 1.1em; }
  .judge-clues {
    flex: 0 1 auto;
    justify-content: flex-end;
    align-content: center;
    max-width: 11rem;
    margin: 0;
    min-height: 1.6rem;
  }
  .stage-caption {
    font-size: 0.95rem;
    white-space: normal;
    min-height: 2em;
  }
}
/* 短螢幕（如 iPhone SE）再收一點，讓示範仍能一屏看完。 */
@media (max-width: 459px) and (max-height: 720px) {
  .product-photo img { max-height: 7rem; }
  .stage-layout { gap: 0.45rem; }
  .product-layout { padding: 0.35rem 0 0.45rem; }
  .judge-face { padding: 0.4rem 0.6rem; }
  .stage-caption { font-size: 0.9rem; min-height: 1.9em; }
}
@container (min-width: 460px) {
  .stage-layout { padding-top: 0.15rem; }
  .customer-window { margin-top: 1.55rem; }
  .judge-card {
    position: absolute;
    top: -4.6rem;
    right: -8.35rem;
    z-index: 4;
    width: 13.4rem;
  }
  .product-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: start; }
  .product-photo img { max-height: none; }
  .product-buy { padding-top: 0.15rem; }
}

.steps { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.9rem 0; }

.step-btn {
  border: 1px solid var(--gray-100);
  background: var(--gray-50);
  border-radius: 999px;
  min-height: 44px;
  padding: 0.35rem 0.8rem;
  font-weight: 700;
}

.step-btn[aria-pressed="true"] {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary);
}

.stage {
  border-radius: 0.75rem;
  background: var(--gray-50);
  padding: 1.25rem;
  min-height: 12rem;
}

.stage strong { display: block; color: var(--main); margin-bottom: 0.35rem; }

.wheel-demo { display: grid; justify-items: center; gap: 0.35rem; }

.wheel-pointer {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 12px solid #00a8ca;
}

.wheel-outer {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 6px solid #fff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.12), 0 0 0 3px #b8e8f2;
  overflow: hidden;
  background: #fff;
}

.wheel-outer svg { display: block; width: 100%; height: 100%; }

.site-footer {
  background: var(--white);
  border-top: 1px solid var(--gray-100);
  padding: 3rem 0;
  color: var(--subtle);
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  gap: 1.25rem;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--subtle);
  font-weight: 500;
}

.footer-brand img { width: 36px; height: 36px; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.2rem;
  justify-content: center;
}

.footer-links a {
  color: var(--subtle);
  text-decoration: none;
  font-size: 0.75rem;
}

.footer-links a:hover { color: var(--main); }

.footer-copy { margin: 0; font-size: 0.75rem; }

#manager, #xiaomei, #collaborate, #service-demo { scroll-margin-top: 5rem; }
#hero-stage { scroll-margin-top: 75px; }

.hero-grid > *, .xiaomei-grid > * { min-width: 0; }

@media (min-width: 768px) {
  h2 { font-size: 2.25rem; }
  .xiaomei-grid { grid-template-columns: 1fr 1fr; align-items: center; }
  .trust-list { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; min-height: 5.5rem; }
  .trust-list li + li { border-left: 1px solid rgb(0 0 0 / 0.08); }
  .footer-grid { grid-template-columns: 1.1fr 1.6fr 1fr; }
  .footer-copy { text-align: right; }
}
/* 1240px 以上維持側邊懸浮卡。更窄且舞台夠寬時，改成與顧客視窗同寬的橫向判讀條。 */
@media (max-width: 1239px) {
  @container (min-width: 460px) {
    .demo-head {
      min-height: 2rem;
      margin: 0 0 12px;
    }
    .demo-kicker {
      display: inline-flex;
      align-items: center;
      min-height: 2rem;
      margin: 0;
    }
    .stage-layout { gap: 12px; }
    .customer-window { margin-top: 0; grid-row: 2; }
    .stage-caption { grid-row: 3; margin-top: 0; }
    .judge-card {
      position: relative;
      top: auto;
      right: auto;
      grid-row: 1;
      justify-self: stretch;
      width: 100%;
    }
    .judge-note {
      position: absolute;
      top: calc(-12px - 2rem);
      right: 0;
      height: 2rem;
      margin: 0;
      z-index: 5;
    }
    .judge-face {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.65rem 1rem;
      padding: 0.42rem 0.85rem;
    }
    .judge-copy { min-width: 0; flex: 1 1 auto; }
    .judge-line {
      min-height: 1.35em;
      margin: 0.08rem 0 0;
    }
    .judge-line br { display: none; }
    .judge-end { margin: 0; min-height: 1.15em; }
    .judge-clues {
      flex: 0 1 auto;
      justify-content: flex-end;
      align-content: center;
      max-width: 17.5rem;
      margin: 0;
      min-height: 1.7rem;
    }
    .judge-card .judge-clues .judge-leave {
      width: auto;
      padding: 0.18rem 0.55rem;
      border: 1px solid transparent;
      overflow: hidden;
      visibility: hidden;
      transform: none;
    }
    .judge-card.is-alert .judge-clues .judge-leave {
      visibility: visible;
      width: auto;
      padding: 0.1rem 0.48rem;
      border: 1px solid rgba(248, 113, 113, 0.55);
    }
  }
}
/* 1024px 起（含 iPad 橫向）圖文並排：一屏看得到文案與示範。
   示範卡寬度約束留給 1240px 以上，這段區間用滿欄寬，判讀條走橫向版本。 */
@media (min-width: 1024px) {
  .hero > .hero-grid { width: min(80rem, calc(100% - 2rem)); }
  .hero-grid { grid-template-columns: 0.46fr 0.54fr; align-items: center; }
}
@media (min-width: 1240px) {
  .stage-layout { width: min(31.5rem, max(29rem, calc(100% - 6.35rem))); }
}
@media (min-width: 1240px) and (max-height: 840px) {
  /* 卡片向上突出約 2rem；短視窗時把這段留在 Hero 裡，避免滑進 Navbar。 */
  .stage-demo { padding-top: 2rem; }
}

@media (min-width: 1024px) {
  h1 { font-size: 3rem; line-height: 1.25; }
}

/* 窄螢幕（含手機、平板直向與窄視窗）：首屏只留文案，示範獨立成第二屏，靠按鈕帶過去。
   1023px 以下沒有足夠寬度並排，維持一屏一訊息。 */
@media (max-width: 1023px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 0;
    align-items: stretch;
  }
  .hero {
    align-items: stretch;
    padding: 0;
  }
  .hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 44rem;
    min-height: calc(100svh - 75px);
    min-height: calc(100dvh - 75px);
    padding: 2.5rem 0;
  }
  .hero-stage {
    display: flex;
    align-items: center;
    min-height: calc(100svh - 75px);
    min-height: calc(100dvh - 75px);
    padding: 3.5rem 0 3rem;
    border-top: 1px solid rgb(0 0 0 / 0.06);
  }
  .hero-stage > .stage-demo {
    width: 100%;
    max-width: 34rem;
    margin-inline: auto;
  }
  .hero .hero-demo-cta {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 2rem;
  }
}

@media (max-width: 767px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: static;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    background: white;
    border: 1px solid var(--gray-100);
    border-radius: 1rem;
    padding: 0.4rem 0.9rem 0.8rem;
    margin-top: 0.5rem;
  }
  .nav { flex-wrap: wrap; }
  .nav-links.is-open { display: flex; }
  .login-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0.4rem; min-width: 0; }
  .hero { padding: 0; }
  .hero-copy { padding: 2rem 0; }
  .hero-stage { padding: 1.75rem 0 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .demo-pointer, .handoff, .hint-spark { display: none !important; }
  .size-help { grid-template-rows: 1fr; margin-top: 0.65rem; }
  .size-help-inner { padding: 0.65rem 0.75rem; }
  .judge-clues li.is-on { opacity: 1; transform: none; }
  .judge-shell { animation: none; }
}

/* 減少動態時尺寸建議預設展開，窄螢幕再把圖片收一點，維持一屏。 */
@media (prefers-reduced-motion: reduce) and (max-width: 459px) {
  .product-photo img { max-height: 7.5rem; }
  .stage-caption { min-height: 1.9em; }
}
