:root {
  /* App 夕陽 palette, shared with the app's orb and the logo */
  --primary: #d9481f;
  --primary-dark: #c2185b;
  --accent: #ffb347;
  --accent-light: #ffd166;
  --accent-ink: #b8460f;
  --p-rgb: 217, 72, 31;
  --a-rgb: 255, 179, 71;
  --rib1: #f08a24;
  --rib2: #d81b60;
  --rib3: #e8453c;
  --bg: #fffaf5;
  --bg-soft: #fcede3;
  --text: #2a1a17;
  --text-soft: #6e5a53;
  --card-bg: #ffffff;
  --card-border: rgba(42, 26, 23, 0.1);
  --nav-bg: rgba(255, 250, 245, 0.85);
  --shadow: 0 20px 45px -25px rgba(217, 72, 31, 0.4);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #e2553a;
    --accent: #ffd166;
    --accent-ink: #ffd166;
    --p-rgb: 226, 85, 58;
    --a-rgb: 255, 209, 102;
    --bg: #1a1214;
    --bg-soft: #22181a;
    --text: #f8eee9;
    --text-soft: #c2aea6;
    --card-bg: #2b1f21;
    --card-border: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(26, 18, 20, 0.85);
    --shadow: 0 20px 45px -25px rgba(226, 85, 58, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 15px;
  color: var(--text-soft);
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 60px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 480px;
  background: radial-gradient(60% 60% at 30% 20%, rgba(var(--p-rgb), 0.12), transparent),
              radial-gradient(50% 50% at 80% 10%, rgba(var(--a-rgb), 0.12), transparent);
  pointer-events: none;
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(var(--p-rgb), 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 42px;
  line-height: 1.25;
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero p.lead {
  font-size: 18px;
  color: var(--text-soft);
  margin: 0 0 30px;
  max-width: 50ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text);
  border-color: var(--card-border);
}

.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--text-soft);
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Phone mockup */
.phone-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.phone {
  width: 260px;
  border-radius: 34px;
  background: linear-gradient(160deg, #241a16, #0f0a08);
  padding: 14px;
  box-shadow: 0 30px 60px -25px rgba(0,0,0,0.5);
}

.phone-screen {
  background: var(--card-bg);
  border-radius: 24px;
  padding: 18px 16px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13px;
  max-width: 90%;
}

.chat-bubble.before {
  background: var(--bg-soft);
  color: var(--text-soft);
  align-self: flex-start;
  border: 1px dashed var(--card-border);
}

.chat-bubble.after {
  background: linear-gradient(90deg, rgba(var(--p-rgb), 0.14), rgba(var(--a-rgb), 0.14));
  align-self: flex-end;
  color: var(--text);
  font-weight: 600;
  min-height: 1.4em;
  transition: opacity 0.25s ease;
}

.chat-bubble.after.is-updating { opacity: 0.45; }

.typing-dots { display: inline-flex; gap: 4px; align-items: center; height: 1em; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.35;
  animation: typing-blink 1s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-blink {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.chip-row {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.chip {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  color: var(--text-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.chip:hover:not(.active) { border-color: var(--primary); color: var(--text); }
.chip:active { transform: scale(0.96); }
.chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.chip.active {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
}

.float-ball {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  flex-shrink: 0;
  position: absolute;
  bottom: 60px;
  right: 10px;
  width: 44px;
  height: 44px;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 10px 20px -8px rgba(var(--p-rgb), 0.45);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.float-ball:hover { transform: scale(1.06); }
.float-ball:active { transform: scale(0.92); }
.float-ball:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.float-ball-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #fff;
}

.float-ball::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
}

.float-ball.pulsing::after { animation: float-ball-ripple 0.6s ease-out; }

@keyframes float-ball-ripple {
  from { opacity: 0.6; transform: scale(0.8); }
  to { opacity: 0; transform: scale(1.6); }
}

.phone-shell {
  position: relative;
}

.phone-hint {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-soft);
  margin: 14px 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .float-ball.pulsing::after { animation: none; }
  .typing-dots span { animation: none; opacity: 0.6; }
  .chat-bubble.after { transition: none; }
}

/* Sections */
section { padding: 72px 0; }

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}

.section-head .eyebrow { margin-bottom: 14px; }

.section-head h2 {
  font-size: 30px;
  margin: 0 0 14px;
  font-weight: 800;
}

.section-head p {
  color: var(--text-soft);
  margin: 0;
}

.alt-bg { background: var(--bg-soft); }

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 28px 24px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(var(--p-rgb), 0.14), rgba(var(--a-rgb), 0.14));
  margin-bottom: 16px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14.5px;
}

/* Two-plugin section */
.plugin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.plugin-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 32px;
}

.plugin-card .badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-ink);
  background: rgba(var(--a-rgb), 0.18);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.plugin-card h3 { margin: 0 0 10px; font-size: 20px; }
