:root {
  --bg: #0b0b14;
  --bg-glow: #1c2350;
  --text: #f4f5fb;
  --muted: #a3a8c3;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.1);
  --accent-start: #4f8bff;
  --accent-end: #9b6bff;
  --button-text: #ffffff;
  /* QR codes need a light quiet zone to scan, in both themes. */
  --qr-background: #ffffff;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: radial-gradient(120% 60% at 50% 0%, var(--bg-glow) 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Korean breaks lines between words, not inside them. */
:lang(ko) { word-break: keep-all; }

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: max(32px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
}

.hero { text-align: center; }

.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 12px 40px rgba(79, 139, 255, 0.35);
}

h1 {
  font-size: 32px;
  line-height: 1.1;
  margin: 18px 0 6px;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 20px;
  color: var(--muted);
  margin: 0 0 24px;
}

.store-button {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  border-radius: 18px;
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
  color: var(--button-text);
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(155, 107, 255, 0.35);
  -webkit-tap-highlight-color: transparent;
}

.store-button:active { transform: scale(0.98); }

.store-buttons {
  display: grid;
  gap: 12px;
}

.store-buttons-bottom { margin-top: 8px; }

/* The second store: same size, quieter. */
.store-button-secondary {
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: none;
}

.web-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  opacity: 0.85;
}

.web-link:hover { opacity: 1; text-decoration: underline; }

/* QR code only where there's no phone to install on: wide screens with a mouse (same query as w2a.js),
   and only once w2a.js has drawn it. */
.qr-section { display: none; }

@media (min-width: 820px) and (hover: hover) and (pointer: fine) {
  .page { max-width: 640px; }
  .store-buttons { grid-template-columns: 1fr 1fr; }
  .qr-section[data-ready] {
    display: block;
    margin-top: 28px;
    padding: 24px;
    border-radius: 20px;
    background: var(--card);
    border: 1px solid var(--card-border);
  }
  .qr-title { margin: 0 0 16px; font-size: 18px; font-weight: 600; }
  .qr-card { margin: 0; text-align: center; }
  .qr-code {
    width: 220px;
    height: 220px;
    margin: 0 auto;
    padding: 16px;
    border-radius: 14px;
    background: var(--qr-background);
  }
  .qr-code svg { display: block; width: 100%; height: 100%; }
  .qr-card figcaption { margin-top: 10px; color: var(--muted); font-size: 15px; }
}

.store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.store-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}

.store-small { font-size: 13px; opacity: 0.9; }

.store-big { font-size: 22px; font-weight: 700; }


.intro {
  margin: 28px 0 24px;
  font-size: 17px;
  line-height: 1.5;
  text-align: center;
}

.section { margin: 40px 0; }

.section h2 {
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.features li {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px;
}

.features strong { display: block; font-size: 18px; margin-bottom: 4px; }

/* A feature with its App Store screenshot beside the text; the example runs full width below. */
.features .has-shot {
  display: grid;
  grid-template-columns: 1fr 34%;
  grid-template-rows: auto 1fr auto auto;
  grid-template-areas: "title shot" "text shot" "example example" "gallery gallery";
  column-gap: 14px;
}

.has-shot > strong { grid-area: title; }
.has-shot > span { grid-area: text; }
.has-shot > .example { grid-area: example; }
.has-shot > .gallery { grid-area: gallery; }

.feature-shot {
  grid-area: shot;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.gallery {
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.gallery figcaption {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.features span { color: var(--muted); font-size: 15px; line-height: 1.45; }

/* A sample question and answer under a feature, drawn as chat bubbles. */
.example {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.example p {
  margin: 0;
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.4;
}

.example .ask {
  justify-self: end;
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
  color: var(--button-text);
  border-bottom-right-radius: 4px;
}

.example .reply {
  justify-self: start;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-bottom-left-radius: 4px;
}

.tiles {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.tiles li {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px;
}

.tiles strong { display: block; font-size: 16px; margin-bottom: 4px; }

.tiles span { color: var(--muted); font-size: 14px; line-height: 1.45; }

.tiles .tile-wide { grid-column: 1 / -1; }

.bots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.bots img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

@media (max-width: 480px) {
  .bots { grid-template-columns: repeat(3, 1fr); }
}

/* Example prompts, shown as chips. */
.chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips li {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--card-border);
  font-size: 15px;
}

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 16px 16px 64px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
  color: var(--button-text);
}

.steps strong { display: block; font-size: 17px; margin-bottom: 2px; }

.steps span { color: var(--muted); font-size: 15px; }

.faq { display: grid; gap: 8px; }

.faq details {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 16px;
}

.faq summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}

.faq details p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.about p, .contact {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.contact { margin-top: 12px; font-style: normal; }

.contact a { color: var(--text); }

.footer {
  margin-top: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.footer a { color: var(--muted); margin: 0 8px; }

.redirect { text-align: center; padding-top: 25vh; }
