/* /demo 互動示範頁專用樣式（2026-09-18）。只有 demo.html 載入，不影響其他頁。 */

.demo-intro { padding: 44px 0 20px; text-align: center; }
.demo-intro h1 { font-size: 30px; line-height: 1.4; margin-bottom: 10px; }
.demo-intro .lead { color: var(--ink-soft); max-width: 560px; margin: 0 auto; }
.demo-fake-note {
  display: inline-block; margin-top: 14px; font-size: 12.5px; color: #7a5a15;
  background: #fff6e5; border: 1px solid #f0dcae; border-radius: 999px; padding: 4px 12px;
}
@media (max-width: 640px) {
  .demo-intro { padding: 30px 0 14px; }
  .demo-intro h1 { font-size: 24px; }
  .demo-intro .lead { font-size: 15px; }
}

/* 整個互動區：手機寬為主，桌機置中 */
.demo-app { max-width: 440px; margin: 0 auto; padding: 0 0 56px; scroll-margin-top: 72px; }

/* 上方 1-2-3-4 步驟列 */
.demo-stepper {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin: 8px 0 16px; list-style: none;
}
.demo-stepper button {
  width: 100%; border: none; background: transparent; cursor: pointer;
  font-family: inherit; color: var(--ink-soft); font-size: 12px; line-height: 1.35;
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 2px;
}
.demo-stepper .n {
  width: 30px; height: 30px; border-radius: 999px; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 14px;
  background: var(--surface); border: 2px solid var(--line); color: var(--ink-soft);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.demo-stepper button.done .n { border-color: var(--brand); color: var(--brand-dark); }
.demo-stepper button.active { color: var(--ink); font-weight: 700; }
.demo-stepper button.active .n { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 每一步的畫面 */
.demo-step { display: none; }
.demo-step.active { display: block; animation: demo-in 0.22s ease-out; }
@keyframes demo-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .demo-step.active { animation: none; } }

.demo-tip {
  font-size: 14px; color: var(--ink); background: var(--brand-tint);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 12px;
}
.demo-tip b { color: var(--brand-dark); }

/* 模擬的 app 畫面 */
.demo-screen {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 10px 30px rgba(31, 42, 46, 0.08); overflow: hidden;
}
.demo-screen-bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-soft);
}
.demo-screen-bar strong { color: var(--ink); font-size: 14px; }
.demo-screen-bar .sp { margin-left: auto; }
.demo-back {
  border: none; background: transparent; font-family: inherit; font-size: 13px;
  color: var(--brand-dark); cursor: pointer; padding: 2px 4px 2px 0;
}