.plugin-card p { margin: 0; color: var(--text-soft); font-size: 14.5px; }

/* Privacy strip */
.privacy-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.privacy-item {
  padding: 24px 16px;
}

.privacy-item .emoji { font-size: 30px; margin-bottom: 10px; }
.privacy-item h4 { margin: 0 0 6px; font-size: 15px; }
.privacy-item p { margin: 0; font-size: 13.5px; color: var(--text-soft); }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 24px 18px;
}

.step .num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 14px;
}

.step h4 { margin: 0 0 6px; font-size: 15px; }
.step p { margin: 0; font-size: 13.5px; color: var(--text-soft); }

/* Requirements table */
.req-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.req-item {
  display: flex;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 14px;
}

.req-item .label { font-weight: 700; min-width: 108px; color: var(--text); }
.req-item .value { color: var(--text-soft); }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--card-border);
  padding: 18px 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15.5px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--accent-ink);
  margin-left: 12px;
}

.faq-item[open] summary::after { content: "–"; }

.faq-item p {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 14.5px;
}

/* Final CTA */
.cta-banner {
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  border-radius: 28px;
  padding: 56px 40px;
  text-align: center;
  color: #fff;
}

.cta-banner h2 { margin: 0 0 12px; font-size: 28px; }
.cta-banner p { margin: 0 0 28px; opacity: 0.92; }
.cta-banner .btn-primary { background: #fff; color: var(--primary); box-shadow: none; }
.cta-banner .btn-secondary { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.4); }

/* Footer */
footer {
  border-top: 1px solid var(--card-border);
  padding: 44px 0 30px;
  font-size: 13.5px;
  color: var(--text-soft);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* Policy page */
.policy {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 20px 80px;
}

.policy h1 { font-size: 30px; margin-bottom: 6px; }
.policy .meta { color: var(--text-soft); font-size: 14px; margin-bottom: 36px; }
.policy h2 { font-size: 20px; margin-top: 40px; }
.policy ul { color: var(--text-soft); }
.policy p { color: var(--text-soft); }
.policy hr { border: none; border-top: 1px solid var(--card-border); margin: 48px 0; }

.lang-tab {
  display: inline-flex;
  gap: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 30px;
}

.lang-tab button {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-soft);
}

.lang-tab button.active {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  color: #fff;
}

.lang-block[hidden] { display: none; }

/* Icons (sprite symbols in each page) */
.ic {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
  color: var(--primary);
}

.eyebrow .ic { width: 22px; height: 22px; }
.trust-row .ic { width: 16px; height: 16px; }
.feature-icon .ic { width: 26px; height: 26px; }
.phone-hint .ic { vertical-align: -0.2em; }

.privacy-item .icon-box {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(var(--p-rgb), 0.12), rgba(var(--a-rgb), 0.18));
}

.privacy-item .icon-box .ic { width: 28px; height: 28px; }

/* Brand ribbons (drawn by js/ribbons.js) */
.ib-ribbon { display: block; pointer-events: none; }
.ib-ribbon-hero { position: absolute; left: 0; top: 58%; width: 100%; height: 62%; transform: translateY(-50%); z-index: -1; opacity: 0.55; }
.ib-ribbon-div { width: 150px; height: 24px; margin: 0 auto 12px; }
.cta-banner { position: relative; overflow: hidden; }
.cta-banner > *:not(.ib-ribbon) { position: relative; }
.ib-ribbon-cta { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.4; }

/* Language switch */
.nav-right { display: flex; align-items: center; gap: 12px; }

.lang-switch {
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-soft);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}

.lang-switch:hover { color: var(--text); border-color: var(--primary); }

/* People scenarios */
.people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.person-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.person-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.person-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.person-who {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
}

.person-mode {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-ink);
  background: rgba(var(--a-rgb), 0.18);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.person-before {
  font-size: 13.5px;
  color: var(--text-soft);
  text-decoration: line-through;
  text-decoration-color: rgba(var(--p-rgb), 0.4);
}

.person-after {
  font-size: 14.5px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(var(--p-rgb), 0.1), rgba(var(--a-rgb), 0.18));
}

.people-credit { text-align: center; font-size: 12px; color: var(--text-soft); margin: 22px 0 0; }

/* Responsive */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .phone-wrap { order: -1; }
  .feature-grid { grid-template-columns: 1fr; }
  .plugin-grid { grid-template-columns: 1fr; }
  .privacy-strip { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .req-grid { grid-template-columns: 1fr; }
  .people-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
}

@media (max-width: 720px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  body.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    padding: 16px 20px 20px;
    border-bottom: 1px solid var(--card-border);
    gap: 14px;
  }
  body.nav-open .nav-cta {
    display: inline-flex;
    margin: 0 20px 18px;
  }
  .hero h1 { font-size: 32px; }
}

@media (max-width: 480px) {
  .privacy-strip { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
}
