:root {
  --ink: #2a2018;
  --ink-2: #4a3b2a;
  --ink-3: #8a7560;
  --ink-4: #b8a995;
  --line: #ecebe6;
  --line-2: #f6f4ee;
  --paper: #ffffff;
  --paper-2: #fdfaf3;
  --paper-3: #fff5dc;
  --accent: #e09530;
  --accent-dark: #b77418;
  --good: #5b8a5d;
  --bad: #b85050;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  font-family: -apple-system, "PingFang TC", "Hiragino Sans", "Microsoft JhengHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  font-size: 15px;
  letter-spacing: 0.01em;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }

/* === Hero === */
.hero {
  padding: 40px 20px 24px;
  max-width: 880px;
  margin: 0 auto;
}
.hero .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.2em;
  margin-bottom: 14px;
  padding: 5px 12px;
  background: var(--paper-3);
  border-radius: 20px;
}
.hero h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.hero .sub {
  font-size: 14px;
  color: var(--ink-2);
  max-width: 520px;
}

/* === Stats === */
.stats {
  max-width: 880px;
  margin: 20px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.stat {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
}
.stat .n { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.stat .l { font-size: 11px; color: var(--ink-3); margin-top: 4px; letter-spacing: 0.05em; }

/* === Search === */
.searchbar { max-width: 880px; margin: 16px auto 0; padding: 0 20px; }
.searchbar .box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  transition: border-color 0.15s, background 0.15s;
}
.searchbar .box:focus-within { border-color: var(--accent); background: var(--paper); }
.searchbar input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: 16px; font-family: inherit; color: var(--ink);
}
.searchbar input::placeholder { color: var(--ink-3); }
.searchbar .ic { font-size: 18px; color: var(--ink-3); }
.searchbar .clear { font-size: 12px; color: var(--ink-3); padding: 4px 8px; display: none; }
.searchbar.has-text .clear { display: inline; }

/* === Sticky nav === */
.nav-wrap {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
  margin-top: 24px;
}
.nav {
  max-width: 880px; margin: 0 auto;
  display: flex; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  padding: 0 12px;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 16px 14px;
  font-size: 14px; color: var(--ink-3); font-weight: 500;
  white-space: nowrap; position: relative;
  transition: color 0.15s;
}
.nav a:active { color: var(--ink); }
.nav a.active { color: var(--ink); font-weight: 600; }
.nav a.active::after {
  content: ""; position: absolute;
  left: 14px; right: 14px; bottom: 0;
  height: 2px; background: var(--accent);
}
.nav a .ic { font-size: 16px; }
.nav a .ct {
  font-size: 11px; color: var(--ink-4);
  background: var(--line-2);
  padding: 2px 7px; border-radius: 8px;
  margin-left: 2px;
}

/* === Section head === */
.section {
  max-width: 880px; margin: 0 auto;
  padding: 32px 20px 8px;
  scroll-margin-top: 64px;
}
.section-head { margin-bottom: 18px; }
.section-head .lb {
  display: inline-block;
  font-size: 11px; letter-spacing: 0.25em;
  color: var(--ink-3); margin-bottom: 8px;
  font-family: "Courier New", monospace;
}
.section-head h2 {
  font-size: 22px; font-weight: 700;
  display: flex; align-items: baseline; gap: 10px;
}
.section-head h2 .ic { font-size: 22px; }
.section-head h2 .ct { font-size: 13px; color: var(--ink-3); font-weight: 400; }
.section-head .desc { font-size: 13px; color: var(--ink-2); margin-top: 6px; }

/* === Toolbar === */
.toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.toolbar .result { font-size: 12px; color: var(--ink-3); }
.toolbar .result strong { color: var(--ink); font-weight: 600; }
.toolbar .actions { display: flex; gap: 8px; }
.toolbar .act-btn {
  font-size: 12px; color: var(--ink-2);
  background: var(--paper-2); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 8px; font-weight: 500;
}
.toolbar .act-btn:active { background: var(--line-2); }

