/* 投注快手賣場 — 對齊官網配色與氣質 */
:root {
  --yellow: #fdd100;
  --yellow-deep: #f4e04d;
  --teal: #56aab7;
  --teal-dark: #3d8a96;
  --ink: #1a1313;
  --text: #333333;
  --muted: #555555;
  --panel: #f2f2f2;
  --white: #ffffff;
  --border: #e0e0e0;
  --danger: #dc3545;
  --shadow: 0 8px 24px rgba(26, 19, 19, 0.08);
  --radius: 12px;
  --nav-h: 40px;
  --font: "Taipei Sans TC", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--text);
  background: var(--yellow-deep);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
main {
  flex: 1 0 auto;
  width: 100%;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

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

/* —— Nav（對齊官網黃青漸層） —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background:
    linear-gradient(319deg, var(--teal), var(--yellow)),
    radial-gradient(circle at top left, var(--teal), transparent),
    radial-gradient(circle at bottom left, var(--yellow), transparent);
  background-blend-mode: overlay;
  box-shadow: none;
  border: 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-h);
  height: var(--nav-h);
  gap: 0.75rem;
  padding-block: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  height: 100%;
  line-height: 0;
}
.brand img {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
}
.nav-links a {
  padding: 0 0.7rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  border-radius: 0;
  border: 0;
  background: transparent;
  transition: color 0.15s ease, opacity 0.15s ease;
  line-height: 1.2;
  white-space: nowrap;
}
.nav-links a:hover {
  background: transparent;
  color: #111;
  opacity: 0.75;
}
.nav-links a.nav-cta,
.nav-links a.active {
  background: transparent;
  color: var(--ink);
  border: 0;
  font-weight: 800;
  text-decoration: none;
}
.nav-links a.nav-cta:hover,
.nav-links a.active:hover {
  background: transparent;
  color: var(--ink);
  opacity: 0.85;
  text-decoration: none;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  margin-left: 0.2rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}
.nav-toggle {
  display: none;
  border: 1.5px solid var(--ink);
  background: var(--white);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  height: 28px;
  align-items: center;
  transition: transform 0.2s ease, background 0.2s ease;
}
.nav-toggle:active { transform: scale(0.94); }

/* —— Motion —— */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes soft-pop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes nav-drop {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

.intro-copy > * {
  animation: fade-up 0.6s ease both;
}
.intro-copy .eyebrow { animation-delay: 0.05s; }
.intro-copy h1 { animation-delay: 0.12s; }
.intro-copy .lead { animation-delay: 0.2s; }
.intro-copy .intro-actions { animation-delay: 0.28s; }
.intro-media {
  animation: soft-pop 0.7s ease 0.18s both;
}

.view-enter {
  animation: fade-in 0.35s ease both;
}

.product-grid .card:nth-child(1) { animation-delay: 0.02s; }
.product-grid .card:nth-child(2) { animation-delay: 0.06s; }
.product-grid .card:nth-child(3) { animation-delay: 0.1s; }
.product-grid .card:nth-child(4) { animation-delay: 0.14s; }
.product-grid .card:nth-child(5) { animation-delay: 0.18s; }
.product-grid .card:nth-child(6) { animation-delay: 0.22s; }
.product-grid .card:nth-child(n+7) { animation-delay: 0.26s; }

.feature-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.1);
}

.shop-cta-banner {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.shop-cta-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.gallery-thumb {
  transition: border-color 0.15s ease, opacity 0.15s ease, transform 0.2s ease;
}
.gallery-thumb:hover { transform: translateY(-2px); }
.gallery-thumb.active { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .card { opacity: 1; transform: none; }
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.65rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.btn:hover {
  opacity: 0.92;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal-dark);
}
.btn-primary:hover { background: var(--teal-dark); opacity: 1; }
.btn-ghost {
  background: var(--white);
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: #f7f7f7;
  opacity: 1;
}
.btn-dark {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}
.btn-lg { padding: 0.9rem 1.5rem; font-size: 1.05rem; }
.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  border-radius: 8px;
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--teal-dark);
  text-transform: none;
}

