/* HanHan website. Pop theme: same colours and ink outlines as the app. */
:root {
  --bg: #F4F1FF;
  --ink: #1B1340;
  --muted: #5A5277;
  --surface: #FFFFFF;
  --violet: #6B3BFF;
  --violet-text: #5A2BE0;
  --yellow: #FFD23F;
  --pink: #FF7AA8;
  --sky: #5BC0FF;
  --mint: #3DDC97;
  --line: 2px solid var(--ink);
  --lift: 0 5px 0 var(--ink);
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Prompt", "M PLUS Rounded 1c", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
:lang(ja) body, body:lang(ja) { font-family: "Prompt", "M PLUS Rounded 1c", system-ui, sans-serif; line-height: 1.75; }
:lang(th) body, body:lang(th) { line-height: 1.7; }
a { color: var(--violet-text); }
a:hover { color: #3F17B8; }
img, svg { display: block; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
:lang(th) h1, :lang(th) h2, :lang(th) h3, :lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { letter-spacing: 0; line-height: 1.3; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border: var(--line); border-radius: 12px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }

/* Header */
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--violet); border: var(--line); box-shadow: 0 3px 0 var(--ink); display: flex; align-items: center; justify-content: center; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-left: auto; font-weight: 600; }
.main-nav a { color: var(--ink); text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.langs { display: flex; background: var(--surface); border: var(--line); border-radius: 20px; padding: 2px; }
.langs a { padding: 3px 12px; border-radius: 16px; font-size: 14px; text-decoration: none; color: var(--ink); }
.langs a[aria-current="true"] { background: var(--ink); color: #FFFFFF; }
.main-nav .langs a:hover { text-decoration: none; background: var(--bg); }
.main-nav .langs a[aria-current="true"]:hover { background: var(--ink); }

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 26px; border-radius: 30px; border: var(--line); font-size: 18px; font-weight: 700; text-decoration: none; box-shadow: var(--lift); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.btn-ink { background: var(--ink); color: #FFFFFF; box-shadow: 0 5px 0 var(--violet); }
.btn-ink:hover { color: #FFFFFF; }
.btn-light { background: var(--surface); color: var(--ink); }
.btn-light:hover { color: var(--ink); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { color: var(--ink); }
.btn[aria-disabled="true"] { cursor: default; }
.chip { display: inline-block; background: var(--surface); border: var(--line); border-radius: 14px; padding: 2px 12px; font-size: 15px; font-weight: 600; }
.chip-yellow { background: var(--yellow); }
.chip-ink { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Cards */
.card { border: var(--line); box-shadow: 0 6px 0 var(--ink); border-radius: 28px; padding: 28px; background: var(--surface); }
.card h2 { font-size: 30px; }
.card h3 { font-size: 26px; }
.card > * + * { margin-top: 12px; }
.bg-yellow { background: var(--yellow); }
.bg-pink { background: var(--pink); }
.bg-sky { background: var(--sky); }
.bg-mint { background: var(--mint); }
.bg-violet { background: var(--violet); color: #FFFFFF; }
.icon-tile { width: 56px; height: 56px; border-radius: 18px; background: var(--surface); border: var(--line); display: flex; align-items: center; justify-content: center; }

/* Home */
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 32px; padding-bottom: 72px; }
.hero-copy { flex: 1 1 440px; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.hero h1 { font-size: clamp(46px, 7vw, 80px); line-height: 1.02; }
:lang(th) .hero h1, :lang(ja) .hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.2; }
.hero h1 em { font-style: normal; color: var(--violet); }
.lead { font-size: 20px; max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.fineprint { font-size: 15px; color: var(--muted); }

.phone { flex: 0 0 auto; margin: 0 auto; width: 300px; height: 600px; border-radius: 50px; background: var(--ink); padding: 11px; box-shadow: 12px 14px 0 var(--pink); }
.screen { position: relative; height: 100%; border-radius: 40px; background: var(--bg); overflow: hidden; padding: 42px 13px 13px; display: flex; flex-direction: column; gap: 11px; font-size: 13px; line-height: 1.35; }
.mini-switch { align-self: center; display: flex; background: var(--surface); border: var(--line); border-radius: 20px; padding: 2px; }
.mini-switch span { width: 66px; height: 28px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.mini-switch .on { background: var(--violet); color: #FFFFFF; font-weight: 700; }
.mini-card { border: var(--line); border-radius: 18px; padding: 11px; box-shadow: 0 3px 0 var(--ink); }
.mini-card b { display: block; font-size: 16px; }
.mini-card .big { font-size: 25px; font-weight: 800; }
.mini-row { display: flex; gap: 8px; }
.mini-row .mini-card { flex: 1; box-shadow: none; font-weight: 700; }
.mini-note { background: var(--surface); border: var(--line); border-radius: 16px; padding: 10px; }
.mini-note b { color: #C2185B; }
.mini-bar { position: absolute; left: 13px; right: 13px; bottom: 16px; display: flex; gap: 6px; }
.mini-bar span { height: 44px; border: var(--line); border-radius: 22px; }
.mini-bar .dot { width: 44px; }
.mini-bar .add { flex: 1; background: var(--violet); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }

.section { padding-bottom: 72px; }
.section > .wrap > h2 { font-size: clamp(32px, 4.4vw, 50px); margin-bottom: 28px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.band { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; padding: 40px; border-radius: 32px; }
.band-copy { flex: 1 1 360px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.band h2 { font-size: clamp(30px, 3.8vw, 44px); }
.budget { flex: 0 1 320px; display: flex; gap: 16px; align-items: center; background: var(--surface); border: var(--line); border-radius: 24px; padding: 20px; }
.ring { width: 84px; height: 84px; flex-shrink: 0; border-radius: 50%; border: var(--line); background: conic-gradient(var(--violet) 0 73%, var(--bg) 73% 100%); display: flex; align-items: center; justify-content: center; }
.ring span { width: 54px; height: 54px; border-radius: 50%; background: var(--surface); border: var(--line); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.budget small { display: block; color: var(--muted); font-size: 14px; }
.budget strong { display: block; font-size: 26px; line-height: 1.2; }
.trio h3 { font-size: 22px; margin-bottom: 6px; }
.cta { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 48px 28px; }
.cta h2 { font-size: clamp(30px, 4vw, 50px); }

/* Article pages (privacy, terms) */
.page-head { padding-top: 24px; padding-bottom: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.page-head h1 { font-size: clamp(38px, 5.5vw, 58px); }
.page-head .lead { color: var(--ink); }
.updated { color: var(--muted); font-size: 15px; }
.doc { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-bottom: 80px; }
.toc { flex: 0 1 250px; position: sticky; top: 16px; background: var(--surface); border: var(--line); border-radius: 20px; padding: 18px; font-size: 15px; }
.toc b { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.prose { flex: 1 1 560px; max-width: 46rem; }
.prose h2 { font-size: 26px; margin: 34px 0 10px; scroll-margin-top: 16px; }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 12px; }
.prose ul { margin: 0; padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.summary { background: var(--mint); border: var(--line); box-shadow: 0 4px 0 var(--ink); border-radius: 20px; padding: 18px 20px; }

/* Support */
.support { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; padding-bottom: 80px; }
.faq { flex: 1 1 560px; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--surface); border: var(--line); border-radius: 20px; padding: 16px 20px; }
.faq summary { font-size: 19px; font-weight: 700; cursor: pointer; }
.faq details p { margin-top: 10px; }
.aside { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; }
.aside .card { padding: 24px; }
.aside h2 { font-size: 24px; }

/* Footer */
.site-footer { border-top: var(--line); background: var(--surface); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 26px; padding-bottom: 30px; font-size: 15px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-left: auto; }
.site-footer a { color: var(--ink); }
.site-footer .muted { color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .main-nav { margin-left: 0; width: 100%; }
  .langs { margin-left: auto; }
  .hero .wrap { padding-top: 16px; gap: 36px; }
  .lead { font-size: 18px; }
  .actions, .actions .btn { width: 100%; }
  .card { padding: 22px; }
  .band { padding: 24px; }
  .toc { position: static; flex-basis: 100%; }
  .site-footer nav { margin-left: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform .08s, box-shadow .08s; }
}