/* === Bundle accordion === */
.bundle-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.bundle {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.bundle.open { border-color: var(--accent); box-shadow: 0 6px 18px rgba(224,149,48,0.1); background: var(--paper); }

.bundle-header {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; width: 100%; text-align: left;
}
.bundle-header:active { background: var(--line-2); }
.bundle-cover {
  width: 56px; height: 56px; border-radius: 12px;
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: "Courier New", monospace;
  font-size: 16px; font-weight: 700; color: white;
  letter-spacing: 0.02em; position: relative;
}
.bundle-cover img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.bundle-cover .num { z-index: 1; position: relative; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.bundle-info { flex: 1; min-width: 0; }
.bundle-info h3 { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.bundle-info .sub {
  font-size: 12px; color: var(--ink-3); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.bundle-info .badges { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.bundle-info .badge {
  font-size: 11px; color: var(--ink-2);
  background: var(--line-2); padding: 2px 8px; border-radius: 6px;
}
.bundle-toggle {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--line-2); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 18px; color: var(--ink-2);
  transition: transform 0.2s, background 0.15s;
}
.bundle.open .bundle-toggle { transform: rotate(45deg); background: var(--accent); color: white; }

.bundle-body { display: none; padding: 0 18px 22px; }
.bundle.open .bundle-body { display: block; }

.bb-block {
  padding-top: 22px;
  border-top: 1px solid var(--line);
  margin-top: 22px;
}
.bb-block:first-child { border-top: none; padding-top: 6px; margin-top: 0; }
.bb-block h4 {
  font-size: 16px; font-weight: 700;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
  color: var(--ink);
}
.bb-block h4 .num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  font-family: -apple-system, sans-serif;
  flex-shrink: 0;
}
.bb-block p, .bb-block li { font-size: 14px; line-height: 1.85; color: var(--ink); }
.bb-block ul { padding-left: 20px; margin-top: 4px; }
.bb-block ul li { margin-bottom: 4px; }
.bb-block .sub-label {
  font-size: 12px; color: var(--ink-3);
  margin-top: 14px; margin-bottom: 6px;
  font-weight: 600;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }

.day-timeline { position: relative; padding-left: 18px; }
.day-timeline::before {
  content: ""; position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--paper-3); border-radius: 2px;
}
.day-item {
  position: relative; padding: 8px 0 16px;
  display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline;
}
.day-item:last-child { padding-bottom: 0; }
.day-item::before {
  content: ""; position: absolute;
  left: -18px; top: 14px;
  width: 12px; height: 12px; border-radius: 50%;
  background: white; border: 3px solid var(--accent);
  box-sizing: border-box;
}
.day-item .t {
  font-size: 11px; letter-spacing: 0.1em;
  color: var(--accent-dark); background: var(--paper-3);
  padding: 3px 8px; border-radius: 5px;
  font-family: "Courier New", monospace;
  font-weight: 600; flex-shrink: 0;
}
.day-item .w { font-size: 13px; line-height: 1.7; color: var(--ink); flex: 1; min-width: 0; }

.copy-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  background: var(--paper);
}
.copy-card .head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.copy-card .platform {
  font-size: 12px; font-weight: 600;
  color: var(--ink-2);
}
.copy-card .btn {
  font-size: 12px; background: var(--ink); color: white;
  padding: 6px 12px; border-radius: 6px; font-weight: 500;
}
.copy-card .btn.ok { background: var(--good); }
.copy-card .content {
  font-size: 13px; line-height: 1.85;
  white-space: pre-wrap; color: var(--ink-2);
}

.hashtag-row {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px; color: var(--ink-2);
  position: relative; padding-right: 70px;
  line-height: 1.7; word-break: break-word;
}
.hashtag-row .btn {
  position: absolute; top: 50%; right: 12px;
  transform: translateY(-50%);
  font-size: 12px; background: var(--ink); color: white;
  padding: 6px 12px; border-radius: 6px;
}

.video-frame {
  background: #1a1a1a;
  aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); font-size: 12px; letter-spacing: 0.3em;
  border-radius: 10px; overflow: hidden;
}
.video-frame video { width: 100%; height: 100%; }

