:root {
  color-scheme: dark;
  --page: #0b0d1d;
  --page-soft: #111327;
  --panel: #171a31;
  --panel-strong: #20233d;
  --text: #f7f3ff;
  --muted: #b9b2cf;
  --soft: #8f88ad;
  --line: rgba(210, 199, 255, 0.16);
  --line-strong: rgba(190, 173, 255, 0.46);
  --accent: #bda8ff;
  --accent-strong: #d8ccff;
  --accent-soft: rgba(189, 168, 255, 0.12);
  --ink: #111327;
  --radius: 8px;
  --max: 1180px;
  --shadow: 0 26px 86px rgba(3, 4, 14, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(160deg, rgba(36, 35, 76, 0.22) 0%, rgba(11, 13, 29, 0) 42%),
    linear-gradient(180deg, #0b0d1d 0%, #090b18 58%, #0b0d1d 100%);
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans TC",
    "PingFang TC",
    sans-serif;
  letter-spacing: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.skip-link {
  position: fixed;
  left: 18px;
  top: 14px;
  z-index: 50;
  transform: translateY(-140%);
  border-radius: var(--radius);
  padding: 10px 14px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 850;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.home-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 24, 0.78);
  backdrop-filter: blur(18px) saturate(132%);
  -webkit-backdrop-filter: blur(18px) saturate(132%);
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 850;
}

.home-brand img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: clamp(14px, 2.4vw, 28px);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.home-nav a {
  transition: color 160ms ease;
}

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

.home-locale {
  flex: 0 0 auto;
}

.home-locale select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--text);
  background: rgba(9, 11, 24, 0.78);
  outline: 0;
}

.home-locale select:focus-visible {
  outline: 3px solid rgba(189, 168, 255, 0.72);
  outline-offset: 3px;
}

.home-nav a:focus-visible,
.button:focus-visible,
.store-badge:focus-visible,
.home-locale select:focus-visible,
.dictionary-chips button:focus-visible,
.quiz-options button:focus-visible,
.guide-links a:focus-visible,
.mobile-download:focus-visible {
  outline: 3px solid rgba(189, 168, 255, 0.72);
  outline-offset: 3px;
}

.hero-section {
  width: min(var(--max), calc(100% - 40px));
  min-height: 92dvh;
  margin: 0 auto;
  padding: 104px 0 50px;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1.14fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}

.hero-copy {
  padding-top: 16px;
}

.section-kicker {
  margin: 0 0 14px;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 850;
}

.hero-copy h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero-lead {
  width: min(520px, 100%);
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.74;
}

.hero-actions,
.store-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  font-weight: 850;
  line-height: 1;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(1px) scale(0.985);
}

.button-primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 14px 38px rgba(135, 101, 255, 0.26);
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(247, 243, 255, 0.04);
  color: var(--text);
}

.hero-media,
.dream-image-frame,
.clue-photo {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-media {
  aspect-ratio: 16 / 10;
}

.hero-media img,
.dream-image-frame img,
.clue-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after,
.dream-image-frame::after,
.clue-photo::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, transparent 62%, rgba(11, 13, 29, 0.2));
}

.signal-strip {
  width: min(var(--max), calc(100% - 40px));
  margin: -16px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.signal-strip article {
  min-height: 112px;
  padding: 22px 24px;
}

.signal-strip article + article {
  border-left: 1px solid var(--line);
}

.signal-strip span {
  display: block;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 780;
}

.signal-strip strong {
  display: block;
  margin-top: 12px;
  color: var(--text);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.35;
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(74px, 10vw, 122px) 0;
}

.section-copy {
  width: min(680px, 100%);
}

.section-copy.narrow {
  width: min(760px, 100%);
}

.section-copy h2,
.download-section h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-copy p,
.download-section p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.82;
}

.capture-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1.18fr);
  gap: clamp(36px, 7vw, 92px);
  align-items: center;
}

.feature-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.feature-line span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 14px;
  font-weight: 780;
}

.dream-image-frame {
  justify-self: end;
  width: min(560px, 100%);
  aspect-ratio: 4 / 3;
  margin: 0;
}

.dictionary-section {
  padding-top: 36px;
}

.dictionary-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 1.12fr);
  gap: clamp(26px, 5vw, 58px);
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 52px);
  background:
    linear-gradient(135deg, rgba(23, 26, 49, 0.94), rgba(11, 13, 29, 0.96)),
    linear-gradient(180deg, rgba(189, 168, 255, 0.08), rgba(189, 168, 255, 0));
  box-shadow: var(--shadow);
}

.dictionary-workbench {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.dictionary-form {
  display: grid;
  gap: 10px;
}

.dictionary-form label {
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 850;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.search-row input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 17px;
  color: var(--text);
  background: rgba(9, 11, 24, 0.76);
  outline: 0;
}

.search-row input::placeholder {
  color: var(--soft);
}

.search-row input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(189, 168, 255, 0.14);
}

.dictionary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.dictionary-chips button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  cursor: pointer;
  color: var(--text);
  background: rgba(247, 243, 255, 0.04);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.dictionary-chips button:hover,