/* —— Intro —— */
.intro-section {
  padding: 1.5rem 0 2.5rem;
}
.intro-hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2rem;
  align-items: center;
  background: var(--panel);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.intro-copy h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3.5vw, 2.45rem);
  line-height: 1.25;
  color: var(--ink);
  text-wrap: pretty;
}
.lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36em;
}
.intro-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.device-frame {
  background: #333;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.35);
}
.device-frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 0;
  border-radius: 10px;
  background: #000;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.feature-card h3 {
  margin: 0 0 0.45rem;
  color: var(--danger);
  font-size: 1.05rem;
}
.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.why-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.why-block h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  color: var(--ink);
}
.why-block ol {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
}
.why-block li { margin-bottom: 0.35rem; }

.pc-teaser {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
  align-items: center;
  background: var(--panel);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 2px solid rgba(86, 170, 183, 0.35);
}
.pc-teaser h2 {
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
  color: var(--ink);
}
.pc-teaser p { color: var(--muted); }
.pc-teaser-media {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #ffc107;
  background: #fff;
  box-shadow: var(--shadow);
}
.pc-teaser-media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.shop-cta-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
  border-radius: 16px;
  background: linear-gradient(319deg, var(--teal), var(--yellow));
  color: var(--ink);
  box-shadow: var(--shadow);
}
.shop-cta-banner h2 {
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
}
.shop-cta-banner p {
  margin: 0;
  max-width: 36em;
}

/* —— Shop —— */
.shop-section {
  background: var(--panel);
  padding: 2.5rem 0 3.5rem;
  border-radius: 24px 24px 0 0;
  margin-top: 0.5rem;
}
.shop-page {
  border-radius: 0;
  margin-top: 0;
  min-height: calc(100vh - var(--nav-h) - 80px);
}
.shop-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.shop-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  color: var(--ink);
}
.shop-sub {
  margin: 0.35rem 0 0;
  color: var(--muted);
  max-width: 40em;
}
.shop-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}
.shop-cat {
  appearance: none;
  border: 1.5px solid rgba(86, 170, 183, 0.45);
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  padding: 0.42rem 0.95rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.shop-cat:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: rgba(86, 170, 183, 0.08);
}
.shop-cat.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal-dark);
}
.shop-cat.active:hover {
  background: var(--teal-dark);
  color: #fff;
  border-color: var(--teal-dark);
}
.shop-cat-count {
  margin-left: 0.15rem;
  opacity: 0.7;
  font-weight: 600;
  font-size: 0.85em;
}
.shop-cat.active .shop-cat-count {
  opacity: 0.9;
}
.shop-tools {
  display: flex;
  gap: 0.5rem;
}
.shop-tools input {
  width: min(240px, 55vw);
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 0.6rem 1rem;
  background: var(--white);
}
.shop-tools input:focus {
  outline: none;
  border-color: var(--teal);
}
.status {
  color: var(--muted);
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.1rem;
}
.card {
  background: var(--white);
  border: 2px solid #ffc107;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(14px);
  animation: fade-up 0.45s ease forwards;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
}
.card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f8f9fa;
}
.card-media {
  display: block;
  line-height: 0;
}
.card-body {
  padding: 0.95rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}