/* === 單品 === */
.product-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-top: 16px;
}
.product-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.product-card .top {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.product-card .swatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1px var(--line);
}
.product-card h4 { font-size: 14px; font-weight: 700; }
.product-card .role { font-size: 12px; color: var(--accent-dark); margin-bottom: 6px; }
.product-card .desc { font-size: 12px; line-height: 1.6; color: var(--ink-2); }

/* === 影片 === */
.video-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.video-row {
  display: flex; gap: 14px; align-items: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px; padding: 14px;
}
.video-row .thumb {
  width: 110px; height: 64px; flex-shrink: 0;
  background: var(--paper-3); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-dark); font-size: 18px;
}
.video-row .thumb video { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.video-row .info { flex: 1; min-width: 0; }
.video-row .num {
  font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.15em;
  font-family: "Courier New", monospace;
  margin-bottom: 2px;
}
.video-row h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.video-row .desc { font-size: 12px; color: var(--ink-2); line-height: 1.5; }

/* === 規範 === */
.rules-wrap { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.rule-box { border-radius: 14px; padding: 18px; border: 1px solid var(--line); }
.rule-box.do { background: #f1f7f2; border-color: #d6e6d8; }
.rule-box.dont { background: #fbf1f1; border-color: #f0d6d6; }
.rule-box .head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; font-size: 15px; font-weight: 700;
}
.rule-box.do .head { color: #3a6b3d; }
.rule-box.dont .head { color: #8a3535; }
.rule-box .head .ic {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: white; font-size: 14px;
}
.rule-box ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rule-box li {
  display: flex; gap: 10px;
  font-size: 13px; line-height: 1.7; color: var(--ink);
}
.rule-box li::before { content: "•"; color: var(--ink-3); flex-shrink: 0; }
.tone-card {
  background: var(--paper-3);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 16px 18px;
}
.tone-card .label {
  font-size: 11px; color: var(--accent-dark);
  letter-spacing: 0.25em; font-weight: 600;
  margin-bottom: 6px;
}
.tone-card p { font-size: 13px; line-height: 1.85; color: var(--ink); }

/* === QA === */
.qa-stack { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.qa {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}
.qa.open { background: var(--paper); border-color: var(--accent); }
.qa-q {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 16px; width: 100%; text-align: left;
  font-size: 14px; font-weight: 600; line-height: 1.5;
  min-height: 56px;
}
.qa-q .num {
  font-size: 11px; color: var(--accent-dark);
  background: var(--paper-3); padding: 4px 8px; border-radius: 6px;
  flex-shrink: 0; font-family: "Courier New", monospace;
}
.qa-q .text { flex: 1; }
.qa-q .toggle { font-size: 18px; color: var(--ink-3); flex-shrink: 0; transition: transform 0.2s; }
.qa.open .qa-q .toggle { transform: rotate(45deg); color: var(--accent); }
.qa-a {
  display: none; padding: 0 16px 18px 60px;
  font-size: 13px; line-height: 1.9; color: var(--ink-2);
}
.qa.open .qa-a { display: block; }

.empty {
  padding: 28px 16px; text-align: center;
  color: var(--ink-3); font-size: 13px;
  background: var(--paper-2);
  border-radius: 12px;
  border: 1px dashed var(--line);
}

.foot {
  max-width: 880px; margin: 32px auto 0;
  padding: 32px 20px 60px;
  text-align: center;
  font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.2em;
  border-top: 1px solid var(--line);
}

@media (min-width: 720px) {
  .hero { padding: 60px 24px 32px; }
  .hero h1 { font-size: 38px; }
  .section { padding: 48px 24px 8px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .video-row .thumb { width: 160px; height: 90px; }
}
@media (min-width: 960px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}