.dictionary-chips button.is-active {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.dictionary-result {
  min-height: 190px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(9, 11, 24, 0.64);
}

.dictionary-result span,
.quiz-result span,
.clue-list span {
  display: block;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 850;
}

.dictionary-result h3,
.quiz-result h3,
.clue-list h3 {
  margin: 12px 0 0;
  color: var(--text);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.16;
}

.dictionary-result p,
.quiz-result p {
  margin: 13px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.clues-section {
  display: grid;
  gap: 34px;
}

.clue-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: stretch;
}

.clue-photo {
  min-height: 430px;
}

.clue-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.clue-list article {
  padding: clamp(22px, 4vw, 32px) 0;
}

.clue-list article + article {
  border-top: 1px solid var(--line);
}

.clue-list h3 {
  max-width: 520px;
  font-size: clamp(22px, 3.2vw, 36px);
}

.quiz-section {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 1.14fr);
  gap: clamp(28px, 6vw, 68px);
  align-items: start;
}

.quiz-layout {
  display: grid;
  gap: 14px;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quiz-options button {
  min-height: 124px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  color: var(--text);
  background: rgba(247, 243, 255, 0.04);
  text-align: left;
  font-weight: 850;
  line-height: 1.45;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.quiz-options button:hover,
.quiz-options button.is-active {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.quiz-result {
  min-height: 206px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--panel);
}

.privacy-section {
  display: grid;
  gap: 28px;
}

.privacy-rows {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.privacy-rows article {
  display: grid;
  grid-template-columns: minmax(180px, 0.38fr) minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
}

.privacy-rows article + article {
  border-top: 1px solid var(--line);
}

.privacy-rows strong {
  color: var(--text);
  font-size: 20px;
}

.privacy-rows span {
  color: var(--muted);
  line-height: 1.7;
}

.guide-section {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 1.14fr);
  gap: clamp(28px, 6vw, 68px);
  align-items: start;
}

.guide-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.guide-links a {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--text);
  background: rgba(247, 243, 255, 0.04);
  font-weight: 850;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.guide-links a:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.download-section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 52px);
  background:
    linear-gradient(90deg, rgba(11, 13, 29, 0.96), rgba(11, 13, 29, 0.72)),
    url("./assets/dashboard.webp") center / cover;
  box-shadow: var(--shadow);
}

.download-section > div:first-child {
  width: min(660px, 100%);
}

.store-actions {
  justify-content: flex-end;
}

.store-badge {
  display: inline-flex;
  width: 184px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: transform 160ms ease;
}

.store-badge:hover {
  transform: translateY(-2px);
}

.store-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 46px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 14px;
}

.home-footer div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.home-footer a:hover {
  color: var(--text);
}

.mobile-download {
  position: fixed;
  z-index: 30;
  left: 18px;
  right: 18px;
  bottom: 14px;
  display: none;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 16px 44px rgba(3, 4, 14, 0.5);
}

.campaign-popup {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 4, 14, 0.62);
  backdrop-filter: blur(10px);
}

.campaign-popup-panel {
  position: relative;
  width: min(100%, 460px);
  border: 1px solid rgba(232, 216, 154, 0.42);
  border-radius: 8px;
  background: rgba(15, 18, 38, 0.96);
  padding: 30px;
  color: var(--text);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.campaign-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.campaign-popup-close:hover {
  color: var(--text);
  border-color: rgba(232, 216, 154, 0.55);
}

.campaign-popup-eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.campaign-popup h2 {
  margin: 0;
  max-width: 13em;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

.campaign-popup-body {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.campaign-popup-details {
  margin: 18px 0 22px;
  color: var(--text);
  font-weight: 800;
}

.campaign-popup-cta {
  width: 100%;
  justify-content: center;
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition:
    opacity 620ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (max-width: 960px) {
  .home-nav {
    display: none;
  }

  .hero-section,
  .capture-section,
  .dictionary-panel,
  .clue-layout,
  .quiz-section,
  .guide-section,
  .download-section {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
    gap: 26px;
    padding-top: 88px;
    padding-bottom: 34px;
  }

  .hero-copy h1 {
    font-size: clamp(42px, 11vw, 76px);
  }

  .hero-media {
    aspect-ratio: 16 / 6;
  }

  .dictionary-chips,
  .dictionary-result {
    grid-column: 1;
  }

  .dream-image-frame {
    justify-self: start;
  }

  .clue-photo {
    min-height: 340px;
  }

  .store-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  body {
    padding-bottom: 76px;
  }

  .home-header {
    min-height: 66px;
  }

  .home-brand span {
    font-size: 16px;
  }

  .hero-section,
  .section,
  .signal-strip,
  .download-section,
  .home-footer {
    width: min(100% - 32px, var(--max));
  }

  .hero-section {
    gap: 26px;
    padding-top: 88px;
    padding-bottom: 34px;
  }

  .hero-actions,
  .search-row,
  .store-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .button,
  .search-row .button,
  .store-badge {
    width: 100%;
  }

  .hero-media {
    aspect-ratio: 4 / 3;
    max-height: 320px;
  }

  .signal-strip {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .signal-strip article + article {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .section {
    padding: 68px 0;
  }

  .section-copy h2,
  .download-section h2 {
    font-size: clamp(31px, 9vw, 42px);
    line-height: 1.14;
  }

  .dictionary-panel {
    padding: 22px;
  }

  .quiz-options,
  .guide-links {
    grid-template-columns: 1fr;
  }

  .clue-photo {
    min-height: 260px;
  }

  .privacy-rows article {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .home-footer {
    flex-direction: column;
  }

  .home-footer div {
    justify-content: flex-start;
  }

  .mobile-download {
    display: flex;
  }

  .campaign-popup {
    align-items: end;
    padding: 18px 16px 92px;
  }

  .campaign-popup-panel {
    padding: 26px 22px 22px;
  }

  .campaign-popup h2 {
    font-size: clamp(28px, 8vw, 36px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