.card-title {
  margin: 0;
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
  transition: color 0.15s ease;
}
.card-title:hover {
  color: var(--teal-dark);
}
.card-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: 0.1rem;
}
.card-price-main {
  display: inline-flex;
  align-items: baseline;
  color: var(--teal-dark);
  font-weight: 800;
  line-height: 1;
}
.card-currency {
  font-size: 0.95rem;
  margin-right: 0.08rem;
  font-weight: 800;
}
.card-amount {
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.card-price-note {
  font-size: 0.78rem;
  font-weight: 700;
  color: #8a8a8a;
}
.price {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}
.card-actions {
  margin-top: auto;
  display: flex;
  gap: 0.45rem;
  padding-top: 0.25rem;
  position: relative;
  z-index: 2;
}
.card-actions .btn { flex: 1; border-radius: 10px; padding: 0.5rem 0.6rem; font-size: 0.88rem; }
.btn-outline {
  background: var(--white);
  color: var(--ink);
  border-color: var(--border);
}
.btn-outline:hover {
  background: #f7f7f7;
  opacity: 1;
}

/* —— Footer —— */
.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  background: linear-gradient(to right, #f8f9fa, #e9ecef);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 1rem 0 1.25rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  text-align: center;
  color: #495057;
  font-size: 0.9rem;
}
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.footer-links a {
  color: #007bff;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}
.footer-links a:hover { background: rgba(0, 123, 255, 0.1); }

/* —— Subviews —— */
.subview { padding: 1.5rem 0 3rem; }
.subview-title {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  color: var(--ink);
}
.back-row { margin: 0 0 1rem; font-weight: 700; }
.back-row a:hover { color: var(--teal-dark); }

.product-detail {
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr;
  gap: 1.75rem;
  align-items: start;
  background: var(--panel);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.product-page {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.product-buy {
  display: grid;
  grid-template-columns: minmax(300px, 1.15fr) minmax(280px, 1fr);
  gap: 1.75rem;
  align-items: start;
  background: var(--panel);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.gallery-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}
.product-buy .gallery,
.product-detail .gallery {
  border: 2px solid #ffc107;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  width: 100%;
  line-height: 0;
  aspect-ratio: 1;
}
.product-buy .gallery img,
.product-detail .gallery img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.gallery-thumbs {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: thin;
}
.gallery-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: border-color 0.15s ease, opacity 0.15s ease;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-thumb:hover { opacity: 0.88; border-color: var(--teal); }
.gallery-thumb.active {
  border-color: var(--teal-dark);
  box-shadow: 0 0 0 1px var(--teal-dark);
}
.product-buy h1,
.product-detail h1 {
  margin: 0 0 0.5rem;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
}
.product-buy .price-row,
.product-detail .price-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.product-buy .price,
.product-detail .price {
  margin-bottom: 0;
  color: var(--teal-dark);
  font-size: 2rem;
}
.product-buy .desc,
.product-detail .desc {
  color: var(--muted);
  margin-bottom: 1.25rem;
  white-space: pre-wrap;
}
.price-hint {
  color: #999;
  font-size: 0.85rem;
}

.product-longdesc {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.35rem 1.5rem 1.75rem;
  box-shadow: var(--shadow);
}
.product-longdesc-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #eee;
  font-size: 1.35rem;
  color: var(--ink);
}
.product-longdesc-title::before {
  content: "";
  width: 6px;
  height: 1.4rem;
  border-radius: 999px;
  background: var(--teal);
}
.ks-param-dynamic {
  margin: 0.75rem 0;
  white-space: normal;
  line-height: 1.7;
  color: var(--text, #1a1a1a);
}
.ks-param-dynamic.is-empty {
  color: #888;
  font-size: 0.95rem;
}
.ks-param-sep {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 1rem 0;
}
.ks-param-dynamic ul,
.product-longdesc-body ul {
  margin: 0.4rem 0 0.8rem 1.2rem;
  padding: 0;
  list-style: disc;
}
.ks-param-dynamic li,
.product-longdesc-body li {
  margin: 0.25rem 0;
}
.ks-param-dynamic h2,
.product-longdesc-body h2 {
  font-size: 1.25rem;
}
.ks-param-dynamic h3,
.product-longdesc-body h3 {
  font-size: 1.08rem;
  margin-top: 1.25rem;
}
.ks-param-dynamic h4,
.product-longdesc-body h4 {
  font-size: 1rem;
  margin-top: 0.9rem;
  color: #3949ab;
}
.product-longdesc-body .ks-warn,
.ks-param-dynamic .ks-warn {
  color: #c62828;
  font-weight: 500;
}

/* —— 各版本差異：對照表 + 分層卡片 —— */
.product-longdesc-body .ks-versions {
  margin: 1.75rem 0 0.5rem;
  padding: 1.1rem 0 0;
  border-top: 2px solid rgba(26, 19, 19, 0.08);
}
.product-longdesc-body .ks-versions-title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}
.product-longdesc-body .ks-versions-hint {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.product-longdesc-body .ks-compare-wrap {
  overflow-x: auto;
  margin: 0 0 1.35rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.product-longdesc-body .ks-compare {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.product-longdesc-body .ks-compare th,
.product-longdesc-body .ks-compare td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}
.product-longdesc-body .ks-compare th:first-child,
.product-longdesc-body .ks-compare td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.product-longdesc-body .ks-compare thead th {
  background: #f7f7f7;
  font-weight: 800;
  color: var(--ink);
  border-bottom: 2px solid rgba(26, 19, 19, 0.12);
}
.product-longdesc-body .ks-compare .ks-col-pro { color: var(--teal-dark); }
.product-longdesc-body .ks-compare .ks-col-lotto { color: #b8860b; }
.product-longdesc-body .ks-compare .ks-col-bingo { color: #2e7d6f; }
.product-longdesc-body .ks-compare .ks-compare-group td {
  background: linear-gradient(90deg, rgba(86, 170, 183, 0.16), rgba(253, 209, 0, 0.12));
  text-align: left;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.product-longdesc-body .ks-compare .ks-yes {
  color: var(--teal-dark);
  font-weight: 800;
}
.product-longdesc-body .ks-compare .ks-no {
  color: #9a9a9a;
}
.product-longdesc-body .ks-version-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}
.product-longdesc-body .ks-version-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.95rem 1rem 1rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--teal);
}
.product-longdesc-body .ks-version-pro { border-top-color: var(--teal-dark); }
.product-longdesc-body .ks-version-lotto { border-top-color: #e6b800; }
.product-longdesc-body .ks-version-bingo { border-top-color: #3d8a96; }
.product-longdesc-body .ks-version-head {
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed rgba(26, 19, 19, 0.12);
}
.product-longdesc-body .ks-version-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: linear-gradient(319deg, rgba(86, 170, 183, 0.35), rgba(253, 209, 0, 0.55));
}
.product-longdesc-body .ks-version-lotto .ks-version-badge {
  background: linear-gradient(319deg, rgba(253, 209, 0, 0.75), rgba(244, 224, 77, 0.45));
}
.product-longdesc-body .ks-version-bingo .ks-version-badge {
  background: linear-gradient(319deg, rgba(61, 138, 150, 0.45), rgba(86, 170, 183, 0.25));
  color: #fff;
}
.product-longdesc-body .ks-version-lead {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}
.product-longdesc-body .ks-feature-group {
  margin: 0.55rem 0 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: #f7fbfb;
}
.product-longdesc-body .ks-version-lotto .ks-feature-group {
  background: #fffbeb;
}
.product-longdesc-body .ks-version-bingo .ks-feature-group {
  background: #f3faf9;
}
.product-longdesc-body .ks-feature-label {
  margin: 0 0 0.3rem !important;
  font-size: 0.88rem !important;
  color: var(--teal-dark) !important;
  font-weight: 800;
}
.product-longdesc-body .ks-feature-group ul {
  margin: 0.15rem 0 0 1rem !important;
  font-size: 0.9rem;
}
@media (max-width: 860px) {
  .product-longdesc-body .ks-version-grid {
    grid-template-columns: 1fr;
  }
}

.ks-param-dynamic img,
.product-longdesc-body img.resized-img,
.ks-param-dynamic img.resized-img {
  width: 50%;
  min-width: min(100%, 300px);
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.85rem auto;
  border-radius: 8px;
}

.product-longdesc-body {
  color: var(--text);
  line-height: 1.8;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}
.product-longdesc-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.85rem auto;
  border-radius: 8px;
}
.product-longdesc-body h1,
.product-longdesc-body h2,
.product-longdesc-body h3,
.product-longdesc-body h4,
.product-longdesc-body h5 {
  margin: 1.1rem 0 0.45rem;
  color: var(--ink);
  line-height: 1.35;
}
.product-longdesc-body p { margin: 0.4rem 0; }
.product-longdesc-body ul,
.product-longdesc-body ol {
  margin: 0.4rem 0 0.4rem 1.2rem;
}
.product-longdesc-images {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
}
.product-longdesc-images img {
  width: 100%;
  display: block;
}
.product-short-desc {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}
.product-short-desc h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--ink);
}
.product-short-desc p {
  margin: 0;
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.7;
}

.spec-groups {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin: 0 0 1.25rem;
}
.spec-label {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 700;
}
.spec-picked {
  color: var(--teal-dark);
  font-size: 0.92rem;
}
.spec-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.spec-opt {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 12px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.spec-opt:hover:not(:disabled) {
  border-color: var(--teal);
}
.spec-opt.active {
  border-color: var(--teal-dark);
  background: rgba(86, 170, 183, 0.12);
  color: var(--teal-dark);
  box-shadow: 0 0 0 1px var(--teal-dark);
}
.spec-opt.disabled,
.spec-opt:disabled {
  border-color: #f3f4f6;
  background: #f9fafb;
  color: #d1d5db;
  cursor: not-allowed;
  text-decoration: line-through;
  box-shadow: none;
}
.spec-msg {
  margin: 0;
  color: #dc2626;
  font-size: 0.9rem;
  font-weight: 700;
}
.spec-stock {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.spec-stock.low { color: #d97706; font-weight: 700; }
.spec-stock.empty { color: #dc2626; font-weight: 700; }

.qty-block {
  margin-bottom: 1rem;
}
.qty-block label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
}
.qty-control {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.qty-control button {
  border: 0;
  background: transparent;
  padding: 0.7rem 1rem;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  color: #6b7280;
}
.qty-control button:hover { background: #f9fafb; }
.qty-control span {
  min-width: 3.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  font-weight: 800;
  color: var(--ink);
}
.btn-atc {
  width: 100%;
  border-radius: 10px;
  padding: 0.95rem 1.25rem;
}

.variant-list {
  display: none;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.cart-table th,
.cart-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.cart-table th { background: #f8f9fa; font-size: 0.9rem; }
.cart-check-cell {
  width: 2.5rem;
  text-align: center;
  vertical-align: middle;
}
.cart-check-cell input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: #f5c518;
  cursor: pointer;
}
.cart-select-hint {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.cart-item-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.cart-summary {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--panel);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.cart-empty {
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 900px) {
  .product-detail,
  .product-buy { grid-template-columns: 1fr; }
  .gallery-thumb {
    width: 64px;
    height: 64px;
  }
  .intro-hero,
  .pc-teaser { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .device-frame { max-width: 560px; margin-inline: auto; }
}

@media (max-width: 720px) {
  .nav-inner {
    position: relative;
    height: var(--nav-h);
    min-height: var(--nav-h);
  }
  .nav-toggle {
    display: inline-flex;
    z-index: 2;
  }
  .nav-links {
    display: flex;
    position: absolute;
    left: 50%;
    width: 100vw;
    top: 100%;
    height: auto !important;
    max-height: min(70vh, 480px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.35rem 1rem 0.85rem;
    z-index: 300;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(-10px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    animation: nav-drop 0.28s ease both;
  }
  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0.85rem 0.35rem;
    margin: 0;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 1rem;
    line-height: 1.35;
    white-space: normal;
  }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a.nav-cta,
  .nav-links a.active {
    background: transparent;
    font-weight: 800;
  }
  .feature-grid { grid-template-columns: 1fr; }
  .shop-cta-banner { flex-direction: column; align-items: flex-start; }
}

/* —— 會員中心 —— */
.member-view { padding-bottom: 3rem; }
.member-view:has(.auth-page) > .back-row { display: none; }
.member-view:has(.auth-page) {
  padding-bottom: 2rem;
}

/* —— 獨立登入／註冊頁 —— */
.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 0;
  min-height: min(640px, calc(100dvh - var(--nav-h) - 4rem));
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--white);
}
.auth-brand {
  position: relative;
  display: flex;
  align-items: center;
  padding: 2.25rem 2rem;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(86, 170, 183, 0.92), rgba(253, 209, 0, 0.88)),
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.45), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(61, 138, 150, 0.35), transparent 50%);
}
.auth-brand-inner { max-width: 22rem; }
.auth-brand-logo {
  height: 44px;
  width: auto;
  margin-bottom: 1.35rem;
  filter: drop-shadow(0 2px 6px rgba(26, 19, 19, 0.12));
}
.auth-brand-kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(26, 19, 19, 0.72);
}
.auth-brand-title {
  margin: 0.35rem 0 0.65rem;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  line-height: 1.25;
  color: var(--ink);
}
.auth-brand-copy {
  margin: 0;
  color: rgba(26, 19, 19, 0.78);
  font-size: 0.98rem;
  line-height: 1.7;
}
.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.75rem;
  background: #fafafa;
}
.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.35rem 1.25rem;
  box-shadow: 0 4px 18px rgba(26, 19, 19, 0.05);
}
.auth-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--teal-dark);
}
.auth-card-title {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
  color: var(--ink);
}
.auth-card .member-muted { margin: 0 0 1rem; }
.auth-card .member-form { margin-top: 0.25rem; }
.auth-submit { width: 100%; margin-top: 0.35rem; }
.auth-card .member-switch {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  padding: 0.35rem;
}
.auth-card .member-switch:hover { color: var(--teal); text-decoration: underline; }
.auth-forgot-link {
  margin: 0.65rem 0 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.auth-forgot-link button {
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 0;
}
.auth-forgot-link button:hover { text-decoration: underline; }
.auth-card .member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.auth-back {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.92rem;
}
.auth-back a {
  color: var(--muted);
  font-weight: 600;
}
.auth-back a:hover { color: var(--teal-dark); }

@media (max-width: 820px) {
  .auth-page {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .auth-brand {
    padding: 1.35rem 1.25rem 1.2rem;
  }
  .auth-brand-logo { height: 36px; margin-bottom: 0.85rem; }
  .auth-brand-title { font-size: 1.35rem; margin-bottom: 0.35rem; }
  .auth-brand-copy { font-size: 0.9rem; }
  .auth-panel { padding: 1.15rem 1rem 1.25rem; }
  .auth-card { padding: 1.2rem 1rem 1.05rem; }
}

.member-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.member-aside {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem 1rem 1rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}
.member-aside-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--teal-dark);
}
.member-aside-title {
  margin: 0.25rem 0 0;
  font-size: 1.25rem;
  color: var(--ink);
}
.member-aside-email {
  margin: 0.2rem 0 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-all;
}
.member-side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.member-side-link {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}
.member-side-link:hover { background: rgba(86, 170, 183, 0.12); }
.member-side-link.active {
  background: linear-gradient(319deg, rgba(86, 170, 183, 0.28), rgba(253, 209, 0, 0.35));
  color: var(--ink);
  font-weight: 800;
}
.member-side-link.member-logout {
  margin-top: 0.5rem;
  color: #b42318;
}
.member-main { min-width: 0; }
.member-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.2rem 1.4rem;
  box-shadow: var(--shadow);
}
.member-card + .member-card { margin-top: 1rem; }
.member-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.member-card-head h2 { margin: 0; }
.member-address-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-top: 1px solid #f3f4f6;
}
.member-address-item:first-child { border-top: 0; padding-top: 0; }
.member-address-name {
  margin: 0 0 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.member-address-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  flex-shrink: 0;
}
#profile-address-form-wrap {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.member-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  color: var(--ink);
}
.member-muted {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.25rem 0;
}
.member-note {
  font-size: 0.85rem;
  color: var(--muted);
  background: #fff8dc;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  margin: 0.5rem 0 0;
}
.auth-address {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}
.auth-address-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #111827;
}
.auth-address .req { color: #dc2626; }
.auth-address .member-note {
  margin: 0;
  background: transparent;
  padding: 0;
}
.member-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}
.member-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}
.member-form input {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-weight: 500;
  background: #fff;
}
.member-form input:disabled {
  background: #f5f5f5;
  color: #777;
}
.member-form input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(86, 170, 183, 0.2);
}
.member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}
.member-switch {
  display: block;
  width: 100%;
  margin-top: 1rem;
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  padding: 0.5rem;
}
.member-msg {
  margin: 0.35rem 0 0;
  color: #1b7a4a;
  font-size: 0.9rem;
  font-weight: 700;
}
.member-msg.err { color: var(--danger); }
.member-quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.member-quick-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, #f7fbfb);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.member-quick-card:hover {
  transform: translateY(-2px);
  border-color: var(--teal);
}
.member-quick-card strong { color: var(--ink); }
.member-quick-card span { color: var(--muted); font-size: 0.86rem; }
.member-order-list { display: flex; flex-direction: column; gap: 0.65rem; margin-top: 0.85rem; }
.member-order-row,
.member-order-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
}
.member-order-row:hover { border-color: var(--teal); background: #fff; }
.member-order-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  text-align: right;
}
.member-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(86, 170, 183, 0.2);
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 800;
}
.member-chip.soft {
  background: #f0f0f0;
  color: #555;
}
.member-order-items { display: flex; flex-direction: column; gap: 0.55rem; }
.member-total {
  margin: 1rem 0 0;
  text-align: right;
  font-size: 1.05rem;
}
.member-pay-note {
  margin-top: 1rem;
  padding: 0.85rem;
  background: #f7f7f7;
  border-radius: 10px;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.9rem;
}
.member-order-note {
  margin-top: 1rem;
}
.member-order-note label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted, #666);
}
.member-order-note textarea {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #ddd;
  border-radius: 10px;
  font: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.member-order-note .btn {
  margin-top: 0.55rem;
}
@media (max-width: 860px) {
  .member-layout { grid-template-columns: 1fr; }
  .member-aside { position: static; }
  .member-quick { grid-template-columns: 1fr; }
  .member-order-row,
  .member-order-item {
    flex-direction: column;
  }
  .member-order-meta { justify-content: flex-start; }
}

/* —— 結帳 —— */
.checkout-view { padding-bottom: 3rem; }
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
  gap: 1.1rem;
  align-items: start;
}
.checkout-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem 1.15rem 1.35rem;
  box-shadow: var(--shadow);
}
.checkout-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  color: var(--ink);
}
.checkout-section-title {
  margin: 1.25rem 0 0.65rem !important;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(26, 19, 19, 0.12);
}
.checkout-fold {
  margin-top: 1.15rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(26, 19, 19, 0.12);
}
.checkout-fold-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
  user-select: none;
}
.checkout-fold-toggle:has(input:checked) {
  border-color: var(--teal);
  background: rgba(86, 170, 183, 0.1);
}
.checkout-fold-toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--teal);
  flex-shrink: 0;
}
.checkout-fold-title {
  flex: 1;
  font-weight: 700;
  color: var(--ink);
}
.checkout-fold-optional {
  margin-left: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted, #777);
}
.checkout-fold-hint {
  font-size: 0.8rem;
  color: var(--muted, #777);
  white-space: nowrap;
}
.checkout-fold-body {
  margin-top: 0.75rem;
}
.checkout-radio-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.checkout-radio {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.7rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  background: #fafafa;
}
.checkout-radio:has(input:checked) {
  border-color: var(--teal);
  background: rgba(86, 170, 183, 0.1);
}
.checkout-radio input { margin-top: 0.2rem; }
.checkout-summary { position: sticky; top: calc(var(--nav-h) + 1rem); }
.checkout-lines {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.checkout-line {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #eee;
}
.checkout-line-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  white-space: nowrap;
}
.checkout-totals {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.95rem;
}
.checkout-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.checkout-total-row {
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 2px solid rgba(26, 19, 19, 0.12);
  font-size: 1.08rem;
}
.member-form select,
.member-form textarea {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-weight: 500;
  background: #fff;
}
.member-form select:focus,
.member-form textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(86, 170, 183, 0.2);
}
.member-form .member-req { color: #dc2626; font-weight: 700; }
.member-form .member-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}
.member-form .member-check input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--teal);
}
#btn-place-order { width: 100%; margin-top: 1rem; }
.pay-lead {
  margin: -0.5rem 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.pay-summary-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.pay-label {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.pay-order-no {
  margin: 0.2rem 0 0;
  font-weight: 800;
  color: var(--ink);
}
.pay-amount-wrap { text-align: right; }
.pay-amount {
  margin: 0.15rem 0 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--teal-dark);
}
.pay-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.pay-meta-val {
  margin: 0.2rem 0 0;
  font-weight: 700;
}
.pay-meta-val.is-paid { color: #059669; }
.pay-meta-val.is-unpaid { color: #d97706; }
.pay-desc {
  margin: 0.35rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.pay-instructions {
  margin: 0;
  white-space: pre-line;
  font: inherit;
  color: var(--text);
  line-height: 1.7;
}
.pay-report-box {
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px dashed rgba(26, 19, 19, 0.14);
}
.pay-report-box h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  color: var(--ink, var(--text));
}
.pay-report-label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted, #666);
  margin-bottom: 0.65rem;
}
.pay-report-label input {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font: inherit;
  letter-spacing: 0.12em;
  box-sizing: border-box;
}
.pay-report-form .btn { margin-top: 0.25rem; }
.pay-report-list {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pay-report-item {
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: #f7f7f7;
  font-size: 0.9rem;
}
.pay-report-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.pay-report-status.pending { color: #b45309; font-weight: 700; }
.pay-report-status.approved { color: #047857; font-weight: 700; }
.pay-report-status.rejected { color: #b91c1c; font-weight: 700; }
.pay-last5 {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.14em;
}
.pay-atm {
  background: #f8fafb;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.pay-atm p { margin: 0.35rem 0; }
.pay-barcode-list { display: grid; gap: 0.85rem; margin: 1rem 0; }
.pay-barcode-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  background: #fff;
}
.pay-barcode-svg { max-width: 100%; height: 72px; margin: 0.5rem auto; display: block; }
.pay-barcode-code {
  margin: 0.5rem 0 0;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--muted);
}
.pay-hint {
  background: #fff8e8;
  border: 1px solid #f5d78e;
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
  color: #8a5a00;
}
.pay-hint .btn { margin-top: 0.75rem; }
.pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.pay-done { text-align: center; font-weight: 700; color: #059669; }
@media (max-width: 860px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
}
