:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --navy: #0b1324;
  --green: #16a34a;
  --green-dark: #15803d;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Thai", "Noto Sans JP",
    "Noto Sans KR", "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: #fff; font: 17px/1.6 var(--font); }
a { color: var(--green-dark); }
h1, h2 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 4vw, 1.8rem); text-align: center; }
.wrap { width: min(1040px, 100% - 32px); margin: 0 auto; }
.narrow { max-width: 680px; }

/* Header */
.top { background: var(--navy); color: #fff; }
.top-row { display: flex; align-items: center; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.lang { position: relative; margin-left: auto; }
.lang summary { list-style: none; cursor: pointer; color: #e2e8f0; font-size: .92rem; padding: 6px 12px; border: 1px solid #334155; border-radius: 999px; }
.lang summary::-webkit-details-marker { display: none; }
.lang ul { position: absolute; right: 0; top: 42px; z-index: 20; margin: 0; padding: 6px; list-style: none; background: #fff; border-radius: 12px; box-shadow: 0 14px 34px rgba(15, 23, 42, .25); min-width: 170px; }
.lang li a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang li a[aria-current], .lang li a:hover { background: #ecfdf3; color: var(--green-dark); }
.inapp { background: #fde68a; color: #422006; padding: 10px 16px; text-align: center; font-weight: 600; }

/* Hero */
.hero { overflow: hidden; background: radial-gradient(900px 480px at 85% 0%, #1e40af 0%, transparent 60%), linear-gradient(165deg, var(--navy), #132443); color: #fff; padding: 48px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
.lead { color: #cbd5e1; font-size: clamp(1.05rem, 2.6vw, 1.25rem); margin: 0 0 28px; max-width: 30em; }

/* Download */
.dl-card { max-width: 440px; }
.dl-btn { display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px; min-height: 62px; border: 0; border-radius: 16px; background: var(--green); color: #fff; font: 700 1.25rem var(--font); cursor: pointer; box-shadow: 0 10px 30px rgba(22, 163, 74, .45); }
.dl-btn:hover { background: var(--green-dark); }
.dl-btn:disabled { opacity: .75; cursor: progress; }
.dl-meta { margin: 10px 0 0; color: #94a3b8; font-size: .92rem; text-align: center; }
.progress { height: 8px; background: rgba(255, 255, 255, .15); border-radius: 99px; overflow: hidden; margin-top: 14px; }
.progress .fill { height: 100%; width: 0; background: #4ade80; transition: width .2s; }
.dl-status { margin: 10px 0 0; text-align: center; color: #e2e8f0; font-size: .95rem; }
.dl-status:empty { display: none; }
.dl-status.ok { color: #86efac; font-weight: 700; }
.dl-status.err, .warn { color: #fca5a5; font-weight: 700; }
.dl-alt { margin-top: 12px; text-align: center; }
.dl-alt .dl-btn { display: inline; width: auto; min-height: 0; padding: 0; background: none; box-shadow: none; color: #93c5fd; font: 500 .92rem var(--font); text-decoration: underline; }
.dl-alt .progress, .dl-alt .dl-meta { display: none; }
.verify { margin-top: 14px; color: #94a3b8; font-size: .85rem; }
.verify summary { cursor: pointer; text-align: center; list-style: none; }
.verify summary::-webkit-details-marker { display: none; }
.verify dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 10px 0 0; background: rgba(255, 255, 255, .06); padding: 12px; border-radius: 10px; }
.verify dd { margin: 0; display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.verify code { font: .78rem/1.4 var(--mono); color: #e2e8f0; word-break: break-all; }
.copy { flex: 0 0 auto; font: .75rem var(--font); padding: 2px 8px; border: 1px solid #475569; border-radius: 6px; background: transparent; color: #cbd5e1; cursor: pointer; }

/* Phone mockup (pure CSS, no images) */
.phone { justify-self: center; width: 260px; padding: 12px; border-radius: 40px; background: #020617; box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 0 0 2px #334155; }
.screen { border-radius: 30px; background: #f8fafc; color: var(--ink); padding: 18px 16px 22px; min-height: 470px; display: flex; flex-direction: column; }
.bar-top { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; margin-bottom: 12px; }
.bar-top .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.nodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nodes li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; font-size: .82rem; position: relative; }
.nodes b { font-size: .78rem; background: #e2e8f0; border-radius: 6px; text-align: center; padding: 2px 0; }
.nodes i { height: 6px; border-radius: 9px; background: linear-gradient(90deg, #4ade80, #16a34a); }
.nodes .w1 { width: 92%; } .nodes .w2 { width: 80%; } .nodes .w3 { width: 70%; } .nodes .w4 { width: 55%; }
.nodes .w5 { width: 30%; background: linear-gradient(90deg, #fcd34d, #f59e0b); }
.nodes em { font-style: normal; color: var(--green-dark); font-weight: 700; }
.nodes .best { border: 2px solid var(--green); }
.nodes small { position: absolute; top: -9px; right: 10px; background: var(--green); color: #fff; font-size: .68rem; font-weight: 700; padding: 0 8px; border-radius: 99px; }
.connect { position: relative; width: 92px; height: 92px; margin: auto auto 10px; }
.connect .ring { position: absolute; inset: 0; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); animation: pulse 2.2s infinite; }
.connect .ok { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 2.4rem; font-weight: 700; }
.state { margin: 0; text-align: center; font-weight: 700; color: var(--green-dark); font-size: .92rem; }
@keyframes pulse { 70% { box-shadow: 0 0 0 18px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
@media (prefers-reduced-motion: reduce) { .connect .ring { animation: none; } }

/* Sections */
.section { padding: 52px 0; }
.alt { background: #f1f5f9; }
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.why article { text-align: center; padding: 8px 10px; }
.why .ico { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px; background: #dcfce7; font-size: 1.9rem; }
.why h3 { margin: 0 0 4px; font-size: 1.2rem; }
.why p { margin: 0; color: var(--muted); }
.pro { margin: 30px auto 0; max-width: 40em; text-align: center; color: var(--muted); font-size: .95rem; }
.steps { list-style: none; counter-reset: s; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { counter-increment: s; background: #fff; border-radius: 16px; padding: 22px 18px; text-align: center; font-weight: 600; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; }
.notice { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 14px; padding: 14px 16px; margin: 0 0 36px; color: #7c2d12; font-size: .95rem; }
details.qa { border-bottom: 1px solid var(--line); padding: 14px 4px; }
details.qa summary { cursor: pointer; font-weight: 700; }
details.qa p { margin: 8px 0 0; color: var(--muted); }

/* Footer */
.foot { background: var(--navy); color: #94a3b8; padding: 26px 0 90px; font-size: .85rem; text-align: center; }
.foot a { color: #cbd5e1; }
.langs-foot a { margin: 0 6px; }

/* Sticky mobile download button */
.sticky-cta { position: fixed; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30; min-height: 56px; border: 0; border-radius: 16px; background: var(--green); color: #fff; font: 700 1.1rem var(--font); box-shadow: 0 10px 30px rgba(15, 23, 42, .35); cursor: pointer; }
.sticky-cta[hidden] { display: none; }

@media (max-width: 800px) {
  .hero { padding: 32px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .lead, .dl-card { margin-left: auto; margin-right: auto; }
  .phone { width: 230px; }
  .screen { min-height: 410px; }
  .why, .steps { grid-template-columns: 1fr; }
  .why article { display: grid; grid-template-columns: 56px 1fr; gap: 0 14px; text-align: left; align-items: center; }
  .why .ico { grid-row: span 2; width: 56px; height: 56px; margin: 0; font-size: 1.6rem; }
  .steps li { display: flex; align-items: center; gap: 14px; text-align: left; }
  .steps li::before { margin: 0; flex: 0 0 40px; }
}
@media (min-width: 801px) { .sticky-cta { display: none; } }
