:root {
  --ink: #183047;
  --muted: #5f7184;
  --line: #d8e4ee;
  --surface: #ffffff;
  --soft: #f5f9fb;
  --accent: #13b99a;
  --accent-ink: #0d695c;
  --sun: #f5b92e;
  --blue: #189de6;
  --header-h: 64px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #eef9ff 0%, #ffffff 42%, #f7fbf9 100%);
  color: var(--ink);
}

a {
  color: inherit;
}

.home {
  min-height: 100vh;
}

.hero {
  display: grid;
  min-height: calc(100vh - var(--header-h));
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  max-width: none;
  padding: 0;
  margin: 0;
}

.hero-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h));
  overflow: hidden;
  background: linear-gradient(180deg, #28a8ec 0%, #52c7ef 58%, #1d72b9 100%);
}

.hero-media img {
  width: 100%;
  height: auto;
  max-height: 100vh;
  object-fit: contain;
  object-position: center;
  display: block;
}

.hero-content {
  display: flex;
  min-height: calc(100vh - var(--header-h));
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 60px);
}

.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(17, 82, 124, 0.18);
}

.eyebrow {
  margin: 28px 0 10px;
  color: var(--accent-ink);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 850px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.3rem, 5vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.lead {
  max-width: 560px;
  margin: 22px 0 30px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.app-store-badge {
  display: block;
  height: 54px;
  transition: opacity 160ms ease, transform 160ms ease;
}

.app-store-badge:hover,
.app-store-badge:focus-visible {
  opacity: 0.82;
  transform: translateY(-1px);
  outline: 3px solid rgba(24, 157, 230, 0.28);
  outline-offset: 2px;
}

.app-store-badge img {
  display: block;
  width: auto;
  height: 54px;
}

/* The official Google Play badge PNG has a ~41px transparent margin baked
   into its 646x250 canvas (visible pill is only 564x168), so scaling it by
   height alone renders the pill noticeably smaller than Apple's near-full-
   bleed SVG. Overscale the image and clip the container to crop that
   margin so both badges read as the same visual size. */
.app-store-badge[href*="play.google.com"] {
  width: 181px;
  overflow: hidden;
  border-radius: 8px;
}

.app-store-badge[href*="play.google.com"] img {
  height: 80px;
  width: auto;
  margin: -13px 0 0 -13px;
}

.trademark-note {
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.language-grid {
  display: grid;
  max-width: 620px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.secondary-grid {
  margin-top: 12px;
}

.language-grid a {
  display: flex;
  min-height: 104px;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(24, 48, 71, 0.07);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.language-grid a:hover,
.language-grid a:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 16px 32px rgba(19, 185, 154, 0.16);
  transform: translateY(-2px);
  outline: none;
}

.language-grid span {
  color: var(--muted);
  font-size: 0.88rem;
}

.language-grid strong {
  font-size: 1rem;
  line-height: 1.35;
}

.policy-page {
  background: var(--soft);
}

.policy-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 28px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-link img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.lang-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.lang-links a {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.lang-links a[aria-current="page"] {
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
}

.policy-card {
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(24, 48, 71, 0.08);
}

.policy-card h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.updated {
  margin: 12px 0 32px;
  color: var(--muted);
}

.policy-card h2 {
  margin: 34px 0 10px;
  font-size: 1.22rem;
  line-height: 1.35;
}

.policy-card p,
.policy-card li {
  color: #34485b;
  font-size: 1rem;
  line-height: 1.8;
}

.policy-card ul {
  padding-left: 1.25rem;
}

.policy-card a {
  color: var(--accent-ink);
  font-weight: 700;
}

footer {
  padding: 28px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-media {
    min-height: 38vh;
  }

  .hero-media img {
    max-height: 38vh;
  }

  .hero-content {
    min-height: 62vh;
    justify-content: flex-start;
  }

  .language-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero-content {
    padding: 28px 20px 44px;
  }

  .app-icon {
    width: 78px;
    height: 78px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .lang-links {
    justify-content: flex-start;
  }
}

/* --- 全域元件：導覽列與擴充區塊 --- */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2%;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

.lang-select {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

.lang-select:focus {
  border-color: var(--accent);
}

section {
  padding: 80px 2%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
  color: var(--ink);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.price-card {
  border: 1px solid var(--line);
  padding: 40px 32px;
  border-radius: 20px;
  text-align: center;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(24, 48, 71, 0.04);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.price-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(24, 48, 71, 0.08);
}

.price-card.premium {
  border: 2px solid var(--blue);
  background: linear-gradient(180deg, #ffffff 0%, #f4fbff 100%);
}

.footer-links {
  text-align: center;
  padding: 60px 20px;
  background: var(--soft);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

section[id] {
  scroll-margin-top: var(--header-h);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

body.nav-open .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .hamburger span:nth-child(2) {
  opacity: 0;
}

body.nav-open .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 880px) {
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }

  body.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
    gap: 0;
    z-index: 99;
    box-shadow: 0 8px 24px rgba(24, 48, 71, 0.1);
  }

  body.nav-open .nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }

  body.nav-open .nav-links .lang-select {
    margin: 12px 0 4px;
    width: 100%;
  }
}

#web .lead {
  margin-inline: auto;
  text-align: center;
}

.web-preview-container {
  background: var(--soft);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  border: 2px dashed var(--line);
  padding: 40px;
}

.web-entry-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(24, 48, 71, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.web-entry-link:hover,
.web-entry-link:focus-visible {
  transform: translateY(-2px);
  background: var(--blue);
  box-shadow: 0 18px 34px rgba(24, 157, 230, 0.22);
  outline: none;
}

.web-entry-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}


.usage-card {
  width: min(1040px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding: 36px 40px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(24, 48, 71, 0.08);
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.usage-card:hover,
.usage-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 24px 48px rgba(19, 185, 154, 0.14);
  outline: none;
}

.usage-card-image {
  width: 100%;
  max-width: 240px;
  justify-self: center;
  display: block;
}

.usage-card-copy {
  min-width: 0;
}

.usage-card-list {
  margin: 0;
  padding-left: 1.35rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.9;
}

.usage-card-list li + li {
  margin-top: 14px;
}

@media (max-width: 880px) {
  .usage-card {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 22px;
  }

  .usage-card-image {
    max-width: 200px;
  }
}