/* 步驟 1：分店 + 評論列表 */
.demo-stores {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  padding: 10px 10px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.demo-store {
  font-family: inherit; text-align: left; cursor: pointer; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 9px; display: flex; flex-direction: column; gap: 1px;
  transition: border-color 0.15s ease;
}
.demo-store.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-tint); }
.demo-store .name { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-store .cnt { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; }
.demo-store .cnt.has { color: var(--danger); font-weight: 700; }
.demo-row .where { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.demo-tone-label { font-size: 12px; color: var(--ink-soft); margin: -2px 0 6px; }
.demo-row {
  display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left;
  padding: 11px 14px; border: none; border-bottom: 1px solid var(--line);
  background: var(--surface); font-family: inherit; font-size: inherit; line-height: inherit; color: var(--ink);
}
button.demo-row { cursor: pointer; transition: background 0.15s ease; }
button.demo-row:hover { background: #fff8f7; }
.demo-row .dot {
  width: 9px; height: 9px; border-radius: 999px; background: var(--danger);
  flex: none; margin-top: 7px; box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.15);
}
.demo-row .dot.off { background: transparent; box-shadow: none; }
.demo-row .body { flex: 1; min-width: 0; }
.demo-row .top { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.demo-row .stars { color: var(--star); letter-spacing: 1px; font-size: 12.5px; }
.demo-row .who { color: var(--ink-soft); font-size: 12.5px; }
.demo-row .txt {
  font-size: 13.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.demo-row .go { flex: none; align-self: center; color: var(--brand-dark); font-size: 13px; font-weight: 700; }
.demo-badge {
  display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px;
  margin-left: auto; flex: none; white-space: nowrap;
}
.demo-badge.pending { background: #fdecea; color: #b3302b; font-weight: 700; }
.demo-badge.replied { background: var(--brand-tint); color: var(--brand-dark); }
.demo-badge.auto { background: #eef1f2; color: var(--ink-soft); }
.demo-row.just-replied { background: #f3fbf9; }

/* 步驟 2：評論詳情 + AI 回覆 */
.demo-detail { padding: 16px 14px 14px; }
.demo-detail .stars { color: var(--star); letter-spacing: 2px; }
.demo-detail .meta { font-size: 12.5px; color: var(--ink-soft); margin: 2px 0 8px; }
.demo-detail .comment { font-size: 15px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.demo-ai-label { font-size: 12.5px; font-weight: 700; color: var(--brand-dark); margin: 14px 0 8px; }
.demo-tones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.demo-tones button {
  font-family: inherit; font-size: 12.5px; padding: 7px 2px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.demo-tones button.on { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-dark); font-weight: 700; }
.demo-draft {
  width: 100%; min-height: 128px; resize: vertical; font-family: inherit; font-size: 15px; line-height: 1.65;
  color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.demo-draft:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.demo-draft-hint { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.demo-send { width: 100%; margin-top: 12px; }

/* 步驟 3：送出完成 */
.demo-done { padding: 26px 18px 18px; text-align: center; }
.demo-done .check {
  width: 54px; height: 54px; border-radius: 999px; background: var(--brand); color: #fff;
  font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
}
.demo-done h3 { font-size: 18px; margin-bottom: 4px; }
.demo-done .sub { font-size: 13.5px; color: var(--ink-soft); }
.demo-sent-box {
  text-align: left; margin-top: 16px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px;
}
.demo-sent-box .lbl { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-bottom: 4px; }
.demo-sent-box .rev { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.demo-sent-box .rev .stars { color: var(--star); }
.demo-sent-box .reply { font-size: 14px; white-space: pre-wrap; word-break: break-word; }

/* 步驟 4：手機 + LINE */
.demo-phone {
  max-width: 340px; margin: 0 auto; background: #1f2a2e; border-radius: 34px; padding: 12px;
  box-shadow: 0 16px 40px rgba(31, 42, 46, 0.22);
}
.demo-phone-screen { background: #8ca5bf; border-radius: 24px; overflow: hidden; }
.demo-line-top {
  background: #273646; color: #fff; font-size: 13.5px; font-weight: 700;
  padding: 12px 14px; display: flex; align-items: center; gap: 8px;
}
.demo-line-top .av {
  width: 26px; height: 26px; border-radius: 999px; background: #fff; flex: none;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.demo-line-top .av img { width: 22px; height: 22px; }
.demo-line-chat { padding: 14px 12px 18px; display: flex; flex-direction: column; gap: 12px; }
.demo-line-time { align-self: center; font-size: 11px; color: #fff; background: rgba(0, 0, 0, 0.18); padding: 1px 10px; border-radius: 999px; }
.demo-bubble {
  background: #fff; border-radius: 16px; overflow: hidden; width: 88%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.demo-bubble-head {
  background: #0f9d8c; color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 9px 12px; display: flex; justify-content: space-between;
}
.demo-bubble-head span { color: #d7f0ec; font-weight: 400; }
.demo-bubble-body { padding: 11px 12px 4px; }
.demo-bubble-body .t { font-size: 15px; font-weight: 700; color: #1f2937; }
.demo-bubble-body .s { font-size: 12px; color: #8a9299; margin: 2px 0 6px; }
.demo-bubble-body .s b { color: #f5a623; font-weight: 400; letter-spacing: 1px; }
.demo-bubble-body .c { font-size: 13px; color: #4b5563; }
.demo-bubble-body .ai { font-size: 11.5px; font-weight: 700; color: #0b7d70; margin-top: 10px; padding-top: 8px; border-top: 1px solid #e6f5f2; }
.demo-bubble-body .d { font-size: 13px; color: #4b5563; }
.demo-bubble-foot { padding: 10px 12px 12px; }
.demo-bubble-btn {
  display: block; width: 100%; border: none; font-family: inherit; cursor: pointer; text-align: center; font-size: 13px; font-weight: 700; border-radius: 8px; padding: 7px;
  background: #0f9d8c; color: #fff;
}
.demo-bubble-btn.sec { background: #eef1f2; color: #1f2937; cursor: default; }
.demo-bubble.good .demo-bubble-body .t { color: #0b7d70; }

.demo-caption-list { margin: 16px 0 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.demo-caption-list li {
  font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; display: flex; gap: 10px; align-items: flex-start;
}
.demo-caption-list .ic { flex: none; width: 10px; height: 10px; border-radius: 999px; margin-top: 7px; }
.demo-caption-list .ic.red { background: var(--danger); }
.demo-caption-list .ic.green { background: var(--brand); }

/* 每一步底下的上一步／下一步 */
.demo-nav { display: flex; gap: 10px; margin-top: 16px; }
.demo-nav .btn { flex: 1; text-align: center; }
.demo-nav .btn[hidden] { display: none; }

/* 最後：其他功能與結尾 */
.demo-more { margin-top: 34px; }
.demo-more h2 { font-size: 20px; text-align: center; margin-bottom: 14px; }
.demo-more-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.demo-more-list li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.demo-more-list h3 { font-size: 15.5px; margin-bottom: 2px; }
.demo-more-list p { font-size: 14px; color: var(--ink-soft); }
.demo-end { margin-top: 26px; text-align: center; }
.demo-end .btn { width: 100%; max-width: 360px; }
.demo-end .fine { font-size: 13px; color: var(--ink-soft); margin-top: 10px; }
